summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_proto.h
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-10-07 20:33:20 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-10-07 20:33:20 +0000
commitd91b68566522230f4daff25c8c2376fbd99ca640 (patch)
tree8c773a1a44d32ca06f9f0b2c8c7c7d00e57ab5bd /protocols/VKontakte/src/vk_proto.h
parenteeb8b2901b9a58285929071cac255d8bb565a2f7 (diff)
VK: avatars
git-svn-id: http://svn.miranda-ng.org/main/trunk@6401 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_proto.h')
-rw-r--r--protocols/VKontakte/src/vk_proto.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/protocols/VKontakte/src/vk_proto.h b/protocols/VKontakte/src/vk_proto.h
index 71a9eecf1c..1f1db4c38b 100644
--- a/protocols/VKontakte/src/vk_proto.h
+++ b/protocols/VKontakte/src/vk_proto.h
@@ -16,7 +16,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
struct CVkProto;
-typedef void (CVkProto::*VK_REQUEST_HANDLER)(NETLIBHTTPREQUEST*);
+typedef void (CVkProto::*VK_REQUEST_HANDLER)(NETLIBHTTPREQUEST*, void*);
struct CVkProto : public PROTO<CVkProto>
{
@@ -78,22 +78,26 @@ struct CVkProto : public PROTO<CVkProto>
int __cdecl OnOptionsInit(WPARAM, LPARAM);
int __cdecl OnPreShutdown(WPARAM, LPARAM);
- void OnOAuthAuthorize(NETLIBHTTPREQUEST*);
- void OnReceiveMyInfo(NETLIBHTTPREQUEST*);
+ void OnOAuthAuthorize(NETLIBHTTPREQUEST*, void*);
+ void OnReceiveMyInfo(NETLIBHTTPREQUEST*, void*);
+ void OnReceiveAvatar(NETLIBHTTPREQUEST*, void*);
//==== Services ======================================================================
INT_PTR __cdecl SvcCreateAccMgrUI(WPARAM, LPARAM);
+ INT_PTR __cdecl SvcGetAvatarInfo(WPARAM, LPARAM);
//==== Misc ==========================================================================
TCHAR* GetUserStoredPassword(void);
void RetrieveUserInfo(LPCSTR szUserId);
- void OnReceiveUserInfo(NETLIBHTTPREQUEST*);
+ void OnReceiveUserInfo(NETLIBHTTPREQUEST*, void*);
void RetrieveFriends();
- void OnReceiveFriends(NETLIBHTTPREQUEST*);
+ void OnReceiveFriends(NETLIBHTTPREQUEST*, void*);
+
+ int SetServerStatus(int);
__forceinline bool IsOnline() const { return m_bOnline; }
@@ -107,7 +111,7 @@ private:
void Redirect(NETLIBHTTPREQUEST*);
VK_REQUEST_HANDLER m_pFunc;
- time_t m_expireTime;
+ void *pUserInfo;
};
LIST<AsyncHttpRequest> m_arRequestsQueue;
CRITICAL_SECTION m_csRequestsQueue;
@@ -131,15 +135,17 @@ private:
void OnLoggedOut();
void ShutdownSession();
+ void GetAvatarFileName(HANDLE hContact, TCHAR* pszDest, size_t cbLen);
+
HANDLE FindUser(LPCSTR userid, bool bCreate = false);
void SetAllContactStatuses(int status);
- int SetServerStatus(int);
bool m_bOnline;
HANDLE m_hNetlibUser, m_hNetlibConn;
- HANDLE hAvatarFolder;
+ HANDLE m_hAvatarFolder;
ptrA m_szAccessToken, m_myUserId;
ptrT m_defaultGroup;
+ UINT_PTR m_timer;
};