diff options
Diffstat (limited to 'plugins/AVS/src')
-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))
{
|