Back to index

indicator-session  12.10.0
dbus-upower.h
Go to the documentation of this file.
00001 /*
00002  * Generated by gdbus-codegen 2.33.3. DO NOT EDIT.
00003  *
00004  * The license of this code is the same as for the source it was derived from.
00005  */
00006 
00007 #ifndef __DBUS_UPOWER_H__
00008 #define __DBUS_UPOWER_H__
00009 
00010 #include <gio/gio.h>
00011 
00012 G_BEGIN_DECLS
00013 
00014 
00015 /* ------------------------------------------------------------------------ */
00016 /* Declarations for org.freedesktop.UPower */
00017 
00018 #define DBUS_TYPE_UPOWER (dbus_upower_get_type ())
00019 #define DBUS_UPOWER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), DBUS_TYPE_UPOWER, DBusUPower))
00020 #define DBUS_IS_UPOWER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), DBUS_TYPE_UPOWER))
00021 #define DBUS_UPOWER_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), DBUS_TYPE_UPOWER, DBusUPowerIface))
00022 
00023 struct _DBusUPower;
00024 typedef struct _DBusUPower DBusUPower;
00025 typedef struct _DBusUPowerIface DBusUPowerIface;
00026 
00027 struct _DBusUPowerIface
00028 {
00029   GTypeInterface parent_iface;
00030 
00031 
00032 
00033   gboolean (*handle_about_to_sleep) (
00034     DBusUPower *object,
00035     GDBusMethodInvocation *invocation);
00036 
00037   gboolean (*handle_enumerate_devices) (
00038     DBusUPower *object,
00039     GDBusMethodInvocation *invocation);
00040 
00041   gboolean (*handle_hibernate) (
00042     DBusUPower *object,
00043     GDBusMethodInvocation *invocation);
00044 
00045   gboolean (*handle_hibernate_allowed) (
00046     DBusUPower *object,
00047     GDBusMethodInvocation *invocation);
00048 
00049   gboolean (*handle_suspend) (
00050     DBusUPower *object,
00051     GDBusMethodInvocation *invocation);
00052 
00053   gboolean (*handle_suspend_allowed) (
00054     DBusUPower *object,
00055     GDBusMethodInvocation *invocation);
00056 
00057   gboolean  (*get_can_hibernate) (DBusUPower *object);
00058 
00059   gboolean  (*get_can_suspend) (DBusUPower *object);
00060 
00061   const gchar * (*get_daemon_version) (DBusUPower *object);
00062 
00063   gboolean  (*get_lid_is_closed) (DBusUPower *object);
00064 
00065   gboolean  (*get_lid_is_present) (DBusUPower *object);
00066 
00067   gboolean  (*get_on_battery) (DBusUPower *object);
00068 
00069   gboolean  (*get_on_low_battery) (DBusUPower *object);
00070 
00071   void (*changed) (
00072     DBusUPower *object);
00073 
00074   void (*device_added) (
00075     DBusUPower *object,
00076     const gchar *arg_device);
00077 
00078   void (*device_changed) (
00079     DBusUPower *object,
00080     const gchar *arg_device);
00081 
00082   void (*device_removed) (
00083     DBusUPower *object,
00084     const gchar *arg_device);
00085 
00086   void (*resuming) (
00087     DBusUPower *object);
00088 
00089   void (*sleeping) (
00090     DBusUPower *object);
00091 
00092 };
00093 
00094 GType dbus_upower_get_type (void) G_GNUC_CONST;
00095 
00096 GDBusInterfaceInfo *dbus_upower_interface_info (void);
00097 guint dbus_upower_override_properties (GObjectClass *klass, guint property_id_begin);
00098 
00099 
00100 /* D-Bus method call completion functions: */
00101 void dbus_upower_complete_enumerate_devices (
00102     DBusUPower *object,
00103     GDBusMethodInvocation *invocation,
00104     const gchar *const *devices);
00105 
00106 void dbus_upower_complete_about_to_sleep (
00107     DBusUPower *object,
00108     GDBusMethodInvocation *invocation);
00109 
00110 void dbus_upower_complete_suspend (
00111     DBusUPower *object,
00112     GDBusMethodInvocation *invocation);
00113 
00114 void dbus_upower_complete_suspend_allowed (
00115     DBusUPower *object,
00116     GDBusMethodInvocation *invocation,
00117     gboolean allowed);
00118 
00119 void dbus_upower_complete_hibernate (
00120     DBusUPower *object,
00121     GDBusMethodInvocation *invocation);
00122 
00123 void dbus_upower_complete_hibernate_allowed (
00124     DBusUPower *object,
00125     GDBusMethodInvocation *invocation,
00126     gboolean allowed);
00127 
00128 
00129 
00130 /* D-Bus signal emissions functions: */
00131 void dbus_upower_emit_device_added (
00132     DBusUPower *object,
00133     const gchar *arg_device);
00134 
00135 void dbus_upower_emit_device_removed (
00136     DBusUPower *object,
00137     const gchar *arg_device);
00138 
00139 void dbus_upower_emit_device_changed (
00140     DBusUPower *object,
00141     const gchar *arg_device);
00142 
00143 void dbus_upower_emit_changed (
00144     DBusUPower *object);
00145 
00146 void dbus_upower_emit_sleeping (
00147     DBusUPower *object);
00148 
00149 void dbus_upower_emit_resuming (
00150     DBusUPower *object);
00151 
00152 
00153 
00154 /* D-Bus method calls: */
00155 void dbus_upower_call_enumerate_devices (
00156     DBusUPower *proxy,
00157     GCancellable *cancellable,
00158     GAsyncReadyCallback callback,
00159     gpointer user_data);
00160 
00161 gboolean dbus_upower_call_enumerate_devices_finish (
00162     DBusUPower *proxy,
00163     gchar ***out_devices,
00164     GAsyncResult *res,
00165     GError **error);
00166 
00167 gboolean dbus_upower_call_enumerate_devices_sync (
00168     DBusUPower *proxy,
00169     gchar ***out_devices,
00170     GCancellable *cancellable,
00171     GError **error);
00172 
00173 void dbus_upower_call_about_to_sleep (
00174     DBusUPower *proxy,
00175     GCancellable *cancellable,
00176     GAsyncReadyCallback callback,
00177     gpointer user_data);
00178 
00179 gboolean dbus_upower_call_about_to_sleep_finish (
00180     DBusUPower *proxy,
00181     GAsyncResult *res,
00182     GError **error);
00183 
00184 gboolean dbus_upower_call_about_to_sleep_sync (
00185     DBusUPower *proxy,
00186     GCancellable *cancellable,
00187     GError **error);
00188 
00189 void dbus_upower_call_suspend (
00190     DBusUPower *proxy,
00191     GCancellable *cancellable,
00192     GAsyncReadyCallback callback,
00193     gpointer user_data);
00194 
00195 gboolean dbus_upower_call_suspend_finish (
00196     DBusUPower *proxy,
00197     GAsyncResult *res,
00198     GError **error);
00199 
00200 gboolean dbus_upower_call_suspend_sync (
00201     DBusUPower *proxy,
00202     GCancellable *cancellable,
00203     GError **error);
00204 
00205 void dbus_upower_call_suspend_allowed (
00206     DBusUPower *proxy,
00207     GCancellable *cancellable,
00208     GAsyncReadyCallback callback,
00209     gpointer user_data);
00210 
00211 gboolean dbus_upower_call_suspend_allowed_finish (
00212     DBusUPower *proxy,
00213     gboolean *out_allowed,
00214     GAsyncResult *res,
00215     GError **error);
00216 
00217 gboolean dbus_upower_call_suspend_allowed_sync (
00218     DBusUPower *proxy,
00219     gboolean *out_allowed,
00220     GCancellable *cancellable,
00221     GError **error);
00222 
00223 void dbus_upower_call_hibernate (
00224     DBusUPower *proxy,
00225     GCancellable *cancellable,
00226     GAsyncReadyCallback callback,
00227     gpointer user_data);
00228 
00229 gboolean dbus_upower_call_hibernate_finish (
00230     DBusUPower *proxy,
00231     GAsyncResult *res,
00232     GError **error);
00233 
00234 gboolean dbus_upower_call_hibernate_sync (
00235     DBusUPower *proxy,
00236     GCancellable *cancellable,
00237     GError **error);
00238 
00239 void dbus_upower_call_hibernate_allowed (
00240     DBusUPower *proxy,
00241     GCancellable *cancellable,
00242     GAsyncReadyCallback callback,
00243     gpointer user_data);
00244 
00245 gboolean dbus_upower_call_hibernate_allowed_finish (
00246     DBusUPower *proxy,
00247     gboolean *out_allowed,
00248     GAsyncResult *res,
00249     GError **error);
00250 
00251 gboolean dbus_upower_call_hibernate_allowed_sync (
00252     DBusUPower *proxy,
00253     gboolean *out_allowed,
00254     GCancellable *cancellable,
00255     GError **error);
00256 
00257 
00258 
00259 /* D-Bus property accessors: */
00260 const gchar *dbus_upower_get_daemon_version (DBusUPower *object);
00261 gchar *dbus_upower_dup_daemon_version (DBusUPower *object);
00262 void dbus_upower_set_daemon_version (DBusUPower *object, const gchar *value);
00263 
00264 gboolean dbus_upower_get_can_suspend (DBusUPower *object);
00265 void dbus_upower_set_can_suspend (DBusUPower *object, gboolean value);
00266 
00267 gboolean dbus_upower_get_can_hibernate (DBusUPower *object);
00268 void dbus_upower_set_can_hibernate (DBusUPower *object, gboolean value);
00269 
00270 gboolean dbus_upower_get_on_battery (DBusUPower *object);
00271 void dbus_upower_set_on_battery (DBusUPower *object, gboolean value);
00272 
00273 gboolean dbus_upower_get_on_low_battery (DBusUPower *object);
00274 void dbus_upower_set_on_low_battery (DBusUPower *object, gboolean value);
00275 
00276 gboolean dbus_upower_get_lid_is_closed (DBusUPower *object);
00277 void dbus_upower_set_lid_is_closed (DBusUPower *object, gboolean value);
00278 
00279 gboolean dbus_upower_get_lid_is_present (DBusUPower *object);
00280 void dbus_upower_set_lid_is_present (DBusUPower *object, gboolean value);
00281 
00282 
00283 /* ---- */
00284 
00285 #define DBUS_TYPE_UPOWER_PROXY (dbus_upower_proxy_get_type ())
00286 #define DBUS_UPOWER_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), DBUS_TYPE_UPOWER_PROXY, DBusUPowerProxy))
00287 #define DBUS_UPOWER_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), DBUS_TYPE_UPOWER_PROXY, DBusUPowerProxyClass))
00288 #define DBUS_UPOWER_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), DBUS_TYPE_UPOWER_PROXY, DBusUPowerProxyClass))
00289 #define DBUS_IS_UPOWER_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), DBUS_TYPE_UPOWER_PROXY))
00290 #define DBUS_IS_UPOWER_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), DBUS_TYPE_UPOWER_PROXY))
00291 
00292 typedef struct _DBusUPowerProxy DBusUPowerProxy;
00293 typedef struct _DBusUPowerProxyClass DBusUPowerProxyClass;
00294 typedef struct _DBusUPowerProxyPrivate DBusUPowerProxyPrivate;
00295 
00296 struct _DBusUPowerProxy
00297 {
00298   /*< private >*/
00299   GDBusProxy parent_instance;
00300   DBusUPowerProxyPrivate *priv;
00301 };
00302 
00303 struct _DBusUPowerProxyClass
00304 {
00305   GDBusProxyClass parent_class;
00306 };
00307 
00308 GType dbus_upower_proxy_get_type (void) G_GNUC_CONST;
00309 
00310 void dbus_upower_proxy_new (
00311     GDBusConnection     *connection,
00312     GDBusProxyFlags      flags,
00313     const gchar         *name,
00314     const gchar         *object_path,
00315     GCancellable        *cancellable,
00316     GAsyncReadyCallback  callback,
00317     gpointer             user_data);
00318 DBusUPower *dbus_upower_proxy_new_finish (
00319     GAsyncResult        *res,
00320     GError             **error);
00321 DBusUPower *dbus_upower_proxy_new_sync (
00322     GDBusConnection     *connection,
00323     GDBusProxyFlags      flags,
00324     const gchar         *name,
00325     const gchar         *object_path,
00326     GCancellable        *cancellable,
00327     GError             **error);
00328 
00329 void dbus_upower_proxy_new_for_bus (
00330     GBusType             bus_type,
00331     GDBusProxyFlags      flags,
00332     const gchar         *name,
00333     const gchar         *object_path,
00334     GCancellable        *cancellable,
00335     GAsyncReadyCallback  callback,
00336     gpointer             user_data);
00337 DBusUPower *dbus_upower_proxy_new_for_bus_finish (
00338     GAsyncResult        *res,
00339     GError             **error);
00340 DBusUPower *dbus_upower_proxy_new_for_bus_sync (
00341     GBusType             bus_type,
00342     GDBusProxyFlags      flags,
00343     const gchar         *name,
00344     const gchar         *object_path,
00345     GCancellable        *cancellable,
00346     GError             **error);
00347 
00348 
00349 /* ---- */
00350 
00351 #define DBUS_TYPE_UPOWER_SKELETON (dbus_upower_skeleton_get_type ())
00352 #define DBUS_UPOWER_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), DBUS_TYPE_UPOWER_SKELETON, DBusUPowerSkeleton))
00353 #define DBUS_UPOWER_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), DBUS_TYPE_UPOWER_SKELETON, DBusUPowerSkeletonClass))
00354 #define DBUS_UPOWER_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), DBUS_TYPE_UPOWER_SKELETON, DBusUPowerSkeletonClass))
00355 #define DBUS_IS_UPOWER_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), DBUS_TYPE_UPOWER_SKELETON))
00356 #define DBUS_IS_UPOWER_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), DBUS_TYPE_UPOWER_SKELETON))
00357 
00358 typedef struct _DBusUPowerSkeleton DBusUPowerSkeleton;
00359 typedef struct _DBusUPowerSkeletonClass DBusUPowerSkeletonClass;
00360 typedef struct _DBusUPowerSkeletonPrivate DBusUPowerSkeletonPrivate;
00361 
00362 struct _DBusUPowerSkeleton
00363 {
00364   /*< private >*/
00365   GDBusInterfaceSkeleton parent_instance;
00366   DBusUPowerSkeletonPrivate *priv;
00367 };
00368 
00369 struct _DBusUPowerSkeletonClass
00370 {
00371   GDBusInterfaceSkeletonClass parent_class;
00372 };
00373 
00374 GType dbus_upower_skeleton_get_type (void) G_GNUC_CONST;
00375 
00376 DBusUPower *dbus_upower_skeleton_new (void);
00377 
00378 
00379 G_END_DECLS
00380 
00381 #endif /* __DBUS_UPOWER_H__ */