Beyond the basics: Desktop, application, and display sharing

Lync 2013

Beyond the basics topic

Learn about advanced features of Microsoft Lync 2013 SDK that let you complete the resource sharing experience of Lync 2013 users in your application.

Last modified: February 22, 2013

Applies to: Lync 2013 | Lync Server 2013

While the process of starting to share a local shareable resource is simple, managing the control of a shared resource involves handling events and calling methods on both the conversation application sharing modality and application sharing modalities of individual conversation participants.

The following table shows the control actions that a resource sharer can take. A resource viewer cannot take these actions.

Method

Purpose

Valid for which modality?

ApplicationSharingModality.BeginAcceptControlRequest

Accepts another user’s request to control a locally shared resource.

Requesting participant modality

ApplicationSharingModality.BeginDeclineControlRequest

Declines another user’s request to control a locally shared resource.

Requesting participant modality

ApplicationSharingModality.BeginGrantControl

Grants control of a locally shared resource to another user.

Important note Important

Granting control to another user does not create an offer that the user can decline. When you have granted control, the other user is automatically in control and must release the control back to you. You can also revoke control.

Modality of participant to be granted control

ApplicationSharingModality.BeginRevokeControl

Revokes control of a resource that was granted or requested by another user.

Resource controlling participant modality

The following table shows the control actions that a resource viewer can take. A resource sharer cannot take these actions.

Method

Purpose

Valid for which modality?

ApplicationSharingModality.BeginRequestControl

Requests control of a resource that is owned by another user.

Local participant modality

ApplicationSharingModality.BeginReleaseControl

Releases control of a resource that a user has either been granted control of or requested control of. This method cannot be called on an application sharing modality by the owner of a shared resource.

Local participant modality

The events that are raised on the application sharing modalities in the conversation must be handled to make your application responsive to changes in the state of sharing objects in a conversation. The following table describes the purpose of each of these modality events and which objects (local participant, other participants, or the conversation) to register event callback methods on.

Event

Purpose

Which object to register on

Modality.ModalityStateChanged

Raised when an application sharing modality has connected or disconnected in the conversation. You cannot share resources when the modality is disconnected.

Application sharing modality of all participants, the conversation modality.

Modality.ActionAvailabilityChanged

Raised when an action such as granting control of a locally shared resource becomes available or is no longer available. This event is typically used to enable or disable resource control action-related buttons in a UI.

Application sharing modality of all participants, the conversation modality.

ApplicationSharingModality.ControlRequestReceived

Raised when another user wants to control a resource shared locally by the local user.

Conversation modality

ApplicationSharingModality.ControllerChanged

Raised when the control of the shared resource changes from one user to another.

Conversation modality

ApplicationSharingModality.ParticipationStateChanged

Raised when the local participant requests or releases control of a resource, or grants or revokes control of a locally shared resource.

Conversation modality

ApplicationSharingModality.LocalSharedResourcesChanged

Raised when the local user begins to share a resource or switches from one shared resource to another shared resource.

Conversation modality

Show: