summaryrefslogtreecommitdiff
path: root/protocols/Gadu-Gadu
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-20 07:18:21 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-20 07:18:21 +0000
commit8eaea03b376ddda81c6f31c2cb1d46963b16d8a2 (patch)
tree1658c07b25e2e75e85a93836687b116229907e64 /protocols/Gadu-Gadu
parentb766ebf1a1091dcc2859a92da300c44e0e432a84 (diff)
total replacement of PROTO_AVATAR_INFORMATION with PROTO_AVATAR_INFORMATIONT
git-svn-id: http://svn.miranda-ng.org/main/trunk@496 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Gadu-Gadu')
-rw-r--r--protocols/Gadu-Gadu/avatar.c6
-rw-r--r--protocols/Gadu-Gadu/core.c2
-rw-r--r--protocols/Gadu-Gadu/services.c17
3 files changed, 13 insertions, 12 deletions
diff --git a/protocols/Gadu-Gadu/avatar.c b/protocols/Gadu-Gadu/avatar.c
index a0d18e1eb3..39e49c12bf 100644
--- a/protocols/Gadu-Gadu/avatar.c
+++ b/protocols/Gadu-Gadu/avatar.c
@@ -207,7 +207,7 @@ void __cdecl gg_avatarrequestthread(GGPROTO *gg, void *empty)
DBWriteContactSettingByte(hContact, GG_PROTO, GG_KEY_AVATARREQUESTED, 1);
if (iWaitFor) {
- PROTO_AVATAR_INFORMATION pai = {0};
+ PROTO_AVATAR_INFORMATIONT pai = {0};
pai.cbSize = sizeof(pai);
pai.hContact = hContact;
if (gg_getavatarinfo(gg, (WPARAM)GAIF_FORCE, (LPARAM)&pai) != GAIR_WAITFOR)
@@ -222,7 +222,7 @@ void __cdecl gg_avatarrequestthread(GGPROTO *gg, void *empty)
GGGETAVATARDATA *data = (GGGETAVATARDATA *)gg->avatar_transfers->data;
NETLIBHTTPREQUEST req = {0};
NETLIBHTTPREQUEST *resp;
- PROTO_AVATAR_INFORMATION pai = {0};
+ PROTO_AVATAR_INFORMATIONT pai = {0};
int result = 0;
pai.cbSize = sizeof(pai);
@@ -301,7 +301,7 @@ void gg_uninitavatarrequestthread(GGPROTO *gg)
void __cdecl gg_getuseravatarthread(GGPROTO *gg, void *empty)
{
- PROTO_AVATAR_INFORMATION pai = {0};
+ PROTO_AVATAR_INFORMATIONT pai = {0};
char *AvatarURL;
int AvatarType;
diff --git a/protocols/Gadu-Gadu/core.c b/protocols/Gadu-Gadu/core.c
index 4f1ac840bd..0641f7df25 100644
--- a/protocols/Gadu-Gadu/core.c
+++ b/protocols/Gadu-Gadu/core.c
@@ -1606,7 +1606,7 @@ HANDLE gg_getcontact(GGPROTO *gg, uin_t uin, int create, int inlist, char *szNic
// Add to notify list and pull avatar for the new contact
if(gg_isonline(gg))
{
- PROTO_AVATAR_INFORMATION pai = {0};
+ PROTO_AVATAR_INFORMATIONT pai = {0};
EnterCriticalSection(&gg->sess_mutex);
gg_add_notify_ex(gg->sess, uin, (char)(inlist ? GG_USER_NORMAL : GG_USER_OFFLINE));
diff --git a/protocols/Gadu-Gadu/services.c b/protocols/Gadu-Gadu/services.c
index 7ba24b2328..420d0666ff 100644
--- a/protocols/Gadu-Gadu/services.c
+++ b/protocols/Gadu-Gadu/services.c
@@ -763,8 +763,9 @@ INT_PTR gg_getavatarcaps(GGPROTO *gg, WPARAM wParam, LPARAM lParam)
// gets avatar information
INT_PTR gg_getavatarinfo(GGPROTO *gg, WPARAM wParam, LPARAM lParam)
{
- PROTO_AVATAR_INFORMATION *pai = (PROTO_AVATAR_INFORMATION *)lParam;
- char *AvatarURL = NULL, *AvatarHash = NULL, *AvatarSavedHash = NULL;
+ PROTO_AVATAR_INFORMATIONT *pai = (PROTO_AVATAR_INFORMATIONT *)lParam;
+ char *AvatarHash = NULL, *AvatarSavedHash = NULL;
+ TCHAR *AvatarURL = NULL;
INT_PTR result = GAIR_NOAVATAR;
DBVARIANT dbv;
uin_t uin = (uin_t)DBGetContactSettingDword(pai->hContact, GG_PROTO, GG_KEY_UIN, 0);
@@ -785,13 +786,13 @@ INT_PTR gg_getavatarinfo(GGPROTO *gg, WPARAM wParam, LPARAM lParam)
pai->format = DBGetContactSettingByte(pai->hContact, GG_PROTO, GG_KEY_AVATARTYPE, GG_KEYDEF_AVATARTYPE);
- if (!DBGetContactSettingString(pai->hContact, GG_PROTO, GG_KEY_AVATARURL, &dbv)) {
- AvatarURL = mir_strdup(dbv.pszVal);
+ if (!DBGetContactSettingTString(pai->hContact, GG_PROTO, GG_KEY_AVATARURL, &dbv)) {
+ AvatarURL = mir_tstrdup(dbv.ptszVal);
DBFreeVariant(&dbv);
}
- if (AvatarURL != NULL && strlen(AvatarURL) > 0) {
- char *AvatarName = strrchr(AvatarURL, '/');
+ if (AvatarURL != NULL && _tcslen(AvatarURL) > 0) {
+ TCHAR *AvatarName = _tcsrchr(AvatarURL, '/');
AvatarName++;
AvatarHash = gg_avatarhash(AvatarName);
}
@@ -842,7 +843,7 @@ INT_PTR gg_getavatarinfo(GGPROTO *gg, WPARAM wParam, LPARAM lParam)
// gets avatar
INT_PTR gg_getmyavatar(GGPROTO *gg, WPARAM wParam, LPARAM lParam)
{
- char *szFilename = (char *)wParam;
+ TCHAR *szFilename = (TCHAR*)wParam;
int len = (int)lParam;
gg_netlog(gg, "gg_getmyavatar(): Requesting user avatar.");
@@ -1009,7 +1010,7 @@ void gg_registerservices(GGPROTO *gg)
gg->proto.vtbl->OnEvent = gg_event;
CreateProtoService(PS_GETAVATARCAPS, gg_getavatarcaps, gg);
- CreateProtoService(PS_GETAVATARINFO, gg_getavatarinfo, gg);
+ CreateProtoService(PS_GETAVATARINFOT, gg_getavatarinfo, gg);
CreateProtoService(PS_GETMYAVATAR, gg_getmyavatar, gg);
CreateProtoService(PS_SETMYAVATAR, gg_setmyavatar, gg);