Sorry for posting many mal-encoded message here.

here are someting from  palm docs:
 
 
In a few instances, you might need to prevent the system from going
to sleep. For example, your code might be in the middle of
performing some lengthy computation or in the middle of
attempting a network connection. If so, register for the
sysNotifySleepRequestEvent instead. This notification
informs all clients that the system might go to sleep. If necessary,
your handler can delay the sleep request by doing the following:
((SleepEventParamType *)
(notify->notifyDetailsP))->deferSleep++;
The system checks the deferSleep value when each notification
handler returns. If it is nonzero, it cancels the sleep event.
After you defer sleep, your code is free to finish what it was doing.
When it is finished, you must allow the system to continue with the
sleep event. To do so, create a keyDownEvent with the
resumeSleepChr and the command key bit set (to signal that the
character is virtual) and add it to the event queue. When the system
receives this event, it will again broadcast the
sysNotifySleepRequestEvent to all clients. If deferSleep is
0 after all clients return, then the system knows it is safe to go to

sleep, and it broadcasts the sysNotifySleepNotifyEvent to all
of its clients.

-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to