diff options
Diffstat (limited to 'plugins/MessageState/src/global.h')
-rw-r--r-- | plugins/MessageState/src/global.h | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/plugins/MessageState/src/global.h b/plugins/MessageState/src/global.h index 9260116846..0413f2535d 100644 --- a/plugins/MessageState/src/global.h +++ b/plugins/MessageState/src/global.h @@ -1,32 +1,43 @@ #ifndef _GLOBAL_H_
#define _GLOBAL_H_
-enum SRMM_ICON_TYPE
+/////////////////////////////////////////////////////////////////////////////////////////
+
+struct ContactData
{
- ICON_HIDDEN = -1,
- ICON_UNREAD,
- ICON_READ,
- ICON_FAILED,
- ICON_NOSENT,
- ICON_EXTRA,
+ ContactData(MCONTACT _p1) :
+ hContact(_p1)
+ {}
+
+ MCONTACT hContact;
+
+ int type = -1, bHidden = true;
+ __time64_t dwLastReadTime = 0, dwLastSentTime = 0;
+
+ void __forceinline setSent(__time64_t _time)
+ {
+ dwLastSentTime = _time;
+ type = 0;
+ }
};
-#define DBKEY_MESSAGE_READ_TIME "LastMsgReadTime"
-#define DBKEY_MESSAGE_READ_TIME_TYPE "LastMsgReadTimeType"
+extern OBJLIST<ContactData> g_arContacts;
+
+ContactData* FindContact(MCONTACT);
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
__forceinline bool CheckProtoSupport(const char *szProto)
{ return (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_READNOTIFY) != 0;
}
void InitServices();
-INT_PTR UpdateService(WPARAM, LPARAM);
-int IconsUpdate(MCONTACT);
-void SetSRMMIcon(MCONTACT hContact, SRMM_ICON_TYPE type, time_t time = 0);
+void IconsUpdate(MCONTACT);
+void SetSRMMIcon(MCONTACT hContact, int type, time_t time = 0);
time_t GetLastSentMessageTime(MCONTACT hContact);
int OnModulesLoaded(WPARAM, LPARAM);
bool HasUnread(MCONTACT hContact);
-int ExtraIconsApply(WPARAM hContact, LPARAM);
-void InitClistExtraIcon();
#endif //_GLOBAL_H_
\ No newline at end of file |