_IUccSubscriptionEvents Interface

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.

Encapsulates the events raised by an IUccSubscription instance.

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

Syntax

'Declaration
Public Interface _IUccSubscriptionEvents
    Inherits IDispatch, IUnknown
public interface _IUccSubscriptionEvents : IDispatch, IUnknown
public interface class _IUccSubscriptionEvents : IDispatch, IUnknown
public interface _IUccSubscriptionEvents extends IDispatch, IUnknown
public interface _IUccSubscriptionEvents extends IDispatch, IUnknown

Remarks

These events represent the responses to the asynchronous requests defined in the IUccSubscription interface. An application must implement this interface and advise an IUccSubscription object of the implementation if it is interested in receiving the status of completion of the subscription operations. This is a dispinterface. Its members define the event handlers for the events raised by an IUccSubscription object. To catch the events, a UCC API client must implement these event handlers and advise the event source of the implementation if it is interested in receiving the events. To prevent memory leaks, the client should unadvise the events when it is no longer interested in the events. Trace and Handle Errors in Unified Communications Client API

Win32 COM/C++ Syntax

dispinterface _IUccSubscriptionEvents

Example

The following example creates a subscription using the supplied parameters and advises for events on the new subscription.

/// <summary>
/// creates a new subscription object with associated
/// metadata context
/// </summary>
/// <param name="pSubScriptionManager">endpoint as subscription manager</param>
/// <param name="pSubContextPropertyName">context property name</param>
/// <param name="pSubContext">context value</param>
/// <param name="pEventSink">Class instance implementing event handler for subscription events</param>
/// <returns>new IUccSubscription with context</returns>
private UccSubscription pr_MakeSubscription(
    IUccSubscriptionManager pSubScriptionManager,
    string pSubContextPropertyName,
    string pSubContext,
    _IUccSubscriptionEvents pEventSink)
{
    UccSubscription returnValue = null;
        UccContext subContext = new UccContextClass();
        if (pSubContextPropertyName.Length > 0 && pSubContext.Length > 0)
        {
            subContext.AddNamedProperty(
                pSubContextPropertyName,
                pSubContext);
        }
        returnValue = pSubScriptionManager.CreateSubscription(subContext);

        //advise for subscrion events
        UCC_Advise<_IUccSubscriptionEvents>(
            returnValue, 
            pEventSink);

    return returnValue;
}

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

_IUccSubscriptionEvents Members
Microsoft.Office.Interop.UccApi Namespace