summaryrefslogtreecommitdiff
path: root/tipper/m_tipper.h
blob: e5a5a16d9625522469b0f55e6af76924c635d7e1 (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
33
34
35
36
37
38
39
40
41
// Tipper API
// note: Tipper is internally unicode and requires unicows.dll to function correctly on 95/98/ME
//		so you'll find a lot of wchar_t stuff in here

// translation function type
// use hContact, module and setting to read your db value(s) and put the resulting string into buff
// return buff if the translation was successful, or return 0 for failure
typedef TCHAR *(TranslateFunc)(HANDLE hContact, const char *module, const char *setting_or_prefix, TCHAR *buff, int bufflen);

typedef struct {
	TranslateFunc *tfunc;	// address of your translation function (see typedef above)
	const TCHAR *name;	// make sure this is unique, and DO NOT translate it
	DWORD id;					// will be overwritten by Tipper - do not use
} DBVTranslation;

// add a translation to tipper
// wParam not used
// lParam = (DBVTranslation *)translation
#define MS_TIPPER_ADDTRANSLATION	 "Tipper/AddTranslation"


/////////////////////
///// This service is NOT implemented by tipper - it is to be implemented by plugins that extend the basic away message services
///// so that tipper has a common interface to use
////////////////////

// wParam - (WORD)wStatus
// lParam - (char *)szProto
// returns (char *)szStatusMessage
#define MS_AWAY_GETPROTOSTATUSMESSAGE      "Away/GetProtoStatusMsg"

// wParam - (WORD)wStatus
// lParam - (wchar_t *)swzProto
// returns (wchar_t *)swzStatusMessage
#define MS_AWAY_GETPROTOSTATUSMESSAGEW     "Away/GetProtoStatusMsgW"

#ifdef _UNICODE
#define MS_AWAY_GETPROTOSTATUSMESSAGET     MS_AWAY_GETPROTOSTATUSMESSAGEW
#else 
#define MS_AWAY_GETPROTOSTATUSMESSAGET     MS_AWAY_GETPROTOSTATUSMESSAGE
#endif