summaryrefslogtreecommitdiff
path: root/plugins
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 /plugins
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 'plugins')
-rw-r--r--plugins/Clist_modern/modern_clc.cpp5
-rw-r--r--plugins/FlashAvatars/cflash.cpp18
-rw-r--r--plugins/MetaContacts/edit.c8
-rw-r--r--plugins/MetaContacts/meta_menu.c8
-rw-r--r--plugins/MetaContacts/meta_services.c28
-rw-r--r--plugins/MetaContacts/meta_utils.c8
-rw-r--r--plugins/SRMM/msgdialog.c4
-rw-r--r--plugins/Scriver/msgdialog.c4
8 files changed, 40 insertions, 43 deletions
diff --git a/plugins/Clist_modern/modern_clc.cpp b/plugins/Clist_modern/modern_clc.cpp
index aeb301a8d5..5778ffe11f 100644
--- a/plugins/Clist_modern/modern_clc.cpp
+++ b/plugins/Clist_modern/modern_clc.cpp
@@ -2085,12 +2085,9 @@ int ClcDoProtoAck(HANDLE wParam,ACKDATA * ack)
{
if (ack->result==ACKRESULT_SUCCESS)
{
- PROTO_AVATAR_INFORMATION *pai = (PROTO_AVATAR_INFORMATION *) ack->hProcess;
-
+ PROTO_AVATAR_INFORMATIONT *pai = (PROTO_AVATAR_INFORMATIONT*)ack->hProcess;
if (pai != NULL && pai->hContact != NULL)
- {
pcli->pfnClcBroadcast( INTM_AVATARCHANGED,(WPARAM)pai->hContact,0);
- }
}
}
else if (ack->type == ACKTYPE_EMAIL) {
diff --git a/plugins/FlashAvatars/cflash.cpp b/plugins/FlashAvatars/cflash.cpp
index a6fb4e7d32..1e3ec2d9c1 100644
--- a/plugins/FlashAvatars/cflash.cpp
+++ b/plugins/FlashAvatars/cflash.cpp
@@ -329,7 +329,7 @@ static INT_PTR makeAvatar(WPARAM wParam, LPARAM)
debug("Searching for flash avatar...\n");
FLASHAVATAR* hFA = (FLASHAVATAR*)wParam;
- PROTO_AVATAR_INFORMATION AI = {0};
+ PROTO_AVATAR_INFORMATIONT AI = {0};
AI.cbSize = sizeof(AI);
AI.hContact = hFA->hContact;
AI.format = PA_FORMAT_UNKNOWN;
@@ -337,13 +337,13 @@ static INT_PTR makeAvatar(WPARAM wParam, LPARAM)
flash_avatar_item key(hFA->hContact, *hFA, NULL);
bool avatarOK = false;
- if(hFA->hContact) {
- avatarOK = (int)CallProtoService(key.getProto(), PS_GETAVATARINFO, 0, (LPARAM)&AI) == GAIR_SUCCESS;
- } else {
- avatarOK = (int)CallProtoService(key.getProto(), PS_GETMYAVATAR, (WPARAM)AI.filename, (LPARAM)255) == 0;
+ if(hFA->hContact)
+ avatarOK = (int)CallProtoService(key.getProto(), PS_GETAVATARINFOT, 0, (LPARAM)&AI) == GAIR_SUCCESS;
+ else {
+ avatarOK = (int)CallProtoService(key.getProto(), PS_GETMYAVATART, (WPARAM)AI.filename, (LPARAM)255) == 0;
if(avatarOK) {
- char* ext = strrchr(AI.filename, '.');
- if(ext && (_stricmp(ext, ".xml") == 0))
+ TCHAR* ext = _tcsrchr(AI.filename, _T('.'));
+ if(ext && (_tcsicmp(ext, _T(".xml")) == 0))
AI.format = PA_FORMAT_XML;
}
}
@@ -351,13 +351,13 @@ static INT_PTR makeAvatar(WPARAM wParam, LPARAM)
if (!avatarOK) return 0;
debug("Avatar found...\n");
- char* url = NULL;
+ TCHAR* url = NULL;
switch(AI.format) {
case PA_FORMAT_SWF:
url = AI.filename;
break;
case PA_FORMAT_XML: {
- int src = _open(AI.filename, _O_BINARY | _O_RDONLY);
+ int src = _tfopen(AI.filename, _O_BINARY | _O_RDONLY);
if(src != -1) {
char pBuf[2048];
char* urlBuf;
diff --git a/plugins/MetaContacts/edit.c b/plugins/MetaContacts/edit.c
index bc4d94ba8a..a5866576dd 100644
--- a/plugins/MetaContacts/edit.c
+++ b/plugins/MetaContacts/edit.c
@@ -215,15 +215,15 @@ void ApplyChanges(CHANGES *chg)
// fix avatar
most_online = Meta_GetMostOnlineSupporting(chg->hMeta, PFLAGNUM_4, PF4_AVATARS);
if (most_online) {
- PROTO_AVATAR_INFORMATION AI;
+ PROTO_AVATAR_INFORMATIONT AI;
AI.cbSize = sizeof(AI);
AI.hContact = chg->hMeta;
AI.format = PA_FORMAT_UNKNOWN;
- strcpy(AI.filename, "X");
+ _tcscpy(AI.filename, _T("X"));
- if ((int)CallProtoService(META_PROTO, PS_GETAVATARINFO, 0, (LPARAM)&AI) == GAIR_SUCCESS)
- DBWriteContactSettingString(chg->hMeta, "ContactPhoto", "File",AI.filename);
+ if ((int)CallProtoService(META_PROTO, PS_GETAVATARINFOT, 0, (LPARAM)&AI) == GAIR_SUCCESS)
+ DBWriteContactSettingTString(chg->hMeta, "ContactPhoto", "File",AI.filename);
}
if (MetaAPI_GetForceState((WPARAM)chg->hMeta, 0) != chg->force_default)
diff --git a/plugins/MetaContacts/meta_menu.c b/plugins/MetaContacts/meta_menu.c
index 6e7ad9f1c6..e71e9357a5 100644
--- a/plugins/MetaContacts/meta_menu.c
+++ b/plugins/MetaContacts/meta_menu.c
@@ -224,15 +224,15 @@ void Meta_RemoveContactNumber(HANDLE hMeta, int number) {
// fix avatar
hContact = Meta_GetMostOnlineSupporting(hMeta, PFLAGNUM_4, PF4_AVATARS);
if (hContact) {
- PROTO_AVATAR_INFORMATION AI;
+ PROTO_AVATAR_INFORMATIONT AI;
AI.cbSize = sizeof(AI);
AI.hContact = hMeta;
AI.format = PA_FORMAT_UNKNOWN;
- strcpy(AI.filename, "X");
+ _tcscpy(AI.filename, _T("X"));
- if ((int)CallProtoService(META_PROTO, PS_GETAVATARINFO, 0, (LPARAM)&AI) == GAIR_SUCCESS)
- DBWriteContactSettingString(hMeta, "ContactPhoto", "File",AI.filename);
+ if ((int)CallProtoService(META_PROTO, PS_GETAVATARINFOT, 0, (LPARAM)&AI) == GAIR_SUCCESS)
+ DBWriteContactSettingTString(hMeta, "ContactPhoto", "File",AI.filename);
}
}
}
diff --git a/plugins/MetaContacts/meta_services.c b/plugins/MetaContacts/meta_services.c
index 97a6623be4..8f570773b1 100644
--- a/plugins/MetaContacts/meta_services.c
+++ b/plugins/MetaContacts/meta_services.c
@@ -657,13 +657,13 @@ int Meta_HandleACK(WPARAM wParam, LPARAM lParam)
//if (!DBGetContactSetting(AI.hContact, "ContactPhoto", "File", &dbv)) {
if (!DBGetContactSetting(ack->hContact, "ContactPhoto", "File", &dbv)) {
- DBWriteContactSettingString(hUser, "ContactPhoto", "File", dbv.pszVal);
+ DBWriteContactSettingTString(hUser, "ContactPhoto", "File", dbv.ptszVal);
DBFreeVariant(&dbv);
}
if (ack->hProcess) {
- PROTO_AVATAR_INFORMATION AI;
- memcpy(&AI, (PROTO_AVATAR_INFORMATION *)ack->hProcess, sizeof(PROTO_AVATAR_INFORMATION));
+ PROTO_AVATAR_INFORMATIONT AI;
+ memcpy(&AI, (PROTO_AVATAR_INFORMATIONT *)ack->hProcess, sizeof(PROTO_AVATAR_INFORMATIONT));
if (AI.hContact)
AI.hContact = hUser;
@@ -885,15 +885,15 @@ int Meta_SettingChanged(WPARAM wParam, LPARAM lParam)
// most online contact with avatar support might have changed - update avatar
most_online = Meta_GetMostOnlineSupporting(hMeta, PFLAGNUM_4, PF4_AVATARS);
if (most_online) {
- PROTO_AVATAR_INFORMATION AI;
+ PROTO_AVATAR_INFORMATIONT AI;
AI.cbSize = sizeof(AI);
AI.hContact = hMeta;
AI.format = PA_FORMAT_UNKNOWN;
- strcpy(AI.filename, "X");
+ _tcscpy(AI.filename, _T("X"));
- if ((int)CallProtoService(META_PROTO, PS_GETAVATARINFO, 0, (LPARAM)&AI) == GAIR_SUCCESS)
- DBWriteContactSettingString(hMeta, "ContactPhoto", "File",AI.filename);
+ if ((int)CallProtoService(META_PROTO, PS_GETAVATARINFOT, 0, (LPARAM)&AI) == GAIR_SUCCESS)
+ DBWriteContactSettingTString(hMeta, "ContactPhoto", "File",AI.filename);
}
} else
@@ -1759,7 +1759,7 @@ INT_PTR Meta_GetAwayMsg(WPARAM wParam, LPARAM lParam) {
}
INT_PTR Meta_GetAvatarInfo(WPARAM wParam, LPARAM lParam) {
- PROTO_AVATAR_INFORMATION *AI = (PROTO_AVATAR_INFORMATION *) lParam;
+ PROTO_AVATAR_INFORMATIONT *AI = (PROTO_AVATAR_INFORMATIONT *) lParam;
char *proto = 0;
DWORD default_contact_number;
@@ -1786,7 +1786,7 @@ INT_PTR Meta_GetAvatarInfo(WPARAM wParam, LPARAM lParam) {
AI->hContact = hSub;
- mir_snprintf(szServiceName, sizeof(szServiceName), "%s%s", proto, PS_GETAVATARINFO);
+ mir_snprintf(szServiceName, sizeof(szServiceName), "%s%s", proto, PS_GETAVATARINFOT);
result = CallService(szServiceName, wParam, lParam);
AI->hContact = hMeta;
if (result != CALLSERVICE_NOTFOUND) return result;
@@ -1808,7 +1808,7 @@ INT_PTR Meta_GetInfo(WPARAM wParam, LPARAM lParam) {
else
{
HANDLE most_online;
- PROTO_AVATAR_INFORMATION AI;
+ PROTO_AVATAR_INFORMATIONT AI;
char szServiceName[100];
most_online = Meta_GetMostOnlineSupporting(ccs->hContact, PFLAGNUM_4, PF4_AVATARS);
@@ -1822,9 +1822,9 @@ INT_PTR Meta_GetInfo(WPARAM wParam, LPARAM lParam) {
AI.cbSize = sizeof(AI);
AI.hContact = ccs->hContact;
AI.format = PA_FORMAT_UNKNOWN;
- strcpy(AI.filename, "X");
- if ((int)CallProtoService(META_PROTO, PS_GETAVATARINFO, 0, (LPARAM)&AI) == GAIR_SUCCESS)
- DBWriteContactSettingString(ccs->hContact, "ContactPhoto", "File",AI.filename);
+ _tcscpy(AI.filename, _T("X"));
+ if ((int)CallProtoService(META_PROTO, PS_GETAVATARINFOT, 0, (LPARAM)&AI) == GAIR_SUCCESS)
+ DBWriteContactSettingTString(ccs->hContact, "ContactPhoto", "File",AI.filename);
most_online = Meta_GetMostOnline(ccs->hContact);
Meta_CopyContactNick(ccs->hContact, most_online);
@@ -2005,7 +2005,7 @@ void Meta_InitServices()
hServices[36] = CreateProtoServiceFunction(META_PROTO,PSS_GETAWAYMSG,Meta_GetAwayMsg);
- hServices[37] = CreateProtoServiceFunction(META_PROTO,PS_GETAVATARINFO,Meta_GetAvatarInfo);
+ hServices[37] = CreateProtoServiceFunction(META_PROTO,PS_GETAVATARINFOT,Meta_GetAvatarInfo);
hServices[38] = CreateProtoServiceFunction(META_PROTO,PSS_GETINFO,Meta_GetInfo);
diff --git a/plugins/MetaContacts/meta_utils.c b/plugins/MetaContacts/meta_utils.c
index 9fa350497f..de30a369a3 100644
--- a/plugins/MetaContacts/meta_utils.c
+++ b/plugins/MetaContacts/meta_utils.c
@@ -416,15 +416,15 @@ BOOL Meta_Assign(HANDLE src, HANDLE dest, BOOL set_as_default)
// if the new contact is the most online contact with avatar support, get avatar info
most_online = Meta_GetMostOnlineSupporting(dest, PFLAGNUM_4, PF4_AVATARS);
if (most_online == src) {
- PROTO_AVATAR_INFORMATION AI;
+ PROTO_AVATAR_INFORMATIONT AI;
AI.cbSize = sizeof(AI);
AI.hContact = dest;
AI.format = PA_FORMAT_UNKNOWN;
- strcpy(AI.filename, "X");
+ _tcscpy(AI.filename, _T("X"));
- if ((int)CallProtoService(META_PROTO, PS_GETAVATARINFO, 0, (LPARAM)&AI) == GAIR_SUCCESS)
- DBWriteContactSettingString(dest, "ContactPhoto", "File",AI.filename);
+ if ((int)CallProtoService(META_PROTO, PS_GETAVATARINFOT, 0, (LPARAM)&AI) == GAIR_SUCCESS)
+ DBWriteContactSettingTString(dest, "ContactPhoto", "File",AI.filename);
}
// Hide the contact
diff --git a/plugins/SRMM/msgdialog.c b/plugins/SRMM/msgdialog.c
index fc01fc51bc..47e099a781 100644
--- a/plugins/SRMM/msgdialog.c
+++ b/plugins/SRMM/msgdialog.c
@@ -1071,8 +1071,8 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
case DM_GETAVATAR:
{
- PROTO_AVATAR_INFORMATION ai = { sizeof(ai), dat->hContact };
- CallProtoService(dat->szProto, PS_GETAVATARINFO, GAIF_FORCE, (LPARAM)&ai);
+ PROTO_AVATAR_INFORMATIONT ai = { sizeof(ai), dat->hContact };
+ CallProtoService(dat->szProto, PS_GETAVATARINFOT, GAIF_FORCE, (LPARAM)&ai);
ShowAvatar(hwndDlg, dat);
SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, 1);
diff --git a/plugins/Scriver/msgdialog.c b/plugins/Scriver/msgdialog.c
index 13709baaef..de3410ae91 100644
--- a/plugins/Scriver/msgdialog.c
+++ b/plugins/Scriver/msgdialog.c
@@ -1073,8 +1073,8 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
case DM_GETAVATAR:
{
- PROTO_AVATAR_INFORMATION ai = { sizeof(ai), dat->windowData.hContact };
- CallProtoService(dat->szProto, PS_GETAVATARINFO, GAIF_FORCE, (LPARAM)&ai);
+ PROTO_AVATAR_INFORMATIONT ai = { sizeof(ai), dat->windowData.hContact };
+ CallProtoService(dat->szProto, PS_GETAVATARINFOT, GAIF_FORCE, (LPARAM)&ai);
ShowAvatar(hwndDlg, dat);
break;
}