NIMSDK-iOS
|
#import <NIMEventSubscribeManagerProtocol.h>
构造函数 | |
(void) | - publishEvent:completion: |
(void) | - subscribeEvent:completion: |
(void) | - unSubscribeEvent:completion: |
(void) | - querySubscribeEvent:completion: |
(void) | - addDelegate: |
(void) | - removeDelegate: |
事件订阅协议
- (void) addDelegate: | (id< NIMEventSubscribeManagerDelegate >) | delegate |
添加通知对象
delegate | 通知对象 |
- (void) publishEvent: | (NIMSubscribeEvent *) | event | |
completion: | (nullable NIMEventSubscribeBlock) | completion | |
发布事件
event | 需要广播的事件,事件可被其他人订阅 |
completion | 完成回调 |
- (void) querySubscribeEvent: | (NIMSubscribeRequest *) | request | |
completion: | (nullable NIMEventSubscribeQueryBlock) | completion | |
查询订阅事件
request | 查询请求 |
completion | 完成回调 @discussion 请求中必须填写 type 字段 和 publishers 字段 |
- (void) removeDelegate: | (id< NIMEventSubscribeManagerDelegate >) | delegate |
移除通知对象
delegate | 通知对象 |
- (void) subscribeEvent: | (NIMSubscribeRequest *) | request | |
completion: | (nullable NIMEventSubscribeResponseBlock) | completion | |
订阅事件
request | 订阅请求 |
completion | 完成回调 @discussion 请求中必需填写 type,expiry,publishers 字段 |
- (void) unSubscribeEvent: | (NIMSubscribeRequest *) | request | |
completion: | (nullable NIMEventSubscribeResponseBlock) | completion | |
取消订阅事件
request | 取消订阅请求 |
completion | 完成回调 @discussion 请求中必须填写 type 字段 , 如果不填写 publishers 字段,则取消指定事件的全部订阅关系 |