The IP Mail demo uses the SRL mechanism to retrieve events. When an event occurs, SRL calls event handlers automatically. All events are received by the SRL and then passed to the callback_hdlr( ) function for handling.
In the initialization phase of the demo, the mailInitialization( ) function sets up the call-back handler, by calling PDLsr_enbhdlr( ).
6.7.1. Handling Keyboard Input EventsThere is an endless loop {while(1)} in the main( ) function in the appmain.c file. In that loop, the application waits forever for a keyboard event by calling the waitForKey( ) function. The event must be handled immediately and event-specific information should be retrieved before the next call to waitForKey( ).
When the next event occurs or when a time-out is reached, the waitForKey( ) returns and the call-back handler function is called automatically.
6.7.2. Handling SRL EventsWhen the R4/Global Call event is received, the application performs the following:
6.7.3. Handling Application Exit EventsNormal application exit events don't enter the SRL. The main( ) function calls PDLSetApplicationExitPath( ) before initialization. In Linux, this function sets the signals (SIGINT, SIGTERM, SIGABRT) for making the appropriate exit from application. In Windows, this function enables the detection of CTRL_CLOSE_EVENT (closing the window).
Click here to contact Telecom Support Resources
Copyright 2002, Intel Corporation