EMGroupOptions.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /**
  2. * \~chinese
  3. * @header EMGroupOptions.h
  4. * @abstract 群组属性选项
  5. * @author Hyphenate
  6. * @version 3.00
  7. *
  8. * \~english
  9. * @header EMGroupOptions.h
  10. * @abstract Group property options
  11. * @author Hyphenate
  12. * @version 3.00
  13. */
  14. #import <Foundation/Foundation.h>
  15. #define KSDK_GROUP_MINUSERSCOUNT 3
  16. #define KSDK_GROUP_USERSCOUNTDEFAULT 200
  17. /**
  18. * \~chinese
  19. * 群组类型。
  20. *
  21. * \~english
  22. * The group type.
  23. */
  24. typedef NS_ENUM(NSInteger, EMGroupStyle) {
  25. EMGroupStylePrivateOnlyOwnerInvite = 0, /**! \~chinese 私有群组类型,只允许群主邀请用户加入。 \~english A private group, where only the group owner can invite users to join. */
  26. EMGroupStylePrivateMemberCanInvite, /**! \~chinese 私有群组类型,群主和群成员均可邀请用户加入。 \~english A private group, where all the group members including the group owner, group manager, and other group members can invite users to join. */
  27. EMGroupStylePublicJoinNeedApproval, /**! \~chinese 公开群组类型,群主可以邀请用户加入; 非群成员用户发送入群申请,经群主同意后才能入组。 \~english A public group, where the group owner can invite users to user. Users can send a join request and join the group if the owner approves it. */
  28. EMGroupStylePublicOpenJoin, /**! \~chinese 公开群组类型,用户可以自由加入。 \~english A public group, where users can join freely. */
  29. };
  30. /**
  31. * \~chinese
  32. * 群组属性选项。
  33. *
  34. * \~english
  35. * The group options.
  36. */
  37. @interface EMGroupOptions : NSObject
  38. /**
  39. * \~chinese
  40. * 群组的类型。
  41. *
  42. * \~english
  43. * The group style.
  44. */
  45. @property (nonatomic) EMGroupStyle style;
  46. /**
  47. * \~chinese
  48. * 群组的最大成员数。取值范围 [3,2000],默认值 200。
  49. *
  50. * \~english
  51. * The maximum number of members in a group. The value range is [3,2000]; the default value is 200.
  52. */
  53. @property (nonatomic) NSInteger maxUsers;
  54. /**
  55. * \~chinese
  56. * 是否需要发送邀请通知。如果设为 NO,则被邀请的人自动加入群组。
  57. *
  58. * \~english
  59. * Whether to send an invitation notification when inviting a user to join the group. If you set it as NO, the user joins the group automatically.
  60. */
  61. @property (nonatomic) BOOL IsInviteNeedConfirm;
  62. /**
  63. * \~chinese
  64. * 扩展信息。
  65. *
  66. * \~english
  67. * The extra information of the group.
  68. */
  69. @property (nonatomic, strong) NSString *ext;
  70. #pragma mark - EM_DEPRECATED_IOS 3.8.8
  71. /**
  72. * \~chinese
  73. * 群组的最大成员数(3 - 2000,默认是200)
  74. *
  75. * \~english
  76. * The group capacity (3-2000, the default is 200)
  77. */
  78. @property (nonatomic) NSInteger maxUsersCount
  79. __deprecated_msg("Use maxUsers instead");
  80. @end