floo2
bmx_roster_item.h
1 //-------------------------------------------------------------------------------------------------
2 // File : bmx_roster_item.h
3 // Author : Eric Liang <eric@bmxlabs.com>
4 // Purpose : bmx roster item define file.
5 // Created : 12 Nov 2018 by Eric Liang <eric@bmxlabs.com>
6 //-------------------------------------------------------------------------------------------------
7 //
8 // Copyright (C) 2018-2019 MaxIM.Top
9 //
10 // You may obtain a copy of the licence at http://www.maxim.top/LICENCE-MAXIM.md
11 //
12 //-------------------------------------------------------------------------------------------------
13 
14 #ifndef bmx_roster_item_h
15 #define bmx_roster_item_h
16 
17 #include <vector>
18 #include "bmx_base_object.h"
19 
20 namespace floo {
21 
25 class EXPORT_API BMXRosterItem : public BMXBaseObject {
26 public:
27 
31  enum class RosterRelation {
33  Friend,
35  Deleted,
37  Stranger,
39  Blocked,
40  };
41 
45  enum class AddFriendAuthMode {
47  Open,
49  NeedApproval,
51  AnswerQuestion,
53  RejectAll
54  };
55 
59  virtual ~BMXRosterItem() {}
60 
65  virtual int64_t rosterId() = 0;
66 
71  virtual const std::string& username() = 0;
72 
77  virtual const std::string& nickname() = 0;
78 
83  virtual std::string avatarRatelUrl() = 0;
84 
89  virtual std::string avatarUrl() = 0;
90 
95  virtual std::string avatarPath() = 0;
96 
101  virtual std::string avatarThumbnailUrl() = 0;
102 
107  virtual std::string avatarThumbnailPath() = 0;
108 
113  virtual const JSON& publicInfo() = 0;
114 
119  virtual const JSON& alias() = 0;
120 
125  virtual const JSON& ext() = 0;
126 
131  virtual const JSON& localExt() = 0;
132 
137  virtual RosterRelation relation() = 0;
138 
143  virtual bool isMuteNotification() = 0;
144 
149  virtual AddFriendAuthMode addFriendAuthMode() = 0;
150 
155  virtual const std::string& authQuestion() = 0;
156 
157 protected:
158  BMXRosterItem() {}
159 
160 private:
161  BMXRosterItem(const BMXRosterItem&);
162  BMXRosterItem& operator=(const BMXRosterItem&);
163 };
164 
165 typedef std::shared_ptr<BMXRosterItem> BMXRosterItemPtr;
166 typedef std::vector<BMXRosterItemPtr> BMXRosterList;
167 }
168 
169 #endif /* bmx_roster_item_h */
AddFriendAuthMode
roster 被申请加好友时的验证方式
Definition: bmx_roster_item.h:45
联系人
Definition: bmx_roster_item.h:25
virtual ~BMXRosterItem()
析构函数
Definition: bmx_roster_item.h:59
RosterRelation
好友关系
Definition: bmx_roster_item.h:31
Definition: bmx_base_object.h:26