JRTCSDK-iOS v2301.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
15@class JRTCP2PSession;
16
19
21@interface JRTCClient : NSObject
22
27@property (nonatomic, readonly, copy) NSString* _Nullable userId;
28
32@property (nonatomic, copy, getter=getDisplayName) NSString* _Nullable displayName;
33
37@property (nonatomic, copy, getter=getAppKey) NSString* _Nullable appKey;
38
42@property (nonatomic, copy, getter=getServer) NSString* _Nullable server;
43
47@property (nonatomic, copy, getter=getAppName) NSString* _Nullable appName;
48
52@property (nonatomic, readonly) JRTCClientState state;
53
60+ (JRTCClient* _Nullable)create:(id<JRTCClientCallback> _Nonnull)callback initParam:(JRTCClientInitParam* _Nullable)initParam;
61
68+ (void)destroy;
69
76- (void)setForeground:(bool)foreground;
77
90- (bool)login:(NSString* _Nonnull)userId password:(NSString* _Nonnull)password;
91
105- (bool)login:(NSString* _Nonnull)userId password:(NSString* _Nonnull)password loginParam:(JRTCClientLoginParam* _Nullable)loginParam;
106
114- (bool)relogin:(NSString* _Nonnull)userId password:(NSString* _Nonnull)password;
115
124- (bool)logout;
125
135- (int)sendOnlineMessage:(NSString* _Nonnull)message userId:(NSString* _Nonnull)userId;
136
143
156- (bool)getUploadUrl:(NSString *_Nullable)fileId;
157
158@end
159
161@interface JRTCP2PSession : NSObject
162
164@property (nonatomic, assign, readonly) int pathId;
165
167@property (nonatomic, copy, readonly) NSString * _Nonnull host;
168
170@property (nonatomic, assign, readonly) int port;
171
173@property (nonatomic, copy, readonly) NSString *otherHost;
174
176@property (nonatomic, assign, readonly) int otherPort;
177
183- (void)connect:(NSString *_Nonnull)otherHost port:(int)otherPort;
184
188- (bool)send:(NSString *_Nonnull)content;
189
193- (void)close;
194
199- (void)updatState:(JRTCP2PSessionState)state;
200
204- (JRTCP2PSessionState)getState;
205
206@end
207
JRTCClientState
Definition: JRTCClientConstants.h:17
JRTCP2PSessionState
Definition: JRTCClientConstants.h:33
登录登出管理
Definition: JRTCClient.h:22
JRTCP2PSession *_Nonnull createP2PSession()
NSString *_Nullable appName
Definition: JRTCClient.h:47
NSString *_Nullable appKey
Definition: JRTCClient.h:37
NSString *_Nullable userId
Definition: JRTCClient.h:27
NSString *_Nullable server
Definition: JRTCClient.h:42
NSString *_Nullable displayName
Definition: JRTCClient.h:32
JRTCClientState state
Definition: JRTCClient.h:52
void destroy()
初始化参数
Definition: JRTCClientInitParam.h:18
登录参数
Definition: JRTCClientLoginParam.h:18
P2P会话类
Definition: JRTCClient.h:162