Avaya Client Services API Reference (iOS)
|
#import <CSClient.h>
Inherits NSObject.
Instance Methods | |
(instancetype) | - initWithConfiguration:delegate:delegateQueue: |
(void) | - createUserWithConfiguration:completionHandler: |
Creates and configures a new CSUser instance. More... | |
(void) | - shutdown: |
Starts an asynchronus shutdown of the client. More... | |
(BOOL) | - prepareForBackgroundInterval: |
Prepares the client for a period of background operation during which the process may be suspended. More... | |
(void) | - removeUser:gracefulRemove: |
Starts an asynchronus removal of a user. More... | |
(void) | - audioSessionDidBecomeActive: |
For CallKit applications, informs the SDK when the AVAudioSession is activated or deactivated. More... | |
(NSDictionary *) | - processRemoteNotification: |
Called by the client application for the ClientSDK to process the push notification message received from the Apple Push Notification service (APNs). More... | |
Properties | |
id< CSClientDelegate > | delegate |
The delegate used to handle client-related events. More... | |
dispatch_queue_t | delegateQueue |
The queue on which delegate methods are called. More... | |
CSMediaServicesInstance * | mediaServices |
The media services instance associated with this client. More... | |
CSCertificateManager * | certificateManager |
The certificate manager instance associated with this client. More... | |
CSDownloadService * | downloadService |
Service providing access to file download services for this user. More... | |
CSLogLevel | logLevel |
The current log level, which controls the verbosity of log output. More... | |
CSLogHandler | logHandler |
A log handler block to call when the library logs a message. More... | |
NSString * | versionString |
The current version of the library. More... | |
NSArray< NSNumber * > * | configuredCipherSuites |
Returns configured cipher suites excluding black listed cipher suites. More... | |
- (void) audioSessionDidBecomeActive: | (BOOL) | active |
For CallKit applications, informs the SDK when the AVAudioSession is activated or deactivated.
This method is intended to be connected to the application's CXProviderDelegate provider:didActivateAudioSession: and provider:didDeactivateAudioSession: methods. Since CallKit activates the audio session separately from the call initiation action the SDK needs to be informed of this activation/deactivation as a separate step.
If legacy cellular call detection is enabled via CSClientConfiguration::cellularCallDetectionEnabled this method has no effect.
- (void) createUserWithConfiguration: | (CSUserConfiguration *) | userConfiguration | |
completionHandler: | (void(^)(CSUser *user, NSError *error)) | handler | |
Creates and configures a new CSUser
instance.
userConfiguration | The configuration information for the new user. |
handler | A completion handler receiving the new user object or an error object describing the reason user creation failed. |
- (instancetype) initWithConfiguration: | (CSClientConfiguration *) | clientConfiguration | |
delegate: | (nullable id< CSClientDelegate >) | delegate | |
delegateQueue: | (nullable dispatch_queue_t) | queue | |
- (BOOL) prepareForBackgroundInterval: | (NSTimeInterval) | interval |
Prepares the client for a period of background operation during which the process may be suspended.
This is used to support the background mode for VoIP applications on iOS. In this mode a keepalive handler is used to wake up the application periodically while it is in the background, and between invocations of this handler the process may be suspended. During the interval in which the process is suspended the client may need to refresh its registration with the call server in order to maintain service. This method checks for any such conditions and, if possible, performs them immediately so that the client will maintain service while the process is in the suspended state.
In some cases it may not be possible for the client to support the specified background interval. For example, if the requested background interval is 10 minutes and the user's call server has been configured with a registration refresh time of 5 minutes, this method will return NO as it is not possible to support a 10 minute suspend interval when the registration must be refreshed every 5 minutes. If this method returns NO the application should use the best available means of preventing the application from being suspended, or inform the user that background operation is not possible. Because the conditions that prevent use of the specified background interval may change during the life of the application it should support the return value of this method changing each time the application enters the background or its keepalive handler is invoked.
interval | The maximum time interval that the application may be suspended for. This should be the same value passed to -[UIApplication setKeepAliveTimeout:handler:]. |
- (NSDictionary*) processRemoteNotification: | (PKPushPayload *) | userInfo |
Called by the client application for the ClientSDK to process the push notification message received from the Apple Push Notification service (APNs).
A dictionary of name/value pairs representing different attributes of the push notification message is returned. The returned information may include the folloowing attributes:
A sample dictionary is as follows:
[ alertType, INTERNAL] [ callReferenceId, F79E9675-83E6-422B-8443-A75EB120E79A] [ callType, REGULAR] [ callingName, Last Name, First Name] [ callingNumber, 12008101091] [ existingCall, false] [ isAutoAnswer, false] [ isConference, false] [ isVideoEnabled, false] [ lineAppearanceId, 1]
userInfo | Push notification message received from APNs. |
- (void) removeUser: | (CSUser *) | user | |
gracefulRemove: | (BOOL) | gracefulRemove | |
Starts an asynchronus removal of a user.
A user and associated sessions will be removed, all sockets closed, all services shut down and other internal resources released. When removal is complete, the <see -[CSClientDelegate client:didRemoveUser:]> event will be fired. At that point, it is safe to dispose of the user.
Removal may be graceful or ungraceful from the signaling perspective.
In a graceful removal, it will attempt to disconnect all established connections used by the user and to unregister the user with servers if applicable, before proceeding with shutdown and cleanup of internal resources allocated for the user. It will wait to ensure that all the required signaling is exchanged with the servers before the shutdown operation is reported as complete. This graceful shutdown operation may take some time as it may require waiting on timeouts if the server or remote end of sessions are unreachable or unresponsive.
In an ungraceful removal, only shutdown of local services and local resource cleanup for the user are performed.
user | The user to remove. |
gracefulRemove | true if an attempt should be made to disconnect user from servers, to wait for signaling completed, before cleanup of local resources (a graceful removal). false if local-only removal should be performed (an ungraceful removal). |
- (void) shutdown: | (BOOL) | gracefulShutdown |
Starts an asynchronus shutdown of the client.
All users and associated sessions will be removed, all sockets closed, all services shut down and other internal resources released. When shutdown is complete, the <see -[CSClientDelegate clientDidShutdown:]> event will be fired. At that point, it is safe to dispose of the client.
Shutdown may be graceful or ungraceful from the signaling perspective.
In a graceful shutdown, it will attempt to disconnect all established connections with servers and to unregister users with servers if applicable, before proceeding with shutdown and cleanup of internal resources. It will wait to ensure that all the required signaling is exchanged with the servers before the shutdown operation is reported as complete. This graceful shutdown operation may take some time as it may require waiting on timeouts if the server or remote end of sessions are unreachable or unresponsive.
In an ungraceful shutdown, only shutdown of local services and local resource cleanup are performed.
gracefulShutdown | true if an attempt should be made to disconnect users from servers, to wait for signaling completed, before cleanup of local resources (a graceful shutdown). false if local-only shutdown should be performed (an ungraceful shutdown). |
|
readnonatomicassign |
The certificate manager instance associated with this client.
|
readatomicassign |
Returns configured cipher suites excluding black listed cipher suites.
|
readwritenonatomicweak |
The delegate used to handle client-related events.
|
readnonatomicassign |
The queue on which delegate methods are called.
|
readnonatomicassign |
Service providing access to file download services for this user.
|
readwriteatomicassign |
A log handler block to call when the library logs a message.
This block may be called from multiple threads. By default the handler is nil
and logging is performed through NSLog.
|
readwriteatomicassign |
The current log level, which controls the verbosity of log output.
The default log level is CSLogLevelError
.
|
readnonatomicassign |
The media services instance associated with this client.
|
readatomicassign |
The current version of the library.