Share via


_IUccPublicationManagerEvents 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.

Defines events raised by an IUccPublicationManager instance.

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

Syntax

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

Remarks

An application must implement this interface and advise an IUccPublicationManager instance of the implementation to receive the notification that all category instances presently in circulation must be republished. This could happen when the server registration is refreshed after the server recovered from a crash that can result in dangling TCP connections. This is a dispinterface. Its members define the event handlers for the events raised by an IUccPublicationManager object. To catch the events, a UCC API client must implement these event handlers and advise the IUccPublicationManager 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.

Win32 COM/C++ Syntax

dispinterface _IUccPublicationManagerEvents

Example

The following example handles the OnPublicationRequired event by iterating on a class instantiation level cache (private List<IUccCategoryInstance> _publishedCategoryInstances;). Newly published category instances are added to this cache at the time of original publication. This example uses the cache to re-publish the instances.

Note

To compile this example, you must declare the publishedCategoryInstances object as a List<IUccCategoryInstances>

/// <summary>
/// Raised when client must re-publish all
/// previously published category instances
/// </summary>
/// <param name="pEventSource">IUccPublicationManager endpoint publication manager</param>
/// <param name="pEventData">object event data</param>
void _IUccPublicationManagerEvents.OnPublicationRequired(
    IUccPublicationManager pEventSource, 
    object pEventData)
{
    IUccPublication rePublication = pEventSource.CreatePublication();

    //iterate cache of previously published category instance
    foreach (IUccCategoryInstance instanceToPublish in this._publishedCategoryInstances)
    {
        rePublication.AddPublishableCategoryInstance(instanceToPublish);
    }
    UCC_Advise<_IUccPublicationEvent>(
        rePublication, 
        this);
    rePublication.Publish(null);
}

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

_IUccPublicationManagerEvents Members
Microsoft.Office.Interop.UccApi Namespace