NIMSDK-iOS
载入中...
搜索中...
未找到
NIMPassThroughOption.h
浏览该文件的文档.
1//
2// NIMPassThroughOption.h
3
4// NIMLib
5//
6// Created by Netease on 2019/12/19.
7// Copyright © 2019 Netease. All rights reserved.
8//
9
10#import <Foundation/Foundation.h>
11
12NS_ASSUME_NONNULL_BEGIN
13
14typedef NS_ENUM(NSInteger, NIPassThroughHttpMethod){
15 /*
16 * Get
17 */
19 /*
20 * POST
21 */
23 /*
24 * Put
25 */
27 /*
28 * Delete
29 */
31};
32
33/**
34 * 透传的HTTP数据
35 */
36@interface NIMPassThroughHttpData : NSObject
37
38/**
39 * 映射一个视频云upstream host
40 * 不传则用默认配置
41 * 选填
42 */
43@property (nullable, nonatomic, copy) NSString *zone;
44
45/**
46 * url中除了host的path
47 * 必填
48 */
49@property (nonatomic, copy) NSString *path;
50
51/**
52 * Http Method
53 * 默认post
54 * 选填
55 */
56@property (nonatomic, assign) NIPassThroughHttpMethod method;
57
58/**
59 * Http Header
60 * 必须为json格式
61 * 选填
62 */
63@property (nullable, nonatomic, copy) NSString *header;
64
65/**
66 * Http body
67 * 格式自定
68 * GET时必须为空, POST和PUT时必须为非空
69 */
70@property (nullable, nonatomic, copy) NSString *body;
71
72@end
73
74/**
75 * 收到的透传消息
76 */
77@interface NIMPassThroughMsgData : NSObject
78
79/**
80 * 发送方accid
81 */
82@property (nullable, nonatomic, copy) NSString *fromAccid;
83
84/**
85 * 透传内容
86 */
87@property (nonatomic, copy) NSString *body;
88
89/**
90 * 发送时间, 毫秒
91 */
92@property (nonatomic, assign) int64_t time;
93
94@end
95
96NS_ASSUME_NONNULL_END
NIPassThroughHttpMethod
Definition: NIMPassThroughOption.h:14
@ NIPassThroughHttpMethodGet
Definition: NIMPassThroughOption.h:18
@ NIPassThroughHttpMethodPost
Definition: NIMPassThroughOption.h:22
@ NIPassThroughHttpMethodPut
Definition: NIMPassThroughOption.h:26
@ NIPassThroughHttpMethodDelete
Definition: NIMPassThroughOption.h:30
Definition: NIMPassThroughOption.h:37
NSString * header
Definition: NIMPassThroughOption.h:63
NSString * body
Definition: NIMPassThroughOption.h:70
NSString * zone
Definition: NIMPassThroughOption.h:43
NSString * path
Definition: NIMPassThroughOption.h:49
NIPassThroughHttpMethod method
Definition: NIMPassThroughOption.h:56
Definition: NIMPassThroughOption.h:78