Geen omschrijving

EMChatroomManagerDelegate.h 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. /*!
  2. * \~chinese
  3. * @header EMChatroomManagerDelegate.h
  4. * @abstract 此协议定义了聊天室相关的回调
  5. * @author Hyphenate
  6. * @version 3.00
  7. *
  8. * \~english
  9. * @header EMChatroomManagerDelegate.h
  10. * @abstract This protocol defined the callbacks of chatroom
  11. * @author Hyphenate
  12. * @version 3.00
  13. */
  14. #import <Foundation/Foundation.h>
  15. /*!
  16. * \~chinese
  17. * 被踢出聊天室的原因
  18. *
  19. * \~english
  20. * The casuse for kicking a user out of a chatroom
  21. */
  22. typedef enum{
  23. EMChatroomBeKickedReasonBeRemoved = 0, /*! \~chinese 被管理员移出聊天室 \~english Removed by chatroom owner */
  24. EMChatroomBeKickedReasonDestroyed, /*! \~chinese 聊天室被销毁 \~english Chatroom has been destroyed */
  25. }EMChatroomBeKickedReason;
  26. @class EMChatroom;
  27. /*!
  28. * \~chinese
  29. * 聊天室相关的回调
  30. *
  31. * \~english
  32. * Callbacks of chatroom
  33. */
  34. @protocol EMChatroomManagerDelegate <NSObject>
  35. @optional
  36. /*!
  37. * \~chinese
  38. * 有用户加入聊天室
  39. *
  40. * @param aChatroom 加入的聊天室
  41. * @param aUsername 加入者
  42. *
  43. * \~english
  44. * Delegate method will be invoked when a user joins a chatroom.
  45. *
  46. * @param aChatroom Joined chatroom
  47. * @param aUsername The user who joined chatroom
  48. */
  49. - (void)userDidJoinChatroom:(EMChatroom *)aChatroom
  50. user:(NSString *)aUsername;
  51. /*!
  52. * \~chinese
  53. * 有用户离开聊天室
  54. *
  55. * @param aChatroom 离开的聊天室
  56. * @param aUsername 离开者
  57. *
  58. * \~english
  59. * Delegate method will be invoked when a user leaves a chatroom.
  60. *
  61. * @param aChatroom Left chatroom
  62. * @param aUsername The user who leaved chatroom
  63. */
  64. - (void)userDidLeaveChatroom:(EMChatroom *)aChatroom
  65. user:(NSString *)aUsername;
  66. /*!
  67. * \~chinese
  68. * 被踢出聊天室
  69. *
  70. * @param aChatroom 被踢出的聊天室
  71. * @param aReason 被踢出聊天室的原因
  72. *
  73. * \~english
  74. * Delegate method will be invoked when a user is dismissed from a chat room
  75. *
  76. * @param aChatroom aChatroom
  77. * @param aReason The reason of dismissing user from the chat room
  78. */
  79. - (void)didDismissFromChatroom:(EMChatroom *)aChatroom
  80. reason:(EMChatroomBeKickedReason)aReason;
  81. #pragma mark - Deprecated methods
  82. /*!
  83. * \~chinese
  84. * 有用户加入聊天室
  85. *
  86. * @param aChatroom 加入的聊天室
  87. * @param aUsername 加入者
  88. *
  89. * \~english
  90. * Delegate method will be invoked when a user joins a chat room
  91. *
  92. * @param aChatroom Joined chatroom
  93. * @param aUsername The user who joined chatroom
  94. */
  95. - (void)didReceiveUserJoinedChatroom:(EMChatroom *)aChatroom
  96. username:(NSString *)aUsername __deprecated_msg("Use -userDidJoinChatroom:user:");
  97. /*!
  98. * \~chinese
  99. * 有用户离开聊天室
  100. *
  101. * @param aChatroom 离开的聊天室
  102. * @param aUsername 离开者
  103. *
  104. * \~english
  105. * A user leaved chatroom
  106. *
  107. * @param aChatroom Leaved chatroom
  108. * @param aUsername The user who leaved chatroom
  109. */
  110. - (void)didReceiveUserLeavedChatroom:(EMChatroom *)aChatroom
  111. username:(NSString *)aUsername __deprecated_msg("Use -userDidLeaveChatroom:reason:");
  112. /*!
  113. * \~chinese
  114. * 被踢出聊天室
  115. *
  116. * @param aChatroom 被踢出的聊天室
  117. * @param aReason 被踢出聊天室的原因
  118. *
  119. * \~english
  120. * User was kicked out from a chatroom
  121. *
  122. * @param aChatroom The chatroom which user was kicked out from
  123. * @param aReason The reason of user was kicked out
  124. */
  125. - (void)didReceiveKickedFromChatroom:(EMChatroom *)aChatroom
  126. reason:(EMChatroomBeKickedReason)aReason __deprecated_msg("Use -didDismissFromChatroom:reason:");
  127. @end