summaryrefslogtreecommitdiff
path: root/plugins/AVS/src/services.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-01-08 22:46:18 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-01-08 22:46:18 +0300
commit92f80d349f63f694d0fdcf003a852fd424557663 (patch)
treec3c65e956949cdd294c4fce32f696e1c811ec7de /plugins/AVS/src/services.cpp
parent82a3bbaf034bc286665465d8904e6d1db52e5eb4 (diff)
unused ansi services removed
Diffstat (limited to 'plugins/AVS/src/services.cpp')
-rw-r--r--plugins/AVS/src/services.cpp33
1 files changed, 7 insertions, 26 deletions
diff --git a/plugins/AVS/src/services.cpp b/plugins/AVS/src/services.cpp
index aba7818492..754fa54dc7 100644
--- a/plugins/AVS/src/services.cpp
+++ b/plugins/AVS/src/services.cpp
@@ -115,7 +115,7 @@ UINT_PTR CALLBACK OpenFileSubclass(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
return FALSE;
}
-static INT_PTR avSetAvatar(MCONTACT hContact, wchar_t *tszPath)
+INT_PTR SetAvatar(WPARAM hContact, LPARAM lParam)
{
wchar_t FileName[MAX_PATH];
wchar_t *szFinalName;
@@ -126,6 +126,7 @@ static INT_PTR avSetAvatar(MCONTACT hContact, wchar_t *tszPath)
int is_locked = db_get_b(hContact, "ContactPhoto", "Locked", 0);
+ wchar_t *tszPath = (wchar_t*)lParam;
if (tszPath == NULL) {
wchar_t filter[256];
Bitmap_GetFilter(filter, _countof(filter));
@@ -172,16 +173,6 @@ static INT_PTR avSetAvatar(MCONTACT hContact, wchar_t *tszPath)
return 0;
}
-INT_PTR SetAvatar(WPARAM wParam, LPARAM lParam)
-{
- return avSetAvatar(wParam, _A2T((const char*)lParam));
-}
-
-INT_PTR SetAvatarW(WPARAM wParam, LPARAM lParam)
-{
- return avSetAvatar(wParam, (wchar_t*)lParam);
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
// see if is possible to set the avatar for the expecified protocol
@@ -608,7 +599,7 @@ static int InternalSetMyAvatar(char *protocol, wchar_t *szFinalName, SetMyAvatar
return ret;
}
-INT_PTR avSetMyAvatar(char* protocol, wchar_t* tszPath)
+INT_PTR SetMyAvatar(WPARAM wParam, LPARAM lParam)
{
wchar_t FileName[MAX_PATH];
wchar_t *szFinalName = NULL;
@@ -616,9 +607,11 @@ INT_PTR avSetMyAvatar(char* protocol, wchar_t* tszPath)
BOOL allAcceptSWF;
// Protocol allow seting of avatar?
+ char* protocol = (char*)wParam;
if (protocol != NULL && !CanSetMyAvatar((WPARAM)protocol, 0))
return -1;
+ wchar_t* tszPath = (wchar_t*)lParam;
if (tszPath == NULL && hwndSetMyAvatar != 0) {
SetForegroundWindow(hwndSetMyAvatar);
SetFocus(hwndSetMyAvatar);
@@ -707,16 +700,6 @@ INT_PTR avSetMyAvatar(char* protocol, wchar_t* tszPath)
return InternalSetMyAvatar(protocol, szFinalName, data, allAcceptXML, allAcceptSWF);
}
-static INT_PTR SetMyAvatar(WPARAM wParam, LPARAM lParam)
-{
- return avSetMyAvatar((char*)wParam, _A2T((const char*)lParam));
-}
-
-static INT_PTR SetMyAvatarW(WPARAM wParam, LPARAM lParam)
-{
- return avSetMyAvatar((char*)wParam, (wchar_t*)lParam);
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
INT_PTR CALLBACK DlgProcAvatarOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
@@ -859,10 +842,8 @@ void InitServices()
{
CreateServiceFunction(MS_AV_GETAVATARBITMAP, GetAvatarBitmap);
CreateServiceFunction(MS_AV_PROTECTAVATAR, ProtectAvatar);
- CreateServiceFunction(MS_AV_SETAVATAR, SetAvatar);
- CreateServiceFunction(MS_AV_SETAVATARW, SetAvatarW);
- CreateServiceFunction(MS_AV_SETMYAVATAR, SetMyAvatar);
- CreateServiceFunction(MS_AV_SETMYAVATARW, SetMyAvatarW);
+ CreateServiceFunction(MS_AV_SETAVATARW, SetAvatar);
+ CreateServiceFunction(MS_AV_SETMYAVATARW, SetMyAvatar);
CreateServiceFunction(MS_AV_CANSETMYAVATAR, CanSetMyAvatar);
CreateServiceFunction(MS_AV_CONTACTOPTIONS, ContactOptions);
CreateServiceFunction(MS_AV_DRAWAVATAR, DrawAvatarPicture);