summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_avatars.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-04-06 09:18:45 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-04-06 09:18:45 +0000
commitb4a062fa0625cff6d7c2205508f6c0f10f8cbff7 (patch)
treefd39d55bed1b62b772ce0a9aca1b735314625be4 /protocols/SkypeWeb/src/skype_avatars.cpp
parent925a58a69d336f2535a1083ca05cb454e755e226 (diff)
avatar support 2nd attempt
git-svn-id: http://svn.miranda-ng.org/main/trunk@12624 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_avatars.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_avatars.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/protocols/SkypeWeb/src/skype_avatars.cpp b/protocols/SkypeWeb/src/skype_avatars.cpp
index b997c92bb1..eb034906aa 100644
--- a/protocols/SkypeWeb/src/skype_avatars.cpp
+++ b/protocols/SkypeWeb/src/skype_avatars.cpp
@@ -1,5 +1,27 @@
#include "common.h"
+INT_PTR CSkypeProto::SvcGetAvatarCaps(WPARAM wParam, LPARAM lParam)
+{
+ switch (wParam) {
+ case AF_MAXSIZE:
+ ((POINT*)lParam)->x = 96;
+ ((POINT*)lParam)->y = 96;
+ return 0;
+
+ case AF_PROPORTION:
+ return PIP_SQUARE;
+
+ case AF_FORMATSUPPORTED:
+ case AF_ENABLED:
+ case AF_DONTNEEDDELAYS:
+ case AF_FETCHIFPROTONOTVISIBLE:
+ case AF_FETCHIFCONTACTOFFLINE:
+ return 1;
+ }
+
+ return 0;
+}
+
void CSkypeProto::ReloadAvatarInfo(MCONTACT hContact)
{
if (!hContact) {
@@ -60,6 +82,23 @@ INT_PTR CSkypeProto::SvcGetAvatarInfo(WPARAM, LPARAM lParam)
return GAIR_NOAVATAR;
}
+INT_PTR CSkypeProto::SvcGetMyAvatar(WPARAM wParam, LPARAM lParam)
+{
+ debugLogA("CSkypeProto::SvcGetMyAvatar");
+ PROTO_AVATAR_INFORMATIONT AI = { sizeof(AI) };
+ AI.hContact = NULL;
+ if (SvcGetAvatarInfo(0, (LPARAM)&AI) != GAIR_SUCCESS)
+ return 1;
+
+ TCHAR* buf = (TCHAR*)wParam;
+ int size = (int)lParam;
+
+ _tcsncpy(buf, AI.filename, size);
+ buf[size - 1] = 0;
+
+ return 0;
+}
+
void CSkypeProto::GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, size_t cbLen)
{
int tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), m_szModuleName);