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,
83};
84
88typedef void (^ZoomCCFetchUIBlock)(UIViewController * _Nullable viewController);
89
94@interface ZoomCCContext : NSObject
98@property(nonatomic, copy) NSString *userName;
102@property(nonatomic, assign) BOOL enableLog;
106@property(nullable, nonatomic, copy) NSString *cacheFolder;
110@property(nullable, nonatomic, copy) NSString *deviceShareBundleID;
114@property(nullable, nonatomic, copy) NSString *appGroupID;
118@property(nonatomic, assign) ZoomCCSDKDomainType domainType;
119@end
120
121
122
123@interface ZoomCCCampaignInfo: NSObject
124// In a campaign, there could be several channels like chat channel and
125// video channel. The value can be ZoomCCIInterfaceType_Chat,
126// ZoomCCIInterfaceType_Video and ZoomCCIInterfaceType_ZVA,
127// ZoomCCIInterfaceType_Chat, or ZoomCCIInterfaceType_ScheduledCallback.
128@property(nonatomic, copy) NSArray <NSNumber *> *translatedCampaignChannels;
129@property(nonatomic, copy) NSString *campaignId;
130@property(nonatomic, copy) NSString *campaignLanguage;
131@property(nonatomic, copy) NSString *campaignName;
132@end
133
138@interface ZoomCCItem: NSObject
142@property(nonatomic, copy) NSString *entryId;
143
147@property(nonatomic, copy) NSString *apiKey;
151@property(nonatomic, assign) ZoomCCIInterfaceType sdkType;
152
153
159@property(nonatomic, assign) BOOL useCampaignMode;
160
166@property(nonatomic, strong, nullable) ZoomCCCampaignInfo *campaignInfo;
167
186@property(nonatomic, copy, nullable) NSDictionary<NSString *, NSString *> *engagementVariables;
187@end
188
189@protocol ZoomCCChatService, ZoomCCVideoService;
190@protocol ZoomCCService;
191
195@protocol ZoomCCServiceDelegate <NSObject>
196@optional
203- (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")));
204
212- (void)onService:(id<ZoomCCService>)service error:(NSUInteger)error detail:(NSInteger)detail description:(NSString *_Nullable)description;
213
219- (void)onService:(id<ZoomCCService>)service engagementStart:(NSString*)engagementId;
220
226- (void)onService:(id<ZoomCCService>)service engagementEnd:(NSString*)engagementId;
227
233- (void)onService:(id<ZoomCCService>)service eventChange:(ZoomCCSDKEvent)event;
234
243- (void)onService:(id<ZoomCCService>)service
244engagementVariablesRequired:(NSArray<NSDictionary<NSString *, NSString *> *> *)variables;
245
251- (void)onService:(id<ZoomCCService>)service loginStatusChanged:(ZoomCCSDKStatus)status;
252@end
253
257@protocol ZoomCCService <NSObject>
261@property(nonatomic, readonly) ZoomCCItem *item;
262
266@property(nonatomic, assign, readonly) ZoomCCSDKStatus status;
267
271@property(nonatomic, assign, readonly) BOOL inEngagement;
272
276@property(nullable, nonatomic, copy, readonly) NSString *engagementId;
277
283- (void)initializeWithItem:(ZoomCCItem *)item;
284
295- (BOOL)login;
301- (BOOL)logout;
302
308- (void)fetchUI:(ZoomCCFetchUIBlock)complete;
309@end
310
314@protocol ZoomCCChatServiceDelegate <ZoomCCServiceDelegate>
315@optional
321- (void)onChatService:(id<ZoomCCChatService>)service unreadMsgCountChanged:(NSUInteger)count;
322@end
323
327@protocol ZoomCCChatService <ZoomCCService>
331@property(nullable, nonatomic, weak) id<ZoomCCChatServiceDelegate> chatDelegate;
335@property(nonatomic, assign, readonly) NSUInteger unreadMsgCount;
336
341- (void)endChat;
342@end
343
347@protocol ZoomCCVideoService <ZoomCCService>
348
352@property(nonatomic, assign) ZoomCCVideoPreviewOption videoPreviewOptions;
353
357@property(nonatomic, assign) BOOL autoJoinWhenVideoCreated;
358
362@property(nullable, nonatomic, weak) id<ZoomCCServiceDelegate> videoDelegate;
363
368- (void)endVideo;
369
383- (BOOL)handleRejoinVideoOpenURL:(NSURL *)rejoinURL item:(ZoomCCItem *)item videoDelegate:(id<ZoomCCServiceDelegate>)videoDelegate complete:(void(^)(UIViewController * _Nonnull viewController))complete;
384
398- (BOOL)handleShortLinkVideoURL:(NSURL *)url item:(ZoomCCItem *)item videoDelegate:(id<ZoomCCServiceDelegate>)videoDelegate complete:(void(^)(UIViewController * _Nonnull viewController))complete;
399
400@end
401
402@protocol ZoomCCScheduledCallbackService <ZoomCCService>
403
407@property (nonatomic, weak) id<ZoomCCServiceDelegate> scheduledCallbackDelegate;
408
414@end
415
419@protocol ZoomCCAppLifecyleDelegate <NSObject>
425
431
437
443@end
444
450
456
461@property(nonatomic, strong) ZoomCCContext *context;
462
467- (id<ZoomCCChatService>)chatService;
468
473- (id<ZoomCCChatService>)zvaService;
474
479- (id<ZoomCCVideoService>)videoService;
480
485- (id<ZoomCCScheduledCallbackService>)scheduledCallbackService;
486
491- (NSString *)sdkVersion;
492
493
497- (void)getCampaigns:(NSString *)apiKey complete:(void(^)(bool success, NSArray <ZoomCCCampaignInfo *>* campaigns))complete;
498@end
499
500NS_ASSUME_NONNULL_END
Definition ZoomCCInterface.h:124
Initializes the SDK's context parameters. This class contains configuration information.
Definition ZoomCCInterface.h:95
NSString * deviceShareBundleID
For screen sharing: the bundle ID for broadcast upload extension.
Definition ZoomCCInterface.h:110
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:98
NSString * cacheFolder
A folder used to store temporary files, such as images and logs.
Definition ZoomCCInterface.h:106
BOOL enableLog
Default is NO. When set to YES, the sdk starts local logging.
Definition ZoomCCInterface.h:102
ZoomCCSDKDomainType domainType
Since the backend service has different clusters, when domainType is configured, the SDK requests bac...
Definition ZoomCCInterface.h:118
NSString * appGroupID
For screen sharing: the main app's appGroupID should be same with the broadcast upload extension's ap...
Definition ZoomCCInterface.h:114
ZoomCCSDK API manager. This is the main singleton instance used to create chat and video services,...
Definition ZoomCCInterface.h:450
ZoomCCInterface * sharedInstance()
Returns ZoomCCInterface instance.
ZoomCCContext * context
Creates and configures ZoomCCContext parameters to initialize the ZoomCCInterface.
Definition ZoomCCInterface.h:461
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:139
ZoomCCCampaignInfo * campaignInfo
Used for the campaign type engagement start. If this property is set with a valid value,...
Definition ZoomCCInterface.h:166
NSString * apiKey
Used to start a scheduled callback.
Definition ZoomCCInterface.h:147
ZoomCCIInterfaceType sdkType
Indicates the channel type, either chat or video.
Definition ZoomCCInterface.h:151
NSDictionary< NSString *, NSString * > * engagementVariables
Application-provided values for variables configured in Contact Center.
Definition ZoomCCInterface.h:186
NSString * entryId
Used to start a video or chat engagement.
Definition ZoomCCInterface.h:142
BOOL useCampaignMode
Indicate whether to use campaign mode to start the engagement. Default value is NO....
Definition ZoomCCInterface.h:159
An interface that handles the life cycle of the application.
Definition ZoomCCInterface.h:419
void appDidEnterBackgroud()
Notifies the common layer that application entered background. Call the appDidEnterBackgroud via appl...
void appWillTerminate()
Notifies the common layer that the application will terminate. Call the appWillTerminate via applicat...
void appDidBecomeActive()
Notifies the common layer that application became active. Call the appDidBecomeActive via application...
void appWillResignActive()
Notifies the common layer that application will resign from active state. Call the systematical metho...
id< ZoomCCChatServiceDelegate > chatDelegate
The chat channel delegate.
Definition ZoomCCInterface.h:331
void endChat()
Forcibly an end a chat engagement.
NSUInteger unreadMsgCount
Gets the number of unread messages.
Definition ZoomCCInterface.h:335
void endScheduledCallback()
Forcibly end a scheduled callback service.
id< ZoomCCServiceDelegate > scheduledCallbackDelegate
The scheduled callback channel delegate.
Definition ZoomCCInterface.h:407
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:266
ZoomCCItem * item
Retrieves information about the service.
Definition ZoomCCInterface.h:261
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:271
NSString * engagementId
Retrieves the service's engagement ID.
Definition ZoomCCInterface.h:276
id< ZoomCCServiceDelegate > videoDelegate
The video channel delegate.
Definition ZoomCCInterface.h:362
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:357
ZoomCCVideoPreviewOption videoPreviewOptions
Indicates if a video preview is available in the waiting room before a user enters the video session....
Definition ZoomCCInterface.h:352