JCSDK-iOS
JCAgent.h
1 //
2 // JCAgent.h
3 // JCSDKOC
4 //
5 // Created by haojie on 2019/7/22.
6 // Copyright © 2019 juphoon. All rights reserved.
7 //
8 
9 #import <Foundation/Foundation.h>
10 #import "JCAgentCallback.h"
11 #import "JCAgentConstants.h"
12 #import "JCMediaChannel.h"
13 
19 NS_ASSUME_NONNULL_BEGIN
20 
22 @interface JCAgent : NSObject
23 
26 @property (nonatomic, readonly, assign) JCAgentCallState callState;
27 
30 @property (nonatomic, readonly, strong) JCMediaChannelParticipant *guestParticipant;
31 
35 @property (nonatomic, readonly, strong) NSArray <JCMediaChannelParticipant *> *participants;
36 
38 @property (nonatomic, readonly, copy) NSString *statistic;
39 
41 @property (nonatomic, readonly, assign) bool pause;
42 
45 @property (nonatomic, readonly, assign) JCAgentOperatorState operatorState;
46 
48 @property (nonatomic, readonly, copy) NSString *shareRenderId;
49 
51 @property (nonatomic, readonly, copy) NSString *shareUserId;
52 
55 @property (nonatomic, readonly, assign) JCMediaChannelPictureSize requestSize;
56 
58 @property (nonatomic, readonly, copy) NSString *serialNumber;
59 
61 @property (nonatomic, readonly, copy) NSString *extraStr;
62 
65 @property (nonatomic, assign) JCAgentTermState termState;
66 
68 @property (nonatomic, readonly, assign) int callerWaitTime;
69 
74 @property (nonatomic, readonly, assign) bool isAutoRecord;
75 
87 + (JCAgent *)create:(JCClient *)client mediaDevice:(JCMediaDevice *)mediaDevice callback:(id<JCAgentCallback>)callback;
88 
94 + (void)destroy;
95 
99 - (bool)queryAllGroups;
100 
120 - (bool)checkin:(NSString *)userId role:(JCAgentRoleType)role;
121 
138 - (bool)checkin:(JCAgentRoleType)role;
139 
154 - (bool)checkin:(NSString *)userId role:(JCAgentRoleType)role busy:(bool)busy;
155 
164 - (bool)checkout;
165 
172 - (bool)answer;
173 
181 - (bool)term;
182 
190 - (int)applyStatePause:(bool)pause;
191 
199 - (bool)enableVideo:(bool)enable;
200 
208 - (bool)enableAudio:(bool)enable;
209 
216 - (bool)sendVideoEmptyPack:(bool)empty;
217 
224 - (bool)sendAudioEmptyPack:(bool)empty;
225 
230 - (bool)setRatio:(float)ratio;
231 
236 - (bool)setScreenMode:(JCMediaChannelConfMergeModeParam *)param;
237 
242 - (int)queryAvailableAgents:(NSString *)groupId;
243 
250 - (int)transferCall:(JCAgentTransferType)type toUserId:(NSString *)toUserId;
251 
257 - (bool)enableScreenShare:(bool)enable;
258 
264 - (bool)inviteMember:(NSString *)userId;
265 
273 - (bool)checkResult:(bool)pass reason:(NSString *)reason;
274 
283 - (int)responseUrgentWithSeialNumber:(NSString *)serilaNumber callerNumber:(NSString *)callerNumber agree:(BOOL)agree;
284 
289 - (bool)enableLocalRecord:(bool)enable path:(NSString *)path;
290 
296 - (bool)enableLocalRecord:(bool)enable recordParam:(JCMediaChannelRecordLocalParams *)recordParam;
297 
304 - (bool)enableRemoteRecord:(bool)enable recordParam:(JCMediaChannelRecordRemoteParams *)recordParam;
305 
311 - (bool)sendMessage:(NSString *)type content:(NSString *)content;
312 
319 - (bool)sendMessage:(NSString *)type content:(NSString *)content toUserId:(nullable NSString *)userId;
320 
328 - (BOOL)insertStorageRecord:(NSString *)url fileType:(JCAgentStorageFileType)fileType fileSize:(int)fileSize expireTime:(int)expireTime;
329 
337 - (bool)setHoldState:(bool)hold;
338 
343 - (bool)getHoldState;
344 
353 - (void)turnCallType:(JCAgentCallType)calltype;
354 
361 
366 - (void)sendTextMessage:(NSString *)content toUserId:(NSString *)userId;
367 
370 - (void)requestSign;
371 
377 - (BOOL)controlRecord:(JCAgentReocrdAction)action watermarkText:(NSString *)watermarkText;
378 
379 @end
380 
381 NS_ASSUME_NONNULL_END
382 
JCAgent::guestParticipant
JCMediaChannelParticipant * guestParticipant
Definition: JCAgent.h:30
JCAgentReocrdAction
JCAgentReocrdAction
Definition: JCAgentConstants.h:183
JCAgent::shareUserId
NSString * shareUserId
屏幕共享时的共享成员id,无屏幕共享时为空
Definition: JCAgent.h:51
-[JCAgent term]
bool term()
Definition: JCAgent.m:229
JCAgentStorageFileType
JCAgentStorageFileType
Definition: JCAgentConstants.h:146
JCAgent::callState
JCAgentCallState callState
Definition: JCAgent.h:26
JCAgent::serialNumber
NSString * serialNumber
该次服务唯一标识
Definition: JCAgent.h:58
JCAgent::termState
JCAgentTermState termState
Definition: JCAgent.h:65
JCAgentTermState
JCAgentTermState
Definition: JCAgentConstants.h:163
JCAgentOperatorState
JCAgentOperatorState
Definition: JCAgentConstants.h:19
JCAgent::statistic
NSString * statistic
获取媒体统计信息
Definition: JCAgent.h:38
JCMediaDevice
Definition: JCMediaDevice.h:26
JCMediaChannelConfMergeModeParam
Definition: JCMediaChannel.h:186
JCAgent::extraStr
NSString * extraStr
电额外参数,由访客呼叫的时候携带
Definition: JCAgent.h:61
-[JCAgent checkout]
bool checkout()
Definition: JCAgent.m:174
JCAgent::pause
bool pause
当前是否是示忙状态
Definition: JCAgent.h:41
JCAgent
座席模块
Definition: JCAgent.h:23
JCMediaChannelRecordLocalParams
Definition: JCMediaChannel.h:137
JCAgentCallType
JCAgentCallType
Definition: JCAgentConstants.h:173
-[JCAgent requestSign]
void requestSign()
Definition: JCAgent.m:617
JCMediaChannelPictureSize
JCMediaChannelPictureSize
Definition: JCMediaChannelConstants.h:53
JCAgentRoleType
JCAgentRoleType
Definition: JCAgentConstants.h:115
JCAgent::operatorState
JCAgentOperatorState operatorState
Definition: JCAgent.h:45
JCAgent::isAutoRecord
bool isAutoRecord
Definition: JCAgent.h:74
JCMediaChannelRecordRemoteParams
Definition: JCMediaChannel.h:83
JCAgentCallState
JCAgentCallState
Definition: JCAgentConstants.h:33
-[JCAgent getCallType]
JCAgentCallType getCallType()
Definition: JCAgent.m:606
JCAgentTransferType
JCAgentTransferType
Definition: JCAgentConstants.h:105
JCAgentCallback-p
座席回调
Definition: JCAgentCallback.h:22
JCAgent::participants
NSArray< JCMediaChannelParticipant * > * participants
Definition: JCAgent.h:35
JCAgent::shareRenderId
NSString * shareRenderId
屏幕共享时的渲染id,无屏幕共享时为空
Definition: JCAgent.h:48
-[JCAgent getHoldState]
bool getHoldState()
Definition: JCAgent.m:587
JCAgent::requestSize
JCMediaChannelPictureSize requestSize
Definition: JCAgent.h:55
JCMediaChannelParticipant
Definition: JCMediaChannelParticipant.h:70
-[JCAgent queryAllGroups]
bool queryAllGroups()
Definition: JCAgent.m:121
JCAgent::callerWaitTime
int callerWaitTime
访客呼叫等待时长,即访客发起呼叫到座席接起的时长,单位秒
Definition: JCAgent.h:68
+[JCAgent destroy]
void destroy()
Definition: JCAgent.m:466
JCClient
Definition: JCClient.h:22
-[JCAgent answer]
bool answer()
Definition: JCAgent.m:224