diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-01 18:10:32 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-01 18:10:32 +0000 |
commit | 2bb514f4195c99b52e0ec748c975c0fd30dbbd25 (patch) | |
tree | e7325f314a828e1233b89ef688e6e52a8846925a /plugins/AVS | |
parent | a59538975c7fef04bcbf9e62b81c78753ac2a16c (diff) |
another bunch of dead crutches: non-unicode avatar services
git-svn-id: http://svn.miranda-ng.org/main/trunk@13961 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/AVS')
-rw-r--r-- | plugins/AVS/src/image_utils.cpp | 2 | ||||
-rw-r--r-- | plugins/AVS/src/main.cpp | 4 | ||||
-rw-r--r-- | plugins/AVS/src/options.cpp | 2 | ||||
-rw-r--r-- | plugins/AVS/src/poll.cpp | 22 | ||||
-rw-r--r-- | plugins/AVS/src/stdafx.h | 2 | ||||
-rw-r--r-- | plugins/AVS/src/utils.cpp | 4 |
6 files changed, 13 insertions, 23 deletions
diff --git a/plugins/AVS/src/image_utils.cpp b/plugins/AVS/src/image_utils.cpp index 9ab45c6516..c478f8bd3e 100644 --- a/plugins/AVS/src/image_utils.cpp +++ b/plugins/AVS/src/image_utils.cpp @@ -553,7 +553,7 @@ BOOL MakeTransparentBkg(MCONTACT hContact, HBITMAP *hBitmap) int SaveAvatar(const char *protocol, const TCHAR *tszFileName)
{
- INT_PTR result = CallProtoService(protocol, PS_SETMYAVATART, 0, (LPARAM)tszFileName);
+ INT_PTR result = CallProtoService(protocol, PS_SETMYAVATAR, 0, (LPARAM)tszFileName);
if (result == CALLSERVICE_NOTFOUND)
result = CallProtoService(protocol, PS_SETMYAVATAR, 0, _T2A(tszFileName));
diff --git a/plugins/AVS/src/main.cpp b/plugins/AVS/src/main.cpp index 247872ac8c..a7e7e97d06 100644 --- a/plugins/AVS/src/main.cpp +++ b/plugins/AVS/src/main.cpp @@ -87,10 +87,10 @@ static int ProtocolAck(WPARAM, LPARAM lParam) if (ack->hProcess == NULL)
ProcessAvatarInfo(ack->hContact, GAIR_NOAVATAR, NULL, ack->szModule);
else
- ProcessAvatarInfo(ack->hContact, GAIR_SUCCESS, (PROTO_AVATAR_INFORMATIONT *)ack->hProcess, ack->szModule);
+ ProcessAvatarInfo(ack->hContact, GAIR_SUCCESS, (PROTO_AVATAR_INFORMATION *)ack->hProcess, ack->szModule);
}
else if (ack->result == ACKRESULT_FAILED) {
- ProcessAvatarInfo(ack->hContact, GAIR_FAILED, (PROTO_AVATAR_INFORMATIONT *)ack->hProcess, ack->szModule);
+ ProcessAvatarInfo(ack->hContact, GAIR_FAILED, (PROTO_AVATAR_INFORMATION *)ack->hProcess, ack->szModule);
}
else if (ack->result == ACKRESULT_STATUS) {
char *szProto = GetContactProto(ack->hContact);
diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp index 02ec9a34e0..4dc593fcd2 100644 --- a/plugins/AVS/src/options.cpp +++ b/plugins/AVS/src/options.cpp @@ -902,7 +902,7 @@ static void EnableDisableControls(HWND hwndDlg, char *proto) EnableWindow(GetDlgItem(hwndDlg, IDC_DELETE), FALSE); } else { - if (!ProtoServiceExists(proto, PS_SETMYAVATAR) && !ProtoServiceExists(proto, PS_SETMYAVATARW)) { + if (!ProtoServiceExists(proto, PS_SETMYAVATAR)) { EnableWindow(GetDlgItem(hwndDlg, IDC_CHANGE), FALSE); EnableWindow(GetDlgItem(hwndDlg, IDC_DELETE), FALSE); } diff --git a/plugins/AVS/src/poll.cpp b/plugins/AVS/src/poll.cpp index 4911fb0e41..a0d92ebc98 100644 --- a/plugins/AVS/src/poll.cpp +++ b/plugins/AVS/src/poll.cpp @@ -140,7 +140,7 @@ void QueueAdd(MCONTACT hContact) QueueAdd(hContact, waitTime);
}
-void ProcessAvatarInfo(MCONTACT hContact, int type, PROTO_AVATAR_INFORMATIONT *pai, const char *szProto)
+void ProcessAvatarInfo(MCONTACT hContact, int type, PROTO_AVATAR_INFORMATION *pai, const char *szProto)
{
QueueRemove(hContact);
@@ -201,24 +201,14 @@ int FetchAvatarFor(MCONTACT hContact, char *szProto) if (szProto != NULL && PollProtocolCanHaveAvatar(szProto) && PollContactCanHaveAvatar(hContact, szProto)) {
// Can have avatar, but must request it?
- if ((g_AvatarHistoryAvail && CallService(MS_AVATARHISTORY_ENABLED, hContact, 0)) ||
- (PollCheckProtocol(szProto) && PollCheckContact(hContact)))
+ if ((g_AvatarHistoryAvail && CallService(MS_AVATARHISTORY_ENABLED, hContact, 0)) || (PollCheckProtocol(szProto) && PollCheckContact(hContact)))
{
// Request it
- PROTO_AVATAR_INFORMATIONT pai_s = { 0 };
- pai_s.cbSize = sizeof(pai_s);
+ PROTO_AVATAR_INFORMATION pai_s = { 0 };
pai_s.hContact = hContact;
- INT_PTR res = CallProtoService(szProto, PS_GETAVATARINFOT, GAIF_FORCE, (LPARAM)&pai_s);
- if (res == CALLSERVICE_NOTFOUND) {
- PROTO_AVATAR_INFORMATION pai = { 0 };
- pai.cbSize = sizeof(pai);
- pai.hContact = hContact;
- res = CallProtoService(szProto, PS_GETAVATARINFO, GAIF_FORCE, (LPARAM)&pai);
- MultiByteToWideChar(CP_ACP, 0, pai.filename, -1, pai_s.filename, SIZEOF(pai_s.filename));
- pai_s.format = pai.format;
- }
-
- if (res != CALLSERVICE_NOTFOUND) result = res;
+ INT_PTR res = CallProtoService(szProto, PS_GETAVATARINFO, GAIF_FORCE, (LPARAM)&pai_s);
+ if (res != CALLSERVICE_NOTFOUND)
+ result = res;
ProcessAvatarInfo(pai_s.hContact, result, &pai_s, szProto);
}
}
diff --git a/plugins/AVS/src/stdafx.h b/plugins/AVS/src/stdafx.h index 2331595a0c..89e9ba9dbe 100644 --- a/plugins/AVS/src/stdafx.h +++ b/plugins/AVS/src/stdafx.h @@ -153,7 +153,7 @@ INT_PTR ReportMyAvatarChanged(WPARAM wParam, LPARAM lParam); MCONTACT GetContactThatHaveTheAvatar(MCONTACT hContact, int locked = -1);
-void ProcessAvatarInfo(MCONTACT hContact, int type, PROTO_AVATAR_INFORMATIONT *pai, const char *szProto);
+void ProcessAvatarInfo(MCONTACT hContact, int type, PROTO_AVATAR_INFORMATION *pai, const char *szProto);
int Proto_GetDelayAfterFail(const char *proto);
BOOL Proto_NeedDelaysForAvatars(const char *proto);
diff --git a/plugins/AVS/src/utils.cpp b/plugins/AVS/src/utils.cpp index d4d6c9e49e..a1863a9f42 100644 --- a/plugins/AVS/src/utils.cpp +++ b/plugins/AVS/src/utils.cpp @@ -119,8 +119,8 @@ int CreateAvatarInCache(MCONTACT hContact, avatarCacheEntry *ace, char *szProto) else
return -10;
}
- else if (ProtoServiceExists(szProto, PS_GETMYAVATART)) {
- if (CallProtoService(szProto, PS_GETMYAVATART, (WPARAM)tszFilename, (LPARAM)MAX_PATH))
+ else if (ProtoServiceExists(szProto, PS_GETMYAVATAR)) {
+ if (CallProtoService(szProto, PS_GETMYAVATAR, (WPARAM)tszFilename, (LPARAM)MAX_PATH))
tszFilename[0] = '\0';
}
else if (ProtoServiceExists(szProto, PS_GETMYAVATAR)) {
|