summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-01 18:10:32 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-01 18:10:32 +0000
commit2bb514f4195c99b52e0ec748c975c0fd30dbbd25 (patch)
treee7325f314a828e1233b89ef688e6e52a8846925a /protocols
parenta59538975c7fef04bcbf9e62b81c78753ac2a16c (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 'protocols')
-rw-r--r--protocols/AimOscar/src/avatars.cpp4
-rw-r--r--protocols/AimOscar/src/proto.cpp6
-rw-r--r--protocols/AimOscar/src/services.cpp4
-rw-r--r--protocols/FacebookRM/src/avatars.cpp10
-rw-r--r--protocols/FacebookRM/src/proto.cpp4
-rw-r--r--protocols/FacebookRM/src/proto.h2
-rw-r--r--protocols/Gadu-Gadu/src/avatar.cpp8
-rw-r--r--protocols/Gadu-Gadu/src/core.cpp4
-rw-r--r--protocols/Gadu-Gadu/src/gg_proto.cpp6
-rw-r--r--protocols/Gadu-Gadu/src/services.cpp8
-rw-r--r--protocols/IcqOscarJ/src/icq_avatar.cpp2
-rw-r--r--protocols/IcqOscarJ/src/icq_proto.cpp6
-rw-r--r--protocols/IcqOscarJ/src/icqosc_svcs.cpp2
-rw-r--r--protocols/JabberG/src/jabber_iqid.cpp3
-rw-r--r--protocols/JabberG/src/jabber_proto.cpp6
-rw-r--r--protocols/JabberG/src/jabber_svc.cpp2
-rw-r--r--protocols/JabberG/src/jabber_util.cpp3
-rw-r--r--protocols/MRA/src/MraAvatars.cpp9
-rw-r--r--protocols/MRA/src/MraProto.cpp4
-rw-r--r--protocols/MRA/src/Mra_svcs.cpp2
-rw-r--r--protocols/MSN/src/msn_avatar.cpp2
-rw-r--r--protocols/MSN/src/msn_commands.cpp2
-rw-r--r--protocols/MSN/src/msn_p2p.cpp4
-rw-r--r--protocols/MSN/src/msn_proto.cpp6
-rw-r--r--protocols/MSN/src/msn_svcs.cpp6
-rw-r--r--protocols/SkypeWeb/src/skype_avatars.cpp8
-rw-r--r--protocols/SkypeWeb/src/skype_proto.cpp6
-rw-r--r--protocols/Steam/src/steam_avatars.cpp8
-rw-r--r--protocols/Steam/src/steam_contacts.cpp2
-rw-r--r--protocols/Steam/src/steam_proto.cpp4
-rw-r--r--protocols/Steam/src/steam_proto.h2
-rw-r--r--protocols/Tlen/src/tlen_svc.cpp8
-rw-r--r--protocols/Tox/src/tox_avatars.cpp4
-rw-r--r--protocols/Tox/src/tox_proto.cpp6
-rw-r--r--protocols/Twitter/src/connection.cpp4
-rw-r--r--protocols/VKontakte/src/vk_avatars.cpp10
-rw-r--r--protocols/VKontakte/src/vk_proto.cpp4
-rw-r--r--protocols/WhatsApp/src/avatars.cpp2
-rw-r--r--protocols/WhatsApp/src/contacts.cpp2
-rw-r--r--protocols/WhatsApp/src/proto.cpp6
-rw-r--r--protocols/Xfire/src/main.cpp16
-rw-r--r--protocols/Xfire/src/processbuddyinfo.cpp3
-rw-r--r--protocols/Xfire/src/services.cpp19
-rw-r--r--protocols/Yahoo/src/avatar.cpp5
-rw-r--r--protocols/Yahoo/src/services.cpp6
45 files changed, 110 insertions, 130 deletions
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 <http://www.gnu.org/licenses/>.
#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<CSkypeProto>(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::vector<u
size_t r = fwrite(std::string(data.begin(), data.end()).c_str(), 1, data.size(), f);
fclose(f);
- PROTO_AVATAR_INFORMATIONT ai = { sizeof(ai) };
+ PROTO_AVATAR_INFORMATION ai = { sizeof(ai) };
ai.hContact = hContact;
ai.format = PA_FORMAT_JPEG;
_tcsncpy_s(ai.filename, filename.c_str(), _TRUNCATE);
diff --git a/protocols/WhatsApp/src/proto.cpp b/protocols/WhatsApp/src/proto.cpp
index 21af7baa4b..9b89beeaa1 100644
--- a/protocols/WhatsApp/src/proto.cpp
+++ b/protocols/WhatsApp/src/proto.cpp
@@ -23,10 +23,10 @@ WhatsAppProto::WhatsAppProto(const char* proto_name, const TCHAR* username) :
CreateProtoService(PS_CREATEACCMGRUI, &WhatsAppProto::SvcCreateAccMgrUI);
- CreateProtoService(PS_GETAVATARINFOT, &WhatsAppProto::GetAvatarInfo);
+ CreateProtoService(PS_GETAVATARINFO, &WhatsAppProto::GetAvatarInfo);
CreateProtoService(PS_GETAVATARCAPS, &WhatsAppProto::GetAvatarCaps);
- CreateProtoService(PS_GETMYAVATART, &WhatsAppProto::GetMyAvatar);
- CreateProtoService(PS_SETMYAVATART, &WhatsAppProto::SetMyAvatar);
+ CreateProtoService(PS_GETMYAVATAR, &WhatsAppProto::GetMyAvatar);
+ CreateProtoService(PS_SETMYAVATAR, &WhatsAppProto::SetMyAvatar);
HookProtoEvent(ME_DB_CONTACT_DELETED, &WhatsAppProto::OnDeleteChat);
HookProtoEvent(ME_OPT_INITIALISE, &WhatsAppProto::OnOptionsInit);
diff --git a/protocols/Xfire/src/main.cpp b/protocols/Xfire/src/main.cpp
index 189439fa4a..ef2bd0e77f 100644
--- a/protocols/Xfire/src/main.cpp
+++ b/protocols/Xfire/src/main.cpp
@@ -1784,8 +1784,7 @@ void SetAvatar(void *arg)
if (GetAvatar(xsa->username, &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);