IUccSessionParticipant.Endpoints Property
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.
Returns the collection of participant endpoints.
Namespace: Microsoft.Office.Interop.UccApi
Assembly: Microsoft.Office.Interop.UccApi (in microsoft.office.interop.uccapi.dll)
Syntax
'Declaration
ReadOnly Property Endpoints As IUccCollection
IUccCollection Endpoints { get; }
property IUccCollection^ Endpoints {
IUccCollection^ get ();
}
/** @property */
IUccCollection get_Endpoints ()
function get Endpoints () : IUccCollection
Property Value
A value of the IUccCollection** (IUccCollection, for a .NET application) type. Each element of the resultant collection is an IUccSessionParticipantEndpoint instance.
Remarks
A session participant endpoint is a type which represents all relevant aspects of the connection of a device to a computer network. If the remote participant is registered on multiple endpoints including a PSTN or UC enabled phone, the endpoint collection will have an item for each registered endpoint.
Win32 COM/C++ Syntax
HRESULT get_Endpoints
(
IUccCollection** ppEndpoints
);
Note
In a Win32 application, the return value of a method or property is always an HRESULT value indicating the status of the call to the interface member. Any result of the operation is returned as a parameter marked with the [out, retval] attribute. In contrast, in a .NET application the HRESULT value indicating an error condition is returned as a COM exception and the [out, retval] parameter becomes the return value. For the UCC API-defined HRESULT values, see Trace and Handle Errors in Unified Communications Client API.
Example
The following example handles the event raised when a session participant state changes. For example, when an invited participant accepts an instant messaging session invitation. The example simply iterates on the session participant endpoint collection and builds a string representing the collection. Finally, the string is displayed on the local user's system console.
/// <summary>
/// session participant state change event. Both local and remote
/// session participants raise this event when state changes.
/// </summary>
/// <param name="pEventSource">participant source of event</param>
/// <param name="pEventData">state changed related data</param>
void _IUccSessionParticipantEvents.OnStateChanged(
IUccSessionParticipant pEventSource,
UccSessionParticipantStateChangedEvent pEventData)
{
if (pEventSource.IsLocal == false)
{
StringBuilder sb = new StringBuilder();
sb.Append(
"number of participant endpoints " +
pEventSource.Endpoints.Count.ToString());
foreach (IUccSessionParticipantEndpoint ep in pEventSource.Endpoints)
{
sb.Append(
"Uri " +
ep.Uri.AddressOfRecord);
sb.Append(
"Local " +
ep.IsLocal.ToString());
}
sb.Append(
"participant State Changed " +
pEventSource.Uri.User);
Console.WriteLine(sb.ToString());
}
}
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
IUccSessionParticipant Interface
IUccSessionParticipant Members
Microsoft.Office.Interop.UccApi Namespace