libkeepalive
|
Provides wrapper API for MCE CPU-keepalive D-Bus interface. More...
Go to the source code of this file.
Typedefs | |
typedef struct cpukeepalive_t | cpukeepalive_t |
Functions | |
cpukeepalive_t * | cpukeepalive_new (void) |
cpukeepalive_t * | cpukeepalive_ref (cpukeepalive_t *self) |
void | cpukeepalive_unref (cpukeepalive_t *self) |
void | cpukeepalive_start (cpukeepalive_t *self) |
void | cpukeepalive_stop (cpukeepalive_t *self) |
const char * | cpukeepalive_get_id (const cpukeepalive_t *self) |
Provides wrapper API for MCE CPU-keepalive D-Bus interface.
typedef struct cpukeepalive_t cpukeepalive_t |
Opaque CPU-keepalive structure
Allocate via cpukeepalive_new() and release via cpukeepalive_unref().
cpukeepalive_t * cpukeepalive_new | ( | void | ) |
Create CPU-keepalive object
Initially has reference count of 1.
Use cpukeepalive_ref() to increment reference count and cpukeepalive_unref() to decrement reference count.
Will be automatically released after reference count drops to zero.
cpukeepalive_t * cpukeepalive_ref | ( | cpukeepalive_t * | self | ) |
Increment reference count of CPU-keepalive object
Passing NULL object is explicitly allowed and does nothing.
self | CPU-keepalive object |
void cpukeepalive_unref | ( | cpukeepalive_t * | self | ) |
Decrement reference count of CPU-keepalive object
Passing NULL object is explicitly allowed and does nothing.
self | CPU-keepalive object |
The object will be released if reference count reaches zero.
void cpukeepalive_start | ( | cpukeepalive_t * | self | ) |
Disable normal device suspend policy
The CPU-keepalive object makes the necessary D-Bus IPC that keeps the device from suspending while/when the following conditions are met: 1) MCE is running
self | CPU-keepalive object |
void cpukeepalive_stop | ( | cpukeepalive_t * | self | ) |
const char * cpukeepalive_get_id | ( | const cpukeepalive_t * | self | ) |
Get keepalive id string
Normally the id string is used to identify CPU-keepalive object when making D-Bus IPC with MCE, but can be also used if application code needs to have some unique within the process key string to associate with the CPU-keepalive object.
self | CPU-keepalive object |