From 2bb514f4195c99b52e0ec748c975c0fd30dbbd25 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 1 Jun 2015 18:10:32 +0000 Subject: 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 --- include/delphi/m_protocols.inc | 15 +------- include/m_avatars.h | 25 +++---------- include/m_protocols.h | 34 ++++-------------- include/m_string.h | 8 ++--- plugins/AVS/src/image_utils.cpp | 2 +- plugins/AVS/src/main.cpp | 4 +-- plugins/AVS/src/options.cpp | 2 +- plugins/AVS/src/poll.cpp | 22 ++++-------- plugins/AVS/src/stdafx.h | 2 +- plugins/AVS/src/utils.cpp | 4 +-- plugins/NewsAggregator/Src/CheckFeed.cpp | 12 +++---- plugins/NewsAggregator/Src/NewsAggregator.cpp | 2 +- plugins/NewsAggregator/Src/Services.cpp | 2 +- plugins/Scriver/src/msgdialog.cpp | 4 +-- plugins/Weather/src/weather_svcs.cpp | 7 ++-- protocols/AimOscar/src/avatars.cpp | 4 +-- protocols/AimOscar/src/proto.cpp | 6 ++-- protocols/AimOscar/src/services.cpp | 4 +-- protocols/FacebookRM/src/avatars.cpp | 10 +++--- protocols/FacebookRM/src/proto.cpp | 4 +-- protocols/FacebookRM/src/proto.h | 2 +- protocols/Gadu-Gadu/src/avatar.cpp | 8 ++--- protocols/Gadu-Gadu/src/core.cpp | 4 +-- protocols/Gadu-Gadu/src/gg_proto.cpp | 6 ++-- protocols/Gadu-Gadu/src/services.cpp | 8 ++--- protocols/IcqOscarJ/src/icq_avatar.cpp | 2 +- protocols/IcqOscarJ/src/icq_proto.cpp | 6 ++-- protocols/IcqOscarJ/src/icqosc_svcs.cpp | 2 +- protocols/JabberG/src/jabber_iqid.cpp | 3 +- protocols/JabberG/src/jabber_proto.cpp | 6 ++-- protocols/JabberG/src/jabber_svc.cpp | 2 +- protocols/JabberG/src/jabber_util.cpp | 3 +- protocols/MRA/src/MraAvatars.cpp | 9 ++--- protocols/MRA/src/MraProto.cpp | 4 +-- protocols/MRA/src/Mra_svcs.cpp | 2 +- protocols/MSN/src/msn_avatar.cpp | 2 +- protocols/MSN/src/msn_commands.cpp | 2 +- protocols/MSN/src/msn_p2p.cpp | 4 +-- protocols/MSN/src/msn_proto.cpp | 6 ++-- protocols/MSN/src/msn_svcs.cpp | 6 ++-- protocols/SkypeWeb/src/skype_avatars.cpp | 8 ++--- protocols/SkypeWeb/src/skype_proto.cpp | 6 ++-- protocols/Steam/src/steam_avatars.cpp | 8 ++--- protocols/Steam/src/steam_contacts.cpp | 2 +- protocols/Steam/src/steam_proto.cpp | 4 +-- protocols/Steam/src/steam_proto.h | 2 +- protocols/Tlen/src/tlen_svc.cpp | 8 ++--- protocols/Tox/src/tox_avatars.cpp | 4 +-- protocols/Tox/src/tox_proto.cpp | 6 ++-- protocols/Twitter/src/connection.cpp | 4 +-- protocols/VKontakte/src/vk_avatars.cpp | 10 +++--- protocols/VKontakte/src/vk_proto.cpp | 4 +-- protocols/WhatsApp/src/avatars.cpp | 2 +- protocols/WhatsApp/src/contacts.cpp | 2 +- protocols/WhatsApp/src/proto.cpp | 6 ++-- protocols/Xfire/src/main.cpp | 16 ++++----- protocols/Xfire/src/processbuddyinfo.cpp | 3 +- protocols/Xfire/src/services.cpp | 19 +++++----- protocols/Yahoo/src/avatar.cpp | 5 ++- protocols/Yahoo/src/services.cpp | 6 ++-- src/core/stdmsg/src/msgdialog.cpp | 4 +-- src/mir_core/src/protos.cpp | 12 ------- src/modules/metacontacts/meta_edit.cpp | 4 +-- src/modules/metacontacts/meta_menu.cpp | 4 +-- src/modules/metacontacts/meta_services.cpp | 19 +++++----- src/modules/metacontacts/meta_utils.cpp | 5 ++- src/modules/protocols/protoaccs.cpp | 52 --------------------------- 67 files changed, 168 insertions(+), 317 deletions(-) diff --git a/include/delphi/m_protocols.inc b/include/delphi/m_protocols.inc index 7fd40cd657..8e3bd4d455 100644 --- a/include/delphi/m_protocols.inc +++ b/include/delphi/m_protocols.inc @@ -395,22 +395,12 @@ const PA_FORMAT_XML = 7; type - PPROTO_AVATAR_INFORMATIONW = ^TPROTO_AVATAR_INFORMATIONW; - TPROTO_AVATAR_INFORMATIONW = record - cbSize : int; // sizeof() - hContact: TMCONTACT; // this might have to be set by the caller too - format : int; // PA_FORMAT_* - // full path to filename which contains the avatar - filename: array[0..(MAX_PATH)-1] of WideChar; - end; - PPROTO_AVATAR_INFORMATION = ^TPROTO_AVATAR_INFORMATION; TPROTO_AVATAR_INFORMATION = record - cbSize : int; // sizeof() hContact: TMCONTACT; // this might have to be set by the caller too format : int; // PA_FORMAT_* // full path to filename which contains the avatar - filename: array[0..(MAX_PATH)-1] of AnsiChar; + filename: array[0..(MAX_PATH)-1] of WideChar; end; const @@ -425,10 +415,7 @@ const lParam : (LPARAM) &PROTO_AVATAR_INFORMATION Affect : Make a request to the protocol to return information about a hContact's avatar (or main user) it can return information, tell you there is none, or if forced start requesting an avatar. - Note: - Version: 0.3.4+ (2004/09/13) } PS_GETAVATARINFO = '/GetAvatarInformation'; - PS_GETAVATARINFOW = '/GetAvatarInformationW'; {$ENDIF} diff --git a/include/m_avatars.h b/include/m_avatars.h index 78b0b2f69f..4bcdf96229 100644 --- a/include/m_avatars.h +++ b/include/m_avatars.h @@ -254,40 +254,25 @@ typedef struct _contactAvatarChangedNotification { /* wParam=0 -lParam=(const char *)Avatar file name or NULL to remove the avatar +lParam=(const TCHAR*)Avatar file name or NULL to remove the avatar return=0 for sucess */ #define PS_SETMYAVATAR "/SetMyAvatar" /* -wParam=(char *)Buffer to file name +wParam=(TCHAR*)Buffer to file name lParam=(int)Buffer size return=0 for sucess */ #define PS_GETMYAVATAR "/GetMyAvatar" -#ifdef _UNICODE - -#define PS_SETMYAVATARW "/SetMyAvatarW" -#define PS_GETMYAVATARW "/GetMyAvatarW" - -#define PS_GETMYAVATART PS_GETMYAVATARW -#define PS_SETMYAVATART PS_SETMYAVATARW - -#else - -#define PS_GETMYAVATART PS_GETMYAVATAR -#define PS_SETMYAVATART PS_SETMYAVATAR - -#endif - -#define PIP_NONE 0 -#define PIP_SQUARE 1 +#define PIP_NONE 0 +#define PIP_SQUARE 1 // Avatar image max size // lParam = (POINT*) maxSize (use -1 for no max) // return 0 for success -#define AF_MAXSIZE 1 +#define AF_MAXSIZE 1 // Avatar image proportion // lParam = 0 diff --git a/include/m_protocols.h b/include/m_protocols.h index fb26cb58c0..cb6fd2ac38 100644 --- a/include/m_protocols.h +++ b/include/m_protocols.h @@ -426,44 +426,24 @@ ProtoBroadcastAck(), listeners must hook ME_PROTO_ACK, note that lParam = ACKDAT #define PA_FORMAT_XML 7 typedef struct { - int cbSize; // sizeof() - MCONTACT hContact; // this might have to be set by the caller too - int format; // PA_FORMAT_* - char filename[MAX_PATH]; // full path to filename which contains the avatar -} PROTO_AVATAR_INFORMATION; - -#ifdef _UNICODE -typedef struct { - int cbSize; // sizeof() - MCONTACT hContact; // this might have to be set by the caller too + MCONTACT hContact; // this might have to be set by the caller too int format; // PA_FORMAT_* WCHAR filename[MAX_PATH]; // full path to filename which contains the avatar -} PROTO_AVATAR_INFORMATIONW; -#endif +} PROTO_AVATAR_INFORMATION; -#define GAIF_FORCE 1 // force an update of the avatar if there is none +#define GAIF_FORCE 1 // force an update of the avatar if there is none -#define GAIR_SUCCESS 0 // information about the avatar has been returned -#define GAIR_WAITFOR 1 // you must hook ME_PROTO_ACK and wait for replies about avatar status -#define GAIR_NOAVATAR 2 // sorry, this contact has no avatars +#define GAIR_SUCCESS 0 // information about the avatar has been returned +#define GAIR_WAITFOR 1 // you must hook ME_PROTO_ACK and wait for replies about avatar status +#define GAIR_NOAVATAR 2 // sorry, this contact has no avatars /* wParam : GAIF_* lParam : (LPARAM) &PROTO_AVATAR_INFORMATION Affect : Make a request to the protocol to return information about a hContact's avatar (or main user) it can return information, tell you there is none, or if forced start requesting an avatar. - Note: - Version: 0.3.4+ (2004/09/13) */ -#define PS_GETAVATARINFO "/GetAvatarInformation" -#ifdef _UNICODE - #define PS_GETAVATARINFOW "/GetAvatarInformationW" - #define PS_GETAVATARINFOT PS_GETAVATARINFOW +#define PS_GETAVATARINFO "/GetAvatarInformation" - #define PROTO_AVATAR_INFORMATIONT PROTO_AVATAR_INFORMATIONW -#else - #define PS_GETAVATARINFOT PS_GETAVATARINFO - #define PROTO_AVATAR_INFORMATIONT PROTO_AVATAR_INFORMATION -#endif #endif // M_PROTOCOLS_H diff --git a/include/m_string.h b/include/m_string.h index 4619222fe9..5fe5990fb9 100644 --- a/include/m_string.h +++ b/include/m_string.h @@ -607,18 +607,18 @@ public: return _vscwprintf(pszFormat, args); } - static int __stdcall Format(LPWSTR pszBuffer, LPCWSTR pszFormat, va_list args) - { #pragma warning (push) #pragma warning(disable : 4996) - return vswprintf(pszBuffer, pszFormat, args); //!!!!!!!!! -#pragma warning (pop) + static int __stdcall Format(LPWSTR pszBuffer, LPCWSTR pszFormat, va_list args) + { + return vswprintf(pszBuffer, pszFormat, args); } static int __stdcall Format(LPWSTR pszBuffer, size_t nLength, LPCWSTR pszFormat, va_list args) { return _vsnwprintf(pszBuffer, nLength, pszFormat, args); } +#pragma warning (pop) static int __stdcall GetBaseTypeLength(LPCSTR pszSrc) { 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)) { diff --git a/plugins/NewsAggregator/Src/CheckFeed.cpp b/plugins/NewsAggregator/Src/CheckFeed.cpp index 613a3e2981..69d0050da0 100644 --- a/plugins/NewsAggregator/Src/CheckFeed.cpp +++ b/plugins/NewsAggregator/Src/CheckFeed.cpp @@ -257,8 +257,7 @@ void CheckCurrentFeed(MCONTACT hContact) LPCTSTR url = xi.getText(imageval); db_set_ts(hContact, MODULE, "ImageURL", url); - PROTO_AVATAR_INFORMATIONT pai = { NULL }; - pai.cbSize = sizeof(pai); + PROTO_AVATAR_INFORMATION pai = { NULL }; pai.hContact = hContact; TCHAR *szNick = db_get_tsa(hContact, MODULE, "Nick"); @@ -388,8 +387,7 @@ void CheckCurrentFeed(MCONTACT hContact) TCHAR *szNick = db_get_tsa(hContact, MODULE, "Nick"); if (szNick) { - PROTO_AVATAR_INFORMATIONT pai = { NULL }; - pai.cbSize = sizeof(pai); + PROTO_AVATAR_INFORMATION pai = { NULL }; pai.hContact = hContact; TCHAR *ext = _tcsrchr((TCHAR *)url, _T('.')) + 1; pai.format = ProtoGetAvatarFormat(ext); @@ -532,8 +530,7 @@ void CheckCurrentFeedAvatar(MCONTACT hContact) LPCTSTR url = xi.getText(imageval); db_set_ts(hContact, MODULE, "ImageURL", url); - PROTO_AVATAR_INFORMATIONT pai = { NULL }; - pai.cbSize = sizeof(pai); + PROTO_AVATAR_INFORMATION pai = { NULL }; pai.hContact = hContact; TCHAR *szNick = db_get_tsa(hContact, MODULE, "Nick"); @@ -568,8 +565,7 @@ void CheckCurrentFeedAvatar(MCONTACT hContact) TCHAR *szNick = db_get_tsa(hContact, MODULE, "Nick"); if (szNick) { - PROTO_AVATAR_INFORMATIONT pai = { NULL }; - pai.cbSize = sizeof(pai); + PROTO_AVATAR_INFORMATION pai = { NULL }; pai.hContact = hContact; TCHAR *ext = _tcsrchr((TCHAR *)url, _T('.')) + 1; diff --git a/plugins/NewsAggregator/Src/NewsAggregator.cpp b/plugins/NewsAggregator/Src/NewsAggregator.cpp index 5fc4edc8cc..13c08a8693 100644 --- a/plugins/NewsAggregator/Src/NewsAggregator.cpp +++ b/plugins/NewsAggregator/Src/NewsAggregator.cpp @@ -80,7 +80,7 @@ extern "C" __declspec(dllexport) int Load(void) CreateProtoServiceFunction(MODULE, PS_GETSTATUS, NewsAggrGetStatus); CreateProtoServiceFunction(MODULE, PS_LOADICON, NewsAggrLoadIcon); CreateProtoServiceFunction(MODULE, PSS_GETINFO, NewsAggrGetInfo); - CreateProtoServiceFunction(MODULE, PS_GETAVATARINFOT, NewsAggrGetAvatarInfo); + CreateProtoServiceFunction(MODULE, PS_GETAVATARINFO, NewsAggrGetAvatarInfo); CreateProtoServiceFunction(MODULE, PSR_MESSAGE, NewsAggrRecvMessage); CreateServiceFunction(MS_NEWSAGGREGATOR_CHECKALLFEEDS, CheckAllFeeds); diff --git a/plugins/NewsAggregator/Src/Services.cpp b/plugins/NewsAggregator/Src/Services.cpp index c41971d662..eb88bf1f1c 100644 --- a/plugins/NewsAggregator/Src/Services.cpp +++ b/plugins/NewsAggregator/Src/Services.cpp @@ -202,7 +202,7 @@ INT_PTR CheckFeed(WPARAM hContact, LPARAM) INT_PTR NewsAggrGetAvatarInfo(WPARAM wParam, LPARAM lParam) { - PROTO_AVATAR_INFORMATIONT *pai = (PROTO_AVATAR_INFORMATIONT *)lParam; + PROTO_AVATAR_INFORMATION *pai = (PROTO_AVATAR_INFORMATION *)lParam; if (!IsMyContact(pai->hContact)) return GAIR_NOAVATAR; diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index 61415b37d2..9571765c16 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -979,8 +979,8 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP case DM_GETAVATAR: { - PROTO_AVATAR_INFORMATIONT ai = { sizeof(ai), dat->hContact }; - CallProtoService(dat->szProto, PS_GETAVATARINFOT, GAIF_FORCE, (LPARAM)&ai); + PROTO_AVATAR_INFORMATION ai = { sizeof(ai), dat->hContact }; + CallProtoService(dat->szProto, PS_GETAVATARINFO, GAIF_FORCE, (LPARAM)&ai); ShowAvatar(hwndDlg, dat); } break; diff --git a/plugins/Weather/src/weather_svcs.cpp b/plugins/Weather/src/weather_svcs.cpp index c31e761916..c72ebf15bd 100644 --- a/plugins/Weather/src/weather_svcs.cpp +++ b/plugins/Weather/src/weather_svcs.cpp @@ -131,7 +131,7 @@ INT_PTR WeatherGetAvatarInfo(WPARAM wParam, LPARAM lParam) TCHAR szSearchPath[MAX_PATH], *chop; WORD status; unsigned i; - PROTO_AVATAR_INFORMATIONT* ai = ( PROTO_AVATAR_INFORMATIONT* )lParam; + PROTO_AVATAR_INFORMATION* ai = ( PROTO_AVATAR_INFORMATION* )lParam; GetModuleFileName(GetModuleHandle(NULL), szSearchPath, SIZEOF(szSearchPath)); chop = _tcsrchr(szSearchPath, '\\'); @@ -165,8 +165,7 @@ INT_PTR WeatherGetAvatarInfo(WPARAM wParam, LPARAM lParam) void AvatarDownloaded(MCONTACT hContact) { - PROTO_AVATAR_INFORMATIONT AI = {0}; - AI.cbSize = sizeof(AI); + PROTO_AVATAR_INFORMATION AI = {0}; AI.hContact = hContact; if (WeatherGetAvatarInfo(GAIF_FORCE, (LPARAM)&AI) == GAIR_SUCCESS) @@ -211,7 +210,7 @@ void InitServices(void) CreateProtoServiceFunction(WEATHERPROTONAME, PS_SEARCHBYEMAIL, WeatherBasicSearch); CreateProtoServiceFunction(WEATHERPROTONAME, PS_ADDTOLIST, WeatherAddToList); CreateProtoServiceFunction(WEATHERPROTONAME, PSS_GETINFO, WeatherGetInfo); - CreateProtoServiceFunction(WEATHERPROTONAME, PS_GETAVATARINFOT, WeatherGetAvatarInfo); + CreateProtoServiceFunction(WEATHERPROTONAME, PS_GETAVATARINFO, WeatherGetAvatarInfo); CreateProtoServiceFunction(WEATHERPROTONAME, PSS_GETAWAYMSG, WeatherGetAwayMsg); CreateProtoServiceFunction(WEATHERPROTONAME, PS_CREATEADVSEARCHUI, WeatherCreateAdvancedSearchUI); CreateProtoServiceFunction(WEATHERPROTONAME, PS_SEARCHBYADVANCED, WeatherAdvancedSearch); diff --git a/protocols/AimOscar/src/avatars.cpp b/protocols/AimOscar/src/avatars.cpp index 0ecf63cb42..2a961d7cd6 100644 --- a/protocols/AimOscar/src/avatars.cpp +++ b/protocols/AimOscar/src/avatars.cpp @@ -98,9 +98,7 @@ void CAimProto::avatar_request_handler(MCONTACT hContact, char* hash, unsigned c void CAimProto::avatar_retrieval_handler(const char* sn, const char* /*hash*/, const char* data, int data_len) { bool res = false; - PROTO_AVATAR_INFORMATIONT AI = {0}; - AI.cbSize = sizeof(AI); - + PROTO_AVATAR_INFORMATION AI = {0}; AI.hContact = contact_from_sn(sn); if (data_len > 0) { diff --git a/protocols/AimOscar/src/proto.cpp b/protocols/AimOscar/src/proto.cpp index e12ed362b1..5a8ac4f8e8 100644 --- a/protocols/AimOscar/src/proto.cpp +++ b/protocols/AimOscar/src/proto.cpp @@ -32,9 +32,9 @@ CAimProto::CAimProto(const char* aProtoName, const TCHAR* aUserName) : CreateProtoService(PS_GETMYAWAYMSG, &CAimProto::GetMyAwayMsg); - CreateProtoService(PS_GETAVATARINFOT, &CAimProto::GetAvatarInfo); - CreateProtoService(PS_GETMYAVATART, &CAimProto::GetAvatar); - CreateProtoService(PS_SETMYAVATART, &CAimProto::SetAvatar); + CreateProtoService(PS_GETAVATARINFO, &CAimProto::GetAvatarInfo); + CreateProtoService(PS_GETMYAVATAR, &CAimProto::GetAvatar); + CreateProtoService(PS_SETMYAVATAR, &CAimProto::SetAvatar); CreateProtoService(PS_GETAVATARCAPS, &CAimProto::GetAvatarCaps); CreateProtoService(PS_JOINCHAT, &CAimProto::OnJoinChat); diff --git a/protocols/AimOscar/src/services.cpp b/protocols/AimOscar/src/services.cpp index 01944ef024..6e35b76a1f 100644 --- a/protocols/AimOscar/src/services.cpp +++ b/protocols/AimOscar/src/services.cpp @@ -339,7 +339,7 @@ INT_PTR CAimProto::ManageAccount(WPARAM, LPARAM) INT_PTR CAimProto::GetAvatarInfo(WPARAM wParam, LPARAM lParam) { - PROTO_AVATAR_INFORMATIONT* AI = (PROTO_AVATAR_INFORMATIONT*)lParam; + PROTO_AVATAR_INFORMATION* AI = (PROTO_AVATAR_INFORMATION*)lParam; AI->filename[0] = 0; AI->format = PA_FORMAT_UNKNOWN; @@ -410,7 +410,7 @@ INT_PTR CAimProto::GetAvatar(WPARAM wParam, LPARAM lParam) if (buf == NULL || size <= 0) return -1; - PROTO_AVATAR_INFORMATIONT ai = { sizeof(ai) }; + PROTO_AVATAR_INFORMATION ai = { sizeof(ai) }; if (GetAvatarInfo(0, (LPARAM)&ai) == GAIR_SUCCESS) { _tcsncpy(buf, ai.filename, size); diff --git a/protocols/FacebookRM/src/avatars.cpp b/protocols/FacebookRM/src/avatars.cpp index 3f9dfa0994..d758e005ce 100644 --- a/protocols/FacebookRM/src/avatars.cpp +++ b/protocols/FacebookRM/src/avatars.cpp @@ -22,7 +22,7 @@ along with this program. If not, see . #include "stdafx.h" -bool FacebookProto::GetDbAvatarInfo(PROTO_AVATAR_INFORMATIONT &ai, std::string *url) +bool FacebookProto::GetDbAvatarInfo(PROTO_AVATAR_INFORMATION &ai, std::string *url) { ptrA id(getStringA(ai.hContact, FACEBOOK_KEY_ID)); if (id == NULL) @@ -75,7 +75,7 @@ void FacebookProto::CheckAvatarChange(MCONTACT hContact, const std::string &imag setString(hContact, FACEBOOK_KEY_AVATAR, image_name.c_str()); if (!hContact) { - PROTO_AVATAR_INFORMATIONT ai = { sizeof(ai) }; + PROTO_AVATAR_INFORMATION ai = { sizeof(ai) }; if (GetAvatarInfo(update_required ? GAIF_FORCE : 0, (LPARAM)&ai) != GAIR_WAITFOR) CallService(MS_AV_REPORTMYAVATARCHANGED, (WPARAM)m_szModuleName, 0); } @@ -96,7 +96,7 @@ void FacebookProto::UpdateAvatarWorker(void *) for (;;) { std::string url; - PROTO_AVATAR_INFORMATIONT ai = { sizeof(ai) }; + PROTO_AVATAR_INFORMATION ai = { sizeof(ai) }; ai.hContact = avatar_queue[0]; if (Miranda_Terminated()) @@ -178,7 +178,7 @@ INT_PTR FacebookProto::GetAvatarInfo(WPARAM wParam, LPARAM lParam) if (!lParam) return GAIR_NOAVATAR; - PROTO_AVATAR_INFORMATIONT* AI = (PROTO_AVATAR_INFORMATIONT*)lParam; + PROTO_AVATAR_INFORMATION* AI = (PROTO_AVATAR_INFORMATION*)lParam; if (GetDbAvatarInfo(*AI, NULL)) { bool fileExist = _taccess(AI->filename, 0) == 0; @@ -220,7 +220,7 @@ INT_PTR FacebookProto::GetMyAvatar(WPARAM wParam, LPARAM lParam) TCHAR* buf = (TCHAR*)wParam; int size = (int)lParam; - PROTO_AVATAR_INFORMATIONT ai = { sizeof(ai) }; + PROTO_AVATAR_INFORMATION ai = { sizeof(ai) }; switch (GetAvatarInfo(0, (LPARAM)&ai)) { case GAIR_SUCCESS: _tcsncpy(buf, ai.filename, size); diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp index 2f92f63a5c..fee5b2d6f9 100644 --- a/protocols/FacebookRM/src/proto.cpp +++ b/protocols/FacebookRM/src/proto.cpp @@ -59,8 +59,8 @@ FacebookProto::FacebookProto(const char* proto_name, const TCHAR* username) : CreateProtoService(PS_CREATEACCMGRUI, &FacebookProto::SvcCreateAccMgrUI); CreateProtoService(PS_GETMYAWAYMSG, &FacebookProto::GetMyAwayMsg); - CreateProtoService(PS_GETMYAVATART, &FacebookProto::GetMyAvatar); - CreateProtoService(PS_GETAVATARINFOT, &FacebookProto::GetAvatarInfo); + CreateProtoService(PS_GETMYAVATAR, &FacebookProto::GetMyAvatar); + CreateProtoService(PS_GETAVATARINFO, &FacebookProto::GetAvatarInfo); CreateProtoService(PS_GETAVATARCAPS, &FacebookProto::GetAvatarCaps); CreateProtoService(PS_GETUNREADEMAILCOUNT, &FacebookProto::GetNotificationsCount); diff --git a/protocols/FacebookRM/src/proto.h b/protocols/FacebookRM/src/proto.h index 9ee8f3ab07..e8b0c8c3c5 100644 --- a/protocols/FacebookRM/src/proto.h +++ b/protocols/FacebookRM/src/proto.h @@ -221,7 +221,7 @@ public: // Helpers std::tstring GetAvatarFolder(); - bool GetDbAvatarInfo(PROTO_AVATAR_INFORMATIONT &ai, std::string *url); + bool GetDbAvatarInfo(PROTO_AVATAR_INFORMATION &ai, std::string *url); void CheckAvatarChange(MCONTACT hContact, const std::string &image_url); void ToggleStatusMenuItems(BOOL bEnable); void StickerAsSmiley(std::string stickerId, const std::string &url, MCONTACT hContact); diff --git a/protocols/Gadu-Gadu/src/avatar.cpp b/protocols/Gadu-Gadu/src/avatar.cpp index a02171539a..7fcb0eee18 100644 --- a/protocols/Gadu-Gadu/src/avatar.cpp +++ b/protocols/Gadu-Gadu/src/avatar.cpp @@ -217,8 +217,7 @@ void __cdecl GGPROTO::avatarrequestthread(void*) mir_free(AvatarURL); mir_free(AvatarTs); if (iWaitFor) { - PROTO_AVATAR_INFORMATIONT pai = {0}; - pai.cbSize = sizeof(pai); + PROTO_AVATAR_INFORMATION pai = {0}; pai.hContact = hContact; INT_PTR res = getavatarinfo((WPARAM)GAIF_FORCE, (LPARAM)&pai); if (res == GAIR_NOAVATAR) @@ -242,7 +241,7 @@ void __cdecl GGPROTO::avatarrequestthread(void*) int result = 0; - PROTO_AVATAR_INFORMATIONT pai = { sizeof(pai) }; + PROTO_AVATAR_INFORMATION pai = { sizeof(pai) }; pai.hContact = data->hContact; pai.format = getByte(pai.hContact, GG_KEY_AVATARTYPE, GG_KEYDEF_AVATARTYPE); @@ -335,8 +334,7 @@ void __cdecl GGPROTO::getOwnAvatarThread(void*) } setByte(GG_KEY_AVATARREQUESTED, 1); - PROTO_AVATAR_INFORMATIONT pai = {0}; - pai.cbSize = sizeof(pai); + PROTO_AVATAR_INFORMATION pai = { 0 }; getavatarinfo((WPARAM)GAIF_FORCE, (LPARAM)&pai); } #ifdef DEBUGMODE diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp index 5a65872b68..f09e727a20 100644 --- a/protocols/Gadu-Gadu/src/core.cpp +++ b/protocols/Gadu-Gadu/src/core.cpp @@ -1582,13 +1582,11 @@ MCONTACT GGPROTO::getcontact(uin_t uin, int create, int inlist, TCHAR *szNick) // Add to notify list and pull avatar for the new contact if (isonline()) { - PROTO_AVATAR_INFORMATIONT pai = {0}; - gg_EnterCriticalSection(&sess_mutex, "getcontact", 32, "sess_mutex", 1); gg_add_notify_ex(sess, uin, (char)(inlist ? GG_USER_NORMAL : GG_USER_OFFLINE)); gg_LeaveCriticalSection(&sess_mutex, "getcontact", 32, 1, "sess_mutex", 1); - pai.cbSize = sizeof(pai); + PROTO_AVATAR_INFORMATION pai = { 0 }; pai.hContact = hContact; getavatarinfo((WPARAM)GAIF_FORCE, (LPARAM)&pai); diff --git a/protocols/Gadu-Gadu/src/gg_proto.cpp b/protocols/Gadu-Gadu/src/gg_proto.cpp index 22f4c18ecf..9d0c8d4a2c 100644 --- a/protocols/Gadu-Gadu/src/gg_proto.cpp +++ b/protocols/Gadu-Gadu/src/gg_proto.cpp @@ -52,9 +52,9 @@ GGPROTO::GGPROTO(const char* pszProtoName, const TCHAR* tszUserName) : // Register services CreateProtoService(PS_GETAVATARCAPS, &GGPROTO::getavatarcaps); - CreateProtoService(PS_GETAVATARINFOT, &GGPROTO::getavatarinfo); - CreateProtoService(PS_GETMYAVATART, &GGPROTO::getmyavatar); - CreateProtoService(PS_SETMYAVATART, &GGPROTO::setmyavatar); + CreateProtoService(PS_GETAVATARINFO, &GGPROTO::getavatarinfo); + CreateProtoService(PS_GETMYAVATAR, &GGPROTO::getmyavatar); + CreateProtoService(PS_SETMYAVATAR, &GGPROTO::setmyavatar); CreateProtoService(PS_GETMYAWAYMSG, &GGPROTO::getmyawaymsg); CreateProtoService(PS_CREATEACCMGRUI, &GGPROTO::get_acc_mgr_gui); diff --git a/protocols/Gadu-Gadu/src/services.cpp b/protocols/Gadu-Gadu/src/services.cpp index 5b1a2537f9..e9c5b1adc6 100644 --- a/protocols/Gadu-Gadu/src/services.cpp +++ b/protocols/Gadu-Gadu/src/services.cpp @@ -167,11 +167,11 @@ INT_PTR GGPROTO::getavatarcaps(WPARAM wParam, LPARAM lParam) ////////////////////////////////////////////////////////// // gets avatar information -// registered as ProtoService PS_GETAVATARINFOT +// registered as ProtoService PS_GETAVATARINFO INT_PTR GGPROTO::getavatarinfo(WPARAM wParam, LPARAM lParam) { - PROTO_AVATAR_INFORMATIONT *pai = (PROTO_AVATAR_INFORMATIONT *)lParam; + PROTO_AVATAR_INFORMATION *pai = (PROTO_AVATAR_INFORMATION *)lParam; pai->filename[0] = 0; pai->format = PA_FORMAT_UNKNOWN; @@ -278,7 +278,7 @@ INT_PTR GGPROTO::getavatarinfo(WPARAM wParam, LPARAM lParam) ////////////////////////////////////////////////////////// // gets avatar -// registered as ProtoService PS_GETMYAVATART +// registered as ProtoService PS_GETMYAVATAR INT_PTR GGPROTO::getmyavatar(WPARAM wParam, LPARAM lParam) { @@ -308,7 +308,7 @@ INT_PTR GGPROTO::getmyavatar(WPARAM wParam, LPARAM lParam) ////////////////////////////////////////////////////////// // sets avatar -// registered as ProtoService PS_SETMYAVATART +// registered as ProtoService PS_SETMYAVATAR INT_PTR GGPROTO::setmyavatar(WPARAM wParam, LPARAM lParam) { diff --git a/protocols/IcqOscarJ/src/icq_avatar.cpp b/protocols/IcqOscarJ/src/icq_avatar.cpp index d1c9343905..e229de63dc 100644 --- a/protocols/IcqOscarJ/src/icq_avatar.cpp +++ b/protocols/IcqOscarJ/src/icq_avatar.cpp @@ -1155,7 +1155,7 @@ void avatars_server_connection::handleAvatarFam(BYTE *pBuffer, size_t wBufferLen } } - PROTO_AVATAR_INFORMATIONT ai = { sizeof(ai) }; + PROTO_AVATAR_INFORMATION ai = { sizeof(ai) }; ai.format = PA_FORMAT_JPEG; // this is for error only ai.hContact = pCookieData->hContact; mir_tstrncpy(ai.filename, pCookieData->szFile, SIZEOF(ai.filename)); diff --git a/protocols/IcqOscarJ/src/icq_proto.cpp b/protocols/IcqOscarJ/src/icq_proto.cpp index b45c61016b..ff505dc1a4 100644 --- a/protocols/IcqOscarJ/src/icq_proto.cpp +++ b/protocols/IcqOscarJ/src/icq_proto.cpp @@ -120,10 +120,10 @@ CIcqProto::CIcqProto(const char* aProtoName, const TCHAR* aUserName) : CreateProtoService(PS_CHANGEINFOEX, &CIcqProto::ChangeInfoEx); // Avatar API - CreateProtoService(PS_GETAVATARINFOT, &CIcqProto::GetAvatarInfo); + CreateProtoService(PS_GETAVATARINFO, &CIcqProto::GetAvatarInfo); CreateProtoService(PS_GETAVATARCAPS, &CIcqProto::GetAvatarCaps); - CreateProtoService(PS_GETMYAVATART, &CIcqProto::GetMyAvatar); - CreateProtoService(PS_SETMYAVATART, &CIcqProto::SetMyAvatar); + CreateProtoService(PS_GETMYAVATAR, &CIcqProto::GetMyAvatar); + CreateProtoService(PS_SETMYAVATAR, &CIcqProto::SetMyAvatar); // Custom Status API CreateProtoService(PS_SETCUSTOMSTATUSEX, &CIcqProto::SetXStatusEx); diff --git a/protocols/IcqOscarJ/src/icqosc_svcs.cpp b/protocols/IcqOscarJ/src/icqosc_svcs.cpp index ff7c0d5f1f..b7d887bad7 100644 --- a/protocols/IcqOscarJ/src/icqosc_svcs.cpp +++ b/protocols/IcqOscarJ/src/icqosc_svcs.cpp @@ -328,7 +328,7 @@ INT_PTR CIcqProto::GetAvatarCaps(WPARAM wParam, LPARAM lParam) INT_PTR CIcqProto::GetAvatarInfo(WPARAM wParam, LPARAM lParam) { - PROTO_AVATAR_INFORMATIONT *pai = (PROTO_AVATAR_INFORMATIONT*)lParam; + PROTO_AVATAR_INFORMATION *pai = (PROTO_AVATAR_INFORMATION*)lParam; DWORD dwUIN; uid_str szUID; DBVARIANT dbv = { DBVT_DELETED }; diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp index dfe3246216..72eb87d11a 100644 --- a/protocols/JabberG/src/jabber_iqid.cpp +++ b/protocols/JabberG/src/jabber_iqid.cpp @@ -1401,8 +1401,7 @@ LBL_ErrFormat: else if ((pictureType = ProtoGetBufferFormat(body, 0)) == PA_FORMAT_UNKNOWN) goto LBL_ErrFormat; - PROTO_AVATAR_INFORMATIONT AI; - AI.cbSize = sizeof AI; + PROTO_AVATAR_INFORMATION AI; AI.format = pictureType; AI.hContact = hContact; diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index ee87d26b89..5b558257ef 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -82,7 +82,7 @@ CJabberProto::CJabberProto(const char *aProtoName, const TCHAR *aUserName) : CreateProtoService(PS_CREATEACCMGRUI, &CJabberProto::SvcCreateAccMgrUI); - CreateProtoService(PS_GETAVATARINFOT, &CJabberProto::JabberGetAvatarInfo); + CreateProtoService(PS_GETAVATARINFO, &CJabberProto::JabberGetAvatarInfo); CreateProtoService(PS_GETMYAWAYMSG, &CJabberProto::GetMyAwayMsg); CreateProtoService(PS_SET_LISTENINGTO, &CJabberProto::OnSetListeningTo); @@ -98,9 +98,9 @@ CJabberProto::CJabberProto(const char *aProtoName, const TCHAR *aUserName) : CreateProtoService(JS_INCOMING_NOTE_EVENT, &CJabberProto::OnIncomingNoteEvent); CreateProtoService(JS_SENDXML, &CJabberProto::ServiceSendXML); - CreateProtoService(PS_GETMYAVATART, &CJabberProto::JabberGetAvatar); + CreateProtoService(PS_GETMYAVATAR, &CJabberProto::JabberGetAvatar); CreateProtoService(PS_GETAVATARCAPS, &CJabberProto::JabberGetAvatarCaps); - CreateProtoService(PS_SETMYAVATART, &CJabberProto::JabberSetAvatar); + CreateProtoService(PS_SETMYAVATAR, &CJabberProto::JabberSetAvatar); CreateProtoService(PS_SETMYNICKNAME, &CJabberProto::JabberSetNickname); CreateProtoService(JS_DB_GETEVENTTEXT_CHATSTATES, &CJabberProto::OnGetEventTextChatStates); diff --git a/protocols/JabberG/src/jabber_svc.cpp b/protocols/JabberG/src/jabber_svc.cpp index b175f9c426..45413a7e89 100644 --- a/protocols/JabberG/src/jabber_svc.cpp +++ b/protocols/JabberG/src/jabber_svc.cpp @@ -121,7 +121,7 @@ INT_PTR __cdecl CJabberProto::JabberGetAvatarInfo(WPARAM wParam, LPARAM lParam) if (!m_options.EnableAvatars) return GAIR_NOAVATAR; - PROTO_AVATAR_INFORMATIONT* AI = (PROTO_AVATAR_INFORMATIONT*)lParam; + PROTO_AVATAR_INFORMATION* AI = (PROTO_AVATAR_INFORMATION*)lParam; ptrA szHashValue( getStringA(AI->hContact, "AvatarHash")); if (szHashValue == NULL) { diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp index 8017aa59ec..a83d136e8e 100644 --- a/protocols/JabberG/src/jabber_util.cpp +++ b/protocols/JabberG/src/jabber_util.cpp @@ -935,8 +935,7 @@ void __cdecl CJabberProto::LoadHttpAvatars(void* param) if (res->resultCode == 200 && res->dataLength) { int pictureType = ProtoGetBufferFormat(res->pData); if (pictureType != PA_FORMAT_UNKNOWN) { - PROTO_AVATAR_INFORMATIONT AI; - AI.cbSize = sizeof(AI); + PROTO_AVATAR_INFORMATION AI; AI.format = pictureType; AI.hContact = avs[i].hContact; diff --git a/protocols/MRA/src/MraAvatars.cpp b/protocols/MRA/src/MraAvatars.cpp index 63ecec27ec..4236da9d89 100644 --- a/protocols/MRA/src/MraAvatars.cpp +++ b/protocols/MRA/src/MraAvatars.cpp @@ -87,8 +87,7 @@ void CMraProto::MraAvatarsQueueClear(HANDLE hAvatarsQueueHandle) MRA_AVATARS_QUEUE *pmraaqAvatarsQueue = (MRA_AVATARS_QUEUE*)hAvatarsQueueHandle; MRA_AVATARS_QUEUE_ITEM *pmraaqiAvatarsQueueItem; - PROTO_AVATAR_INFORMATIONT pai = { 0 }; - pai.cbSize = sizeof(pai); + PROTO_AVATAR_INFORMATION pai = { 0 }; pai.format = PA_FORMAT_UNKNOWN; while (FifoMTItemPop(pmraaqAvatarsQueue, NULL, (LPVOID*)&pmraaqiAvatarsQueueItem) == NO_ERROR) { @@ -156,11 +155,9 @@ void CMraProto::MraAvatarsThreadProc(LPVOID lpParameter) HANDLE hConnection = NULL; NETLIBSELECT nls = { 0 }; INTERNET_TIME itAvatarLastModifiedTimeServer; - PROTO_AVATAR_INFORMATIONT pai; WCHAR szErrorText[2048]; nls.cbSize = sizeof(nls); - pai.cbSize = sizeof(pai); HANDLE hThreadEvent = CreateEvent(NULL, FALSE, FALSE, NULL); { @@ -305,6 +302,7 @@ void CMraProto::MraAvatarsThreadProc(LPVOID lpParameter) } } + PROTO_AVATAR_INFORMATION pai; if (bFailed) { DeleteFile(wszFileName); pai.hContact = pmraaqiAvatarsQueueItem->hContact; @@ -553,8 +551,7 @@ DWORD CMraProto::MraAvatarsQueueGetAvatarSimple(HANDLE hAvatarsQueueHandle, DWOR if ( !hAvatarsQueueHandle) return GAIR_NOAVATAR; - PROTO_AVATAR_INFORMATIONT pai = { 0 }; - pai.cbSize = sizeof(pai); + PROTO_AVATAR_INFORMATION pai = { 0 }; pai.hContact = hContact; DWORD dwRetCode = MraAvatarsQueueGetAvatar(hAvatarsQueueHandle, dwFlags, hContact, NULL, (DWORD*)&pai.format, pai.filename); if (dwRetCode != GAIR_SUCCESS) diff --git a/protocols/MRA/src/MraProto.cpp b/protocols/MRA/src/MraProto.cpp index 74d587d25a..702d23e347 100644 --- a/protocols/MRA/src/MraProto.cpp +++ b/protocols/MRA/src/MraProto.cpp @@ -25,8 +25,8 @@ CMraProto::CMraProto(const char* _module, const TCHAR* _displayName) : CreateProtoService(PS_CREATEACCMGRUI, &CMraProto::MraCreateAccMgrUI); CreateProtoService(PS_GETAVATARCAPS, &CMraProto::MraGetAvatarCaps); - CreateProtoService(PS_GETAVATARINFOT, &CMraProto::MraGetAvatarInfo); - CreateProtoService(PS_GETMYAVATART, &CMraProto::MraGetMyAvatar); + CreateProtoService(PS_GETAVATARINFO, &CMraProto::MraGetAvatarInfo); + CreateProtoService(PS_GETMYAVATAR, &CMraProto::MraGetMyAvatar); CreateProtoService(MS_ICQ_SENDSMS, &CMraProto::MraSendSMS); CreateProtoService(PS_SEND_NUDGE, &CMraProto::MraSendNudge); diff --git a/protocols/MRA/src/Mra_svcs.cpp b/protocols/MRA/src/Mra_svcs.cpp index 3d0ca4267f..abf84e465a 100644 --- a/protocols/MRA/src/Mra_svcs.cpp +++ b/protocols/MRA/src/Mra_svcs.cpp @@ -614,7 +614,7 @@ INT_PTR CMraProto::MraGetAvatarCaps(WPARAM wParam, LPARAM) INT_PTR CMraProto::MraGetAvatarInfo(WPARAM wParam, LPARAM lParam) { if (lParam) { - PROTO_AVATAR_INFORMATIONT *ppai = (PROTO_AVATAR_INFORMATIONT*)lParam; + PROTO_AVATAR_INFORMATION *ppai = (PROTO_AVATAR_INFORMATION*)lParam; return (INT_PTR)MraAvatarsQueueGetAvatar(hAvatarsQueueHandle, (DWORD)wParam, ppai->hContact, NULL, (DWORD*)&ppai->format, ppai->filename); } return GAIR_NOAVATAR; diff --git a/protocols/MSN/src/msn_avatar.cpp b/protocols/MSN/src/msn_avatar.cpp index cc0a480418..199de8d362 100644 --- a/protocols/MSN/src/msn_avatar.cpp +++ b/protocols/MSN/src/msn_avatar.cpp @@ -76,7 +76,7 @@ LBL_Error: if (fmt == PA_FORMAT_UNKNOWN) goto LBL_Error; - PROTO_AVATAR_INFORMATIONT AI = { sizeof(AI) }; + PROTO_AVATAR_INFORMATION AI = { sizeof(AI) }; AI.format = fmt; AI.hContact = p->hContact; MSN_GetAvatarFileName(AI.hContact, AI.filename, SIZEOF(AI.filename), szExt); diff --git a/protocols/MSN/src/msn_commands.cpp b/protocols/MSN/src/msn_commands.cpp index b9136e636e..0d66012e0c 100644 --- a/protocols/MSN/src/msn_commands.cpp +++ b/protocols/MSN/src/msn_commands.cpp @@ -1746,7 +1746,7 @@ void CMsnProto::MSN_InitSB(ThreadData* info, const char* szEmail) TranslateT("Chat session established by my request") : TranslateT("Chat session established by contact request"), 0); - PROTO_AVATAR_INFORMATIONT ai = { sizeof(ai), cont->hContact }; + PROTO_AVATAR_INFORMATION ai = { sizeof(ai), cont->hContact }; GetAvatarInfo(GAIF_FORCE, (LPARAM)&ai); } diff --git a/protocols/MSN/src/msn_p2p.cpp b/protocols/MSN/src/msn_p2p.cpp index 2aa880dd6a..67cb4b9f1a 100644 --- a/protocols/MSN/src/msn_p2p.cpp +++ b/protocols/MSN/src/msn_p2p.cpp @@ -194,7 +194,7 @@ void CMsnProto::p2p_pictureTransferFailed(filetransfer* ft) case MSN_APPID_AVATAR: case MSN_APPID_AVATAR2: { - PROTO_AVATAR_INFORMATIONT AI = { 0 }; + PROTO_AVATAR_INFORMATION AI = { 0 }; AI.cbSize = sizeof(AI); AI.hContact = ft->std.hContact; delSetting(ft->std.hContact, "AvatarHash"); @@ -233,7 +233,7 @@ void CMsnProto::p2p_savePicture2disk(filetransfer* ft) case MSN_APPID_AVATAR: case MSN_APPID_AVATAR2: { - PROTO_AVATAR_INFORMATIONT AI = { 0 }; + PROTO_AVATAR_INFORMATION AI = { 0 }; AI.cbSize = sizeof(AI); AI.format = format; AI.hContact = ft->std.hContact; diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp index 40be291a48..dce9ae50ff 100644 --- a/protocols/MSN/src/msn_proto.cpp +++ b/protocols/MSN/src/msn_proto.cpp @@ -57,13 +57,13 @@ CMsnProto::CMsnProto(const char* aProtoName, const TCHAR* aUserName) : CreateProtoService(PS_CREATEACCMGRUI, &CMsnProto::SvcCreateAccMgrUI); - CreateProtoService(PS_GETAVATARINFOT, &CMsnProto::GetAvatarInfo); + CreateProtoService(PS_GETAVATARINFO, &CMsnProto::GetAvatarInfo); CreateProtoService(PS_GETMYAWAYMSG, &CMsnProto::GetMyAwayMsg); CreateProtoService(PS_LEAVECHAT, &CMsnProto::OnLeaveChat); - CreateProtoService(PS_GETMYAVATART, &CMsnProto::GetAvatar); - CreateProtoService(PS_SETMYAVATART, &CMsnProto::SetAvatar); + CreateProtoService(PS_GETMYAVATAR, &CMsnProto::GetAvatar); + CreateProtoService(PS_SETMYAVATAR, &CMsnProto::SetAvatar); CreateProtoService(PS_GETAVATARCAPS, &CMsnProto::GetAvatarCaps); CreateProtoService(PS_SETMYNICKNAME, &CMsnProto::SetNickName); diff --git a/protocols/MSN/src/msn_svcs.cpp b/protocols/MSN/src/msn_svcs.cpp index b758348cdd..88ee42dba8 100644 --- a/protocols/MSN/src/msn_svcs.cpp +++ b/protocols/MSN/src/msn_svcs.cpp @@ -58,12 +58,12 @@ INT_PTR CMsnProto::GetAvatar(WPARAM wParam, LPARAM lParam) void CMsnProto::sttFakeAvatarAck(void* arg) { Sleep(100); - ProtoBroadcastAck(((PROTO_AVATAR_INFORMATIONT*)arg)->hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, arg, 0); + ProtoBroadcastAck(((PROTO_AVATAR_INFORMATION*)arg)->hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, arg, 0); } INT_PTR CMsnProto::GetAvatarInfo(WPARAM wParam, LPARAM lParam) { - PROTO_AVATAR_INFORMATIONT *AI = (PROTO_AVATAR_INFORMATIONT*)lParam; + PROTO_AVATAR_INFORMATION *AI = (PROTO_AVATAR_INFORMATION*)lParam; TCHAR filename[MAX_PATH]; MsnContact *cont = NULL; @@ -125,7 +125,7 @@ INT_PTR CMsnProto::GetAvatarInfo(WPARAM wParam, LPARAM lParam) WORD wStatus = getWord(AI->hContact, "Status", ID_STATUS_OFFLINE); if (wStatus == ID_STATUS_OFFLINE) { delSetting(AI->hContact, "AvatarHash"); - PROTO_AVATAR_INFORMATIONT* fakeAI = new PROTO_AVATAR_INFORMATIONT; + PROTO_AVATAR_INFORMATION* fakeAI = new PROTO_AVATAR_INFORMATION; *fakeAI = *AI; ForkThread(&CMsnProto::sttFakeAvatarAck, fakeAI); } diff --git a/protocols/SkypeWeb/src/skype_avatars.cpp b/protocols/SkypeWeb/src/skype_avatars.cpp index c72a50072d..d94e1cf2c1 100644 --- a/protocols/SkypeWeb/src/skype_avatars.cpp +++ b/protocols/SkypeWeb/src/skype_avatars.cpp @@ -47,7 +47,7 @@ void CSkypeProto::ReloadAvatarInfo(MCONTACT hContact) CallService(MS_AV_REPORTMYAVATARCHANGED, (WPARAM)m_szModuleName, 0); return; } - PROTO_AVATAR_INFORMATIONT AI = { sizeof(AI) }; + PROTO_AVATAR_INFORMATION AI = { sizeof(AI) }; AI.hContact = hContact; SvcGetAvatarInfo(0, (LPARAM)&AI); } @@ -60,7 +60,7 @@ void CSkypeProto::OnReceiveAvatar(const NETLIBHTTPREQUEST *response, void *arg) if (response->resultCode != 200) return; - PROTO_AVATAR_INFORMATIONT AI = { sizeof(AI) }; + PROTO_AVATAR_INFORMATION AI = { sizeof(AI) }; AI.format = ProtoGetBufferFormat(response->pData); setByte(hContact, "AvatarType", AI.format); GetAvatarFileName(hContact, AI.filename, SIZEOF(AI.filename)); @@ -89,7 +89,7 @@ void CSkypeProto::OnSentAvatar(const NETLIBHTTPREQUEST *response) INT_PTR CSkypeProto::SvcGetAvatarInfo(WPARAM, LPARAM lParam) { - PROTO_AVATAR_INFORMATIONT* AI = (PROTO_AVATAR_INFORMATIONT*)lParam; + PROTO_AVATAR_INFORMATION* AI = (PROTO_AVATAR_INFORMATION*)lParam; ptrA szUrl(getStringA(AI->hContact, "AvatarUrl")); if (szUrl == NULL) @@ -152,7 +152,7 @@ void CSkypeProto::SetAvatarUrl(MCONTACT hContact, CMString &tszUrl) else { setTString(hContact, "AvatarUrl", tszUrl.GetBuffer()); setByte(hContact, "NeedNewAvatar", 1); - PROTO_AVATAR_INFORMATIONT AI = { sizeof(AI) }; + PROTO_AVATAR_INFORMATION AI = { sizeof(AI) }; AI.hContact = hContact; GetAvatarFileName(AI.hContact, AI.filename, SIZEOF(AI.filename)); AI.format = ProtoGetAvatarFormat(AI.filename); diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp index 5241fb00ea..656360a366 100644 --- a/protocols/SkypeWeb/src/skype_proto.cpp +++ b/protocols/SkypeWeb/src/skype_proto.cpp @@ -34,10 +34,10 @@ PROTO(protoName, userName), password(NULL) CreateProtoService(PS_CREATEACCMGRUI, &CSkypeProto::OnAccountManagerInit); - CreateProtoService(PS_GETAVATARINFOT, &CSkypeProto::SvcGetAvatarInfo); + CreateProtoService(PS_GETAVATARINFO, &CSkypeProto::SvcGetAvatarInfo); CreateProtoService(PS_GETAVATARCAPS, &CSkypeProto::SvcGetAvatarCaps); - CreateProtoService(PS_GETMYAVATART, &CSkypeProto::SvcGetMyAvatar); - CreateProtoService(PS_SETMYAVATART, &CSkypeProto::SvcSetMyAvatar); + CreateProtoService(PS_GETMYAVATAR, &CSkypeProto::SvcGetMyAvatar); + CreateProtoService(PS_SETMYAVATAR, &CSkypeProto::SvcSetMyAvatar); CreateProtoService("/IncomingCallCLE", &CSkypeProto::OnIncomingCallCLE); CreateProtoService("/IncomingCallPP", &CSkypeProto::OnIncomingCallPP); diff --git a/protocols/Steam/src/steam_avatars.cpp b/protocols/Steam/src/steam_avatars.cpp index 053a526134..7b84a5fe0b 100644 --- a/protocols/Steam/src/steam_avatars.cpp +++ b/protocols/Steam/src/steam_avatars.cpp @@ -18,7 +18,7 @@ TCHAR* CSteamProto::GetAvatarFilePath(MCONTACT hContact) return mir_tstrdup(path); } -bool CSteamProto::GetDbAvatarInfo(PROTO_AVATAR_INFORMATIONT &pai) +bool CSteamProto::GetDbAvatarInfo(PROTO_AVATAR_INFORMATION &pai) { ptrT path(GetAvatarFilePath(pai.hContact)); if (!path) @@ -44,7 +44,7 @@ void CSteamProto::CheckAvatarChange(MCONTACT hContact, std::string avatarUrl) if (!hContact) { - PROTO_AVATAR_INFORMATIONT pai = { sizeof(pai) }; + PROTO_AVATAR_INFORMATION pai = { sizeof(pai) }; if (GetAvatarInfo(update_required ? GAIF_FORCE : 0, (LPARAM)&pai) != GAIR_WAITFOR) CallService(MS_AV_REPORTMYAVATARCHANGED, (WPARAM)m_szModuleName, 0); } @@ -60,7 +60,7 @@ INT_PTR CSteamProto::GetAvatarInfo(WPARAM wParam, LPARAM lParam) if (!lParam) return GAIR_NOAVATAR; - PROTO_AVATAR_INFORMATIONT* pai = (PROTO_AVATAR_INFORMATIONT*)lParam; + PROTO_AVATAR_INFORMATION* pai = (PROTO_AVATAR_INFORMATION*)lParam; ptrA avatarUrl(getStringA(pai->hContact, "AvatarUrl")); if (!avatarUrl) @@ -144,7 +144,7 @@ INT_PTR CSteamProto::GetMyAvatar(WPARAM wParam, LPARAM lParam) TCHAR* buf = (TCHAR*)wParam; int size = (int)lParam; - PROTO_AVATAR_INFORMATIONT ai = { sizeof(ai) }; + PROTO_AVATAR_INFORMATION ai = { sizeof(ai) }; switch (GetAvatarInfo(0, (LPARAM)&ai)) { case GAIR_SUCCESS: _tcsncpy(buf, ai.filename, size); diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp index 85537b886a..fd43933e72 100644 --- a/protocols/Steam/src/steam_contacts.cpp +++ b/protocols/Steam/src/steam_contacts.cpp @@ -520,7 +520,7 @@ void CSteamProto::OnGotUserSummaries(const NETLIBHTTPREQUEST *response) void CSteamProto::OnGotAvatar(const NETLIBHTTPREQUEST *response, void *arg) { - PROTO_AVATAR_INFORMATIONW pai = { sizeof(pai) }; + PROTO_AVATAR_INFORMATION pai = { sizeof(pai) }; pai.hContact = (MCONTACT)arg; GetDbAvatarInfo(pai); diff --git a/protocols/Steam/src/steam_proto.cpp b/protocols/Steam/src/steam_proto.cpp index 577a896979..1ce64f65de 100644 --- a/protocols/Steam/src/steam_proto.cpp +++ b/protocols/Steam/src/steam_proto.cpp @@ -54,9 +54,9 @@ CSteamProto::CSteamProto(const char* protoName, const TCHAR* userName) : // services CreateServiceFunction(MODULE"/MenuChoose", CSteamProto::MenuChooseService); // avatar API - CreateProtoService(PS_GETAVATARINFOT, &CSteamProto::GetAvatarInfo); + CreateProtoService(PS_GETAVATARINFO, &CSteamProto::GetAvatarInfo); CreateProtoService(PS_GETAVATARCAPS, &CSteamProto::GetAvatarCaps); - CreateProtoService(PS_GETMYAVATART, &CSteamProto::GetMyAvatar); + CreateProtoService(PS_GETMYAVATAR, &CSteamProto::GetMyAvatar); // custom status API CreateProtoService(PS_GETCUSTOMSTATUSEX, &CSteamProto::OnGetXStatusEx); CreateProtoService(PS_GETCUSTOMSTATUSICON, &CSteamProto::OnGetXStatusIcon); diff --git a/protocols/Steam/src/steam_proto.h b/protocols/Steam/src/steam_proto.h index f37a36b20b..fc82986b67 100644 --- a/protocols/Steam/src/steam_proto.h +++ b/protocols/Steam/src/steam_proto.h @@ -206,7 +206,7 @@ protected: // avatars TCHAR* GetAvatarFilePath(MCONTACT hContact); - bool GetDbAvatarInfo(PROTO_AVATAR_INFORMATIONT &pai); + bool GetDbAvatarInfo(PROTO_AVATAR_INFORMATION &pai); void CheckAvatarChange(MCONTACT hContact, std::string avatarUrl); INT_PTR __cdecl GetAvatarInfo(WPARAM, LPARAM); diff --git a/protocols/Tlen/src/tlen_svc.cpp b/protocols/Tlen/src/tlen_svc.cpp index 427dec1869..c078194007 100644 --- a/protocols/Tlen/src/tlen_svc.cpp +++ b/protocols/Tlen/src/tlen_svc.cpp @@ -665,7 +665,7 @@ INT_PTR TlenProtocol::GetAvatarInfo(WPARAM wParam, LPARAM lParam) char *avatarHash = NULL; TLEN_LIST_ITEM *item = NULL; DBVARIANT dbv; - PROTO_AVATAR_INFORMATIONT* AI = ( PROTO_AVATAR_INFORMATIONT* )lParam; + PROTO_AVATAR_INFORMATION* AI = ( PROTO_AVATAR_INFORMATION* )lParam; if (AI->hContact != NULL) { if (!db_get(AI->hContact, m_szModuleName, "jid", &dbv)) { @@ -1179,11 +1179,11 @@ INT_PTR TlenProtocol::AccMgrUI(WPARAM wParam, LPARAM lParam) void TlenInitServicesVTbl(TlenProtocol *proto) { proto->CreateProtoService(PS_GETNAME, &TlenProtocol::GetName); - proto->CreateProtoService(PS_GETAVATARINFOT, &TlenProtocol::GetAvatarInfo); + proto->CreateProtoService(PS_GETAVATARINFO, &TlenProtocol::GetAvatarInfo); proto->CreateProtoService(PS_SEND_NUDGE, &TlenProtocol::SendAlert); proto->CreateProtoService(PS_GETAVATARCAPS, &TlenProtocol::GetAvatarCaps); - proto->CreateProtoService(PS_SETMYAVATART, &TlenProtocol::SetMyAvatar); - proto->CreateProtoService(PS_GETMYAVATART, &TlenProtocol::GetMyAvatar); + proto->CreateProtoService(PS_SETMYAVATAR, &TlenProtocol::SetMyAvatar); + proto->CreateProtoService(PS_GETMYAVATAR, &TlenProtocol::GetMyAvatar); proto->CreateProtoService(PS_GETSTATUS, &TlenProtocol::GetStatus); proto->CreateProtoService(PS_CREATEACCMGRUI, &TlenProtocol::AccMgrUI); } diff --git a/protocols/Tox/src/tox_avatars.cpp b/protocols/Tox/src/tox_avatars.cpp index 30132522ce..80aabc8ea3 100644 --- a/protocols/Tox/src/tox_avatars.cpp +++ b/protocols/Tox/src/tox_avatars.cpp @@ -121,7 +121,7 @@ INT_PTR CToxProto::GetAvatarCaps(WPARAM wParam, LPARAM lParam) INT_PTR CToxProto::GetAvatarInfo(WPARAM, LPARAM lParam) { - PROTO_AVATAR_INFORMATIONW *pai = (PROTO_AVATAR_INFORMATIONW *)lParam; + PROTO_AVATAR_INFORMATION *pai = (PROTO_AVATAR_INFORMATION *)lParam; ptrA address(getStringA(pai->hContact, TOX_SETTINGS_ID)); if (address != NULL) @@ -232,7 +232,7 @@ void CToxProto::OnGotFriendAvatarData(AvatarTransferParam *transfer) { db_set_blob(transfer->pfts.hContact, m_szModuleName, TOX_SETTINGS_AVATAR_HASH, transfer->hash, TOX_HASH_LENGTH); - PROTO_AVATAR_INFORMATIONT pai = { sizeof(pai) }; + PROTO_AVATAR_INFORMATION pai = { sizeof(pai) }; pai.format = PA_FORMAT_PNG; pai.hContact = transfer->pfts.hContact; mir_tstrcpy(pai.filename, transfer->pfts.tszCurrentFile); diff --git a/protocols/Tox/src/tox_proto.cpp b/protocols/Tox/src/tox_proto.cpp index b3e4ff4a7f..aff83a2db3 100644 --- a/protocols/Tox/src/tox_proto.cpp +++ b/protocols/Tox/src/tox_proto.cpp @@ -20,9 +20,9 @@ hPollingThread(NULL), hOutDevice(NULL) // avatars CreateProtoService(PS_GETAVATARCAPS, &CToxProto::GetAvatarCaps); - CreateProtoService(PS_GETAVATARINFOT, &CToxProto::GetAvatarInfo); - CreateProtoService(PS_GETMYAVATART, &CToxProto::GetMyAvatar); - CreateProtoService(PS_SETMYAVATART, &CToxProto::SetMyAvatar); + CreateProtoService(PS_GETAVATARINFO, &CToxProto::GetAvatarInfo); + CreateProtoService(PS_GETMYAVATAR, &CToxProto::GetMyAvatar); + CreateProtoService(PS_SETMYAVATAR, &CToxProto::SetMyAvatar); // nick CreateProtoService(PS_SETMYNICKNAME, &CToxProto::SetMyNickname); diff --git a/protocols/Twitter/src/connection.cpp b/protocols/Twitter/src/connection.cpp index f793b09e0a..202daf9fbb 100644 --- a/protocols/Twitter/src/connection.cpp +++ b/protocols/Twitter/src/connection.cpp @@ -403,7 +403,7 @@ void TwitterProto::UpdateAvatarWorker(void *p) std::tstring filename = GetAvatarFolder() + _T('\\') + dbv.ptszVal + (TCHAR*)_A2T(ext.c_str()); // local filename and path db_free(&dbv); - PROTO_AVATAR_INFORMATIONT ai = { sizeof(ai) }; + PROTO_AVATAR_INFORMATION ai = { sizeof(ai) }; ai.hContact = data->hContact; ai.format = ProtoGetAvatarFormat(filename.c_str()); @@ -442,7 +442,7 @@ void TwitterProto::UpdateAvatar(MCONTACT hContact, const std::string &url, bool else { // TODO: more defaults (configurable?) if (url == "http://static.twitter.com/images/default_profile_normal.png") { - PROTO_AVATAR_INFORMATIONT ai = { sizeof(ai), hContact }; + PROTO_AVATAR_INFORMATION ai = { sizeof(ai), hContact }; db_set_s(hContact, m_szModuleName, TWITTER_KEY_AV_URL, url.c_str()); ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, &ai, 0); diff --git a/protocols/VKontakte/src/vk_avatars.cpp b/protocols/VKontakte/src/vk_avatars.cpp index f5a7046171..60cf0b8df1 100644 --- a/protocols/VKontakte/src/vk_avatars.cpp +++ b/protocols/VKontakte/src/vk_avatars.cpp @@ -22,7 +22,7 @@ void CVkProto::OnReceiveAvatar(NETLIBHTTPREQUEST *reply, AsyncHttpRequest* pReq) if (reply->resultCode != 200) return; - PROTO_AVATAR_INFORMATIONT AI = { sizeof(AI) }; + PROTO_AVATAR_INFORMATION AI = { sizeof(AI) }; GetAvatarFileName((MCONTACT)pReq->pUserInfo, AI.filename, SIZEOF(AI.filename)); AI.format = ProtoGetBufferFormat(reply->pData); @@ -66,14 +66,14 @@ void CVkProto::ReloadAvatarInfo(MCONTACT hContact) CallService(MS_AV_REPORTMYAVATARCHANGED, (WPARAM)m_szModuleName, 0); return; } - PROTO_AVATAR_INFORMATIONT AI = { sizeof(AI) }; + PROTO_AVATAR_INFORMATION AI = { sizeof(AI) }; AI.hContact = hContact; SvcGetAvatarInfo(0, (LPARAM)&AI); } INT_PTR CVkProto::SvcGetAvatarInfo(WPARAM, LPARAM lParam) { - PROTO_AVATAR_INFORMATIONT* AI = (PROTO_AVATAR_INFORMATIONT*)lParam; + PROTO_AVATAR_INFORMATION* AI = (PROTO_AVATAR_INFORMATION*)lParam; ptrA szUrl(getStringA(AI->hContact, "AvatarUrl")); if (szUrl == NULL) @@ -109,7 +109,7 @@ INT_PTR CVkProto::SvcGetAvatarInfo(WPARAM, LPARAM lParam) INT_PTR CVkProto::SvcGetMyAvatar(WPARAM wParam, LPARAM lParam) { debugLogA("CVkProto::SvcGetMyAvatar"); - PROTO_AVATAR_INFORMATIONT AI = { sizeof(AI) }; + PROTO_AVATAR_INFORMATION AI = { sizeof(AI) }; AI.hContact = NULL; if (SvcGetAvatarInfo(0, (LPARAM)&AI) != GAIR_SUCCESS) return 1; @@ -159,7 +159,7 @@ void CVkProto::SetAvatarUrl(MCONTACT hContact, CMString &tszUrl) else { setTString(hContact, "AvatarUrl", tszUrl); setByte(hContact,"NeedNewAvatar", 1); - PROTO_AVATAR_INFORMATIONT AI = { sizeof(AI) }; + PROTO_AVATAR_INFORMATION AI = { sizeof(AI) }; AI.hContact = hContact; GetAvatarFileName(AI.hContact, AI.filename, SIZEOF(AI.filename)); AI.format = ProtoGetAvatarFormat(AI.filename); diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index 7d0f9a52be..887cafdf8c 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -44,9 +44,9 @@ CVkProto::CVkProto(const char *szModuleName, const TCHAR *ptszUserName) : InitQueue(); CreateProtoService(PS_CREATEACCMGRUI, &CVkProto::SvcCreateAccMgrUI); - CreateProtoService(PS_GETAVATARINFOT, &CVkProto::SvcGetAvatarInfo); + CreateProtoService(PS_GETAVATARINFO, &CVkProto::SvcGetAvatarInfo); CreateProtoService(PS_GETAVATARCAPS, &CVkProto::SvcGetAvatarCaps); - CreateProtoService(PS_GETMYAVATART, &CVkProto::SvcGetMyAvatar); + CreateProtoService(PS_GETMYAVATAR, &CVkProto::SvcGetMyAvatar); CreateProtoService(PS_SET_LISTENINGTO, &CVkProto::SvcSetListeningTo); HookProtoEvent(ME_OPT_INITIALISE, &CVkProto::OnOptionsInit); diff --git a/protocols/WhatsApp/src/avatars.cpp b/protocols/WhatsApp/src/avatars.cpp index c9797799a3..3c5f10d102 100644 --- a/protocols/WhatsApp/src/avatars.cpp +++ b/protocols/WhatsApp/src/avatars.cpp @@ -2,7 +2,7 @@ INT_PTR WhatsAppProto::GetAvatarInfo(WPARAM wParam, LPARAM lParam) { - PROTO_AVATAR_INFORMATIONT* AI = (PROTO_AVATAR_INFORMATIONT*)lParam; + PROTO_AVATAR_INFORMATION* AI = (PROTO_AVATAR_INFORMATION*)lParam; ptrA id(getStringA(AI->hContact, isChatRoom(AI->hContact) ? "ChatRoomID" : WHATSAPP_KEY_ID)); if (id == NULL) diff --git a/protocols/WhatsApp/src/contacts.cpp b/protocols/WhatsApp/src/contacts.cpp index 30a87fe73a..caa0771f5b 100644 --- a/protocols/WhatsApp/src/contacts.cpp +++ b/protocols/WhatsApp/src/contacts.cpp @@ -165,7 +165,7 @@ void WhatsAppProto::onSendGetPicture(const std::string &jid, const std::vectorusername, &av)) { - PROTO_AVATAR_INFORMATIONT AI; - AI.cbSize = sizeof(AI); + PROTO_AVATAR_INFORMATION AI; AI.format = av.type; AI.hContact = xsa->hContact; mir_tstrcpy(AI.filename, _A2T(av.file)); @@ -3382,7 +3381,8 @@ int IconLibChanged(WPARAM wParam, LPARAM lParam) { } -INT_PTR GetAvatarInfo(WPARAM wParam, LPARAM lParam) { +INT_PTR GetAvatarInfo(WPARAM wParam, LPARAM lParam) +{ PROTO_AVATAR_INFORMATION* pai = (PROTO_AVATAR_INFORMATION*)lParam; if (db_get_b(NULL, protocolname, "noavatars", -1) != 0) @@ -3392,14 +3392,10 @@ INT_PTR GetAvatarInfo(WPARAM wParam, LPARAM lParam) { if (pai->format == 0) return GAIR_NOAVATAR; - DBVARIANT dbv; - if (!db_get(pai->hContact, "ContactPhoto", "File", &dbv)) - { - strncpy(pai->filename, dbv.pszVal, sizeof(pai->filename)-1); - db_free(&dbv); - } - else + ptrW pwszPath(db_get_wsa(pai->hContact, "ContactPhoto", "File")); + if (pwszPath == NULL) return GAIR_NOAVATAR; + wcsncpy_s(pai->filename, pwszPath, _TRUNCATE); return GAIR_SUCCESS; } diff --git a/protocols/Xfire/src/processbuddyinfo.cpp b/protocols/Xfire/src/processbuddyinfo.cpp index a788f2e7ca..7d03146da4 100644 --- a/protocols/Xfire/src/processbuddyinfo.cpp +++ b/protocols/Xfire/src/processbuddyinfo.cpp @@ -90,8 +90,7 @@ void ProcessBuddyInfo(xfirelib::BuddyInfoPacket *buddyinfo, MCONTACT hcontact, c { db_set_dw(hcontact, "ContactPhoto", "XFireAvatarId", buddyinfo->avatarid); db_set_b(hcontact, "ContactPhoto", "XFireAvatarMode", buddyinfo->avatarmode); - PROTO_AVATAR_INFORMATIONT AI; - AI.cbSize = sizeof(AI); + PROTO_AVATAR_INFORMATION AI; AI.format = type; AI.hContact = hcontact; mir_tstrcpy(AI.filename, _A2T(filename)); diff --git a/protocols/Xfire/src/services.cpp b/protocols/Xfire/src/services.cpp index 380308cc14..fdb15d7e80 100644 --- a/protocols/Xfire/src/services.cpp +++ b/protocols/Xfire/src/services.cpp @@ -52,18 +52,15 @@ BOOL IsContactMySelf(std::string buddyusername) { return FALSE; } -//liefert vollendateipfad vom eigenen avatar zurück, wenn definiert -INT_PTR GetMyAvatar(WPARAM wparam, LPARAM lparam) { - DBVARIANT dbv; +// liefert vollendateipfad vom eigenen avatar zurück, wenn definiert +INT_PTR GetMyAvatar(WPARAM wparam, LPARAM lparam) +{ + ptrW wszFileName(db_get_wsa(NULL, protocolname, "MyAvatarFile")); + if (wszFileName == NULL) + return -1; - if (!db_get(NULL, protocolname, "MyAvatarFile", &dbv)) - { - strncpy((char*)wparam, dbv.pszVal, (int)lparam); - db_free(&dbv); - return 0; - } - - return -1; + wcsncpy_s((wchar_t*)wparam, (size_t)lparam, wszFileName, _TRUNCATE); + return 0; } //liefert vollendateipfad vom eigenen avatar zurück, wenn definiert diff --git a/protocols/Yahoo/src/avatar.cpp b/protocols/Yahoo/src/avatar.cpp index 5b35f6b3d9..3290fefc69 100644 --- a/protocols/Yahoo/src/avatar.cpp +++ b/protocols/Yahoo/src/avatar.cpp @@ -242,8 +242,7 @@ void __cdecl CYahooProto::recv_avatarthread(void *pavt) free(avt->pic_url); free(avt); - PROTO_AVATAR_INFORMATIONT AI; - AI.cbSize = sizeof AI; + PROTO_AVATAR_INFORMATION AI; AI.format = PA_FORMAT_PNG; AI.hContact = hContact; _tcsncpy(AI.filename, buf, SIZEOF(AI.filename)-1); @@ -618,7 +617,7 @@ void CYahooProto::GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, int cbLen INT_PTR __cdecl CYahooProto::GetAvatarInfo(WPARAM wParam,LPARAM lParam) { - PROTO_AVATAR_INFORMATIONT* AI = ( PROTO_AVATAR_INFORMATIONT* )lParam; + PROTO_AVATAR_INFORMATION* AI = ( PROTO_AVATAR_INFORMATION* )lParam; DBVARIANT dbv; int avtType; diff --git a/protocols/Yahoo/src/services.cpp b/protocols/Yahoo/src/services.cpp index 196ac65c1e..b6417f83d6 100644 --- a/protocols/Yahoo/src/services.cpp +++ b/protocols/Yahoo/src/services.cpp @@ -508,9 +508,9 @@ void CYahooProto::LoadYahooServices( void ) //----| Service creation |------------------------------------------------------------ CreateProtoService(PS_CREATEACCMGRUI, &CYahooProto::SvcCreateAccMgrUI); - CreateProtoService(PS_GETAVATARINFOT, &CYahooProto::GetAvatarInfo); - CreateProtoService(PS_GETMYAVATART, &CYahooProto::GetMyAvatar); - CreateProtoService(PS_SETMYAVATART, &CYahooProto::SetMyAvatar); + CreateProtoService(PS_GETAVATARINFO, &CYahooProto::GetAvatarInfo); + CreateProtoService(PS_GETMYAVATAR, &CYahooProto::GetMyAvatar); + CreateProtoService(PS_SETMYAVATAR, &CYahooProto::SetMyAvatar); CreateProtoService(PS_GETAVATARCAPS, &CYahooProto::GetAvatarCaps); CreateProtoService(PS_GETMYAWAYMSG, &CYahooProto::GetMyAwayMsg); diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index 399703ec52..59f56219a2 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -912,8 +912,8 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP case DM_GETAVATAR: { - PROTO_AVATAR_INFORMATIONT ai = { sizeof(ai), dat->hContact }; - CallProtoService(dat->szProto, PS_GETAVATARINFOT, GAIF_FORCE, (LPARAM)&ai); + PROTO_AVATAR_INFORMATION ai = { sizeof(ai), dat->hContact }; + CallProtoService(dat->szProto, PS_GETAVATARINFO, GAIF_FORCE, (LPARAM)&ai); ShowAvatar(hwndDlg, dat); SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, 1); diff --git a/src/mir_core/src/protos.cpp b/src/mir_core/src/protos.cpp index 2e4f009cdc..154ff2ad26 100644 --- a/src/mir_core/src/protos.cpp +++ b/src/mir_core/src/protos.cpp @@ -93,18 +93,6 @@ MIR_CORE_DLL(void) ProtoLogW(struct PROTO_INTERFACE *pThis, LPCWSTR wszFormat, v MIR_CORE_DLL(INT_PTR) ProtoBroadcastAck(const char *szModule, MCONTACT hContact, int type, int result, HANDLE hProcess, LPARAM lParam) { - if (type == ACKTYPE_AVATAR && hProcess) { - PROTO_AVATAR_INFORMATION* ai = (PROTO_AVATAR_INFORMATION*)hProcess; - if (ai->cbSize == sizeof(PROTO_AVATAR_INFORMATION)) { - PROTO_AVATAR_INFORMATIONW aiw = { sizeof(aiw), ai->hContact, ai->format }; - MultiByteToWideChar(CP_ACP, 0, ai->filename, -1, aiw.filename, SIZEOF(aiw.filename)); - - hProcess = &aiw; - ACKDATA ack = { sizeof(ACKDATA), szModule, hContact, type, result, hProcess, lParam }; - return NotifyEventHooks(hAckEvent, 0, (LPARAM)&ack); - } - } - ACKDATA ack = { sizeof(ACKDATA), szModule, hContact, type, result, hProcess, lParam }; return NotifyEventHooks(hAckEvent, 0, (LPARAM)&ack); } diff --git a/src/modules/metacontacts/meta_edit.cpp b/src/modules/metacontacts/meta_edit.cpp index fba8032489..e4eabf0347 100644 --- a/src/modules/metacontacts/meta_edit.cpp +++ b/src/modules/metacontacts/meta_edit.cpp @@ -164,11 +164,11 @@ static void ApplyChanges() // fix avatar most_online = Meta_GetMostOnlineSupporting(g_data.cc, PFLAGNUM_4, PF4_AVATARS); if (most_online) { - PROTO_AVATAR_INFORMATIONT AI = { sizeof(AI) }; + PROTO_AVATAR_INFORMATION AI = { sizeof(AI) }; AI.hContact = g_data.hMeta; AI.format = PA_FORMAT_UNKNOWN; _tcsncpy_s(AI.filename, _T("X"), _TRUNCATE); - if (CallProtoService(META_PROTO, PS_GETAVATARINFOT, 0, (LPARAM)&AI) == GAIR_SUCCESS) + if (CallProtoService(META_PROTO, PS_GETAVATARINFO, 0, (LPARAM)&AI) == GAIR_SUCCESS) db_set_ts(g_data.hMeta, "ContactPhoto", "File", AI.filename); } } diff --git a/src/modules/metacontacts/meta_menu.cpp b/src/modules/metacontacts/meta_menu.cpp index 3ecbf8481c..495768c9fd 100644 --- a/src/modules/metacontacts/meta_menu.cpp +++ b/src/modules/metacontacts/meta_menu.cpp @@ -160,12 +160,12 @@ void Meta_RemoveContactNumber(DBCachedContact *ccMeta, int number, bool bUpdateI // fix avatar MCONTACT hContact = Meta_GetMostOnlineSupporting(ccMeta, PFLAGNUM_4, PF4_AVATARS); if (hContact) { - PROTO_AVATAR_INFORMATIONT AI = { sizeof(AI) }; + PROTO_AVATAR_INFORMATION AI = { sizeof(AI) }; AI.hContact = ccMeta->contactID; AI.format = PA_FORMAT_UNKNOWN; _tcsncpy_s(AI.filename, _T("X"), _TRUNCATE); - if (CallProtoService(META_PROTO, PS_GETAVATARINFOT, 0, (LPARAM)&AI) == GAIR_SUCCESS) + if (CallProtoService(META_PROTO, PS_GETAVATARINFO, 0, (LPARAM)&AI) == GAIR_SUCCESS) db_set_ts(ccMeta->contactID, "ContactPhoto", "File", AI.filename); } } diff --git a/src/modules/metacontacts/meta_services.cpp b/src/modules/metacontacts/meta_services.cpp index b947a6f551..3b48c62c69 100644 --- a/src/modules/metacontacts/meta_services.cpp +++ b/src/modules/metacontacts/meta_services.cpp @@ -303,8 +303,8 @@ int Meta_HandleACK(WPARAM, LPARAM lParam) } if (ack->hProcess) { - PROTO_AVATAR_INFORMATIONT AI; - memcpy(&AI, (PROTO_AVATAR_INFORMATIONT *)ack->hProcess, sizeof(PROTO_AVATAR_INFORMATIONT)); + PROTO_AVATAR_INFORMATION AI; + memcpy(&AI, (PROTO_AVATAR_INFORMATION *)ack->hProcess, sizeof(PROTO_AVATAR_INFORMATION)); if (AI.hContact) AI.hContact = cc->contactID; @@ -442,11 +442,11 @@ int Meta_SettingChanged(WPARAM hContact, LPARAM lParam) // most online contact with avatar support might have changed - update avatar hMostOnline = Meta_GetMostOnlineSupporting(ccMeta, PFLAGNUM_4, PF4_AVATARS); if (hMostOnline) { - PROTO_AVATAR_INFORMATIONT AI = { sizeof(AI) }; + PROTO_AVATAR_INFORMATION AI = { sizeof(AI) }; AI.hContact = ccMeta->contactID; AI.format = PA_FORMAT_UNKNOWN; _tcsncpy_s(AI.filename, _T("X"), _TRUNCATE); - if (CallProtoService(META_PROTO, PS_GETAVATARINFOT, 0, (LPARAM)&AI) == GAIR_SUCCESS) + if (CallProtoService(META_PROTO, PS_GETAVATARINFO, 0, (LPARAM)&AI) == GAIR_SUCCESS) db_set_ts(ccMeta->contactID, "ContactPhoto", "File", AI.filename); } } @@ -748,7 +748,7 @@ INT_PTR Meta_GetAwayMsg(WPARAM wParam, LPARAM lParam) INT_PTR Meta_GetAvatarInfo(WPARAM wParam, LPARAM lParam) { - PROTO_AVATAR_INFORMATIONT *AI = (PROTO_AVATAR_INFORMATIONT*)lParam; + PROTO_AVATAR_INFORMATION *AI = (PROTO_AVATAR_INFORMATION*)lParam; DBCachedContact *cc = CheckMeta(AI->hContact); if (cc == NULL) return GAIR_NOAVATAR; @@ -765,7 +765,7 @@ INT_PTR Meta_GetAvatarInfo(WPARAM wParam, LPARAM lParam) return GAIR_NOAVATAR; AI->hContact = hSub; - INT_PTR result = CallProtoService(proto, PS_GETAVATARINFOT, wParam, lParam); + INT_PTR result = CallProtoService(proto, PS_GETAVATARINFO, wParam, lParam); AI->hContact = cc->contactID; if (result != CALLSERVICE_NOTFOUND) return result; @@ -791,12 +791,11 @@ INT_PTR Meta_GetInfo(WPARAM wParam, LPARAM lParam) if (!proto) return 0; - PROTO_AVATAR_INFORMATIONT AI; - AI.cbSize = sizeof(AI); + PROTO_AVATAR_INFORMATION AI; AI.hContact = ccs->hContact; AI.format = PA_FORMAT_UNKNOWN; _tcsncpy_s(AI.filename, _T("X"), _TRUNCATE); - if (CallProtoService(META_PROTO, PS_GETAVATARINFOT, 0, (LPARAM)&AI) == GAIR_SUCCESS) + if (CallProtoService(META_PROTO, PS_GETAVATARINFO, 0, (LPARAM)&AI) == GAIR_SUCCESS) db_set_ts(ccs->hContact, "ContactPhoto", "File", AI.filename); hMostOnline = Meta_GetMostOnline(cc); @@ -873,7 +872,7 @@ void Meta_InitServices() // file recv is done by subcontacts CreateProtoServiceFunction(META_PROTO, PSS_FILE, Meta_FileSend); CreateProtoServiceFunction(META_PROTO, PSS_GETAWAYMSG, Meta_GetAwayMsg); - CreateProtoServiceFunction(META_PROTO, PS_GETAVATARINFOT, Meta_GetAvatarInfo); + CreateProtoServiceFunction(META_PROTO, PS_GETAVATARINFO, Meta_GetAvatarInfo); CreateProtoServiceFunction(META_PROTO, PSS_GETINFO, Meta_GetInfo); // receive filter diff --git a/src/modules/metacontacts/meta_utils.cpp b/src/modules/metacontacts/meta_utils.cpp index eef6561c16..18a4c42078 100644 --- a/src/modules/metacontacts/meta_utils.cpp +++ b/src/modules/metacontacts/meta_utils.cpp @@ -191,13 +191,12 @@ BOOL Meta_Assign(MCONTACT hSub, MCONTACT hMeta, BOOL set_as_default) // if the new contact is the most online contact with avatar support, get avatar info most_online = Meta_GetMostOnlineSupporting(ccDest, PFLAGNUM_4, PF4_AVATARS); if (most_online == hSub) { - PROTO_AVATAR_INFORMATIONT AI; - AI.cbSize = sizeof(AI); + PROTO_AVATAR_INFORMATION AI; AI.hContact = hMeta; AI.format = PA_FORMAT_UNKNOWN; _tcsncpy_s(AI.filename, _T("X"), _TRUNCATE); - if (CallProtoService(META_PROTO, PS_GETAVATARINFOT, 0, (LPARAM)&AI) == GAIR_SUCCESS) + if (CallProtoService(META_PROTO, PS_GETAVATARINFO, 0, (LPARAM)&AI) == GAIR_SUCCESS) db_set_ts(hMeta, "ContactPhoto", "File", AI.filename); } diff --git a/src/modules/protocols/protoaccs.cpp b/src/modules/protocols/protoaccs.cpp index 5e29c13b12..42e27aba15 100644 --- a/src/modules/protocols/protoaccs.cpp +++ b/src/modules/protocols/protoaccs.cpp @@ -291,45 +291,6 @@ int LoadAccountsModule(void) ///////////////////////////////////////////////////////////////////////////////////////// -static INT_PTR stub43(PROTO_INTERFACE* ppi, WPARAM wParam, LPARAM lParam) -{ - PROTO_AVATAR_INFORMATION* p = (PROTO_AVATAR_INFORMATION*)lParam; - - PROTO_AVATAR_INFORMATIONW tmp = { 0 }; - tmp.cbSize = sizeof(tmp); - tmp.hContact = p->hContact; - int result = CallProtoServiceInt(NULL, ppi->m_szModuleName, PS_GETAVATARINFOW, wParam, (LPARAM)&tmp); - - p->format = tmp.format; - - wchar_t filename[MAX_PATH]; - mir_wstrcpy(filename, tmp.filename); - GetShortPathNameW(tmp.filename, filename, SIZEOF(filename)); - - WideCharToMultiByte(CP_ACP, 0, filename, -1, p->filename, MAX_PATH, 0, 0); - return result; -} - -static INT_PTR stub44(PROTO_INTERFACE* ppi, WPARAM wParam, LPARAM lParam) -{ - wchar_t* buf = (wchar_t*)_alloca(sizeof(wchar_t) * (lParam + 1)); - int result = CallProtoServiceInt(NULL, ppi->m_szModuleName, PS_GETMYAVATARW, WPARAM(buf), lParam); - if (result == 0) { - wchar_t* filename = (wchar_t*)_alloca(sizeof(wchar_t) * (lParam + 1)); - mir_wstrcpy(filename, buf); - GetShortPathNameW(buf, filename, lParam + 1); - - WideCharToMultiByte(CP_ACP, 0, filename, -1, (char*)wParam, lParam, 0, 0); - } - - return result; -} - -static INT_PTR stub45(PROTO_INTERFACE* ppi, WPARAM wParam, LPARAM lParam) -{ - return CallProtoServiceInt(NULL, ppi->m_szModuleName, PS_SETMYAVATARW, wParam, _A2T((char*)lParam)); -} - static HANDLE CreateProtoServiceEx(const char* szModule, const char* szService, MIRANDASERVICEOBJ pFunc, void* param) { char tmp[100]; @@ -352,19 +313,6 @@ BOOL ActivateAccount(PROTOACCOUNT *pa) pa->ppro = ppi; ppi->m_iDesiredStatus = ppi->m_iStatus = ID_STATUS_OFFLINE; - - if (!ProtoServiceExists(pa->szModuleName, PS_GETAVATARINFO)) - if (ProtoServiceExists(pa->szModuleName, PS_GETAVATARINFOW)) - CreateProtoServiceEx(pa->szModuleName, PS_GETAVATARINFO, (MIRANDASERVICEOBJ)stub43, pa->ppro); - - if (!ProtoServiceExists(pa->szModuleName, PS_GETMYAVATAR)) - if (ProtoServiceExists(pa->szModuleName, PS_GETMYAVATARW)) - CreateProtoServiceEx(pa->szModuleName, PS_GETMYAVATAR, (MIRANDASERVICEOBJ)stub44, pa->ppro); - - if (!ProtoServiceExists(pa->szModuleName, PS_SETMYAVATAR)) - if (ProtoServiceExists(pa->szModuleName, PS_SETMYAVATARW)) - CreateProtoServiceEx(pa->szModuleName, PS_SETMYAVATAR, (MIRANDASERVICEOBJ)stub45, pa->ppro); - return TRUE; } -- cgit v1.2.3