summaryrefslogtreecommitdiff
path: root/plugins/MessageState/src/global.h
blob: 12c0ee69c2dd745b2b41ea828f8abd28781511b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef _GLOBAL_H_
#define _GLOBAL_H_

enum SRMM_ICON_TYPE
{
	ICON_HIDDEN = -1,
	ICON_UNREAD,
	ICON_READ,
	ICON_FAILED,
	ICON_NOSENT,
	ICON_EXTRA,
};

#define DBKEY_MESSAGE_READ_TIME "LastMsgReadTime"
#define DBKEY_MESSAGE_READ_TIME_TYPE "LastMsgReadTimeType"

__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);
time_t GetLastSentMessageTime(MCONTACT hContact);
int OnModulesLoaded(WPARAM, LPARAM);
bool HasUnread(MCONTACT hContact);
int ExtraIconsApply(WPARAM hContact, LPARAM);
void InitClistExtraIcon();

#endif //_GLOBAL_H_