Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

_IUccSubscriptionEvents Interface

Encapsulates the events raised by an IUccSubscription instance.

Namespace: Microsoft.Office.Interop.UccApi
Assembly: Microsoft.Office.Interop.UccApi (in microsoft.office.interop.uccapi.dll)
public interface _IUccSubscriptionEvents : IDispatch, IUnknown
public interface _IUccSubscriptionEvents extends IDispatch, IUnknown
public interface _IUccSubscriptionEvents extends IDispatch, IUnknown

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

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;
}

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

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.