floo2
bmx_user_profile.h
1 //-------------------------------------------------------------------------------------------------
2 // File : bmx_user_profile.h
3 // Author : Eric Liang <eric@bmxlabs.com>
4 // Purpose : bmx user profile 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_user_profile_h
15 #define bmx_user_profile_h
16 
17 #include "bmx_base_object.h"
18 
19 namespace floo {
20 
24 class EXPORT_API BMXUserProfile: public BMXBaseObject {
25 
26 public:
30  enum class AddFriendAuthMode {
32  Open,
34  NeedApproval,
36  AnswerQuestion,
38  RejectAll
39  };
40 
44  struct AuthQuestion {
45  AuthQuestion() {}
46 
48  std::string mQuestion;
49 
51  std::string mAnswer;
52  };
53 
57  struct MessageSetting {
58  MessageSetting() {
59  mPushEnabled = true;
60  mPushDetail = true;
61  mNotificationSound = true;
62  mNotificationVibrate = true;
63  mAutoDownloadAttachment = true;
64  mSilenceStartTime = 0;
65  mSilenceEndTime = 0;
66  mPushStartTime = 0;
67  mPushEndTime = 23;
68  }
69 
70  // 推送设定
73 
76 
78  std::string mPushNickname;
79 
80  // 在线消息设定
83 
86 
89 
92 
95 
98 
101  };
102 
106  enum class UserCategory {
108  Normal,
110  Advanced
111  };
112 
116  virtual ~BMXUserProfile() {}
117 
122  virtual int64_t userId() = 0;
123 
128  virtual UserCategory category() = 0;
129 
134  virtual const std::string& username() = 0;
135 
140  virtual const std::string& nickname() = 0;
141 
146  virtual std::string avatarRatelUrl() = 0;
147 
152  virtual std::string avatarUrl() = 0;
153 
158  virtual std::string avatarPath() = 0;
159 
164  virtual std::string avatarThumbnailPath() = 0;
165 
170  virtual const std::string& mobilePhone() = 0;
171 
176  virtual const std::string& email() = 0;
177 
182  virtual const JSON& publicInfo() = 0;
183 
188  virtual const JSON& privateInfo() = 0;
189 
194  virtual AddFriendAuthMode addFriendAuthMode() = 0;
195 
200  virtual const AuthQuestion& authQuestion() = 0;
201 
206  virtual const MessageSetting& messageSetting() = 0;
207 
212  virtual bool isAutoAcceptGroupInvite() = 0;
213 
214 protected:
215  BMXUserProfile() {}
216 
217 private:
218  BMXUserProfile(const BMXUserProfile&);
219  BMXUserProfile& operator=(const BMXUserProfile&);
220 };
221 
222 typedef std::shared_ptr<BMXUserProfile> BMXUserProfilePtr;
223 }
224 
225 #endif /* bmx_user_profile_h */
std::string mQuestion
好友验证问题
Definition: bmx_user_profile.h:48
int mSilenceEndTime
推送静默结束时间
Definition: bmx_user_profile.h:94
bool mNotificationSound
收到消息时是否通过声音提醒
Definition: bmx_user_profile.h:82
int mPushEndTime
允许推送结束时间
Definition: bmx_user_profile.h:100
bool mPushEnabled
当APP未打开时是否允许推送
Definition: bmx_user_profile.h:72
bool mPushDetail
是否推送消息详情
Definition: bmx_user_profile.h:75
virtual ~BMXUserProfile()
析构函数
Definition: bmx_user_profile.h:116
int mSilenceStartTime
推送静默起始时间
Definition: bmx_user_profile.h:91
用户Profile
Definition: bmx_user_profile.h:24
std::string mAnswer
好友验证问题答案
Definition: bmx_user_profile.h:51
bool mNotificationVibrate
收到消息时是否通过震动提醒
Definition: bmx_user_profile.h:85
bool mAutoDownloadAttachment
收到消息时是否自动下载缩略图或者语音
Definition: bmx_user_profile.h:88
Definition: bmx_base_object.h:26
添加好友时的校验问题
Definition: bmx_user_profile.h:44
AddFriendAuthMode
对方申请加好友时的验证方式
Definition: bmx_user_profile.h:30
int mPushStartTime
允许推送起始时间
Definition: bmx_user_profile.h:97
std::string mPushNickname
对方收到推送消息时显示的名称
Definition: bmx_user_profile.h:78
用户消息设置
Definition: bmx_user_profile.h:57
UserCategory
用户类型
Definition: bmx_user_profile.h:106