JRTCSDK-iOS v2601.0
多方通话 API 文档
载入中...
搜索中...
未找到
JRTCClient.h
1//
2// JRTCClient.h
3// JRTCSDK
4//
5// Created by juphoon on 2017/8/10.
6// Copyright © 2017年 juphoon. All rights reserved.
7//
8
9#import <Foundation/Foundation.h>
10#import "JRTCClientCallback.h"
11#import "JRTCClientLoginParam.h"
12#import "JRTCClientConstants.h"
13#import "JRTCClientInitParam.h"
14#import "JRTCRequestFileUploadParam.h"
15#import "JRTCCompleteFileUploadParam.h"
16
17@class JRTCP2PSession;
18
21
23@interface JRTCClient : NSObject
24
29@property (nonatomic, readonly, copy) NSString* _Nullable userId;
30
34@property (nonatomic, copy, getter=getDisplayName) NSString* _Nullable displayName;
35
39@property (nonatomic, copy, getter=getAppKey) NSString* _Nullable appKey;
40
44@property (nonatomic, copy, getter=getServer) NSString* _Nullable server;
45
49@property (nonatomic, copy, getter=getAppName) NSString* _Nullable appName;
50
54@property (nonatomic, readonly) JRTCClientState state;
55
62+ (JRTCClient* _Nullable)create:(id<JRTCClientCallback> _Nonnull)callback initParam:(JRTCClientInitParam* _Nullable)initParam;
63
70+ (void)destroy;
71
78- (void)setForeground:(bool)foreground;
79
92- (bool)login:(NSString* _Nonnull)userId password:(NSString* _Nonnull)password DEPRECATED_MSG_ATTRIBUTE("该方法即将废弃");
93
106- (bool)login:(NSString* _Nonnull)userId loginParam:(JRTCClientLoginParam* _Nullable)loginParam;
107
121- (bool)login:(NSString* _Nonnull)userId password:(NSString* _Nonnull)password loginParam:(JRTCClientLoginParam* _Nullable)loginParam DEPRECATED_MSG_ATTRIBUTE("该方法即将废弃");
122
130- (bool)relogin:(NSString* _Nonnull)userId password:(NSString* _Nonnull)password DEPRECATED_MSG_ATTRIBUTE("该方法即将废弃");
131
140- (bool)logout;
141
151- (int)sendOnlineMessage:(NSString* _Nonnull)message userId:(NSString* _Nonnull)userId;
152
159
172- (bool)getUploadUrl:(NSString *_Nullable)fileId DEPRECATED_MSG_ATTRIBUTE("该方法即将废弃,请用#requestFileUploadInfo:requestFileUploadParam:代替");
173
184- (int)requestFileUploadInfo:(NSString *_Nonnull)serialId requestFileUploadParam:(JRTCRequestFileUploadParam *_Nonnull)requestFileUploadParam;
185
197- (int)completeFileUpload:(NSString *_Nonnull)serialId completeFileUploadParam:(JRTCCompleteFileUploadParam *_Nonnull)completeFileUploadParam;
198
209- (int)getUploadFileInfo:(NSString *_Nonnull)serialId extraInfo:(NSDictionary<NSString *, id> *_Nullable)extraInfo;
210
219- (int)getQualityCheckResult:(NSString *_Nonnull)serialId;
220
221@end
222
224@interface JRTCP2PSession : NSObject
225
227@property (nonatomic, assign, readonly) int pathId;
228
230@property (nonatomic, copy, readonly) NSString * _Nonnull host;
231
233@property (nonatomic, assign, readonly) int port;
234
236@property (nonatomic, copy, readonly) NSString * _Nullable otherHost;
237
239@property (nonatomic, assign, readonly) int otherPort;
240
246- (void)connect:(NSString *_Nonnull)otherHost port:(int)otherPort;
247
251- (bool)send:(NSString *_Nonnull)content;
252
256- (void)close;
257
262- (void)updatState:(JRTCP2PSessionState)state;
263
268
269@end
270
JRTCClientState
定义 JRTCClientConstants.h:17
JRTCP2PSessionState
定义 JRTCClientConstants.h:33
登录登出管理
定义 JRTCClient.h:24
JRTCP2PSession *_Nonnull createP2PSession()
NSString *_Nullable appName
定义 JRTCClient.h:49
NSString *_Nullable appKey
定义 JRTCClient.h:39
NSString *_Nullable userId
定义 JRTCClient.h:29
NSString *_Nullable server
定义 JRTCClient.h:44
NSString *_Nullable displayName
定义 JRTCClient.h:34
JRTCClientState state
定义 JRTCClient.h:54
void destroy()
初始化参数
定义 JRTCClientInitParam.h:18
登录参数
定义 JRTCClientLoginParam.h:18
P2P会话类
定义 JRTCClient.h:225
int pathId
P2P通道ID
定义 JRTCClient.h:227
NSString *_Nullable otherHost
连接的host
定义 JRTCClient.h:236
int otherPort
连接的端口
定义 JRTCClient.h:239
NSString *_Nonnull host
host
定义 JRTCClient.h:230
JRTCP2PSessionState getState()
获取当前P2P连接的状态
void close()
关闭连接
int port
端口
定义 JRTCClient.h:233