summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_avatars.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-10-08 13:29:55 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-10-08 13:29:55 +0000
commit5408daff6e544cb8e7ea5fd34531c400a7ad8bc7 (patch)
treed575a09f2a2c83115daa1c0806f46b6179f95cf7 /protocols/VKontakte/src/vk_avatars.cpp
parent2df079ac06a85c5bf9f29a17cb1f57fd40f3fffe (diff)
VK: we allow to read avatars even for the offline contacts
git-svn-id: http://svn.miranda-ng.org/main/trunk@6403 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_avatars.cpp')
-rw-r--r--protocols/VKontakte/src/vk_avatars.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/protocols/VKontakte/src/vk_avatars.cpp b/protocols/VKontakte/src/vk_avatars.cpp
index 6325516509..17a43318dc 100644
--- a/protocols/VKontakte/src/vk_avatars.cpp
+++ b/protocols/VKontakte/src/vk_avatars.cpp
@@ -37,6 +37,27 @@ void CVkProto::OnReceiveAvatar(NETLIBHTTPREQUEST *reply, void* hContact)
ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, &AI, 0);
}
+INT_PTR CVkProto::SvcGetAvatarCaps(WPARAM wParam, LPARAM lParam)
+{
+ switch (wParam) {
+ case AF_MAXSIZE:
+ ((POINT*)lParam)->x = 100;
+ ((POINT*)lParam)->y = 100;
+ return 0;
+
+ case AF_PROPORTION:
+ return PIP_SQUARE;
+
+ case AF_FORMATSUPPORTED:
+ case AF_ENABLED:
+ case AF_DONTNEEDDELAYS:
+ case AF_FETCHALWAYS:
+ return 1;
+ }
+
+ return 0;
+}
+
INT_PTR CVkProto::SvcGetAvatarInfo(WPARAM wParam, LPARAM lParam)
{
PROTO_AVATAR_INFORMATIONT* AI = (PROTO_AVATAR_INFORMATIONT*)lParam;
@@ -97,3 +118,4 @@ void CVkProto::GetAvatarFileName(HANDLE hContact, TCHAR* pszDest, size_t cbLen)
ptrA id( getStringA(hContact, "ID"));
mir_sntprintf(pszDest + tPathLen, MAX_PATH - tPathLen, _T("%S%s"), id, szFileType);
}
+