1 /*
2  * This file is generated by gdbus-codegen, do not modify it.
3  *
4  * The license of this code is the same as for the D-Bus interface description
5  * it was derived from. Note that it links to GLib, so must comply with the
6  * LGPL linking clauses.
7  */
8 
9 #ifndef __UP_DEVICE_GENERATED_H__
10 #define __UP_DEVICE_GENERATED_H__
11 
12 #include <gio/gio.h>
13 
14 G_BEGIN_DECLS
15 
16 
17 /* ------------------------------------------------------------------------ */
18 /* Declarations for org.freedesktop.UPower.Device */
19 
20 #define UP_TYPE_EXPORTED_DEVICE (up_exported_device_get_type ())
21 #define UP_EXPORTED_DEVICE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), UP_TYPE_EXPORTED_DEVICE, UpExportedDevice))
22 #define UP_IS_EXPORTED_DEVICE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), UP_TYPE_EXPORTED_DEVICE))
23 #define UP_EXPORTED_DEVICE_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), UP_TYPE_EXPORTED_DEVICE, UpExportedDeviceIface))
24 
25 struct _UpExportedDevice;
26 typedef struct _UpExportedDevice UpExportedDevice;
27 typedef struct _UpExportedDeviceIface UpExportedDeviceIface;
28 
29 struct _UpExportedDeviceIface
30 {
31   GTypeInterface parent_iface;
32 
33 
34   gboolean (*handle_get_history) (
35     UpExportedDevice *object,
36     GDBusMethodInvocation *invocation,
37     const gchar *arg_type,
38     guint arg_timespan,
39     guint arg_resolution);
40 
41   gboolean (*handle_get_statistics) (
42     UpExportedDevice *object,
43     GDBusMethodInvocation *invocation,
44     const gchar *arg_type);
45 
46   gboolean (*handle_refresh) (
47     UpExportedDevice *object,
48     GDBusMethodInvocation *invocation);
49 
50   guint  (*get_battery_level) (UpExportedDevice *object);
51 
52   gdouble  (*get_capacity) (UpExportedDevice *object);
53 
54   gdouble  (*get_energy) (UpExportedDevice *object);
55 
56   gdouble  (*get_energy_empty) (UpExportedDevice *object);
57 
58   gdouble  (*get_energy_full) (UpExportedDevice *object);
59 
60   gdouble  (*get_energy_full_design) (UpExportedDevice *object);
61 
62   gdouble  (*get_energy_rate) (UpExportedDevice *object);
63 
64   gboolean  (*get_has_history) (UpExportedDevice *object);
65 
66   gboolean  (*get_has_statistics) (UpExportedDevice *object);
67 
68   const gchar * (*get_icon_name) (UpExportedDevice *object);
69 
70   gboolean  (*get_is_present) (UpExportedDevice *object);
71 
72   gboolean  (*get_is_rechargeable) (UpExportedDevice *object);
73 
74   gdouble  (*get_luminosity) (UpExportedDevice *object);
75 
76   const gchar * (*get_model) (UpExportedDevice *object);
77 
78   const gchar * (*get_native_path) (UpExportedDevice *object);
79 
80   gboolean  (*get_online) (UpExportedDevice *object);
81 
82   gdouble  (*get_percentage) (UpExportedDevice *object);
83 
84   gboolean  (*get_power_supply) (UpExportedDevice *object);
85 
86   const gchar * (*get_serial) (UpExportedDevice *object);
87 
88   guint  (*get_state) (UpExportedDevice *object);
89 
90   guint  (*get_technology) (UpExportedDevice *object);
91 
92   gdouble  (*get_temperature) (UpExportedDevice *object);
93 
94   gint64  (*get_time_to_empty) (UpExportedDevice *object);
95 
96   gint64  (*get_time_to_full) (UpExportedDevice *object);
97 
98   guint  (*get_type_) (UpExportedDevice *object);
99 
100   guint64  (*get_update_time) (UpExportedDevice *object);
101 
102   const gchar * (*get_vendor) (UpExportedDevice *object);
103 
104   gdouble  (*get_voltage) (UpExportedDevice *object);
105 
106   guint  (*get_warning_level) (UpExportedDevice *object);
107 
108 };
109 
110 GType up_exported_device_get_type (void) G_GNUC_CONST;
111 
112 GDBusInterfaceInfo *up_exported_device_interface_info (void);
113 guint up_exported_device_override_properties (GObjectClass *klass, guint property_id_begin);
114 
115 
116 /* D-Bus method call completion functions: */
117 void up_exported_device_complete_refresh (
118     UpExportedDevice *object,
119     GDBusMethodInvocation *invocation);
120 
121 void up_exported_device_complete_get_history (
122     UpExportedDevice *object,
123     GDBusMethodInvocation *invocation,
124     GVariant *data);
125 
126 void up_exported_device_complete_get_statistics (
127     UpExportedDevice *object,
128     GDBusMethodInvocation *invocation,
129     GVariant *data);
130 
131 
132 
133 /* D-Bus method calls: */
134 void up_exported_device_call_refresh (
135     UpExportedDevice *proxy,
136     GCancellable *cancellable,
137     GAsyncReadyCallback callback,
138     gpointer user_data);
139 
140 gboolean up_exported_device_call_refresh_finish (
141     UpExportedDevice *proxy,
142     GAsyncResult *res,
143     GError **error);
144 
145 gboolean up_exported_device_call_refresh_sync (
146     UpExportedDevice *proxy,
147     GCancellable *cancellable,
148     GError **error);
149 
150 void up_exported_device_call_get_history (
151     UpExportedDevice *proxy,
152     const gchar *arg_type,
153     guint arg_timespan,
154     guint arg_resolution,
155     GCancellable *cancellable,
156     GAsyncReadyCallback callback,
157     gpointer user_data);
158 
159 gboolean up_exported_device_call_get_history_finish (
160     UpExportedDevice *proxy,
161     GVariant **out_data,
162     GAsyncResult *res,
163     GError **error);
164 
165 gboolean up_exported_device_call_get_history_sync (
166     UpExportedDevice *proxy,
167     const gchar *arg_type,
168     guint arg_timespan,
169     guint arg_resolution,
170     GVariant **out_data,
171     GCancellable *cancellable,
172     GError **error);
173 
174 void up_exported_device_call_get_statistics (
175     UpExportedDevice *proxy,
176     const gchar *arg_type,
177     GCancellable *cancellable,
178     GAsyncReadyCallback callback,
179     gpointer user_data);
180 
181 gboolean up_exported_device_call_get_statistics_finish (
182     UpExportedDevice *proxy,
183     GVariant **out_data,
184     GAsyncResult *res,
185     GError **error);
186 
187 gboolean up_exported_device_call_get_statistics_sync (
188     UpExportedDevice *proxy,
189     const gchar *arg_type,
190     GVariant **out_data,
191     GCancellable *cancellable,
192     GError **error);
193 
194 
195 
196 /* D-Bus property accessors: */
197 const gchar *up_exported_device_get_native_path (UpExportedDevice *object);
198 gchar *up_exported_device_dup_native_path (UpExportedDevice *object);
199 void up_exported_device_set_native_path (UpExportedDevice *object, const gchar *value);
200 
201 const gchar *up_exported_device_get_vendor (UpExportedDevice *object);
202 gchar *up_exported_device_dup_vendor (UpExportedDevice *object);
203 void up_exported_device_set_vendor (UpExportedDevice *object, const gchar *value);
204 
205 const gchar *up_exported_device_get_model (UpExportedDevice *object);
206 gchar *up_exported_device_dup_model (UpExportedDevice *object);
207 void up_exported_device_set_model (UpExportedDevice *object, const gchar *value);
208 
209 const gchar *up_exported_device_get_serial (UpExportedDevice *object);
210 gchar *up_exported_device_dup_serial (UpExportedDevice *object);
211 void up_exported_device_set_serial (UpExportedDevice *object, const gchar *value);
212 
213 guint64 up_exported_device_get_update_time (UpExportedDevice *object);
214 void up_exported_device_set_update_time (UpExportedDevice *object, guint64 value);
215 
216 guint up_exported_device_get_type_ (UpExportedDevice *object);
217 void up_exported_device_set_type_ (UpExportedDevice *object, guint value);
218 
219 gboolean up_exported_device_get_power_supply (UpExportedDevice *object);
220 void up_exported_device_set_power_supply (UpExportedDevice *object, gboolean value);
221 
222 gboolean up_exported_device_get_has_history (UpExportedDevice *object);
223 void up_exported_device_set_has_history (UpExportedDevice *object, gboolean value);
224 
225 gboolean up_exported_device_get_has_statistics (UpExportedDevice *object);
226 void up_exported_device_set_has_statistics (UpExportedDevice *object, gboolean value);
227 
228 gboolean up_exported_device_get_online (UpExportedDevice *object);
229 void up_exported_device_set_online (UpExportedDevice *object, gboolean value);
230 
231 gdouble up_exported_device_get_energy (UpExportedDevice *object);
232 void up_exported_device_set_energy (UpExportedDevice *object, gdouble value);
233 
234 gdouble up_exported_device_get_energy_empty (UpExportedDevice *object);
235 void up_exported_device_set_energy_empty (UpExportedDevice *object, gdouble value);
236 
237 gdouble up_exported_device_get_energy_full (UpExportedDevice *object);
238 void up_exported_device_set_energy_full (UpExportedDevice *object, gdouble value);
239 
240 gdouble up_exported_device_get_energy_full_design (UpExportedDevice *object);
241 void up_exported_device_set_energy_full_design (UpExportedDevice *object, gdouble value);
242 
243 gdouble up_exported_device_get_energy_rate (UpExportedDevice *object);
244 void up_exported_device_set_energy_rate (UpExportedDevice *object, gdouble value);
245 
246 gdouble up_exported_device_get_voltage (UpExportedDevice *object);
247 void up_exported_device_set_voltage (UpExportedDevice *object, gdouble value);
248 
249 gdouble up_exported_device_get_luminosity (UpExportedDevice *object);
250 void up_exported_device_set_luminosity (UpExportedDevice *object, gdouble value);
251 
252 gint64 up_exported_device_get_time_to_empty (UpExportedDevice *object);
253 void up_exported_device_set_time_to_empty (UpExportedDevice *object, gint64 value);
254 
255 gint64 up_exported_device_get_time_to_full (UpExportedDevice *object);
256 void up_exported_device_set_time_to_full (UpExportedDevice *object, gint64 value);
257 
258 gdouble up_exported_device_get_percentage (UpExportedDevice *object);
259 void up_exported_device_set_percentage (UpExportedDevice *object, gdouble value);
260 
261 gdouble up_exported_device_get_temperature (UpExportedDevice *object);
262 void up_exported_device_set_temperature (UpExportedDevice *object, gdouble value);
263 
264 gboolean up_exported_device_get_is_present (UpExportedDevice *object);
265 void up_exported_device_set_is_present (UpExportedDevice *object, gboolean value);
266 
267 guint up_exported_device_get_state (UpExportedDevice *object);
268 void up_exported_device_set_state (UpExportedDevice *object, guint value);
269 
270 gboolean up_exported_device_get_is_rechargeable (UpExportedDevice *object);
271 void up_exported_device_set_is_rechargeable (UpExportedDevice *object, gboolean value);
272 
273 gdouble up_exported_device_get_capacity (UpExportedDevice *object);
274 void up_exported_device_set_capacity (UpExportedDevice *object, gdouble value);
275 
276 guint up_exported_device_get_technology (UpExportedDevice *object);
277 void up_exported_device_set_technology (UpExportedDevice *object, guint value);
278 
279 guint up_exported_device_get_warning_level (UpExportedDevice *object);
280 void up_exported_device_set_warning_level (UpExportedDevice *object, guint value);
281 
282 guint up_exported_device_get_battery_level (UpExportedDevice *object);
283 void up_exported_device_set_battery_level (UpExportedDevice *object, guint value);
284 
285 const gchar *up_exported_device_get_icon_name (UpExportedDevice *object);
286 gchar *up_exported_device_dup_icon_name (UpExportedDevice *object);
287 void up_exported_device_set_icon_name (UpExportedDevice *object, const gchar *value);
288 
289 
290 /* ---- */
291 
292 #define UP_TYPE_EXPORTED_DEVICE_PROXY (up_exported_device_proxy_get_type ())
293 #define UP_EXPORTED_DEVICE_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), UP_TYPE_EXPORTED_DEVICE_PROXY, UpExportedDeviceProxy))
294 #define UP_EXPORTED_DEVICE_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), UP_TYPE_EXPORTED_DEVICE_PROXY, UpExportedDeviceProxyClass))
295 #define UP_EXPORTED_DEVICE_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), UP_TYPE_EXPORTED_DEVICE_PROXY, UpExportedDeviceProxyClass))
296 #define UP_IS_EXPORTED_DEVICE_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), UP_TYPE_EXPORTED_DEVICE_PROXY))
297 #define UP_IS_EXPORTED_DEVICE_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), UP_TYPE_EXPORTED_DEVICE_PROXY))
298 
299 typedef struct _UpExportedDeviceProxy UpExportedDeviceProxy;
300 typedef struct _UpExportedDeviceProxyClass UpExportedDeviceProxyClass;
301 typedef struct _UpExportedDeviceProxyPrivate UpExportedDeviceProxyPrivate;
302 
303 struct _UpExportedDeviceProxy
304 {
305   /*< private >*/
306   GDBusProxy parent_instance;
307   UpExportedDeviceProxyPrivate *priv;
308 };
309 
310 struct _UpExportedDeviceProxyClass
311 {
312   GDBusProxyClass parent_class;
313 };
314 
315 GType up_exported_device_proxy_get_type (void) G_GNUC_CONST;
316 
317 #if GLIB_CHECK_VERSION(2, 44, 0)
318 G_DEFINE_AUTOPTR_CLEANUP_FUNC (UpExportedDeviceProxy, g_object_unref)
319 #endif
320 
321 void up_exported_device_proxy_new (
322     GDBusConnection     *connection,
323     GDBusProxyFlags      flags,
324     const gchar         *name,
325     const gchar         *object_path,
326     GCancellable        *cancellable,
327     GAsyncReadyCallback  callback,
328     gpointer             user_data);
329 UpExportedDevice *up_exported_device_proxy_new_finish (
330     GAsyncResult        *res,
331     GError             **error);
332 UpExportedDevice *up_exported_device_proxy_new_sync (
333     GDBusConnection     *connection,
334     GDBusProxyFlags      flags,
335     const gchar         *name,
336     const gchar         *object_path,
337     GCancellable        *cancellable,
338     GError             **error);
339 
340 void up_exported_device_proxy_new_for_bus (
341     GBusType             bus_type,
342     GDBusProxyFlags      flags,
343     const gchar         *name,
344     const gchar         *object_path,
345     GCancellable        *cancellable,
346     GAsyncReadyCallback  callback,
347     gpointer             user_data);
348 UpExportedDevice *up_exported_device_proxy_new_for_bus_finish (
349     GAsyncResult        *res,
350     GError             **error);
351 UpExportedDevice *up_exported_device_proxy_new_for_bus_sync (
352     GBusType             bus_type,
353     GDBusProxyFlags      flags,
354     const gchar         *name,
355     const gchar         *object_path,
356     GCancellable        *cancellable,
357     GError             **error);
358 
359 
360 /* ---- */
361 
362 #define UP_TYPE_EXPORTED_DEVICE_SKELETON (up_exported_device_skeleton_get_type ())
363 #define UP_EXPORTED_DEVICE_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), UP_TYPE_EXPORTED_DEVICE_SKELETON, UpExportedDeviceSkeleton))
364 #define UP_EXPORTED_DEVICE_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), UP_TYPE_EXPORTED_DEVICE_SKELETON, UpExportedDeviceSkeletonClass))
365 #define UP_EXPORTED_DEVICE_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), UP_TYPE_EXPORTED_DEVICE_SKELETON, UpExportedDeviceSkeletonClass))
366 #define UP_IS_EXPORTED_DEVICE_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), UP_TYPE_EXPORTED_DEVICE_SKELETON))
367 #define UP_IS_EXPORTED_DEVICE_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), UP_TYPE_EXPORTED_DEVICE_SKELETON))
368 
369 typedef struct _UpExportedDeviceSkeleton UpExportedDeviceSkeleton;
370 typedef struct _UpExportedDeviceSkeletonClass UpExportedDeviceSkeletonClass;
371 typedef struct _UpExportedDeviceSkeletonPrivate UpExportedDeviceSkeletonPrivate;
372 
373 struct _UpExportedDeviceSkeleton
374 {
375   /*< private >*/
376   GDBusInterfaceSkeleton parent_instance;
377   UpExportedDeviceSkeletonPrivate *priv;
378 };
379 
380 struct _UpExportedDeviceSkeletonClass
381 {
382   GDBusInterfaceSkeletonClass parent_class;
383 };
384 
385 GType up_exported_device_skeleton_get_type (void) G_GNUC_CONST;
386 
387 #if GLIB_CHECK_VERSION(2, 44, 0)
388 G_DEFINE_AUTOPTR_CLEANUP_FUNC (UpExportedDeviceSkeleton, g_object_unref)
389 #endif
390 
391 UpExportedDevice *up_exported_device_skeleton_new (void);
392 
393 
394 G_END_DECLS
395 
396 #endif /* __UP_DEVICE_GENERATED_H__ */
397