1 /* devkit-power-gobject.vapi generated by vapigen, do not modify. */
3 [CCode (cprefix = "Dkp", lower_case_cprefix = "dkp_")]
5 [CCode (cheader_filename = "devkit-power-gobject.h")]
6 public class Client : GLib.Object {
7 [CCode (has_construct_function = false)]
9 public unowned GLib.PtrArray enumerate_devices () throws GLib.Error;
10 [CCode (cname = "dkp_client_can_hibernate")]
11 public bool get_can_hibernate ();
12 [CCode (cname = "dkp_client_can_suspend")]
13 public bool get_can_suspend ();
14 public unowned string get_daemon_version ();
15 [CCode (cname = "dkp_client_lid_is_closed")]
16 public bool get_lid_is_closed ();
17 [CCode (cname = "dkp_client_on_battery")]
18 public bool get_on_battery ();
19 [CCode (cname = "dkp_client_on_low_battery")]
20 public bool get_on_low_battery ();
21 public bool hibernate () throws GLib.Error;
22 public bool suspend () throws GLib.Error;
24 public bool can_hibernate { get; }
26 public bool can_suspend { get; }
27 public string daemon_version { get; }
29 public bool lid_is_closed { get; }
31 public bool lid_is_present { get; }
33 public bool on_battery { get; }
35 public bool on_low_battery { get; }
36 public virtual signal void changed ();
37 public virtual signal void device_added (void* device);
38 public virtual signal void device_changed (void* device);
39 public virtual signal void device_removed (void* device);
41 [CCode (cheader_filename = "devkit-power-gobject.h")]
42 public class Device : GLib.Object {
43 [CCode (has_construct_function = false)]
45 public unowned GLib.PtrArray get_history (string type, uint timespec, uint resolution) throws GLib.Error;
46 public unowned string get_object_path ();
47 public unowned GLib.PtrArray get_statistics (string type) throws GLib.Error;
49 public bool refresh () throws GLib.Error;
50 public bool set_object_path (string object_path) throws GLib.Error;
51 public static Dkp.DeviceState state_from_text (string state);
52 public static unowned string state_to_text (Dkp.DeviceState state_enum);
53 public static Dkp.DeviceTechnology technology_from_text (string technology);
54 public static unowned string technology_to_text (Dkp.DeviceTechnology technology_enum);
55 public static Dkp.DeviceType type_from_text (string type);
56 public static unowned string type_to_text (Dkp.DeviceType type_enum);
58 public double capacity { get; set; }
60 public double energy { get; set; }
62 public double energy_empty { get; set; }
64 public double energy_full { get; set; }
66 public double energy_full_design { get; set; }
68 public double energy_rate { get; set; }
70 public bool has_history { get; set; }
72 public bool has_statistics { get; set; }
74 public bool is_present { get; set; }
76 public bool is_rechargeable { get; set; }
78 public string model { owned get; set; }
80 public string native_path { owned get; set; }
82 public bool online { get; set; }
84 public double percentage { get; set; }
86 public bool power_supply { get; set; }
88 public bool recall_notice { get; set; }
90 public string recall_url { owned get; set; }
92 public string recall_vendor { owned get; set; }
94 public string serial { owned get; set; }
96 public uint state { get; set; }
98 public uint technology { get; set; }
100 public int64 time_to_empty { get; set; }
102 public int64 time_to_full { get; set; }
104 public uint type { get; set; }
106 public uint64 update_time { get; set; }
108 public string vendor { owned get; set; }
110 public double voltage { get; set; }
111 public virtual signal void changed (void* obj);
114 [CCode (copy_function = "dkp_history_obj_copy", cheader_filename = "devkit-power-gobject.h")]
115 public class HistoryObj {
116 public Dkp.DeviceState state;
119 [CCode (has_construct_function = false)]
120 public HistoryObj ();
121 public bool clear ();
122 public unowned Dkp.HistoryObj copy ();
123 public static unowned Dkp.HistoryObj create (double value, Dkp.DeviceState state);
124 public bool equal (Dkp.HistoryObj obj2);
125 public static unowned Dkp.HistoryObj from_string (string text);
126 public bool print ();
127 public unowned string to_string ();
130 [CCode (copy_function = "dkp_qos_obj_copy", cheader_filename = "devkit-power-gobject.h")]
131 public class QosObj {
132 public weak string cmdline;
134 public bool persistent;
136 public weak string sender;
137 public uint64 timespec;
138 public Dkp.QosType type;
141 [CCode (has_construct_function = false)]
143 public unowned Dkp.QosObj copy ();
144 public bool equal (Dkp.QosObj obj2);
145 public bool print ();
148 [CCode (copy_function = "dkp_stats_obj_copy", cheader_filename = "devkit-power-gobject.h")]
149 public class StatsObj {
150 public double accuracy;
152 [CCode (has_construct_function = false)]
154 public unowned Dkp.StatsObj copy ();
155 public static unowned Dkp.StatsObj create (double value, double accuracy);
156 public static unowned Dkp.StatsObj from_string (string text);
157 public unowned string to_string ();
159 [CCode (cheader_filename = "devkit-power-gobject.h")]
160 public class Wakeups : GLib.Object {
161 [CCode (has_construct_function = false)]
163 public unowned GLib.PtrArray get_data () throws GLib.Error;
164 public uint get_total () throws GLib.Error;
165 public bool has_capability ();
166 public virtual signal void data_changed ();
167 public virtual signal void total_changed (uint value);
170 [CCode (copy_function = "dkp_wakeups_obj_copy", cheader_filename = "devkit-power-gobject.h")]
171 public class WakeupsObj {
172 public weak string cmdline;
173 public weak string details;
175 public bool is_userspace;
178 [CCode (has_construct_function = false)]
179 public WakeupsObj ();
180 public unowned Dkp.WakeupsObj copy ();
181 public bool equal (Dkp.WakeupsObj obj2);
182 public bool print ();
184 [CCode (cprefix = "DKP_DEVICE_STATE_", has_type_id = "0", cheader_filename = "devkit-power-gobject.h")]
185 public enum DeviceState {
195 [CCode (cprefix = "DKP_DEVICE_TECHNOLOGY_", has_type_id = "0", cheader_filename = "devkit-power-gobject.h")]
196 public enum DeviceTechnology {
200 LITHIUM_IRON_PHOSPHATE,
203 NICKEL_METAL_HYDRIDE,
206 [CCode (cprefix = "DKP_DEVICE_TYPE_", has_type_id = "0", cheader_filename = "devkit-power-gobject.h")]
207 public enum DeviceType {
219 [CCode (cprefix = "DKP_QOS_TYPE_", has_type_id = "0", cheader_filename = "devkit-power-gobject.h")]
220 public enum QosType {
226 [CCode (cheader_filename = "devkit-power-gobject.h")]
227 public const int COMPILE_VERSION;
228 [CCode (cheader_filename = "devkit-power-gobject.h")]
229 public static Dkp.QosType qos_type_from_text (string type);
230 [CCode (cheader_filename = "devkit-power-gobject.h")]
231 public static unowned string qos_type_to_text (Dkp.QosType type);