summaryrefslogtreecommitdiff
path: root/include/m_idle.h
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-12-10 15:24:14 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-12-10 15:24:14 +0300
commitc9265783b1bf4a9cea1fd63e633ced6e66a154fc (patch)
treee64e3ec5b96adcb0121e2e6395f0767766bc5195 /include/m_idle.h
parent926a493a89fbe3d56b7f2b5a3160dc949b401529 (diff)
Miranda idle code cleaning
Diffstat (limited to 'include/m_idle.h')
-rw-r--r--include/m_idle.h35
1 files changed, 21 insertions, 14 deletions
diff --git a/include/m_idle.h b/include/m_idle.h
index 58d786ac8a..203228e030 100644
--- a/include/m_idle.h
+++ b/include/m_idle.h
@@ -31,9 +31,6 @@ for "long" idle. Thie module will generate long/short events based on these user
and other information too. If you are unsure which idle mode to report for, report it
for short idle.*/
-#define IDF_ISIDLE 0x1 // idle has become active (if not set, inactive)
-#define IDF_PRIVACY 0x8 // if set, the information provided shouldn't be given to third parties.
-
/*
wParam: 0
lParam: IDF_* (or'd field)
@@ -47,18 +44,11 @@ for short idle.*/
set.
Version: 0.3.4a+ (2004/09/16)
*/
-#define ME_IDLE_CHANGED "Miranda/Idle/Changed"
-typedef struct {
- int cbSize; // sizeof()
- int idleTime; // idle in mins, if zero then disabled
- int privacy; // user doesnt want other people seeing anything more than they are idle
- int aaStatus; // status to go to when user is auto away
- int aaLock; // the status shouldn't be unset if its set
- int idleType;
- int idlesoundsoff;
-}
- MIRANDA_IDLE_INFO;
+#define IDF_ISIDLE 0x1 // idle has become active (if not set, inactive)
+#define IDF_PRIVACY 0x8 // if set, the information provided shouldn't be given to third parties.
+
+#define ME_IDLE_CHANGED "Miranda/Idle/Changed"
/*
wParam; 0
@@ -69,6 +59,23 @@ typedef struct {
Version: 0.3.4 (2004/09/16)
*/
+struct MIRANDA_IDLE_INFO
+{
+ int cbSize; // sizeof()
+ int idleTime; // idle in mins, if zero then disabled
+ int privacy; // user doesnt want other people seeing anything more than they are idle
+ int aaStatus; // status to go to when user is auto away
+ int aaLock; // the status shouldn't be unset if its set
+ int idleType;
+ int idlesoundsoff;
+};
+
#define MS_IDLE_GETIDLEINFO "Miranda/Idle/GetInfo"
+__forceinline int Idle_GetInfo(MIRANDA_IDLE_INFO &pInfo)
+{
+ pInfo.cbSize = sizeof(MIRANDA_IDLE_INFO);
+ return CallService(MS_IDLE_GETIDLEINFO, 0, (LPARAM)&pInfo);
+}
+
#endif // M_IDLE_H__