123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326 |
- /*!
- * \~chinese
- * @header EMGroup.h
- * @abstract 群组
- * @author Hyphenate
- * @version 3.00
- *
- * \~english
- * @header EMGroup.h
- * @abstract Group
- * @author Hyphenate
- * @version 3.00
- */
- #import <Foundation/Foundation.h>
- #import "EMCommonDefs.h"
- #import "EMGroupOptions.h"
- /*!
- * \~chinese
- * 群组类型
- *
- * \~english
- * Group permission type
- */
- typedef enum{
- EMGroupPermissionTypeNone = -1, /*! \~chinese 未知 \~english Unknown */
- EMGroupPermissionTypeMember = 0, /*! \~chinese 普通成员 \~english Normal member */
- EMGroupPermissionTypeAdmin, /*! \~chinese 群组管理员 \~english Group admin */
- EMGroupPermissionTypeOwner, /*! \~chinese 群主 \~english Group owner */
- }EMGroupPermissionType;
- /*!
- * \~chinese
- * 群组
- *
- * \~english
- * Group
- */
- @interface EMGroup : NSObject
- /*!
- * \~chinese
- * 群组ID
- *
- * \~english
- * Group id
- */
- @property (nonatomic, copy, readonly) NSString *groupId;
- /*!
- * \~chinese
- * 群组的名称,需要获取群详情
- *
- * \~english
- * Subject of the group
- */
- @property (nonatomic, copy, readonly) NSString *groupName;
- /*!
- * \~chinese
- * 群组的描述,需要获取群详情
- *
- * \~english
- * Description of the group
- */
- @property (nonatomic, copy, readonly) NSString *description;
- /*!
- * \~chinese
- * 群组的公告,需要获取群公告
- *
- * \~english
- * Announcement of the group
- */
- @property (nonatomic, copy, readonly) NSString *announcement;
- /*!
- * \~chinese
- * 群组属性配置,需要获取群详情
- *
- * \~english
- * Setting options of group
- */
- @property (nonatomic, strong, readonly) EMGroupOptions *setting;
- /*!
- * \~chinese
- * 群组的所有者,拥有群的最高权限,需要获取群详情
- *
- * 群组的所有者只有一人
- *
- * \~english
- * Owner of the group
- *
- * Each group only has one owner
- */
- @property (nonatomic, copy, readonly) NSString *owner;
- /*!
- * \~chinese
- * 群组的管理者,拥有群的最高权限,需要获取群详情
- *
- *
- * \~english
- * Admins of the group
- *
- */
- @property (nonatomic, copy, readonly) NSArray *adminList;
- /*!
- * \~chinese
- * 群组的成员列表,需要获取群详情
- *
- * \~english
- * Member list of the group
- */
- @property (nonatomic, copy, readonly) NSArray *memberList;
- /*!
- * \~chinese
- * 群组的黑名单,需要先调用获取群黑名单方法
- *
- * 需要owner权限才能查看,非owner返回nil
- *
- * \~english
- * Group‘s blacklist of blocked users
- *
- * Need owner's authority to access, return nil if user is not the group owner.
- */
- @property (nonatomic, strong, readonly) NSArray *blacklist;
- /*!
- * \~chinese
- * 群组的被禁言列表
- *
- * 需要owner权限才能查看,非owner返回nil
- *
- * \~english
- * List of muted members
- *
- * Need owner's authority to access, return nil if user is not the group owner.
- */
- @property (nonatomic, strong, readonly) NSArray *muteList;
- /*!
- * \~chinese
- * 聊天室的白名单列表<NSString>
- *
- * 需要owner权限才能查看,非owner返回nil
- *
- * \~english
- * List of whitelist members<NSString>
- *
- * Need owner's authority to access, return nil if user is not the group owner.
- */
- @property (nonatomic, strong, readonly) NSArray *whiteList;
- /*!
- * \~chinese
- * 群共享文件列表
- *
- * \~english
- * List of shared file
- */
- @property (nonatomic, strong, readonly) NSArray *sharedFileList;
- /*!
- * \~chinese
- * 此群组是否接收消息推送通知
- *
- * \~english
- * Is Apple Push Notification Service enabled for group
- */
- @property (nonatomic, readonly) BOOL isPushNotificationEnabled;
- /*!
- * \~chinese
- * 此群是否为公开群,需要获取群详情
- *
- * \~english
- * Whether is a public group
- */
- @property (nonatomic, readonly) BOOL isPublic;
- /*!
- * \~chinese
- * 是否屏蔽群消息
- *
- * \~english
- * Whether block the current group‘s messages
- */
- @property (nonatomic, readonly) BOOL isBlocked;
- /*!
- * \~chinese
- * 当前登录账号的群成员类型
- *
- * \~english
- * The group membership type of the current login account
- */
- @property (nonatomic, readonly) EMGroupPermissionType permissionType;
- /*!
- * \~chinese
- * 群组的所有成员(包含owner、admins和members)
- *
- * \~english
- * All occupants of the group, includes the group owner and admins and all other group members
- */
- @property (nonatomic, strong, readonly) NSArray *occupants;
- /*!
- * \~chinese
- * 群组当前的成员数量,需要获取群详情, 包括owner, admins, members
- *
- * \~english
- * The total number of group occupants, include owner, admins, members
- */
- @property (nonatomic, readonly) NSInteger occupantsCount;
- /**
- * \~chinese
- * 群组成员是否全部被静音
- *
- * \~english
- * The group is all members muted.
- */
- @property (nonatomic, readonly) BOOL isMuteAllMembers;
- /*!
- * \~chinese
- * 获取群组实例,如果不存在则创建
- *
- * @param aGroupId 群组ID
- *
- * @result 群组实例
- *
- * \~english
- * Get group instance, create a instance if it does not exist
- *
- * @param aGroupId Group id
- *
- * @result Group instance
- */
- + (instancetype)groupWithId:(NSString *)aGroupId;
- #pragma mark - EM_DEPRECATED_IOS 3.3.0
- /*!
- * \~chinese
- * 群组的成员列表,需要获取群详情
- *
- * \~english
- * Member list of the group
- */
- @property (nonatomic, copy, readonly) NSArray *members EM_DEPRECATED_IOS(3_1_0, 3_3_0, "Use -memberList");
- /*!
- * \~chinese
- * 群组的黑名单,需要先调用获取群黑名单方法
- *
- * 需要owner权限才能查看,非owner返回nil
- *
- * \~english
- * Group‘s blacklist of blocked users
- *
- * Need owner's authority to access, return nil if user is not the group owner.
- */
- @property (nonatomic, strong, readonly) NSArray *blackList EM_DEPRECATED_IOS(3_1_0, 3_3_0, "Use -blacklist");
- /*!
- * \~chinese
- * 群组当前的成员数量,需要获取群详情, 包括owner, admins, members
- *
- * \~english
- * The total number of group members, include owner, admins, members
- */
- @property (nonatomic, readonly) NSInteger membersCount EM_DEPRECATED_IOS(3_1_0, 3_3_0, "Use -occupantsCount");
- /*!
- * \~chinese
- * 群组的主题,需要获取群详情
- *
- * \~english
- * Subject of the group
- */
- @property (nonatomic, copy, readonly) NSString *subject EM_DEPRECATED_IOS(3_1_0, 3_6_2, "Use -groupName");
- #pragma mark - EM_DEPRECATED_IOS < 3.2.3
- /*!
- * \~chinese
- * 初始化群组实例
- *
- * 请使用+groupWithId:方法
- *
- * @result nil
- *
- * \~english
- * Initialize a group instance
- *
- * Please use [+groupWithId:]
- *
- * @result nil
- */
- - (instancetype)init __deprecated_msg("Use +groupWithId:");
- /*!
- * \~chinese
- * 群组的黑名单,需要先调用获取群黑名单方法
- *
- * 需要owner权限才能查看,非owner返回nil
- *
- * \~english
- * Group‘s blacklist of blocked users
- *
- * Need owner's authority to access, return nil if user is not the group owner.
- */
- @property (nonatomic, strong, readonly) NSArray *bans __deprecated_msg("Use - blackList");
- @end
|