Share via


IUccCategoryContext.Presentity 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.

Gets the publisher of this named category instances.

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

Syntax

'Declaration
ReadOnly Property Presentity As UccPresentity
UccPresentity Presentity { get; }
property UccPresentity^ Presentity {
    UccPresentity^ get ();
}
/** @property */
UccPresentity get_Presentity ()
function get Presentity () : UccPresentity

Property Value

A value of the IUccPresentity** (IUccPresentity, for a .NET application) type.

Remarks

In the case of self-published categories such as "contacts", the presentity property represents the local user. Otherwise, the presentity represents the remote user whose category data is subscribed to by the local user. All category instances in the collection of category instances exposed by the IUccCategoryContext interface were published by this single presentity.

Win32 COM/C++ Syntax

HRESULT get_Presentity
(
   IUccPresentity** ppPresentity
);

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 compares the presentity Uri AddressOfRecord to the local user's endpoint Uri AddressOfRecord. If the two string values are equal, the example displays a message on the local user's computer system console.

void _IUccCategoryContextEvents.OnCategoryInstanceRemoved(
    IUccCategoryContext pCategory, 
    UccCategoryInstanceEvent pEventData)
{

   if (pCategory.Presentity.Uri.AddressOfRecord == endpoint.Uri.AddressOfRecord)
   {
      Console.Writeline("self-published category");
   }
}

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

IUccCategoryContext Interface
IUccCategoryContext Members
Microsoft.Office.Interop.UccApi Namespace