Avaya Client Services API Reference (OS X)
Instance Methods | Properties | List of all members
CSClient Class Reference

#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...
 

Properties

id< CSClientDelegatedelegate
 The delegate used to handle client-related events. More...
 
dispatch_queue_t delegateQueue
 The queue on which delegate methods are called. More...
 
CSMediaServicesInstancemediaServices
 The media services instance associated with this client. More...
 
CSCertificateManagercertificateManager
 The certificate manager instance associated with this client. More...
 
CSDownloadServicedownloadService
 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...
 

Method Documentation

- (void) createUserWithConfiguration: (CSUserConfiguration *)  userConfiguration
completionHandler: (void(^)(CSUser *user, NSError *error))  handler 

Creates and configures a new CSUser instance.

Parameters
userConfigurationThe configuration information for the new user.
handlerA 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.

Parameters
intervalThe maximum time interval that the application may be suspended for. This should be the same value passed to -[UIApplication setKeepAliveTimeout:handler:].
Returns
YES if the client was able to successfully prepare for the specified background interval, NO if not.
- (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.

Parameters
userThe user to remove.
gracefulRemovetrue 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).
See also
-[CSClientDelegate client:didRemoveUser:]
- (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.

Parameters
gracefulShutdowntrue 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).
See also
-[CSClientDelegate clientDidShutdown:]

Property Documentation

- (CSCertificateManager*) certificateManager
readnonatomicassign

The certificate manager instance associated with this client.

- (NSArray<NSNumber *>*) configuredCipherSuites
readatomicassign

Returns configured cipher suites excluding black listed cipher suites.

See also
-[CSSecurityPolicyConfiguration] blackListedCipherSuites
- (id<CSClientDelegate>) delegate
readwritenonatomicweak

The delegate used to handle client-related events.

- (dispatch_queue_t) delegateQueue
readnonatomicassign

The queue on which delegate methods are called.

- (CSDownloadService*) downloadService
readnonatomicassign

Service providing access to file download services for this user.

- (CSLogHandler) logHandler
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.

- (CSLogLevel) logLevel
readwriteatomicassign

The current log level, which controls the verbosity of log output.

The default log level is CSLogLevelError.

- (CSMediaServicesInstance*) mediaServices
readnonatomicassign

The media services instance associated with this client.

- (NSString*) versionString
readatomicassign

The current version of the library.


The documentation for this class was generated from the following file: