ACAPI_​Notify_​CatchElementReservationChange

Sets notification handler for element reservation changes.

    GSErrCode  ACAPI_Notify_CatchElementReservationChange (
        APIReservationChangeHandlerProc*     handlerProc,
        const GS::HashSet<API_Guid>*         filterElementsInterestedOnly
    );

 

Parameters

handlerProc
[in] Notification handler function to be called on the specified event. Pass nullptr to unsubscribe from this notification.
filterElementsInterestedOnly
[in] List of element guids; optional parameter for controlling the range of elements of interest. If passed, the reservation change notifications will be sent for only these elements, otherwise every element reservation changes will be reported.

 

Return Values

NoError
The function completed successfully.

For other common errors see the list of error codes.

 

Remarks

This function is used to subscribe an add-on to be notified when element reservations have been changed in Teamwork. Once a APIReservationChangeHandlerProc function pointer is passed, the add-on remains loaded in the memory, and receives the notifications. When the add-on does not need these notifications any more, you can stop receiving them by calling this function with nullptr in the first argument.

In case the add-on is interested only in specified elements, you can set the focus on those elements by passing the list of the element guids in the filterElementsInterestedOnly parameter. Note that there can be only one handler function set for this notification at the same time, that is you cannot set multiple handlers for different lists of elements.

 

Example

See the Examples section of APIReservationChangeHandlerProc.
See also the Teamwork Control and Notification Manager example projects of the API Development Kit.

 

Requirements

Version: API 15 or later
Header: ACAPinc.h

 

See Also

APIReservationChangeHandlerProc
ACAPI_Notify_CatchLockableReservationChange
Teamwork Control
Notification Manager
API Functions