Gets a new PM event.
PM (Power Management) Library (libpm.a)
int pmlib_get_event_notice(event) int *event;
The pmlib_get_event_notice subroutine gets the latest event. It is recommended PM- aware application calls this subroutine when signal notification from pm daemon arrives.
|event||Points to an integer that is the latest PM event that the
PM daemon holds, event can be bit-wise OR of following
Upon successful completion, PMLIB_SUCCESS is returned. If the pmlib_get_event_notice subroutine fails, PMLIB_ERROR is returned and errno variable is set to an error code.
|ESRCH||PM daemon is not running.|
Note: If an application program is registered as PM aware, the PM daemon sends a SIGPM (equal to SIGPWR) signal to the application when an PM event occurs. The application program needs to prepare a signal handler and to use this pmlib_get_event_notice subroutine to get the to get the PM event.
The pmlib_get_event_notice subroutine is part of the Base Operation System (BOS) Runtime.
The pmlib_request_state (pmlib_request_state Subroutine) subroutine, pmlib_request_battery (pmlib_request_battery Subroutine) subroutine, pmlib_request_parameter (pmlib_request_parameter Subroutine) subroutine, pmlib_register_application (pmlib_register_application Subroutine) subroutine.