Contact Center SDK for iOS API reference
Loading...
Searching...
No Matches
ZoomCCInterface.h
1//
2// ZoomCCInterface.h
3// ZoomCCSDK
4//
5
6#import <UIKit/UIKit.h>
7
8NS_ASSUME_NONNULL_BEGIN
9
13typedef NS_ENUM(NSInteger, ZoomCCIInterfaceType) {
15 ZoomCCIInterfaceType_Unknown,
17 ZoomCCIInterfaceType_Chat,
19 ZoomCCIInterfaceType_Video,
21 ZoomCCIInterfaceType_ZVA,
23 ZoomCCIInterfaceType_ScheduledCallback,
24};
25
26typedef NS_ENUM(NSInteger, ZoomCCVideoPreviewOption) {
28 ZoomCCVideoPreviewOption_default,
30 ZoomCCVideoPreviewOption_noPreviewWithCameraOn,
32 ZoomCCVideoPreviewOption_noPreviewWithCameraOff
33};
34
38typedef NS_ENUM(NSInteger, ZoomCCSDKStatus) {
40 ZoomCCSDKStatus_Initial,
42 ZoomCCSDKStatus_Connecting,
44 ZoomCCSDKStatus_Login,
46 ZoomCCSDKStatus_Disconnect
47};
48
52typedef NS_ENUM(NSInteger, ZoomCCSDKEvent) {
54 ZoomCCSDKEvent_VideoTaskCreated,
56 ZoomCCSDKEvent_VideoJoinButtonClicked,
58 ZoomCCSDKEvent_VideoStart,
60 ZoomCCSDKEvent_VideoLeaveButtonClicked,
62 ZoomCCSDKEvent_VideoEndedForcefully,
64 ZoomCCSDKEvent_VideoEnd,
65};
66
70typedef NS_ENUM(NSInteger, ZoomCCSDKDomainType) {
72 ZoomCCSDKDomainType_None = 0,
74 ZoomCCSDKDomainType_US01,
76 ZoomCCSDKDomainType_EU01,
78 ZoomCCSDKDomainType_SA01,
80 ZoomCCSDKDomainType_US08,
82 ZoomCCSDKDomainType_UK01,
84 ZoomCCSDKDomainType_GOV,
85};
86
90typedef void (^ZoomCCFetchUIBlock)(UIViewController * _Nullable viewController);
91
96@interface ZoomCCContext : NSObject
100@property(nonatomic, copy) NSString *userName;
104@property(nonatomic, assign) BOOL enableLog;
108@property(nullable, nonatomic, copy) NSString *cacheFolder;
112@property(nullable, nonatomic, copy) NSString *deviceShareBundleID;
116@property(nullable, nonatomic, copy) NSString *appGroupID;
120@property(nonatomic, assign) ZoomCCSDKDomainType domainType;
121@end
122
123
124
125@interface ZoomCCCampaignInfo: NSObject
126// In a campaign, there could be several channels like chat channel and
127// video channel. The value can be ZoomCCIInterfaceType_Chat,
128// ZoomCCIInterfaceType_Video and ZoomCCIInterfaceType_ZVA,
129// ZoomCCIInterfaceType_Chat, or ZoomCCIInterfaceType_ScheduledCallback.
130@property(nonatomic, copy) NSArray <NSNumber *> *translatedCampaignChannels;
131@property(nonatomic, copy) NSString *campaignId;
132@property(nonatomic, copy) NSString *campaignLanguage;
133@property(nonatomic, copy) NSString *campaignName;
134@end
135
140@interface ZoomCCItem: NSObject
144@property(nonatomic, copy) NSString *entryId;
145
149@property(nonatomic, copy) NSString *apiKey;
153@property(nonatomic, assign) ZoomCCIInterfaceType sdkType;
154
155
161@property(nonatomic, assign) BOOL useCampaignMode;
162
168@property(nonatomic, strong, nullable) ZoomCCCampaignInfo *campaignInfo;
169
188@property(nonatomic, copy, nullable) NSDictionary<NSString *, NSString *> *engagementVariables;
189@end
190
191@protocol ZoomCCChatService, ZoomCCVideoService;
192@protocol ZoomCCService;
193
197@protocol ZoomCCServiceDelegate <NSObject>
198@optional
205- (void)onService:(id<ZoomCCService>)service error:(NSUInteger)error detail:(NSInteger)detail __attribute__((deprecated("This method is deprecated. Use onService:error:detail:description: to replace this")));
206
214- (void)onService:(id<ZoomCCService>)service error:(NSUInteger)error detail:(NSInteger)detail description:(NSString *_Nullable)description;
215
221- (void)onService:(id<ZoomCCService>)service engagementStart:(NSString*)engagementId;
222
228- (void)onService:(id<ZoomCCService>)service engagementEnd:(NSString*)engagementId;
229
235- (void)onService:(id<ZoomCCService>)service eventChange:(ZoomCCSDKEvent)event;
236
245- (void)onService:(id<ZoomCCService>)service
246engagementVariablesRequired:(NSArray<NSDictionary<NSString *, NSString *> *> *)variables;
247
253- (void)onService:(id<ZoomCCService>)service loginStatusChanged:(ZoomCCSDKStatus)status;
254@end
255
259@protocol ZoomCCService <NSObject>
263@property(nonatomic, readonly) ZoomCCItem *item;
264
268@property(nonatomic, assign, readonly) ZoomCCSDKStatus status;
269
273@property(nonatomic, assign, readonly) BOOL inEngagement;
274
278@property(nullable, nonatomic, copy, readonly) NSString *engagementId;
279
285- (void)initializeWithItem:(ZoomCCItem *)item;
286
297- (BOOL)login;
303- (BOOL)logout;
304
310- (void)fetchUI:(ZoomCCFetchUIBlock)complete;
311@end
312
316@protocol ZoomCCChatServiceDelegate <ZoomCCServiceDelegate>
317@optional
323- (void)onChatService:(id<ZoomCCChatService>)service unreadMsgCountChanged:(NSUInteger)count;
324@end
325
329@protocol ZoomCCChatService <ZoomCCService>
333@property(nullable, nonatomic, weak) id<ZoomCCChatServiceDelegate> chatDelegate;
337@property(nonatomic, assign, readonly) NSUInteger unreadMsgCount;
338
343- (void)endChat;
344@end
345
349@protocol ZoomCCVideoService <ZoomCCService>
350
354@property(nonatomic, assign) ZoomCCVideoPreviewOption videoPreviewOptions;
355
359@property(nonatomic, assign) BOOL autoJoinWhenVideoCreated;
360
364@property(nullable, nonatomic, weak) id<ZoomCCServiceDelegate> videoDelegate;
365
370- (void)endVideo;
371
385- (BOOL)handleRejoinVideoOpenURL:(NSURL *)rejoinURL item:(ZoomCCItem *)item videoDelegate:(id<ZoomCCServiceDelegate>)videoDelegate complete:(void(^)(UIViewController * _Nonnull viewController))complete;
386
400- (BOOL)handleShortLinkVideoURL:(NSURL *)url item:(ZoomCCItem *)item videoDelegate:(id<ZoomCCServiceDelegate>)videoDelegate complete:(void(^)(UIViewController * _Nonnull viewController))complete;
401
402@end
403
404@protocol ZoomCCScheduledCallbackService <ZoomCCService>
405
409@property (nonatomic, weak) id<ZoomCCServiceDelegate> scheduledCallbackDelegate;
410
416@end
417
431@protocol ZoomCCAppLifecyleDelegate <NSObject>
440
449
461
471@end
472
478
484
489@property(nonatomic, strong) ZoomCCContext *context;
490
495- (id<ZoomCCChatService>)chatService;
496
501- (id<ZoomCCChatService>)zvaService;
502
507- (id<ZoomCCVideoService>)videoService;
508
513- (id<ZoomCCScheduledCallbackService>)scheduledCallbackService;
514
519- (NSString *)sdkVersion;
520
521
525- (void)getCampaigns:(NSString *)apiKey complete:(void(^)(bool success, NSArray <ZoomCCCampaignInfo *>* campaigns))complete;
526@end
527
528NS_ASSUME_NONNULL_END
Definition ZoomCCInterface.h:126
Initializes the SDK's context parameters. This class contains configuration information.
Definition ZoomCCInterface.h:97
NSString * deviceShareBundleID
For screen sharing: the bundle ID for broadcast upload extension.
Definition ZoomCCInterface.h:112
NSString * userName
The username to be displayed on the chat or video screen. The length can be between 1 to 34 character...
Definition ZoomCCInterface.h:100
NSString * cacheFolder
A folder used to store temporary files, such as images and logs.
Definition ZoomCCInterface.h:108
BOOL enableLog
Default is NO. When set to YES, the sdk starts local logging.
Definition ZoomCCInterface.h:104
ZoomCCSDKDomainType domainType
Since the backend service has different clusters, when domainType is configured, the SDK requests bac...
Definition ZoomCCInterface.h:120
NSString * appGroupID
For screen sharing: the main app's appGroupID should be same with the broadcast upload extension's ap...
Definition ZoomCCInterface.h:116
ZoomCCSDK API manager. This is the main singleton instance used to create chat and video services,...
Definition ZoomCCInterface.h:478
ZoomCCInterface * sharedInstance()
Returns ZoomCCInterface instance.
ZoomCCContext * context
Creates and configures ZoomCCContext parameters to initialize the ZoomCCInterface.
Definition ZoomCCInterface.h:489
id< ZoomCCScheduledCallbackService > scheduledCallbackService()
Returns the scheduled callback channel service.
NSString * sdkVersion()
Returns the Zoom Contact Center SDK internal version.
id< ZoomCCChatService > zvaService()
Returns the ZVA channel service.
id< ZoomCCChatService > chatService()
Returns the chat channel service.
id< ZoomCCVideoService > videoService()
Returns the video channel service.
Used to initialize [ZoomCCService]. Contains engagement information.
Definition ZoomCCInterface.h:141
ZoomCCCampaignInfo * campaignInfo
Used for the campaign type engagement start. If this property is set with a valid value,...
Definition ZoomCCInterface.h:168
NSString * apiKey
Used to start a scheduled callback.
Definition ZoomCCInterface.h:149
ZoomCCIInterfaceType sdkType
Indicates the channel type, either chat or video.
Definition ZoomCCInterface.h:153
NSDictionary< NSString *, NSString * > * engagementVariables
Application-provided values for variables configured in Contact Center.
Definition ZoomCCInterface.h:188
NSString * entryId
Used to start a video or chat engagement.
Definition ZoomCCInterface.h:144
BOOL useCampaignMode
Indicate whether to use campaign mode to start the engagement. Default value is NO....
Definition ZoomCCInterface.h:161
An interface for forwarding host application life-cycle transitions to the SDK.
Definition ZoomCCInterface.h:431
void appDidEnterBackgroud()
Notifies the common layer that the host application entered the background.
void appWillTerminate()
Notifies the common layer that the host application is about to terminate.
void appDidBecomeActive()
Notifies the common layer that the host application became active.
void appWillResignActive()
Notifies the common layer that the host application is about to resign the active state.
id< ZoomCCChatServiceDelegate > chatDelegate
The chat channel delegate.
Definition ZoomCCInterface.h:333
void endChat()
Forcibly an end a chat engagement.
NSUInteger unreadMsgCount
Gets the number of unread messages.
Definition ZoomCCInterface.h:337
void endScheduledCallback()
Forcibly end a scheduled callback service.
id< ZoomCCServiceDelegate > scheduledCallbackDelegate
The scheduled callback channel delegate.
Definition ZoomCCInterface.h:409
BOOL logout()
When done using the service, call this method to disconnect from the server.
void uninitialize()
Used to uninitialize service.
ZoomCCSDKStatus status
Retrieves the current service status.
Definition ZoomCCInterface.h:268
ZoomCCItem * item
Retrieves information about the service.
Definition ZoomCCInterface.h:263
BOOL login()
When calling method "initializeWithItem:", call this method to request to login to server.
BOOL inEngagement
Retrieves the service's current engagement status.
Definition ZoomCCInterface.h:273
NSString * engagementId
Retrieves the service's engagement ID.
Definition ZoomCCInterface.h:278
id< ZoomCCServiceDelegate > videoDelegate
The video channel delegate.
Definition ZoomCCInterface.h:364
void endVideo()
Forcibly end to a video engagement.
BOOL autoJoinWhenVideoCreated
Indicates if when agent accept the video request, a user will auto-join the video session....
Definition ZoomCCInterface.h:359
ZoomCCVideoPreviewOption videoPreviewOptions
Indicates if a video preview is available in the waiting room before a user enters the video session....
Definition ZoomCCInterface.h:354