diff options
author | George Hazan <george.hazan@gmail.com> | 2012-11-25 12:54:45 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-11-25 12:54:45 +0000 |
commit | bd8a04455d9c991c15df2287e091abe4ba054efb (patch) | |
tree | 6af5485d60feef741669eb545a6378e7c209ab59 /plugins/AVS | |
parent | 7fdce14cd488e25e8e32e34098fbe9f5cb3021b7 (diff) |
typed stub for MS_PROTO_GETCONTACTBASEPROTO
git-svn-id: http://svn.miranda-ng.org/main/trunk@2480 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/AVS')
-rw-r--r-- | plugins/AVS/src/acc.cpp | 2 | ||||
-rw-r--r-- | plugins/AVS/src/main.cpp | 16 | ||||
-rw-r--r-- | plugins/AVS/src/options.cpp | 6 | ||||
-rw-r--r-- | plugins/AVS/src/poll.cpp | 2 |
4 files changed, 13 insertions, 13 deletions
diff --git a/plugins/AVS/src/acc.cpp b/plugins/AVS/src/acc.cpp index 507245fca8..00e0c644c8 100644 --- a/plugins/AVS/src/acc.cpp +++ b/plugins/AVS/src/acc.cpp @@ -567,7 +567,7 @@ static LRESULT CALLBACK ACCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l DestroyAnimation(hwnd, data);
data->hContact = (HANDLE) lParam;
- lstrcpynA(data->proto, (char*) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)data->hContact, 0), sizeof(data->proto));
+ lstrcpynA(data->proto, GetContactProto(data->hContact), sizeof(data->proto));
StartAnimation(hwnd, data);
diff --git a/plugins/AVS/src/main.cpp b/plugins/AVS/src/main.cpp index 91ba752a27..251c612c41 100644 --- a/plugins/AVS/src/main.cpp +++ b/plugins/AVS/src/main.cpp @@ -165,7 +165,7 @@ int _DebugTrace(HANDLE hContact, const char *fmt, ...) if (hContact != NULL)
{
name = (char*) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, 0);
- proto = (char*) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ proto = GetContactProto(hContact);
}
mir_snprintf(text, SIZEOF(text) - 10, " ***** AVS [%08d] [ID:%04x]: [%08d - %s - %s] ",
@@ -252,7 +252,7 @@ static void NotifyMetaAware(HANDLE hContact, struct CacheNode *node = NULL, AVAT cacn.filename[MAX_PATH - 1] = 0;
// Get hash
- char *szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *szProto = GetContactProto(hContact);
if (szProto != NULL) {
DBVARIANT dbv = {0};
if (!DBGetContactSetting(hContact, szProto, "AvatarHash", &dbv)) {
@@ -434,7 +434,7 @@ int CreateAvatarInCache(HANDLE hContact, avatarCacheEntry *ace, char *szProto) ace->szFilename[0] = 0;
if (szProto == NULL) {
- char *proto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *proto = GetContactProto(hContact);
if (proto == NULL || !DBGetContactSettingByte(NULL, AVS_MODULE, proto, 1)) {
return -1;
}
@@ -639,7 +639,7 @@ struct CacheNode *FindAvatarInCache(HANDLE hContact, BOOL add, BOOL findAny = FA {
struct CacheNode *cacheNode = g_Cache, *foundNode = NULL;
- char *szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *szProto = GetContactProto(hContact);
if (szProto == NULL || !DBGetContactSettingByte(NULL, AVS_MODULE, szProto, 1))
return NULL;
@@ -749,7 +749,7 @@ static int ProtocolAck(WPARAM wParam, LPARAM lParam) }
else if (ack->result == ACKRESULT_STATUS)
{
- char *szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)ack->hContact, 0);
+ char *szProto = GetContactProto(ack->hContact);
if (szProto == NULL || Proto_NeedDelaysForAvatars(szProto))
{
// Queue
@@ -1702,7 +1702,7 @@ INT_PTR GetMyAvatar(WPARAM wParam, LPARAM lParam) static protoPicCacheEntry *GetProtoDefaultAvatar(HANDLE hContact)
{
- char *szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *szProto = GetContactProto(hContact);
if (szProto) {
for(int i = 0; i < g_ProtoPictures.getCount(); i++) {
protoPicCacheEntry& p = g_ProtoPictures[i];
@@ -1818,7 +1818,7 @@ static void PicLoader(LPVOID param) if (result == -2)
{
- char *szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)node->ace.hContact, 0);
+ char *szProto = GetContactProto(node->ace.hContact);
if (szProto == NULL || Proto_NeedDelaysForAvatars(szProto))
{
QueueAdd(node->ace.hContact);
@@ -2373,7 +2373,7 @@ static int OnDetailsInit(WPARAM wParam, LPARAM lParam) }
else
{
- char *szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *szProto = GetContactProto(hContact);
if (szProto == NULL || DBGetContactSettingByte(NULL, AVS_MODULE, szProto, 1))
{
// Contact dialog
diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp index 54858c99c3..218a092e85 100644 --- a/plugins/AVS/src/options.cpp +++ b/plugins/AVS/src/options.cpp @@ -437,7 +437,7 @@ INT_PTR CALLBACK DlgProcOptionsProtos(HWND hwndDlg, UINT msg, WPARAM wParam, LPA HANDLE hContact = db_find_first();
while (hContact != NULL)
{
- char* szContactProto = (char*) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ char* szContactProto = GetContactProto(hContact);
if (szContactProto != NULL && !strcmp(szContactProto, szProto))
DeleteAvatarFromCache(hContact, TRUE);
@@ -613,7 +613,7 @@ INT_PTR CALLBACK DlgProcAvatarOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPA case IDC_RESET:
{
- char *szProto = ( char* )CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *szProto = GetContactProto(hContact);
DBVARIANT dbv = {0};
ProtectAvatar((WPARAM)hContact, 0);
@@ -844,7 +844,7 @@ INT_PTR CALLBACK DlgProcAvatarUserInfo(HWND hwndDlg, UINT msg, WPARAM wParam, LP }
case IDC_RESET:
{
- char *szProto = ( char* )CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *szProto = GetContactProto(hContact);
DBVARIANT dbv = {0};
ProtectAvatar((WPARAM)hContact, 0);
diff --git a/plugins/AVS/src/poll.cpp b/plugins/AVS/src/poll.cpp index d93ef5309c..3fb4263497 100644 --- a/plugins/AVS/src/poll.cpp +++ b/plugins/AVS/src/poll.cpp @@ -230,7 +230,7 @@ int FetchAvatarFor(HANDLE hContact, char *szProto = NULL) int result = GAIR_NOAVATAR;
if (szProto == NULL)
- szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ szProto = GetContactProto(hContact);
if (szProto != NULL && PollProtocolCanHaveAvatar(szProto) && PollContactCanHaveAvatar(hContact, szProto))
{
|