LocalOwnerPresence

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

The LocalOwnerPresence class provides a number of methods and properties to enable a presentity to publish its presence information to Office Communications Server.

LocalOwnerPresence State Transitions

The LocalOwnerPresence state transitions are shown in the following illustration. The state values are the members of the CollaborationSubscriptionState enumerated type.

Dd279776.158e35c8-50ce-4933-9a3a-756780577661(en-us,office.13).jpg

  1. The transition from Idle to Subscribing occurs when the application calls BeginSubscribe().

  2. The transition from Subscribing to Subscribed occurs when the subscription to the local presentity succeeds.

  3. The transition from Subscribing to Terminating occurs when the subscription to the local presentity fails. This is a non-recoverable error.

  4. The transition from Subscribing to WaitingForRetry occurs when the subscription could not be successfully created, but the server requests UCMA 2.0 Core SDK to try subscribing to the cross-pool server, or to try subscribing at a later time because it is busy now.

  5. The transition from WaitingForRetry to Subscribing occurs when another subscription to the local presentity is attempted for the reason given instep 4.

  6. The transition from WaitingForRetry to Terminating occurs when the subscription attempt to the local presentity fails.

  7. The transition from Subscribed to WaitingForRetry occurs for one of the following reasons: when the server requests UCMA 2.0 Core SDK to close this subscription and create a new subscription. This action can happen at any time.

    • The server requests UCMA 2.0 Core SDK to close this subscription and to create a new subscription by sending a NOTIFY request with an Expires:0 parameter. The server can make this request at any time.

    • Route-set recovery begins.

    • The server sends a “481 Call leg unavailable” response.

  8. The transition from Subscribed to Terminating occurs when BeginUnsubscribe() is called.

  9. The transition from Terminating to Idle occurs when the call to BeginUnsubscribe ends successfully. The subscription can be reused; that is, an application can call BeginSubscribe when the state is Idle.

LocalOwnerPresence Constructors

The LocalOwnerPresence class has no public constructors.

LocalOwnerPresence Properties

The following are the public properties on the LocalOwnerPresence class.

// Gets the state of the subscription.
public CollaborationSubscriptionState CurrentState {get;}

LocalOwnerPresence Methods

The following are the public methods on the LocalOwnerPresence class.

// Starts a service request to acknowledge the given list of subscribers.
public IAsyncResult BeginAcknowledgeSubscriber(string subscriberId, AsyncCallback userCallback, object state);

// Creates a service request to publish the given list of categories to the server.
public IAsyncResult BeginPublishPresence(ICollection<PresenceCategoryMetadata> categories, AsyncCallback userCallback, object state);

// Creates a service request to publish the given list of categories to the server.
public IAsyncResult BeginPublishPresence(ICollection<PresenceCategory> categoryItems, AsyncCallback userCallback, object state);

// Creates a service request to delete all nonempty publications for the given category names.
public IAsyncResult BeginDeletePresence(ICollection<PresenceCategory> categoryItems, AsyncCallback userCallback, object state);

// Starts a service request to update container memberships.
public IAsyncResult BeginUpdateContainerMembership(ICollection<ContainerUpdateOperation> operations, AsyncCallback userCallback, object state);

// Completes the asynchronous operation initiated by BeginAcknowledgeSubscriber.
public void EndAcknowledgeSubscriber(IAsyncResult result);

// Completes the asynchronous operation initiated by BeginPublishPresence.
public void EndPublishPresence(IAsyncResult result);

// Completes the asynchronous operation initiated by BeginDeleteCategories.
public void EndDeletePresence(IAsyncResult result);

// Completes the asynchronous operation initiated by BeginUpdateContainerMembership.
public void EndUpdateContainerMembership(IAsyncResult result);

LocalOwnerPresence Events

The following are the public events on the LocalOwnerPresence class.

// Raised when there are changes in the pending watcher (subscriber) list.
public event EventHandler<SubscriberNotificationEventArgs> SubscriberNotificationReceived;

// Raised when there are changes in container membership.
public event EventHandler<ContainerNotificationEventArgs> ContainerNotificationReceived;

// Raised when there are changes in the list presence category items
public event EventHandler<CategoryNotificationEventArgs> CategoryNotificationReceived;

// Raised when there are changes in the list of delegatees.
public event EventHandler<DelegatesNotificationEventArgs> DelegateNotificationReceived;

// Raised when there are changes in the underlying subscription state.
public event EventHandler<SubscriptionStateChangedEventArgs> SubscriptionStateChange;