Avaya Client Services API Reference (iOS)

- Main Page
- Classes
- Files
- Related Pages

- Class List
- Class Index
- Class Hierarchy
- Class Members

Instance Methods | Properties | List of all members
CSPresenceService Class Reference

The class encapsulates all of presence related features available to the user. More...

`#import <CSPresenceService.h>`

Inherits NSObject.

## Instance Methods
(void) | - publishPresence:
| Publishes presence state, location mode and optional note for the local user. More...
(CSPresenceListSubscription *) | - createPresenceListSubscription
| Creates a new empty ad-hoc presence subscription object. More...
(void) | - removePresenceListSubscription:
| Removes the specified presence list subscription. More...

## Properties
id< CSPresenceServiceDelegate > | delegate
| The delegate responsible for handling presence service related events. More...
BOOL | serviceAvailable
| Exposes the service availability status. More...
BOOL | serviceConfigured
| Exposes the service configuration status. More...
NSTimeInterval | autoAwayTimeout
| Sets the timeout for the user inactivity timer at runtime. More...
BOOL | sendAllCallsOnDoNotDisturb
| Sets a link between "Do Not Disturb" presence state and "Send All Calls" call service feature at runtime. More...
CSPresence * | selfPresence
| Property to get current self-presence based on the last received presence data from the presence server. More...
NSUInteger | presenceNoteMaxTextLength
| Get the maximum text length value (in characters) accepted for presence note. More...
CSCapability * | presenceAccessControlListCapability
| Returns CSCapability object describing whether the Presence service supports Presence Access Control List(ACL). More...
CSCapability * | automaticModeCapability
| Returns CSCapability object describing whether the Presence service supports automatic mode for self-presence. More...
NSArray * | automaticPresenceStates
| Returns array of all the supported automatic self-presence states. More...
NSArray * | manualPresenceStates
| Returns array of all the supported manual self-presence states. More...
CSPresenceAccessControlList * | presenceAccessControlList
| Property representing CSPresenceAccessControlList . More...

## Detailed Description

The class encapsulates all of presence related features available to the user.

The presence service encapsulates such features as publishing presence, subscribing for self-presence update events, and creating presence list subscriptions to watch presence of other users.

The service is configured with CSPresenceConfiguration object created by the client application as part of the CSUserConfiguration. In order to get the service object and leverage the available presence features CSUser::presenceService is used.

## Method Documentation

- (CSPresenceListSubscription *) createPresenceListSubscription |  |  |

Creates a new empty ad-hoc presence subscription object.

An ad-hoc presence subscription object is used to manipulate the list of users the client application wants to know presence of. A PresenceListSubscription object allows the application to subscribe for presence events of multiple users specified by their presence addresses. Note that the preferred way of getting presence of other users is CSContact::startPresenceWithAccessControlBehavior:completionHandler:.

Returns
  An empty CSPresenceListSubscription object.

- (void) publishPresence: |  | (CSPresence *) | presence |

Publishes presence state, location mode and optional note for the local user.

The result of the operation is delivered via CSPresenceServiceDelegate:

- If presence information is published successfully CSPresenceServiceDelegate::presenceService:didPublishPresence: gets invoked.
- Otherwise, CSPresenceServiceDelegate::presenceService:didFailToPublishPresence:error: is reported representing the specific failure.

Parameters

  presence | Presence information to publish.

- (void) removePresenceListSubscription: |  | (CSPresenceListSubscription *) | subscription |

Removes the specified presence list subscription.

This method is used to stop getting presence updates for all of the users specified by the addresses added to the object.

Parameters

  subscription | Subscription to be removed.

## Property Documentation

- (NSTimeInterval) autoAwayTimeout
| readwritenonatomicassign

Sets the timeout for the user inactivity timer at runtime.

Inactivity timer is used to automatically change the user's presence state to 'away' if the user is inactive, i.e. not using the device with the installed application. When the timer fires, the user's presence is set to the 'away' state. If zero value is specified, the inactivity timer is disabled.

- (CSCapability*) automaticModeCapability
| readnonatomicassign

Returns CSCapability object describing whether the Presence service supports automatic mode for self-presence.

Returns
  CSCapability object describing whether the Presence service supports automatic mode for Self Presence.

- (NSArray*) automaticPresenceStates
| readnonatomicassign

Returns array of all the supported automatic self-presence states.

Returns
  NSArray object with all the supported automatic self-presence states(CSPresenceState).

- (id<CSPresenceServiceDelegate>) delegate
| readwritenonatomicweak

The delegate responsible for handling presence service related events.

- (NSArray*) manualPresenceStates
| readnonatomicassign

Returns array of all the supported manual self-presence states.

The client application should check for the supported manual self-presence states before initializing the presence states for UI/UX update.

Returns
  NSArray object with all the supported manual self-presence states(CSPresenceState).

- (CSPresenceAccessControlList*) presenceAccessControlList
| readnonatomicassign

Property representing CSPresenceAccessControlList .

- (CSCapability*) presenceAccessControlListCapability
| readnonatomicassign

Returns CSCapability object describing whether the Presence service supports Presence Access Control List(ACL).

Returns
  CSCapability object describing whether the Presence service supports Presence Access Control List(ACL).

- (NSUInteger) presenceNoteMaxTextLength
| readnonatomicassign

Get the maximum text length value (in characters) accepted for presence note.

Returns
  the maximum text length value accepted for presence note.

- (CSPresence*) selfPresence
| readnonatomicassign

Property to get current self-presence based on the last received presence data from the presence server.

Self-presence describes overall presence status of the local user calculated by the presence server based on presence data information collected from various presence sources. The sources are communication devices and applications running on behalf of the user.

- (BOOL) sendAllCallsOnDoNotDisturb
| readwritenonatomicassign

Sets a link between "Do Not Disturb" presence state and "Send All Calls" call service feature at runtime.

If the link is enabled and "Send All Calls" feature is available, the following behavior applies.

- Once the presence state of the user changes to "Do not Disturb", "Send All Calls" is automatically switched on.
- If the presence state of the user changes from "Do not Disturb" to any other state, "Send All Calls" is automatically switched off.

- (BOOL) serviceAvailable
| readnonatomicassign

Exposes the service availability status.

The service may become unavailable due to a number of reasons such as network issues, presence server issues, and configuration issues.

- (BOOL) serviceConfigured
| readnonatomicassign

Exposes the service configuration status.

Reflects the fact that the service is not provided with a valid CSPresenceConfiguration object or couldn't automatically discover its configuration.

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

- CSPresenceService.h