|
|
The DMI 2.0 specification defines the SP's responsibility to send indications and events to all management applications that have subscribed to the SP for this purpose. The DMI 2.0 specification also describes the mechanism for indication subscription and event filtering. This section specifies the interface and the required steps that a management application should take to receive indications.
A managing side that enables indication delivery is called an Indication Server. The client front-end software implements an indication server for each of the underlying RPCs. An application must first activate the server before it can receive indications. The DmiSetIndicationCallbacks(3dmi) and DmiIndicationListen(3dmi) functions inform the client front end of indication entry points and inform the indication server to listen for indications. The DmiIndicationListenExt(3dmi) function starts the indication server for selected RPC and transport protocols.
Next, the application must subscribe for indications and events. Usually, the application subscribes after the indication server has been started, using the DmiIndicationListen(3dmi) function, for the following reasons:
Subscribing for indications requires an application to register with the Service Provider's potential indication generator. After adding subscription/event filter rows, an indication consumer may unregister itself from the SP. The indication delivery mechanism and the DmiRegister session are independent.
The Local DMI RPC does not require an application to subscribe for indications. The local DMI RPC delivers all indications/events that are generated/forwarded by the local SP to all management applications that have started an indication server with the DmiIndicationListen(3dmi) function.
RPC delivers all indications/events that are generated/forwarded by the Service Provider (SP) to all management applications registered with this SP. The only currently supported RPC that requires subscription is ONC RPC. For more details, see ``RPC specific information''.
The indication server shutdown process includes removing the event filter subscription rows and calling the DmiStopIndicationListening(3dmi) or DmiStopIndicationListeningExt(3dmi) function to clean up RPC resources. Event filter rows should be deleted before removing corresponding subscription rows. Otherwise, the Service Provider will automatically delete all associated filter rows and the application will get an error when it tries to delete nonexistent filters.
See also:
The DmiIndicationFuncs structure identifies indication callback functions (entry points) provided by the Management Application. The indication function prototypes are discussed in the section ``Management Application Provider API'' of the DMI 2.0 Specification. If the application is not interested in a particular indication type, it can pass a NULL value for that function's address.
typedef struct DmiIndicationFuncs { DmiDeliverEvent* deliverEventFunc; DmiComponentAdded* componentAddedFunc; DmiComponentDeleted* componentDeletedFunc; DmiLanguageAdded* languageAddedFunc; DmiLanguageDeleted* languageDeletedFunc; DmiGroupAdded* groupAddedFunc; DmiGroupDeleted* groupDeletedFunc; DmiSubscriptionNotice* subscriptionNoticeFunc; } DmiIndicationFuncs_t;
See also: