NIMSDK-iOS
载入中...
搜索中...
未找到
NIMGenericTypeAPIDefine.h
浏览该文件的文档.
1//
2// Created by cqu227hk on 2022/12/08.
3// Copyright (c) 2022 Netease. All rights reserved.
4//
5
6#import <Foundation/Foundation.h>
7
8NS_ASSUME_NONNULL_BEGIN
9
10/**
11 * 统一类型调用参数定义
12 */
13@interface NIMGenericTypeAPICallParam : NSObject
14
15/**
16 * 调用序列号,调用方产生,在执行结果中带回
17 */
18@property (nonatomic,assign) NSInteger sn;
19/**
20 * 调用上下文数据,调用方产生,SDK不维护此数据的生命周期,在执行结果中带回
21 */
22@property (nonatomic,assign) id data;
23/**
24 * api名称
25 */
26@property (nonatomic,copy) NSString* name;
27/**
28 * api参数,json format
29 */
30@property (nonatomic,copy) NSString* param;
31
32@end
33
34/**
35 * 统一类型调用结果参数定义
36 */
37@interface NIMGenericTypeAPICallResult : NSObject
38
39/**
40 * 调用序列号用户生成,与调用参数中的sn字段一致
41 */
42@property (nonatomic,assign) NSInteger sn;
43/**
44 * 调用上下文数据,与调用参数中的data字段一致
45 */
46@property (nonatomic,assign) id data;
47/**
48 * api名称
49 */
50@property (nonatomic,copy) NSString* name;
51/**
52 * api 结果参数,json format
53 */
54@property (nonatomic,copy) NSString* result;
55
56@end
57
58/**
59 * 统一类型调用执行结果回调定义
60 *
61 * @param error 错误信息,如果成功,error 为 nil
62 * @param result 调用结果,如果失败,result 可能为 nil
63 */
64typedef void(^NIMGenericTypeAPICallInvokeCallback)(NSError * __nullable error, NIMGenericTypeAPICallResult * __nullable result);
65
66
67NS_ASSUME_NONNULL_END
68
69
void(^ NIMGenericTypeAPICallInvokeCallback)(NSError *__nullable error, NIMGenericTypeAPICallResult *__nullable result)
Definition: NIMGenericTypeAPIDefine.h:64
Definition: NIMGenericTypeAPIDefine.h:14
NSString * param
Definition: NIMGenericTypeAPIDefine.h:30
NSString * name
Definition: NIMGenericTypeAPIDefine.h:26
NSInteger sn
Definition: NIMGenericTypeAPIDefine.h:18
id data
Definition: NIMGenericTypeAPIDefine.h:22
Definition: NIMGenericTypeAPIDefine.h:38