EMMultiDevicesDelegate.h 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /*!
  2. * \~chinese
  3. * @header EMMultiDevicesDelegate.h
  4. * @abstract 多设备回调
  5. * @author Hyphenate
  6. * @version 3.00
  7. *
  8. * \~english
  9. * @header EMMultiDevicesDelegate.h
  10. * @abstract This protocol defined the callbacks of Multi-device
  11. * @author Hyphenate
  12. * @version 3.00
  13. */
  14. #import <Foundation/Foundation.h>
  15. /*!
  16. * \~chinese
  17. * 多设备事件类型
  18. * 用户UserA,登录2台机子DeviceA1和DeviceA2,另有一个用户UserB
  19. *
  20. * \~english
  21. * Multi-device event type
  22. * User UserA logged into two devices DeviceA1 and DeviceA2 with another user UserB
  23. */
  24. typedef NS_ENUM(NSInteger, EMMultiDevicesEvent) {
  25. EMMultiDevicesEventUnknow = -1, /*! \~chinese 默认 \~english Default */
  26. EMMultiDevicesEventContactRemove = 2, /*! \~chinese UserB和UserA是好友,UserA在DeviceA1上删除了UserB,DeviceA2会收到该回调 \~english UserB and UserA are friends, UserA removed UserB on DeviceA1, DeviceA2 will receive this callback */
  27. EMMultiDevicesEventContactAccept = 3, /*! \~chinese UserB向UserA发送加好友申请,UserA在DeviceA1上同意了该请求,DeviceA2会收到该回调 \~english UserB sent UserA a friend request, UserA accepted the request on DeviceA1, DeviceA2 will receive this callback */
  28. EMMultiDevicesEventContactDecline = 4, /*! \~chinese UserB向UserA发送加好友申请,UserA在DeviceA1上拒绝了该请求,DeviceA2会收到该回调 \~english UserB sent UserA a friend request, UserA declined the request on DeviceA1, DeviceA2 will receive this callback */
  29. EMMultiDevicesEventContactBan = 5, /*! \~chinese UserA在DeviceA1上将UserB加入黑名单,DeviceA2会收到该回调 \~english UserB and UserA are friends, UserA blocked UserB on DeviceA1, DeviceA2 will receive this callback */
  30. EMMultiDevicesEventContactAllow = 6, /*! \~chinese UserA在DeviceA1上将UserB从黑名单中移除,DeviceA2会收到该回调 \~english UserB and UserA are friends, UserA unblocked UserB on DeviceA1, DeviceA2 will receive this callback */
  31. EMMultiDevicesEventGroupCreate = 10, /*! \~chinese UserA在DeviceA1上创建了群组Group,DeviceA2会收到该回调 \~english UserA created a group on DeviceA1, DeviceA2 will receive this callback */
  32. EMMultiDevicesEventGroupDestroy = 11, /*! \~chinese UserA在DeviceA1上销毁了群组Group,DeviceA2会收到该回调 \~english UserA destroyed a group on DeviceA1, DeviceA2 will receive this callback */
  33. EMMultiDevicesEventGroupJoin = 12, /*! \~chinese UserA在DeviceA1上主动加入了群组Group,DeviceA2会收到该回调 \~english UserA joined a group on DeviceA1, DeviceA2 will receive this callback */
  34. EMMultiDevicesEventGroupLeave = 13, /*! \~chinese UserA在DeviceA1上退出了群组Group,DeviceA2会收到该回调 \~english UserA left a group on DeviceA1, DeviceA2 will receive this callback */
  35. EMMultiDevicesEventGroupApply = 14, /*! \~chinese UserA在DeviceA1上发送了申请进入Group,DeviceA2会收到该回调 \~english UserA requested to join a group on DeviceA1, DeviceA2 will receive this callback */
  36. EMMultiDevicesEventGroupApplyAccept = 15, /*! \~chinese UserA收到UserB的入群申请,UserA在DeviceA1上同意了该申请,DeviceA2会收到该回调 \~english UserA received UserB's request to join the group, UserA accepted the request on DeviceA1, DeviceA2 will receive this callback */
  37. EMMultiDevicesEventGroupApplyDecline = 16, /*! \~chinese UserA收到UserB的入群申请,UserA在DeviceA1上拒绝了该申请,DeviceA2会收到该回调 \~english UserA received UserB's request to join the group, but UserA declined the request on DeviceA1, DeviceA2 will receive this callback */
  38. EMMultiDevicesEventGroupInvite = 17, /*! \~chinese UserA在DeviceA1上邀请了某些人进入GroupA,DeviceA2会收到该回调 \~english UserA invited UserB to join a Group on DeviceA1, DeviceA2 will receive this callback */
  39. EMMultiDevicesEventGroupInviteAccept = 18, /*! \~chinese UserBUserA加入群组,UserA在DeviceA1上同意了UserB的邀请,DeviceA2会收到该回调 \~english UserB invited UserA to join a group, UserA accepted UserB's invitation on DeviceA1, DeviceA2 will receive this callback */
  40. EMMultiDevicesEventGroupInviteDecline = 19, /*! \~chinese UserB邀请UserA加入群组,UserA在DeviceA1上拒绝了UserB的邀请,DeviceA2会收到该回调 \~english UserB invited UserA to join a group, UserA declined UserB's invitation on DeviceA1, DeviceA2 will receive this callback */
  41. EMMultiDevicesEventGroupKick = 20, /*! \~chinese UserA在DeviceA1上将某些成员从GroupA中踢出,DeviceA2会收到该回调 \~english UserA removed a user(s) from a group on DeviceA1, DeviceA2 will receive this callback */
  42. EMMultiDevicesEventGroupBan = 21, /*! \~chinese UserA在DeviceA1上将某些成员加入GroupA黑名单,DeviceA2会收到该回调 \~english UserA blocked a user(s) on DeviceA1, DeviceA2 will receive this callback */
  43. EMMultiDevicesEventGroupAllow = 22, /*! \~chinese UserA在DeviceA1上将某些成员从GroupA黑名单中移除,DeviceA2会收到该回调 \~english UserA unblocked a user(s) on DeviceA1, DeviceA2 will receive this callback */
  44. EMMultiDevicesEventGroupBlock = 23, /*! \~chinese UserA在DeviceA1上屏蔽了GroupA的消息,DeviceA2会收到该回调 \~english UserA blocked message from GroupA on DeviceA1, DeviceA2 will receive this callback */
  45. EMMultiDevicesEventGroupUnBlock = 24, /*! \~chinese UserA在DeviceA1上取消了屏蔽GroupA的消息,DeviceA2会收到该回调 \~english UserA unblocked message from GroupA on DeviceA1, DeviceA2 will receive this callback */
  46. EMMultiDevicesEventGroupAssignOwner = 25, /*! \~chinese UserA在DeviceA1上更新了GroupA的群主,DeviceA2会收到该回调 \~english UserA updated GroupA owner on DeviceA1, DeviceA2 will receive this callback */
  47. EMMultiDevicesEventGroupAddAdmin = 26, /*! \~chinese UserA在DeviceA1上添加了GroupA的管理员,DeviceA2会收到该回调 \~english UserA added an admin to GroupA on DeviceA1, DeviceA2 will receive this callback */
  48. EMMultiDevicesEventGroupRemoveAdmin = 27, /*! \~chinese UserA在DeviceA1上移除了GroupA的管理员,DeviceA2会收到该回调 \~english UserA removed an admin from GroupA on DeviceA1, DeviceA2 will receive this callback */
  49. EMMultiDevicesEventGroupAddMute = 28, /*! \~chinese UserA在DeviceA1上禁言了GroupA的某些成员,DeviceA2会收到该回调 \~english UserA silent a user(s) on GroupA on DeviceA1, DeviceA2 will receive this callback */
  50. EMMultiDevicesEventGroupRemoveMute = 29, /*! \~chinese UserA在DeviceA1上移除了GroupA的某些禁言成员,DeviceA2会收到该回调 \~english UserA un-silent a user(s) on GroupA on DeviceA1, DeviceA2 will receive this callback */
  51. };
  52. @protocol EMMultiDevicesDelegate <NSObject>
  53. @optional
  54. /*!
  55. * \~chinese
  56. * 好友多设备事件回调
  57. *
  58. * @param aEvent 多设备事件类型
  59. * @param aUsername 用户名
  60. * @param aExt 扩展信息
  61. *
  62. * \~english
  63. * The multi-device event callback of contact
  64. *
  65. * @param aEvent Event type
  66. * @param aUsername Username
  67. * @param aExt Extended Information
  68. */
  69. - (void)multiDevicesContactEventDidReceive:(EMMultiDevicesEvent)aEvent
  70. username:(NSString *)aUsername
  71. ext:(NSString *)aExt;
  72. /*!
  73. * \~chinese
  74. * 群组多设备事件回调
  75. *
  76. * @param aEvent 多设备事件类型
  77. * @param aGroupId 群组ID
  78. * @param aExt 扩展信息
  79. *
  80. * \~english
  81. * The multi-device event callback of group
  82. *
  83. * @param aEvent Event type
  84. * @param aGroupId Group id
  85. * @param aExt Extended Information
  86. */
  87. - (void)multiDevicesGroupEventDidReceive:(EMMultiDevicesEvent)aEvent
  88. groupId:(NSString *)aGroupId
  89. ext:(id)aExt;
  90. @end