1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<title>up-types</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7
<link rel="home" href="index.html" title="UPower Reference Manual">
8
<link rel="up" href="libupower-glib-helpers.html" title="libupower-glib helpers">
9
<link rel="prev" href="libupower-glib-helpers.html" title="libupower-glib helpers">
10
<link rel="next" href="tools-fileformats.html" title="Manual Pages">
11
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
12
<link rel="stylesheet" href="style.css" type="text/css">
13
<link rel="reference" href="ref-dbus.html" title="D-Bus API Reference">
14
<link rel="reference" href="libupower-glib.html" title="libpackagekit GObjects">
15
<link rel="reference" href="libupower-glib-helpers.html" title="libupower-glib helpers">
16
<link rel="reference" href="tools-fileformats.html" title="Manual Pages">
17
<link rel="index" href="ix01.html" title="Index">
18
<link rel="appendix" href="license.html" title="Appendix A. License">
20
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
21
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
23
<td><a accesskey="p" href="libupower-glib-helpers.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
24
<td><a accesskey="u" href="libupower-glib-helpers.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
25
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
26
<th width="100%" align="center">UPower Reference Manual</th>
27
<td><a accesskey="n" href="tools-fileformats.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
29
<tr><td colspan="5" class="shortcuts">
30
<a href="#UPower-up-types.synopsis" class="shortcut">Top</a>
32
<a href="#UPower-up-types.description" class="shortcut">Description</a>
35
<div class="refentry" title="up-types">
36
<a name="UPower-up-types"></a><div class="titlepage"></div>
37
<div class="refnamediv"><table width="100%"><tr>
39
<h2><span class="refentrytitle"><a name="UPower-up-types.top_of_page"></a>up-types</span></h2>
40
<p>up-types — Types used by UPower and libupower-glib</p>
42
<td valign="top" align="right"></td>
44
<div class="refsynopsisdiv" title="Synopsis">
45
<a name="UPower-up-types.synopsis"></a><h2>Synopsis</h2>
46
<pre class="synopsis">
47
enum <a class="link" href="UPower-up-types.html#UpDeviceKind" title="enum UpDeviceKind">UpDeviceKind</a>;
48
enum <a class="link" href="UPower-up-types.html#UpDeviceState" title="enum UpDeviceState">UpDeviceState</a>;
49
enum <a class="link" href="UPower-up-types.html#UpDeviceTechnology" title="enum UpDeviceTechnology">UpDeviceTechnology</a>;
50
enum <a class="link" href="UPower-up-types.html#UpQosKind" title="enum UpQosKind">UpQosKind</a>;
52
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
53
>gchar</a> * <a class="link" href="UPower-up-types.html#up-device-kind-to-string" title="up_device_kind_to_string ()">up_device_kind_to_string</a> (<a class="link" href="UPower-up-types.html#UpDeviceKind" title="enum UpDeviceKind">UpDeviceKind</a> type_enum);
55
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
56
>gchar</a> * <a class="link" href="UPower-up-types.html#up-device-state-to-string" title="up_device_state_to_string ()">up_device_state_to_string</a> (<a class="link" href="UPower-up-types.html#UpDeviceState" title="enum UpDeviceState">UpDeviceState</a> state_enum);
58
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
59
>gchar</a> * <a class="link" href="UPower-up-types.html#up-device-technology-to-string" title="up_device_technology_to_string ()">up_device_technology_to_string</a> (<a class="link" href="UPower-up-types.html#UpDeviceTechnology" title="enum UpDeviceTechnology">UpDeviceTechnology</a> technology_enum);
60
<a class="link" href="UPower-up-types.html#UpDeviceKind" title="enum UpDeviceKind">UpDeviceKind</a> <a class="link" href="UPower-up-types.html#up-device-kind-from-string" title="up_device_kind_from_string ()">up_device_kind_from_string</a> (const <a
61
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
63
<a class="link" href="UPower-up-types.html#UpDeviceState" title="enum UpDeviceState">UpDeviceState</a> <a class="link" href="UPower-up-types.html#up-device-state-from-string" title="up_device_state_from_string ()">up_device_state_from_string</a> (const <a
64
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
66
<a class="link" href="UPower-up-types.html#UpDeviceTechnology" title="enum UpDeviceTechnology">UpDeviceTechnology</a> <a class="link" href="UPower-up-types.html#up-device-technology-from-string" title="up_device_technology_from_string ()">up_device_technology_from_string</a> (const <a
67
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
68
>gchar</a> *technology);
70
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
71
>gchar</a> * <a class="link" href="UPower-up-types.html#up-qos-kind-to-string" title="up_qos_kind_to_string ()">up_qos_kind_to_string</a> (<a class="link" href="UPower-up-types.html#UpQosKind" title="enum UpQosKind">UpQosKind</a> type);
72
<a class="link" href="UPower-up-types.html#UpQosKind" title="enum UpQosKind">UpQosKind</a> <a class="link" href="UPower-up-types.html#up-qos-kind-from-string" title="up_qos_kind_from_string ()">up_qos_kind_from_string</a> (const <a
73
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
77
<div class="refsect1" title="Description">
78
<a name="UPower-up-types.description"></a><h2>Description</h2>
80
These helper functions provide a way to marshal enumerated values to
84
See also: <span class="type">UpClient</span>, <span class="type">UpDevice</span></p>
86
<div class="refsect1" title="Details">
87
<a name="UPower-up-types.details"></a><h2>Details</h2>
88
<div class="refsect2" title="enum UpDeviceKind">
89
<a name="UpDeviceKind"></a><h3>enum UpDeviceKind</h3>
90
<pre class="programlisting">typedef enum {
91
UP_DEVICE_KIND_UNKNOWN,
92
UP_DEVICE_KIND_LINE_POWER,
93
UP_DEVICE_KIND_BATTERY,
95
UP_DEVICE_KIND_MONITOR,
97
UP_DEVICE_KIND_KEYBOARD,
107
<div class="refsect2" title="enum UpDeviceState">
108
<a name="UpDeviceState"></a><h3>enum UpDeviceState</h3>
109
<pre class="programlisting">typedef enum {
110
UP_DEVICE_STATE_UNKNOWN,
111
UP_DEVICE_STATE_CHARGING,
112
UP_DEVICE_STATE_DISCHARGING,
113
UP_DEVICE_STATE_EMPTY,
114
UP_DEVICE_STATE_FULLY_CHARGED,
115
UP_DEVICE_STATE_PENDING_CHARGE,
116
UP_DEVICE_STATE_PENDING_DISCHARGE,
121
The device state.</p>
124
<div class="refsect2" title="enum UpDeviceTechnology">
125
<a name="UpDeviceTechnology"></a><h3>enum UpDeviceTechnology</h3>
126
<pre class="programlisting">typedef enum {
127
UP_DEVICE_TECHNOLOGY_UNKNOWN,
128
UP_DEVICE_TECHNOLOGY_LITHIUM_ION,
129
UP_DEVICE_TECHNOLOGY_LITHIUM_POLYMER,
130
UP_DEVICE_TECHNOLOGY_LITHIUM_IRON_PHOSPHATE,
131
UP_DEVICE_TECHNOLOGY_LEAD_ACID,
132
UP_DEVICE_TECHNOLOGY_NICKEL_CADMIUM,
133
UP_DEVICE_TECHNOLOGY_NICKEL_METAL_HYDRIDE,
134
UP_DEVICE_TECHNOLOGY_LAST
135
} UpDeviceTechnology;
138
The device technology.</p>
141
<div class="refsect2" title="enum UpQosKind">
142
<a name="UpQosKind"></a><h3>enum UpQosKind</h3>
143
<pre class="programlisting">typedef enum {
151
The type of QOS request.</p>
154
<div class="refsect2" title="up_device_kind_to_string ()">
155
<a name="up-device-kind-to-string"></a><h3>up_device_kind_to_string ()</h3>
156
<pre class="programlisting">const <a
157
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
158
>gchar</a> * up_device_kind_to_string (<a class="link" href="UPower-up-types.html#UpDeviceKind" title="enum UpDeviceKind">UpDeviceKind</a> type_enum);</pre>
160
Converts a <a class="link" href="UPower-up-types.html#UpDeviceKind" title="enum UpDeviceKind"><span class="type">UpDeviceKind</span></a> to a string.</p>
161
<div class="variablelist"><table border="0">
162
<col align="left" valign="top">
164
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
165
<td> identifier string
170
<p class="since">Since 0.9.0</p>
173
<div class="refsect2" title="up_device_state_to_string ()">
174
<a name="up-device-state-to-string"></a><h3>up_device_state_to_string ()</h3>
175
<pre class="programlisting">const <a
176
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
177
>gchar</a> * up_device_state_to_string (<a class="link" href="UPower-up-types.html#UpDeviceState" title="enum UpDeviceState">UpDeviceState</a> state_enum);</pre>
179
Converts a <a class="link" href="UPower-up-types.html#UpDeviceState" title="enum UpDeviceState"><span class="type">UpDeviceState</span></a> to a string.</p>
180
<div class="variablelist"><table border="0">
181
<col align="left" valign="top">
183
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
184
<td> identifier string
189
<p class="since">Since 0.9.0</p>
192
<div class="refsect2" title="up_device_technology_to_string ()">
193
<a name="up-device-technology-to-string"></a><h3>up_device_technology_to_string ()</h3>
194
<pre class="programlisting">const <a
195
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
196
>gchar</a> * up_device_technology_to_string (<a class="link" href="UPower-up-types.html#UpDeviceTechnology" title="enum UpDeviceTechnology">UpDeviceTechnology</a> technology_enum);</pre>
198
Converts a <a class="link" href="UPower-up-types.html#UpDeviceTechnology" title="enum UpDeviceTechnology"><span class="type">UpDeviceTechnology</span></a> to a string.</p>
199
<div class="variablelist"><table border="0">
200
<col align="left" valign="top">
202
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
203
<td> identifier string
208
<p class="since">Since 0.9.0</p>
211
<div class="refsect2" title="up_device_kind_from_string ()">
212
<a name="up-device-kind-from-string"></a><h3>up_device_kind_from_string ()</h3>
213
<pre class="programlisting"><a class="link" href="UPower-up-types.html#UpDeviceKind" title="enum UpDeviceKind">UpDeviceKind</a> up_device_kind_from_string (const <a
214
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
215
>gchar</a> *type);</pre>
217
Converts a string to a <a class="link" href="UPower-up-types.html#UpDeviceKind" title="enum UpDeviceKind"><span class="type">UpDeviceKind</span></a>.</p>
218
<div class="variablelist"><table border="0">
219
<col align="left" valign="top">
221
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
222
<td> enumerated value
227
<p class="since">Since 0.9.0</p>
230
<div class="refsect2" title="up_device_state_from_string ()">
231
<a name="up-device-state-from-string"></a><h3>up_device_state_from_string ()</h3>
232
<pre class="programlisting"><a class="link" href="UPower-up-types.html#UpDeviceState" title="enum UpDeviceState">UpDeviceState</a> up_device_state_from_string (const <a
233
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
234
>gchar</a> *state);</pre>
236
Converts a string to a <a class="link" href="UPower-up-types.html#UpDeviceState" title="enum UpDeviceState"><span class="type">UpDeviceState</span></a>.</p>
237
<div class="variablelist"><table border="0">
238
<col align="left" valign="top">
240
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
241
<td> enumerated value
246
<p class="since">Since 0.9.0</p>
249
<div class="refsect2" title="up_device_technology_from_string ()">
250
<a name="up-device-technology-from-string"></a><h3>up_device_technology_from_string ()</h3>
251
<pre class="programlisting"><a class="link" href="UPower-up-types.html#UpDeviceTechnology" title="enum UpDeviceTechnology">UpDeviceTechnology</a> up_device_technology_from_string (const <a
252
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
253
>gchar</a> *technology);</pre>
255
Converts a string to a <a class="link" href="UPower-up-types.html#UpDeviceTechnology" title="enum UpDeviceTechnology"><span class="type">UpDeviceTechnology</span></a>.</p>
256
<div class="variablelist"><table border="0">
257
<col align="left" valign="top">
259
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
260
<td> enumerated value
265
<p class="since">Since 0.9.0</p>
268
<div class="refsect2" title="up_qos_kind_to_string ()">
269
<a name="up-qos-kind-to-string"></a><h3>up_qos_kind_to_string ()</h3>
270
<pre class="programlisting">const <a
271
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
272
>gchar</a> * up_qos_kind_to_string (<a class="link" href="UPower-up-types.html#UpQosKind" title="enum UpQosKind">UpQosKind</a> type);</pre>
274
Converts a <a class="link" href="UPower-up-types.html#UpQosKind" title="enum UpQosKind"><span class="type">UpQosKind</span></a> to a string.</p>
275
<div class="variablelist"><table border="0">
276
<col align="left" valign="top">
278
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
279
<td> identifier string
284
<p class="since">Since 0.9.0</p>
287
<div class="refsect2" title="up_qos_kind_from_string ()">
288
<a name="up-qos-kind-from-string"></a><h3>up_qos_kind_from_string ()</h3>
289
<pre class="programlisting"><a class="link" href="UPower-up-types.html#UpQosKind" title="enum UpQosKind">UpQosKind</a> up_qos_kind_from_string (const <a
290
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
291
>gchar</a> *type);</pre>
293
Converts a string to a <a class="link" href="UPower-up-types.html#UpQosKind" title="enum UpQosKind"><span class="type">UpQosKind</span></a>.</p>
294
<div class="variablelist"><table border="0">
295
<col align="left" valign="top">
297
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
298
<td> enumerated value
303
<p class="since">Since 0.9.0</p>
309
Generated by GTK-Doc V1.11</div>