Easemob Windows SDK
emgroupsetting.h
1 /************************************************************
2  * * EaseMob CONFIDENTIAL
3  * __________________
4  * Copyright (C) 2015 EaseMob Technologies. All rights reserved.
5  *
6  * NOTICE: All information contained herein is, and remains
7  * the property of EaseMob Technologies.
8  * Dissemination of this information or reproduction of this material
9  * is strictly forbidden unless prior written permission is obtained
10  * from EaseMob Technologies.
11  */
12 
13 #ifndef __easemob__emgroupsetting__
14 #define __easemob__emgroupsetting__
15 
16 #include "embaseobject.h"
17 #include <memory>
18 
19 namespace easemob
20 {
21 
22 class EASEMOB_API EMGroupSetting : public EMBaseObject
23 {
24 public:
25 
26  typedef enum{
27  PRIVATE_OWNER_INVITE, //Private group, only group owner can invite user to the group
28  PRIVATE_MEMBER_INVITE, //Private group, both group owner and members can invite user to the group
29  PUBLIC_JOIN_APPROVAL, //Public group, user can apply to join the group, but need group owner's approval, and owner can invite user to the group
30  PUBLIC_JOIN_OPEN, //Public group, any user can freely join the group, and owner can invite user to the group
31  PUBLIC_ANONYMOUS, //Anonymous group, NOT support now
32  DEFAUT = PRIVATE_OWNER_INVITE
33  } EMGroupStyle;
34 
35  EMGroupSetting(EMGroupStyle style = DEFAUT, int maxUserCount = 200) : mStyle(style), mMaxUserCount(maxUserCount)
36  {}
37  EMGroupSetting(const EMGroupSetting& a) {
38  mStyle = a.mStyle;
39  mMaxUserCount = a.mMaxUserCount;
40  }
41 
42  virtual ~EMGroupSetting() {}
43 
44  EMGroupStyle style() const { return mStyle; }
45  void setStyle(EMGroupStyle style) { mStyle = style; }
46 
47  int maxUserCount() const { return mMaxUserCount; }
48  void setMaxUserCount(int maxUserCount) { mMaxUserCount = maxUserCount; }
49 
50  EMGroupSetting& operator=(const EMGroupSetting &a) {
51  mStyle = a.mStyle;
52  mMaxUserCount = a.mMaxUserCount;
53  return *this;
54  }
55 
56 private:
57  EMGroupStyle mStyle;
58  int mMaxUserCount;
59 };
60 
61 typedef std::shared_ptr<EMGroupSetting> EMGroupSettingPtr;
62 
63 }
64 
65 #endif /* defined(__easemob__emgroupsetting__) */
Definition: emgroupsetting.h:22
Definition: emattributevalue.h:28
Definition: embaseobject.h:28