blob: 8f1f0bc0a388496327b459fd5e8d113ee6baf816 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
#ifndef POWER_H
#define POWER_H
#include <glib.h>
typedef struct _Power Power;
typedef struct _CMPIBroker CMPIBroker;
typedef struct _PowerStateChangeJob PowerStateChangeJob;
/**
* Get reference to global power object
* \note Don't forget to call power_unref
*/
Power *power_ref(const CMPIBroker *_cb);
/**
* Decrement reference counter for power struct
*/
void power_unref(Power *power);
/**
* Get list of available requested power states
*
* \param power Pointer to power struct, obtained by power_ref
* \param count Number of states returned
* \return list of power states
*/
unsigned short *power_available_requested_power_states(Power *power, int *count);
/**
* Get requested power state
*
* \param power Pointer to power struct, obtained by power_ref
* \return current requested power state
*/
unsigned short power_requested_power_state(Power *power);
/**
* Request change power state to \p state
*
* \param power Pointer to power struct, obtained by power_ref
* \param state Requested power state
* \return CMPI return code
*/
int power_request_power_state(Power *power, unsigned short state);
GList *power_get_jobs(Power *power);
unsigned short power_transitioning_to_power_state(Power *power);
unsigned short job_state(PowerStateChangeJob *state);
int job_timeOfLastChange(PowerStateChangeJob *state);
int job_timeBeforeRemoval(PowerStateChangeJob *state);
#endif // POWER_H
|