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


API Reference


Brew Release
Brew MP 1.0.2
See Also

The IApplet Interface is the interface that handles events in the Application Execution Environment (AEE). The interface is derived from IBase and implements a simple event handling routine. This routine is called by the AEE Shell in response to events generated by the system, other components, or applets. All applets in the BREW AEE must implement this interface. In other words, a BREW applet is a class that implements the IApplet Interface. IApplet_HandleEvent() is used by the BREW AEE Shell for sending events to the applet.

NOTE: IApplet_HandleEvent() can be called only by the AEE Shell. Events sent by other applets or components can be sent by ISHELL_SendEvent().
The following header file is required:
The application developer should inherit their applet from IApplet Interface and should override IApplet_HandleEvent API.
In application's createinstance AEEApplet_New will be called as shown below in order to overwrite the IAPPlet_HandleEvent with application's HandleEvent.
Applet Name: SampleApp. Private Struct of Applet: SampleStruct. Applet ClsId =
   AEEApplet_New(sizeof(SampleStruct), ClsId, 
                pIShell, //pointer to shell
                po, //pointer to IModule
               (IApplet**)ppObj, //IApplet Object [out]
               (AEEHANDLER)SampleApp_HandleEvent, // Applets HandleEvent
                NULL )