diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-09-30 06:09:29 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-09-30 06:09:29 +0000 |
commit | 3f737e93021a4e08083a31e98e52ac110249461d (patch) | |
tree | 2710fae36700a397e27d8ed8ca2fe85b06483300 /protocols/VKontakte/src/vk_proto.h | |
parent | 0094bfe3eff72016d0a2dd039d93cc3ff3fcf273 (diff) |
VKontakte:
deduplicate for set contact info code
fix for re-set empty statusmsg
fix for day&month only bdate
some code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@10646 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_proto.h')
-rw-r--r-- | protocols/VKontakte/src/vk_proto.h | 51 |
1 files changed, 32 insertions, 19 deletions
diff --git a/protocols/VKontakte/src/vk_proto.h b/protocols/VKontakte/src/vk_proto.h index 9347e5e909..ba5db0edc7 100644 --- a/protocols/VKontakte/src/vk_proto.h +++ b/protocols/VKontakte/src/vk_proto.h @@ -210,7 +210,12 @@ struct CVkProto : public PROTO<CVkProto> void InitMenus();
void UnInitMenus();
int __cdecl OnPreBuildContactMenu(WPARAM hContact, LPARAM);
-
+
+ //==== PopUps ========================================================================
+
+ void InitPopups(void);
+ void MsgPopup(MCONTACT hContact, const TCHAR *szMsg, const TCHAR *szTitle, bool err = false);
+
//==== Search ========================================================================
void __cdecl SearchBasicThread(void* id);
@@ -224,6 +229,7 @@ struct CVkProto : public PROTO<CVkProto> void RetrieveStatusMsg(const CMString &StatusMsg);
void RetrieveStatusMusic(const CMString &StatusMsg);
+ MCONTACT SetContactInfo(JSONNODE* Item, bool flag = false);
void RetrieveMyInfo(void);
void OnReceiveMyInfo(NETLIBHTTPREQUEST*, AsyncHttpRequest*);
void RetrieveUserInfo(LONG userId);
@@ -234,24 +240,31 @@ struct CVkProto : public PROTO<CVkProto> void MarkMessagesRead(const CMStringA &mids);
void MarkMessagesRead(const MCONTACT hContact);
+
void RetrieveMessagesByIds(const CMStringA &mids);
void RetrieveUnreadMessages();
void OnReceiveMessages(NETLIBHTTPREQUEST*, AsyncHttpRequest*);
void OnReceiveDlgs(NETLIBHTTPREQUEST*, AsyncHttpRequest*);
+ CMString GetAttachmentDescr(JSONNODE*);
+
void OnSendMessage(NETLIBHTTPREQUEST*, AsyncHttpRequest*);
+
void OnReceiveHistoryMessages(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq);
void GetHistoryDlg(MCONTACT hContact, int iLastMsg);
void GetHistoryDlgMessages(MCONTACT hContact, int iOffset, int iMaxCount, int lastcount);
+
void RetrievePollingInfo();
void OnReceivePollingInfo(NETLIBHTTPREQUEST*, AsyncHttpRequest*);
- void OnReceiveAuthRequest(NETLIBHTTPREQUEST*, AsyncHttpRequest*);
- void OnReceiveDeleteFriend(NETLIBHTTPREQUEST*, AsyncHttpRequest*);
-
void __cdecl PollingThread(void*);
int PollServer();
void PollUpdates(JSONNODE*);
void OnReceivePolling(NETLIBHTTPREQUEST*, AsyncHttpRequest*);
+ void OnReceiveAuthRequest(NETLIBHTTPREQUEST*, AsyncHttpRequest*);
+ void OnReceiveDeleteFriend(NETLIBHTTPREQUEST*, AsyncHttpRequest*);
+ void DBAddAuthRequest(const MCONTACT hContact);
+ MCONTACT MContactFromDbEvent(HANDLE hDbEvent);
+
void SetServerStatus(int);
void CreateNewChat(LPCSTR uids, LPCTSTR ptrszTitle);
@@ -335,7 +348,8 @@ private: void __cdecl SendMsgAck(void *param);
- bool m_bOnline,
+ bool m_prevError,
+ m_bOnline,
m_bHideChats,
m_bMesAsUnread,
m_bMarkReadOnReply,
@@ -348,14 +362,22 @@ private: m_bRemoveFromClist;
LONG m_myUserId;
- ptrA m_szAccessToken;
ptrT m_defaultGroup;
- ptrA m_pollingServer, m_pollingKey, m_pollingTs;
- HANDLE m_pollingConn, m_hPollingThread;
+ ptrA
+ m_pollingServer,
+ m_pollingKey,
+ m_pollingTs,
+ m_szAccessToken;
+
+ HANDLE
+ m_pollingConn,
+ m_hPollingThread,
+ m_hPopupClassError,
+ m_hPopupClassNotification;
+
ULONG m_msgId;
- bool m_prevError;
-
+
LIST<void> m_sendIds;
bool CheckMid(int guid);
@@ -377,13 +399,4 @@ private: void SetChatStatus(MCONTACT hContact, int iStatus);
CVkChatInfo* GetChatById(LPCTSTR ptszId);
INT_PTR __cdecl SvcCreateChat(WPARAM, LPARAM);
-
- CMString GetAttachmentDescr(JSONNODE*);
-
- HANDLE m_hPopupClassError, m_hPopupClassNotification;
- void InitPopups(void);
- void MsgPopup(MCONTACT hContact, const TCHAR *szMsg, const TCHAR *szTitle, bool err=false);
-
- void DBAddAuthRequest(const MCONTACT hContact);
- MCONTACT MContactFromDbEvent(HANDLE hDbEvent);
};
|