UccServerEndpoint Class

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.

Illustrates the implementation of a server endpoint. The class cannot be co-created.

Namespace: Microsoft.Office.Interop.UccApi
Assembly: Microsoft.Office.Interop.UccApi (in microsoft.office.interop.uccapi.dll)

Syntax

'Declaration
Public MustInherit Class UccServerEndpoint
public abstract class UccServerEndpoint
public ref class UccServerEndpoint abstract
public abstract class UccServerEndpoint
public abstract class UccServerEndpoint

Remarks

This class implements these interfaces:

The default interface is IUccEndpoint. An application obtains the default interface on the class instance directly. Non-default interfaces, if any, can be obtained by calling QueryInterface on the default interface. An instance of this class is also a source of the events defined in these dispinterfaces:

This class cannot be co-created. It is intended to illustrate that the implemented interfaces can be queried from each other as well as the events raised in an instance of this class.

Win32 COM/C++ Syntax

coclass UccServerEndpoint
{
   [default] interface IUccEndpoint;
   interface IUccMediaEndpointSettings;
   interface IUccServerSignalingSettings;
   interface IUccSessionManager;
   interface IUccSubscriptionManager;
   interface IUccPublicationManager;
   interface IUccSignalingChannelManager;
   interface IUccConferenceManager;
   interface IUccDiagnosticReportingSettings;
   interface IUccUserSearchMananger;
   [default, source] dispinterface _IUccEndpointEvents;
   [source] dispinterface _IUccServerSignalingSettingsEvents;
   [source] dispinterface _IUccSessionManagerEvents;
   [source] dispinterface _IUccPublicationManagerEvents;
   [source] dispinterface _IUccMediaEndpointEvents;
};

Inheritance Hierarchy

System.Object
  Microsoft.Office.Interop.UccApi.UccServerEndpoint

Example

The following example obtains a reference to the default interface of the UccEndpoint class created by an instance of the UccPlatform class. A client should advise for endpoint event.

// Create the sip endpoint and advise for endpoint events
IUccEndpoint endpoint = this.platform.CreateEndpoint(
   UCC_ENDPOINT_TYPE.UCCET_PRINCIPAL_SERVER_BASED,
   meUri,
   null,
   null);
UCC_Advise<_IUccEndpointEvents>(
   endpoint,
   this);

The new endpoint must be registered with a Unified Communications server before the client can subscribe to remote user presence or publish presence. Registering involves obtaining the IUccServerSignalingSettings from the endpoint. With this interface, a client can create and populate a credential cache. The credential cache is necessary to pass the local user's credentials to the Unified Communications server.

IUccServerSignalingSettings serverSignalingSettings = this.endpoint as IUccServerSignalingSettings;
if (serverSignalingSettings != null)
{
   serverSignalingSettings.Server = serverSignalingSettings.CreateSignalingServer(
      server,
      UCC_TRANSPORT_MODE.UCCTM_TLS);
}

UccCredential credential = null;
if (useDefaultCredentials == true)
{
   // Use Windows default credential of the logged in user
   credential = serverSignalingSettings.CredentialCache.DefaultCredential;
}
else
{
   // Create a new credential
   credential = serverSignalingSettings.CredentialCache.CreateCredential(username, passwd, domain);
}

// Specify the credential and authentication types
serverSignalingSettings.CredentialCache.SetCredential("*", credential);
serverSignalingSettings.AllowedAuthenticationModes = (int)UCC_AUTHENTICATION_MODES.UCCAM_KERBEROS | (int)UCC_AUTHENTICATION_MODES.UCCAM_NTLM;

//Enable the endpoint to login
this.endpoint.Enable(null);

After an endpoint is created and enabled, a client should handle the OnEnable event raised by the new endpoint. The following example obtains three additional interfaces from the enabled endpoint. These interfaces can raise events specific to those interfaces. If a client is to handle these events, it must advise for each class of events. The class designated as the event sink must implement the dispinterfaces referenced in the type parameter of the UCC_Advise method called.

void _IUccEndpointEvents.OnEnable(
   IUccEndpoint pEventSource,
   IUccOperationProgressEvent pEventData)
{
   if (pEventData.IsComplete && pEventData.StatusCode >= 0)
   {
      // Get SubscriptionManager and PubicationManager
      // from the endpoint
      IUccSubscriptionManager subMgr = pEventSource as IUccSubscriptionManager;
      IUccPublicationManager pubMgr = pEventSource as IUccPublicationManager;
      UCC_Advise<_IUccPublicationManagerEvents>(
         pubMgr,
         this);

      IUccMediaEndpointSettings mediaEndpointSettings = pEventSource as IUccMediaEndpointSettings;
      UCC_Advise<_IUccMediaEndpointEvents>(
         mediaEndpointSettings,
         this);
   }
}

Thread Safety

All public static (Shared in Visual Basic) members of this type are thread-safe. Instance members are not guaranteed to be thread-safe.

Platforms

Development Platforms

Windows XP Professional with Service Pack 2 (SP2), Windows Server 2000 with Service Pack 4, Windows Server 2003, Windows Vista Ultimate Edition, Windows Vista Business Edition, Windows Vista Enterprise Edition

Target Platforms

See Also

Reference

UccServerEndpoint Members
Microsoft.Office.Interop.UccApi Namespace

Other Resources

Code Listing: Basic Event Registration and Other Helper Methods in C#