The aee layer supports the concept of notification. Notification is a mechanism in which different applications can be registered for the event to handle certain errors in other applications. For example, you can register an application to receive notifications when there is an incoming SMS message. This means that as long as there is an incoming SMS message, the application that has registered to receive the notification will receive an event, which is evt_policy. A notification program is an application that generates a notification. For example, an itapi can act as a notification program. A notification will be sent when an incoming SMS message is sent. Whenever the notification program needs to send a notification, it must use the ishell_policy () method. The application can receive notifications through registration. To do so, the ishell_registernotify () function is generally used (). For example, an application can use ishell_registernotify () to register and receive notifications of such specific events from the aeeclsid_tapi.
Inotifier is a function interface that must be implemented by the application that needs to become a notification program. Any application that wants to send a notification so that other applications can receive it must implement functions in the inotifier interface, implement the inotifier interface, and define the notification (or mask) group that can be sent by this class, 0 xffffffff indicates that all notifications are received, and 0x00000000 indicates that all notifications are not received. For example, nmask_tapi_sms, nmask_tapi_ts_page, nmask_tapi_ts_vmail, and Other types can be sent by TAPI. These masks must be available to other applications so that the applications that follow these notifications can register them. The notification program must call the ishell_policy () function whenever a notification is sent. At this time, the aee layer is responsible for notifying all applications that have registered to receive the notification.
After brew 3.1.4, the ialarmmgr interface is introduced. One application can use alarm settings to notify another application to perform related operations. Compared with ishell_setalarm, ialarmmgr can set the alarm trigger interval in seconds, and can be set based on the specified time or absolute time. An important feature of ialarmmgr is that you can retain a unique alarm code before setting an alarm to trigger. The alarm code is a 16-bit integer. You can use ialarmmgr_setusercode () and ialarmmgr_getusercode () to set and obtain the alarm code. You can use ialarmmgr_setalarm () to specify a valid classid so that another application can receive an alarm. The application that receives the alarm listens to the evt_alarm event. wparam is the alarm code, then you can perform related operations.