API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

INOTIFIER

Brew Release
Brew MP 1.0.2
See Also
Description

The AEE supports the concept of notifications. Notification is a mechanism where different classes can register for events when certain incidents occur in other classes. For example, an applet can regsiter to be notified when say, there is an incoming SMS message. This means, whenever there is an incoming SMS message, the applet that has registered to be notified will receive an event. This event is EVT_NOTIFY.
Notifiers are the classes that generate notifications. For ex: the TAPI class acts as a notifier and it sends out notifications when there is an incoming SMS message. Notifiers are classes that want to send out notifications when certain incidents occur. Whenever a notifier needs to send out notifications, it uses the ISHELL_Notify() method.
Applets can register for notifications i.e. they can register to be notified whenever certain incidents occur in the notifiers. To do this, the function ISHELL_RegisterNotify() must be used. For example, an applet can use this mechanism to register for notification from the AEECLSID_TAPI interface for events specific to that class.
INotifier is the interface that specifies the functions that must be implemented by any class that needs to be a notifier. Any class that wants to send out notifications so that other applets can receive it must implement the functions in the INotifier interface.
Usage
Here is a broad description of the steps that must be followed by a class if it needs to be a notifier:

1. The class must implement the INotifier interface.
2. Define the set of notifications (or masks) that the class can issue. For ex: some of the notifications that the the TAPI class can issue are: NMASK_TAPI_SMS, NMASK_TAPI_TS_PAGE and NMASK_TAPI_TS_VMAIL. These masks must be made available to other applets so the applets that are interested in these notifications can register for them.
3. Whenever the notifier class wants to issue a notification, it must invoke the ISHELL_Notify() function. The shell will then take care of informing all the applets that have registered for this notification.