diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-12-23 07:45:38 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-12-23 07:45:38 +0000 |
commit | 331d68975919584be948fb862316669cf2945d07 (patch) | |
tree | 07bc3f8adcbce06ae630feb6c7e62b4b0e422989 /protocols/VKontakte/src/vk_proto.h | |
parent | a57b972035bf2866fece4b832849d98e07485a98 (diff) |
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
Diffstat (limited to 'protocols/VKontakte/src/vk_proto.h')
-rw-r--r-- | protocols/VKontakte/src/vk_proto.h | 40 |
1 files changed, 30 insertions, 10 deletions
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<CVkProto>
{
@@ -321,11 +341,11 @@ struct CVkProto : public PROTO<CVkProto> void AddFeedSpecialUser();
void AddFeedEvent(CMString& tszBody, time_t tTime);
- CVkUserInfo * GetVkUserInfo(LONG iUserId, OBJLIST<CVkUserInfo> &vkUsers);
+ CVkUserInfo* GetVkUserInfo(LONG iUserId, OBJLIST<CVkUserInfo> &vkUsers);
void CreateVkUserInfoList(OBJLIST<CVkUserInfo> &vkUsers, JSONNODE *pResponse);
CMString GetVkPhotoItem(JSONNODE *pPhotoItem);
- CMString GetVkNewsItem(JSONNODE *pItem, OBJLIST<CVkUserInfo> &vkUsers, time_t &tDate);
+ CVKNewsItem* GetVkNewsItem(JSONNODE *pItem, OBJLIST<CVkUserInfo> &vkUsers);
CMString GetVkNotificationsItem(JSONNODE *pItem, OBJLIST<CVkUserInfo> &vkUsers, time_t &tDate);
CMString GetVkFeedback(JSONNODE *pFeedback, VKObjType vkFeedbackType, OBJLIST<CVkUserInfo> &vkUsers, CVkUserInfo *vkUser);
|