40
40
<pre class="synopsis">#define <a class="link" href="UPower-up-client.html#UP-CLIENT-ERROR:CAPS" title="UP_CLIENT_ERROR">UP_CLIENT_ERROR</a>
41
41
#define <a class="link" href="UPower-up-client.html#UP-CLIENT-TYPE-ERROR:CAPS" title="UP_CLIENT_TYPE_ERROR">UP_CLIENT_TYPE_ERROR</a>
42
42
<a class="link" href="UPower-up-client.html#UpClientPrivate" title="UpClientPrivate">UpClientPrivate</a>;
43
<span class="returnvalue">void</span> <a class="link" href="UPower-up-client.html#device-added" title="device_added ()">device_added</a> (<span class="returnvalue">UpClient</span> *client,
44
<span class="returnvalue">UpDevice</span> *device);
45
<span class="returnvalue">void</span> <a class="link" href="UPower-up-client.html#device-changed" title="device_changed ()">device_changed</a> (<span class="returnvalue">UpClient</span> *client,
46
<span class="returnvalue">UpDevice</span> *device);
47
<span class="returnvalue">void</span> <a class="link" href="UPower-up-client.html#device-removed" title="device_removed ()">device_removed</a> (<span class="returnvalue">UpClient</span> *client,
48
<span class="returnvalue">UpDevice</span> *device);
49
<span class="returnvalue">void</span> <a class="link" href="UPower-up-client.html#changed" title="changed ()">changed</a> (<span class="returnvalue">UpClient</span> *client);
50
<span class="returnvalue">UpClient</span> * <a class="link" href="UPower-up-client.html#up-client-new" title="up_client_new ()">up_client_new</a> (void);
51
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="UPower-up-client.html#up-client-get-properties-sync" title="up_client_get_properties_sync ()">up_client_get_properties_sync</a> (<span class="returnvalue">UpClient</span> *client,
52
<a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="returnvalue">GCancellable</span></a> *cancellable,
53
<a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="returnvalue">GError</span></a> **error);
54
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="UPower-up-client.html#up-client-enumerate-devices-sync" title="up_client_enumerate_devices_sync ()">up_client_enumerate_devices_sync</a> (<span class="returnvalue">UpClient</span> *client,
55
<a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="returnvalue">GCancellable</span></a> *cancellable,
56
<a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="returnvalue">GError</span></a> **error);
57
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="UPower-up-client.html#up-client-suspend-sync" title="up_client_suspend_sync ()">up_client_suspend_sync</a> (<span class="returnvalue">UpClient</span> *client,
58
<a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="returnvalue">GCancellable</span></a> *cancellable,
59
<a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="returnvalue">GError</span></a> **error);
60
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="UPower-up-client.html#up-client-about-to-sleep-sync" title="up_client_about_to_sleep_sync ()">up_client_about_to_sleep_sync</a> (<span class="returnvalue">UpClient</span> *client,
61
<a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="returnvalue">GCancellable</span></a> *cancellable,
62
<a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="returnvalue">GError</span></a> **error);
63
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="UPower-up-client.html#up-client-hibernate-sync" title="up_client_hibernate_sync ()">up_client_hibernate_sync</a> (<span class="returnvalue">UpClient</span> *client,
64
<a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="returnvalue">GCancellable</span></a> *cancellable,
65
<a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="returnvalue">GError</span></a> **error);
66
<a href="/usr/share/gtk-doc/html/glib/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> * <a class="link" href="UPower-up-client.html#up-client-get-devices" title="up_client_get_devices ()">up_client_get_devices</a> (<span class="returnvalue">UpClient</span> *client);
67
const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="UPower-up-client.html#up-client-get-daemon-version" title="up_client_get_daemon_version ()">up_client_get_daemon_version</a> (<span class="returnvalue">UpClient</span> *client);
68
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="UPower-up-client.html#up-client-get-can-hibernate" title="up_client_get_can_hibernate ()">up_client_get_can_hibernate</a> (<span class="returnvalue">UpClient</span> *client);
69
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="UPower-up-client.html#up-client-get-lid-is-closed" title="up_client_get_lid_is_closed ()">up_client_get_lid_is_closed</a> (<span class="returnvalue">UpClient</span> *client);
70
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="UPower-up-client.html#up-client-get-can-suspend" title="up_client_get_can_suspend ()">up_client_get_can_suspend</a> (<span class="returnvalue">UpClient</span> *client);
71
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="UPower-up-client.html#up-client-get-on-battery" title="up_client_get_on_battery ()">up_client_get_on_battery</a> (<span class="returnvalue">UpClient</span> *client);
72
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="UPower-up-client.html#up-client-get-on-low-battery" title="up_client_get_on_low_battery ()">up_client_get_on_low_battery</a> (<span class="returnvalue">UpClient</span> *client);
43
<span class="returnvalue">void</span> (<a class="link" href="UPower-up-client.html#device-added" title="device_added ()">*device_added</a>) (<em class="parameter"><code><span class="type">UpClient</span> *client</code></em>,
44
<em class="parameter"><code><span class="type">UpDevice</span> *device</code></em>);
45
<span class="returnvalue">void</span> (<a class="link" href="UPower-up-client.html#device-changed" title="device_changed ()">*device_changed</a>) (<em class="parameter"><code><span class="type">UpClient</span> *client</code></em>,
46
<em class="parameter"><code><span class="type">UpDevice</span> *device</code></em>);
47
<span class="returnvalue">void</span> (<a class="link" href="UPower-up-client.html#device-removed" title="device_removed ()">*device_removed</a>) (<em class="parameter"><code><span class="type">UpClient</span> *client</code></em>,
48
<em class="parameter"><code><span class="type">UpDevice</span> *device</code></em>);
49
<span class="returnvalue">void</span> (<a class="link" href="UPower-up-client.html#changed" title="changed ()">*changed</a>) (<em class="parameter"><code><span class="type">UpClient</span> *client</code></em>);
50
<span class="returnvalue">UpClient</span> * <a class="link" href="UPower-up-client.html#up-client-new" title="up_client_new ()">up_client_new</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
51
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="UPower-up-client.html#up-client-get-properties-sync" title="up_client_get_properties_sync ()">up_client_get_properties_sync</a> (<em class="parameter"><code><span class="type">UpClient</span> *client</code></em>,
52
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
53
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
54
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="UPower-up-client.html#up-client-enumerate-devices-sync" title="up_client_enumerate_devices_sync ()">up_client_enumerate_devices_sync</a> (<em class="parameter"><code><span class="type">UpClient</span> *client</code></em>,
55
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
56
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
57
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="UPower-up-client.html#up-client-suspend-sync" title="up_client_suspend_sync ()">up_client_suspend_sync</a> (<em class="parameter"><code><span class="type">UpClient</span> *client</code></em>,
58
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
59
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
60
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="UPower-up-client.html#up-client-about-to-sleep-sync" title="up_client_about_to_sleep_sync ()">up_client_about_to_sleep_sync</a> (<em class="parameter"><code><span class="type">UpClient</span> *client</code></em>,
61
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
62
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
63
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="UPower-up-client.html#up-client-hibernate-sync" title="up_client_hibernate_sync ()">up_client_hibernate_sync</a> (<em class="parameter"><code><span class="type">UpClient</span> *client</code></em>,
64
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
65
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
66
<a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> * <a class="link" href="UPower-up-client.html#up-client-get-devices" title="up_client_get_devices ()">up_client_get_devices</a> (<em class="parameter"><code><span class="type">UpClient</span> *client</code></em>);
67
const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="UPower-up-client.html#up-client-get-daemon-version" title="up_client_get_daemon_version ()">up_client_get_daemon_version</a> (<em class="parameter"><code><span class="type">UpClient</span> *client</code></em>);
68
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="UPower-up-client.html#up-client-get-can-hibernate" title="up_client_get_can_hibernate ()">up_client_get_can_hibernate</a> (<em class="parameter"><code><span class="type">UpClient</span> *client</code></em>);
69
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="UPower-up-client.html#up-client-get-lid-is-closed" title="up_client_get_lid_is_closed ()">up_client_get_lid_is_closed</a> (<em class="parameter"><code><span class="type">UpClient</span> *client</code></em>);
70
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="UPower-up-client.html#up-client-get-can-suspend" title="up_client_get_can_suspend ()">up_client_get_can_suspend</a> (<em class="parameter"><code><span class="type">UpClient</span> *client</code></em>);
71
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="UPower-up-client.html#up-client-get-on-battery" title="up_client_get_on_battery ()">up_client_get_on_battery</a> (<em class="parameter"><code><span class="type">UpClient</span> *client</code></em>);
72
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="UPower-up-client.html#up-client-get-on-low-battery" title="up_client_get_on_low_battery ()">up_client_get_on_low_battery</a> (<em class="parameter"><code><span class="type">UpClient</span> *client</code></em>);
75
75
<div class="refsect1" title="Description">
99
100
<a name="UpClientPrivate"></a><h3>UpClientPrivate</h3>
100
101
<pre class="programlisting">typedef struct _UpClientPrivate UpClientPrivate;</pre>
102
Private <span class="type">UpClient</span> data</p>
103
Private <span class="type">UpClient</span> data
105
107
<div class="refsect2" title="device_added ()">
106
108
<a name="device-added"></a><h3>device_added ()</h3>
107
<pre class="programlisting"><span class="returnvalue">void</span> device_added (<span class="returnvalue">UpClient</span> *client,
108
<span class="returnvalue">UpDevice</span> *device);</pre>
109
<pre class="programlisting"><span class="returnvalue">void</span> (*device_added) (<em class="parameter"><code><span class="type">UpClient</span> *client</code></em>,
110
<em class="parameter"><code><span class="type">UpDevice</span> *device</code></em>);</pre>
111
113
<div class="refsect2" title="device_changed ()">
112
114
<a name="device-changed"></a><h3>device_changed ()</h3>
113
<pre class="programlisting"><span class="returnvalue">void</span> device_changed (<span class="returnvalue">UpClient</span> *client,
114
<span class="returnvalue">UpDevice</span> *device);</pre>
115
<pre class="programlisting"><span class="returnvalue">void</span> (*device_changed) (<em class="parameter"><code><span class="type">UpClient</span> *client</code></em>,
116
<em class="parameter"><code><span class="type">UpDevice</span> *device</code></em>);</pre>
117
119
<div class="refsect2" title="device_removed ()">
118
120
<a name="device-removed"></a><h3>device_removed ()</h3>
119
<pre class="programlisting"><span class="returnvalue">void</span> device_removed (<span class="returnvalue">UpClient</span> *client,
120
<span class="returnvalue">UpDevice</span> *device);</pre>
121
<pre class="programlisting"><span class="returnvalue">void</span> (*device_removed) (<em class="parameter"><code><span class="type">UpClient</span> *client</code></em>,
122
<em class="parameter"><code><span class="type">UpDevice</span> *device</code></em>);</pre>
123
125
<div class="refsect2" title="changed ()">
124
126
<a name="changed"></a><h3>changed ()</h3>
125
<pre class="programlisting"><span class="returnvalue">void</span> changed (<span class="returnvalue">UpClient</span> *client);</pre>
127
<pre class="programlisting"><span class="returnvalue">void</span> (*changed) (<em class="parameter"><code><span class="type">UpClient</span> *client</code></em>);</pre>
128
130
<div class="refsect2" title="up_client_new ()">
129
131
<a name="up-client-new"></a><h3>up_client_new ()</h3>
130
<pre class="programlisting"><span class="returnvalue">UpClient</span> * up_client_new (void);</pre>
132
<pre class="programlisting"><span class="returnvalue">UpClient</span> * up_client_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
132
Creates a new <span class="type">UpClient</span> object.</p>
134
Creates a new <span class="type">UpClient</span> object.
133
136
<div class="variablelist"><table border="0">
134
137
<col align="left" valign="top">
145
148
<div class="refsect2" title="up_client_get_properties_sync ()">
146
149
<a name="up-client-get-properties-sync"></a><h3>up_client_get_properties_sync ()</h3>
147
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> up_client_get_properties_sync (<span class="returnvalue">UpClient</span> *client,
148
<a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="returnvalue">GCancellable</span></a> *cancellable,
149
<a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="returnvalue">GError</span></a> **error);</pre>
150
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> up_client_get_properties_sync (<em class="parameter"><code><span class="type">UpClient</span> *client</code></em>,
151
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
152
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
151
Get all the properties from UPower daemon.</p>
154
Get all the properties from UPower daemon.
152
156
<div class="variablelist"><table border="0">
153
157
<col align="left" valign="top">
156
160
<td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
157
<td> a <span class="type">UpClient</span> instance.
161
<td>a <span class="type">UpClient</span> instance.
161
165
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
162
<td> a <a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="type">GCancellable</span></a> or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
166
<td>a <a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
166
170
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
167
<td> a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
171
<td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
171
175
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
172
<td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> for success, else <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.
176
<td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> for success, else <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.
181
185
<div class="refsect2" title="up_client_enumerate_devices_sync ()">
182
186
<a name="up-client-enumerate-devices-sync"></a><h3>up_client_enumerate_devices_sync ()</h3>
183
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> up_client_enumerate_devices_sync (<span class="returnvalue">UpClient</span> *client,
184
<a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="returnvalue">GCancellable</span></a> *cancellable,
185
<a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="returnvalue">GError</span></a> **error);</pre>
187
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> up_client_enumerate_devices_sync (<em class="parameter"><code><span class="type">UpClient</span> *client</code></em>,
188
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
189
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
187
Enumerates all the devices from the daemon.</p>
191
Enumerates all the devices from the daemon.
188
193
<div class="variablelist"><table border="0">
189
194
<col align="left" valign="top">
192
197
<td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
193
<td> a <span class="type">UpClient</span> instance.
198
<td>a <span class="type">UpClient</span> instance.
197
202
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
198
<td> a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
203
<td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
202
207
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
203
<td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> for success, else <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.
208
<td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> for success, else <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.
212
217
<div class="refsect2" title="up_client_suspend_sync ()">
213
218
<a name="up-client-suspend-sync"></a><h3>up_client_suspend_sync ()</h3>
214
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> up_client_suspend_sync (<span class="returnvalue">UpClient</span> *client,
215
<a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="returnvalue">GCancellable</span></a> *cancellable,
216
<a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="returnvalue">GError</span></a> **error);</pre>
219
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> up_client_suspend_sync (<em class="parameter"><code><span class="type">UpClient</span> *client</code></em>,
220
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
221
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
218
223
Puts the computer into a low power state, but state is not preserved if the
222
NOTE: The system is still consuming a small amount of power</p>
227
NOTE: The system is still consuming a small amount of power
223
229
<div class="variablelist"><table border="0">
224
230
<col align="left" valign="top">
227
233
<td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
228
<td> a <span class="type">UpClient</span> instance.
234
<td>a <span class="type">UpClient</span> instance.
232
238
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
233
<td> a <a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="type">GCancellable</span></a> or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
239
<td>a <a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
237
243
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
238
<td> a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
244
<td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
252
258
<div class="refsect2" title="up_client_about_to_sleep_sync ()">
253
259
<a name="up-client-about-to-sleep-sync"></a><h3>up_client_about_to_sleep_sync ()</h3>
254
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> up_client_about_to_sleep_sync (<span class="returnvalue">UpClient</span> *client,
255
<a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="returnvalue">GCancellable</span></a> *cancellable,
256
<a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="returnvalue">GError</span></a> **error);</pre>
260
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> up_client_about_to_sleep_sync (<em class="parameter"><code><span class="type">UpClient</span> *client</code></em>,
261
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
262
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
258
264
Tells UPower that we are soon to reqest either <code class="function">Suspend()</code> or <code class="function">Hibernate()</code>
259
and that session and system components should be notified of this.</p>
265
and that session and system components should be notified of this.
260
267
<div class="variablelist"><table border="0">
261
268
<col align="left" valign="top">
264
271
<td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
265
<td> a <span class="type">UpClient</span> instance.
272
<td>a <span class="type">UpClient</span> instance.
269
276
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
270
<td> a <a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="type">GCancellable</span></a> or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
277
<td>a <a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
274
281
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
275
<td> a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
282
<td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
289
296
<div class="refsect2" title="up_client_hibernate_sync ()">
290
297
<a name="up-client-hibernate-sync"></a><h3>up_client_hibernate_sync ()</h3>
291
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> up_client_hibernate_sync (<span class="returnvalue">UpClient</span> *client,
292
<a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="returnvalue">GCancellable</span></a> *cancellable,
293
<a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="returnvalue">GError</span></a> **error);</pre>
298
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> up_client_hibernate_sync (<em class="parameter"><code><span class="type">UpClient</span> *client</code></em>,
299
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
300
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
295
302
Puts the computer into a low power state, where state is preserved if the
297
305
<div class="variablelist"><table border="0">
298
306
<col align="left" valign="top">
301
309
<td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
302
<td> a <span class="type">UpClient</span> instance.
310
<td>a <span class="type">UpClient</span> instance.
306
314
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
307
<td> a <a href="/usr/share/gtk-doc/html/gio/GCancellable.html"><span class="type">GCancellable</span></a> or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
315
<td>a <a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
311
319
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
312
<td> a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>.
320
<td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>.
326
334
<div class="refsect2" title="up_client_get_devices ()">
327
335
<a name="up-client-get-devices"></a><h3>up_client_get_devices ()</h3>
328
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> * up_client_get_devices (<span class="returnvalue">UpClient</span> *client);</pre>
336
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> * up_client_get_devices (<em class="parameter"><code><span class="type">UpClient</span> *client</code></em>);</pre>
330
Get a copy of the device objects.</p>
338
Get a copy of the device objects.
339
You must have called <a class="link" href="UPower-up-client.html#up-client-enumerate-devices-sync" title="up_client_enumerate_devices_sync ()"><code class="function">up_client_enumerate_devices_sync()</code></a> before calling this
331
342
<div class="variablelist"><table border="0">
332
343
<col align="left" valign="top">
335
346
<td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
336
<td> a <span class="type">UpClient</span> instance.
347
<td>a <span class="type">UpClient</span> instance.
340
351
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
341
<td> an array of <span class="type">UpDevice</span> objects, free with <a href="/usr/share/gtk-doc/html/glib/glib-Pointer-Arrays.html#g-ptr-array-unref"><code class="function">g_ptr_array_unref()</code></a>
352
<td> an array of <span class="type">UpDevice</span> objects, free with <a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#g-ptr-array-unref"><code class="function">g_ptr_array_unref()</code></a>
398
411
<div class="refsect2" title="up_client_get_lid_is_closed ()">
399
412
<a name="up-client-get-lid-is-closed"></a><h3>up_client_get_lid_is_closed ()</h3>
400
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> up_client_get_lid_is_closed (<span class="returnvalue">UpClient</span> *client);</pre>
413
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> up_client_get_lid_is_closed (<em class="parameter"><code><span class="type">UpClient</span> *client</code></em>);</pre>
402
Get whether the laptop lid is closed.</p>
415
Get whether the laptop lid is closed.
403
417
<div class="variablelist"><table border="0">
404
418
<col align="left" valign="top">
407
421
<td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
408
<td> a <span class="type">UpClient</span> instance.
422
<td>a <span class="type">UpClient</span> instance.
412
426
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
413
<td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if lid is closed or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.
427
<td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if lid is closed or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.
433
<p class="since">Since 0.9.0</p>
420
436
<div class="refsect2" title="up_client_get_can_suspend ()">
421
437
<a name="up-client-get-can-suspend"></a><h3>up_client_get_can_suspend ()</h3>
422
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> up_client_get_can_suspend (<span class="returnvalue">UpClient</span> *client);</pre>
438
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> up_client_get_can_suspend (<em class="parameter"><code><span class="type">UpClient</span> *client</code></em>);</pre>
424
Get whether the system is able to suspend.</p>
440
Get whether the system is able to suspend.
425
442
<div class="variablelist"><table border="0">
426
443
<col align="left" valign="top">
429
446
<td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
430
<td> a <span class="type">UpClient</span> instance.
447
<td>a <span class="type">UpClient</span> instance.