diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2016-04-22 16:53:14 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2016-04-22 16:53:14 +0000 |
commit | 17da1798498188c1f221e738866107e69d6af066 (patch) | |
tree | 64da750c77dcf7ab12654d3fe22d2abeb8f8f3e9 /plugins/MessageState/src/global.h | |
parent | 2db93e0b278176b4dd68e8565ddab139d86c6e7b (diff) |
MessageState: code cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@16747 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MessageState/src/global.h')
-rw-r--r-- | plugins/MessageState/src/global.h | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/plugins/MessageState/src/global.h b/plugins/MessageState/src/global.h index 5734fba61d..9260116846 100644 --- a/plugins/MessageState/src/global.h +++ b/plugins/MessageState/src/global.h @@ -1,42 +1,29 @@ #ifndef _GLOBAL_H_
#define _GLOBAL_H_
-static LIST<void> arMonitoredWindows(3, PtrKeySortT);
-
-static IconItem Icons[] =
-{
- { LPGEN("Unread message icon"), "unread_icon", IDI_UNREAD },
- { LPGEN("Read message icon"), "read_icon", IDI_READ },
- { LPGEN("Failed sending icon"), "fail_icon", IDI_FAIL },
- { LPGEN("Sending message icon"), "nosent_icon", IDI_NOSENT },
- { LPGEN("Unread clist extra icon"), "clist_unread_icon", IDI_EXTRA },
-};
-
enum SRMM_ICON_TYPE
{
- ICON_HIDDEN,
- ICON_READ,
+ ICON_HIDDEN = -1,
ICON_UNREAD,
+ ICON_READ,
ICON_FAILED,
- ICON_NOSENT
+ ICON_NOSENT,
+ ICON_EXTRA,
};
-#define FLAG_CONTAINS(x,y) ((x & y) == y)
-
#define DBKEY_MESSAGE_READ_TIME "LastMsgReadTime"
#define DBKEY_MESSAGE_READ_TIME_TYPE "LastMsgReadTimeType"
__forceinline bool CheckProtoSupport(const char *szProto)
-{ return ((szProto != NULL) ? FLAG_CONTAINS(CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0), PF4_READNOTIFY) : false);
+{ return (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_READNOTIFY) != 0;
}
void InitServices();
-void DestroyServices();
INT_PTR UpdateService(WPARAM, LPARAM);
-int IconsUpdate(WPARAM hContact, LONGLONG readtime);
+int IconsUpdate(MCONTACT);
void SetSRMMIcon(MCONTACT hContact, SRMM_ICON_TYPE type, time_t time = 0);
-LONGLONG GetLastSentMessageTime(MCONTACT hContact);
+time_t GetLastSentMessageTime(MCONTACT hContact);
int OnModulesLoaded(WPARAM, LPARAM);
bool HasUnread(MCONTACT hContact);
int ExtraIconsApply(WPARAM hContact, LPARAM);
|