From 331d68975919584be948fb862316669cf2945d07 Mon Sep 17 00:00:00 2001 From: Sergey Bolhovskoy Date: Tue, 23 Dec 2014 07:45:38 +0000 Subject: VKontakte: fix order loading news to chat windows fix duplicate news git-svn-id: http://svn.miranda-ng.org/main/trunk@11593 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/VKontakte/src/vk_proto.h | 40 ++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) (limited to 'protocols/VKontakte/src/vk_proto.h') diff --git a/protocols/VKontakte/src/vk_proto.h b/protocols/VKontakte/src/vk_proto.h index 4540ad7999..105e0115fe 100644 --- a/protocols/VKontakte/src/vk_proto.h +++ b/protocols/VKontakte/src/vk_proto.h @@ -158,7 +158,7 @@ struct CVkFileUploadParam { __forceinline char* fileName() { return fname; } }; -struct CVkUserInfo : public MZeroedObject{ +struct CVkUserInfo : public MZeroedObject { CVkUserInfo(LONG _UserId) : m_UserId(_UserId), m_bIsGroup(false) @@ -179,6 +179,33 @@ struct CVkUserInfo : public MZeroedObject{ bool m_bIsGroup; }; +enum VKObjType { vkNull, vkPost, vkPhoto, vkVideo, vkComment, vkTopic, vkUsers, vkCopy }; + +struct CVkNotification { + TCHAR *ptszType; + VKObjType vkParent, vkFeedback; + TCHAR *ptszTranslate; +}; + + +struct CVKNewsItem : public MZeroedObject { + CVKNewsItem() + { + tDate = NULL; + vkUser = NULL; + bIsGroup = bIsRepost = true; + }; + + CMString tszId; + time_t tDate; + CVkUserInfo *vkUser; + CMString tszText; + CMString tszLink; + CMString tszType; + bool bIsGroup; + bool bIsRepost; +}; + struct TFakeAckParams { __inline TFakeAckParams(MCONTACT _hContact, int _msgid) : @@ -189,13 +216,6 @@ struct TFakeAckParams int msgid; }; -enum VKObjType { vkNull, vkPost, vkPhoto, vkVideo, vkComment, vkTopic, vkUsers, vkCopy }; - -struct CVkNotification { - TCHAR *ptszType; - VKObjType vkParent, vkFeedback; - TCHAR *ptszTranslate; -}; struct CVkProto : public PROTO { @@ -321,11 +341,11 @@ struct CVkProto : public PROTO void AddFeedSpecialUser(); void AddFeedEvent(CMString& tszBody, time_t tTime); - CVkUserInfo * GetVkUserInfo(LONG iUserId, OBJLIST &vkUsers); + CVkUserInfo* GetVkUserInfo(LONG iUserId, OBJLIST &vkUsers); void CreateVkUserInfoList(OBJLIST &vkUsers, JSONNODE *pResponse); CMString GetVkPhotoItem(JSONNODE *pPhotoItem); - CMString GetVkNewsItem(JSONNODE *pItem, OBJLIST &vkUsers, time_t &tDate); + CVKNewsItem* GetVkNewsItem(JSONNODE *pItem, OBJLIST &vkUsers); CMString GetVkNotificationsItem(JSONNODE *pItem, OBJLIST &vkUsers, time_t &tDate); CMString GetVkFeedback(JSONNODE *pFeedback, VKObjType vkFeedbackType, OBJLIST &vkUsers, CVkUserInfo *vkUser); -- cgit v1.2.3