The class is the basis for all Microsoft Lync 2010 API functionality. This class exposes a static method, , that you call to get an instance of the class before initiating any further Lync 2010 API logic. All subsequent application logic uses this class instance for Lync 2010 API features.
The instance uses the endpoint established by a running instance of Microsoft Lync 2010. When you sign in, sign out, start or accept a conversation, add contacts or custom groups, you are actually performing these actions using the Lync 2010 endpoint. As your custom application performs these actions, you see these actions mirrored in Lync 2010.
For the call to the method to succeed, Lync 2010 must be running on the local computer.
Signing in and out of Lync Server
The class lets you verify that your local user is signed in to Lync Server 2010. If not signed in then you call the method to sign the local user in. If the local user is already signed in to Lync Server 2010, calling this method raises an exception. You should read the property to discover the sign-in state before attempting to sign in.
You can also sign the user out of Lync Server 2010 using the instance. A call to the method raises an exception if the user not signed in to Lync Server 2010.
The sign-in/sign-out process is asynchronous and requires that you handle events raised by the instance when you have called either of the previous methods. For information about asynchronous programming in Lync 2010 API, see Asynchronous Programming .
Classes Exposed by the LyncClient Class
The following figure illustrates the classes you obtain from the class. Note that these client classes expose member methods and classes for more specific functionality.
To start a new conversation with another user or join a conference, you get an instance of the class from your instance. The conversation manager exposes a collection of current conversations as well as a collection of properties describing previous conversations. You obtain the voice mails manager class from the conversation manager so that you can access the Outlook voicemail system for retrieving voice mail.
Contacts and Groups Manager
The contacts and groups manager class ( ) gives you access to the local user's contact list. Through this class, you can:
Enumerate the contact list and the group list.
Add and remove contacts and distribution groups from the contact list.
Add and remove contacts from custom groups.
Add, remove, and rename custom groups.
Enumerate the contacts in a distribution group.
The class allows you to:
Publish a set of the local user's telephone numbers for other users to use.
Set inbound call routing rules to control which phone to ring for an inbound call.
Set many user options for customization.
The class allows your user to assign a team member such as an administrative assistant to the responsibility of answering incoming telephone calls on your user's behalf.
The class provides features such as email sending, meeting scheduling, a device-tuning wizard, adding contacts to Outlook, and accessing previous conversations stored in Microsoft Outlook.
The class lets you discover the device for audio and video transmissions and play an audio file on a specified playback device.