summaryrefslogtreecommitdiff
path: root/plugins
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 /plugins
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 'plugins')
-rw-r--r--plugins/AVS/src/image_utils.cpp2
-rw-r--r--plugins/AVS/src/main.cpp4
-rw-r--r--plugins/AVS/src/options.cpp2
-rw-r--r--plugins/AVS/src/poll.cpp22
-rw-r--r--plugins/AVS/src/stdafx.h2
-rw-r--r--plugins/AVS/src/utils.cpp4
-rw-r--r--plugins/NewsAggregator/Src/CheckFeed.cpp12
-rw-r--r--plugins/NewsAggregator/Src/NewsAggregator.cpp2
-rw-r--r--plugins/NewsAggregator/Src/Services.cpp2
-rw-r--r--plugins/Scriver/src/msgdialog.cpp4
-rw-r--r--plugins/Weather/src/weather_svcs.cpp7
11 files changed, 24 insertions, 39 deletions
diff --git a/plugins/AVS/src/image_utils.cpp b/plugins/AVS/src/image_utils.cpp
index 9ab45c6516..c478f8bd3e 100644
--- a/plugins/AVS/src/image_utils.cpp
+++ b/plugins/AVS/src/image_utils.cpp
@@ -553,7 +553,7 @@ BOOL MakeTransparentBkg(MCONTACT hContact, HBITMAP *hBitmap)
int SaveAvatar(const char *protocol, const TCHAR *tszFileName)
{
- INT_PTR result = CallProtoService(protocol, PS_SETMYAVATART, 0, (LPARAM)tszFileName);
+ INT_PTR result = CallProtoService(protocol, PS_SETMYAVATAR, 0, (LPARAM)tszFileName);
if (result == CALLSERVICE_NOTFOUND)
result = CallProtoService(protocol, PS_SETMYAVATAR, 0, _T2A(tszFileName));
diff --git a/plugins/AVS/src/main.cpp b/plugins/AVS/src/main.cpp
index 247872ac8c..a7e7e97d06 100644
--- a/plugins/AVS/src/main.cpp
+++ b/plugins/AVS/src/main.cpp
@@ -87,10 +87,10 @@ static int ProtocolAck(WPARAM, LPARAM lParam)
if (ack->hProcess == NULL)
ProcessAvatarInfo(ack->hContact, GAIR_NOAVATAR, NULL, ack->szModule);
else
- ProcessAvatarInfo(ack->hContact, GAIR_SUCCESS, (PROTO_AVATAR_INFORMATIONT *)ack->hProcess, ack->szModule);
+ ProcessAvatarInfo(ack->hContact, GAIR_SUCCESS, (PROTO_AVATAR_INFORMATION *)ack->hProcess, ack->szModule);
}
else if (ack->result == ACKRESULT_FAILED) {
- ProcessAvatarInfo(ack->hContact, GAIR_FAILED, (PROTO_AVATAR_INFORMATIONT *)ack->hProcess, ack->szModule);
+ ProcessAvatarInfo(ack->hContact, GAIR_FAILED, (PROTO_AVATAR_INFORMATION *)ack->hProcess, ack->szModule);
}
else if (ack->result == ACKRESULT_STATUS) {
char *szProto = GetContactProto(ack->hContact);
diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp
index 02ec9a34e0..4dc593fcd2 100644
--- a/plugins/AVS/src/options.cpp
+++ b/plugins/AVS/src/options.cpp
@@ -902,7 +902,7 @@ static void EnableDisableControls(HWND hwndDlg, char *proto)
EnableWindow(GetDlgItem(hwndDlg, IDC_DELETE), FALSE);
}
else {
- if (!ProtoServiceExists(proto, PS_SETMYAVATAR) && !ProtoServiceExists(proto, PS_SETMYAVATARW)) {
+ if (!ProtoServiceExists(proto, PS_SETMYAVATAR)) {
EnableWindow(GetDlgItem(hwndDlg, IDC_CHANGE), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_DELETE), FALSE);
}
diff --git a/plugins/AVS/src/poll.cpp b/plugins/AVS/src/poll.cpp
index 4911fb0e41..a0d92ebc98 100644
--- a/plugins/AVS/src/poll.cpp
+++ b/plugins/AVS/src/poll.cpp
@@ -140,7 +140,7 @@ void QueueAdd(MCONTACT hContact)
QueueAdd(hContact, waitTime);
}
-void ProcessAvatarInfo(MCONTACT hContact, int type, PROTO_AVATAR_INFORMATIONT *pai, const char *szProto)
+void ProcessAvatarInfo(MCONTACT hContact, int type, PROTO_AVATAR_INFORMATION *pai, const char *szProto)
{
QueueRemove(hContact);
@@ -201,24 +201,14 @@ int FetchAvatarFor(MCONTACT hContact, char *szProto)
if (szProto != NULL && PollProtocolCanHaveAvatar(szProto) && PollContactCanHaveAvatar(hContact, szProto)) {
// Can have avatar, but must request it?
- if ((g_AvatarHistoryAvail && CallService(MS_AVATARHISTORY_ENABLED, hContact, 0)) ||
- (PollCheckProtocol(szProto) && PollCheckContact(hContact)))
+ if ((g_AvatarHistoryAvail && CallService(MS_AVATARHISTORY_ENABLED, hContact, 0)) || (PollCheckProtocol(szProto) && PollCheckContact(hContact)))
{
// Request it
- PROTO_AVATAR_INFORMATIONT pai_s = { 0 };
- pai_s.cbSize = sizeof(pai_s);
+ PROTO_AVATAR_INFORMATION pai_s = { 0 };
pai_s.hContact = hContact;
- INT_PTR res = CallProtoService(szProto, PS_GETAVATARINFOT, GAIF_FORCE, (LPARAM)&pai_s);
- if (res == CALLSERVICE_NOTFOUND) {
- PROTO_AVATAR_INFORMATION pai = { 0 };
- pai.cbSize = sizeof(pai);
- pai.hContact = hContact;
- res = CallProtoService(szProto, PS_GETAVATARINFO, GAIF_FORCE, (LPARAM)&pai);
- MultiByteToWideChar(CP_ACP, 0, pai.filename, -1, pai_s.filename, SIZEOF(pai_s.filename));
- pai_s.format = pai.format;
- }
-
- if (res != CALLSERVICE_NOTFOUND) result = res;
+ INT_PTR res = CallProtoService(szProto, PS_GETAVATARINFO, GAIF_FORCE, (LPARAM)&pai_s);
+ if (res != CALLSERVICE_NOTFOUND)
+ result = res;
ProcessAvatarInfo(pai_s.hContact, result, &pai_s, szProto);
}
}
diff --git a/plugins/AVS/src/stdafx.h b/plugins/AVS/src/stdafx.h
index 2331595a0c..89e9ba9dbe 100644
--- a/plugins/AVS/src/stdafx.h
+++ b/plugins/AVS/src/stdafx.h
@@ -153,7 +153,7 @@ INT_PTR ReportMyAvatarChanged(WPARAM wParam, LPARAM lParam);
MCONTACT GetContactThatHaveTheAvatar(MCONTACT hContact, int locked = -1);
-void ProcessAvatarInfo(MCONTACT hContact, int type, PROTO_AVATAR_INFORMATIONT *pai, const char *szProto);
+void ProcessAvatarInfo(MCONTACT hContact, int type, PROTO_AVATAR_INFORMATION *pai, const char *szProto);
int Proto_GetDelayAfterFail(const char *proto);
BOOL Proto_NeedDelaysForAvatars(const char *proto);
diff --git a/plugins/AVS/src/utils.cpp b/plugins/AVS/src/utils.cpp
index d4d6c9e49e..a1863a9f42 100644
--- a/plugins/AVS/src/utils.cpp
+++ b/plugins/AVS/src/utils.cpp
@@ -119,8 +119,8 @@ int CreateAvatarInCache(MCONTACT hContact, avatarCacheEntry *ace, char *szProto)
else
return -10;
}
- else if (ProtoServiceExists(szProto, PS_GETMYAVATART)) {
- if (CallProtoService(szProto, PS_GETMYAVATART, (WPARAM)tszFilename, (LPARAM)MAX_PATH))
+ else if (ProtoServiceExists(szProto, PS_GETMYAVATAR)) {
+ if (CallProtoService(szProto, PS_GETMYAVATAR, (WPARAM)tszFilename, (LPARAM)MAX_PATH))
tszFilename[0] = '\0';
}
else if (ProtoServiceExists(szProto, PS_GETMYAVATAR)) {
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);