NIMSDK-iOS
载入中...
搜索中...
未找到
NIMPassThroughManagerProtocol.h
浏览该文件的文档.
1//
2// NIMPassThroughManagerProtocol.h
3// NIMLib
4//
5// Created by Netease on 2019/12/19.
6// Copyright © 2019 Netease. All rights reserved.
7//
8
9#import <Foundation/Foundation.h>
10
13
14NS_ASSUME_NONNULL_BEGIN
15
16/**
17 * 透传HTTP请求完成的回调block
18 * @param response 透传请求的响应,如果错误则为nil
19 * @param error 错误,如果成功则为nil
20 */
21typedef void(^NIMPassThroughCompletedBlock)(NIMPassThroughHttpData* __nullable response, NSError * __nullable error);
22
23/**
24 * 透传服务管理回调
25 */
26@protocol NIMPassThroughManagerDelegate <NSObject>
27
28@optional
29
30/**
31* 收到透传消息
32*
33* @param recvData 收到的透传消息数据
34*/
35- (void)didReceivedPassThroughMsg:(NIMPassThroughMsgData* __nullable)recvData;
36
37@end
38
39/**
40 * PassThrough接口
41 */
42@protocol NIMPassThroughManager <NSObject>
43
44/**
45 * 透传HTTP请求到应用服务
46 *
47 * @param reqData 透传的Http数据
48 * @param completion 经验操作完成后的回调
49 * @discussion 操作成功后,云信服务器会下发禁言的群通知消息
50 */
51- (void)passThroughHttpReq:(NIMPassThroughHttpData *)reqData
52 completion:(nullable NIMPassThroughCompletedBlock)completion;
53
54
55/**
56 * 添加透传管理的委托
57 *
58 * @param delegate 透传管理委托
59 */
60- (void)addDelegate:(id<NIMPassThroughManagerDelegate>)delegate;
61
62/**
63 * 移除透传管理的委托
64 *
65 * @param delegate 透传管理委托
66 */
67- (void)removeDelegate:(id<NIMPassThroughManagerDelegate>)delegate;
68
69@end
70
71NS_ASSUME_NONNULL_END
NS_ASSUME_NONNULL_BEGIN typedef void(^ NIMPassThroughCompletedBlock)(NIMPassThroughHttpData *__nullable response, NSError *__nullable error)
Definition: NIMPassThroughOption.h:37
Definition: NIMPassThroughOption.h:78