diff options
author | George Hazan <george.hazan@gmail.com> | 2014-01-10 20:12:55 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-01-10 20:12:55 +0000 |
commit | 09509db69203537d336a2d2b3451e5bba32d8aec (patch) | |
tree | 50384348e5556d8bbd64b4354eb7a5035ac93ceb /protocols/VKontakte/src/vk_proto.h | |
parent | 30d6da8676deb22ae62a72f28e8487b78fa4e6fa (diff) |
VK: nasty clutch to maintain chat history
git-svn-id: http://svn.miranda-ng.org/main/trunk@7582 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_proto.h')
-rw-r--r-- | protocols/VKontakte/src/vk_proto.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/protocols/VKontakte/src/vk_proto.h b/protocols/VKontakte/src/vk_proto.h index a6b3988a8f..81b9300b5e 100644 --- a/protocols/VKontakte/src/vk_proto.h +++ b/protocols/VKontakte/src/vk_proto.h @@ -31,6 +31,12 @@ struct AsyncHttpRequest : public NETLIBHTTPREQUEST, public MZeroedObject void *pUserInfo;
};
+struct CVkChatMessage : public MZeroedObject
+{
+ int m_mid, m_uid, m_date;
+ ptrT m_tszBody;
+};
+
struct CVkChatUser : public MZeroedObject
{
CVkChatUser(int _id) : m_uid(_id) {}
@@ -44,6 +50,7 @@ struct CVkChatInfo : public MZeroedObject {
CVkChatInfo(int _id) :
m_users(10, NumericKeySortT),
+ m_msgs(10, NumericKeySortT),
m_chatid(_id)
{}
@@ -52,6 +59,7 @@ struct CVkChatInfo : public MZeroedObject ptrT m_tszTitle, m_tszId;
HANDLE m_hContact;
OBJLIST<CVkChatUser> m_users;
+ OBJLIST<CVkChatMessage> m_msgs;
CVkChatUser* GetUserById(LPCTSTR);
};
@@ -231,6 +239,7 @@ private: OBJLIST<CVkChatInfo> m_chats;
CVkChatInfo* AppendChat(int id, JSONNODE *pNode);
void AppendChatMessage(int id, JSONNODE *pMsg, bool bIsHistory);
+ void AppendChatMessage(CVkChatInfo *cc, int uid, int msgTime, LPCTSTR ptszBody, bool bIsHistory);
void RetrieveChatInfo(CVkChatInfo*);
void OnReceiveChatInfo(NETLIBHTTPREQUEST*, AsyncHttpRequest*);
void OnSendChatMsg(NETLIBHTTPREQUEST*, AsyncHttpRequest*);
@@ -239,6 +248,7 @@ private: int __cdecl OnGcMenuHook(WPARAM, LPARAM);
void LogMenuHook(CVkChatInfo*, GCHOOK*);
void NickMenuHook(CVkChatInfo*, GCHOOK*);
+ CVkChatInfo* GetChatById(LPCTSTR ptszId);
CMString GetAttachmentDescr(JSONNODE*);
};
|