]> git.proxmox.com Git - systemd.git/blob - docs/gudev/html/GUdevClient.html
Imported Upstream version 220
[systemd.git] / docs / gudev / html / GUdevClient.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>GUdevClient: GUdev Reference Manual</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7 <link rel="home" href="index.html" title="GUdev Reference Manual">
8 <link rel="up" href="ref-API.html" title="API Reference">
9 <link rel="prev" href="ref-API.html" title="API Reference">
10 <link rel="next" href="GUdevDevice.html" title="GUdevDevice">
11 <meta name="generator" content="GTK-Doc V1.23 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
16 <td width="100%" align="left" class="shortcuts">
17 <a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
18 <a href="#GUdevClient.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
19 <a href="#GUdevClient.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
20 <a href="#GUdevClient.properties" class="shortcut">Properties</a></span><span id="nav_signals">  <span class="dim">|</span> 
21 <a href="#GUdevClient.signals" class="shortcut">Signals</a></span>
22 </td>
23 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
24 <td><a accesskey="u" href="ref-API.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
25 <td><a accesskey="p" href="ref-API.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
26 <td><a accesskey="n" href="GUdevDevice.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
27 </tr></table>
28 <div class="refentry">
29 <a name="GUdevClient"></a><div class="titlepage"></div>
30 <div class="refnamediv"><table width="100%"><tr>
31 <td valign="top">
32 <h2><span class="refentrytitle"><a name="GUdevClient.top_of_page"></a>GUdevClient</span></h2>
33 <p>GUdevClient — Query devices and listen to uevents</p>
34 </td>
35 <td class="gallery_image" valign="top" align="right"></td>
36 </tr></table></div>
37 <div class="refsect1">
38 <a name="GUdevClient.functions"></a><h2>Functions</h2>
39 <div class="informaltable"><table width="100%" border="0">
40 <colgroup>
41 <col width="150px" class="functions_return">
42 <col class="functions_name">
43 </colgroup>
44 <tbody>
45 <tr>
46 <td class="function_type">
47 <a class="link" href="GUdevClient.html" title="GUdevClient"><span class="returnvalue">GUdevClient</span></a> *
48 </td>
49 <td class="function_name">
50 <a class="link" href="GUdevClient.html#g-udev-client-new" title="g_udev_client_new ()">g_udev_client_new</a> <span class="c_punctuation">()</span>
51 </td>
52 </tr>
53 <tr>
54 <td class="function_type">
55 <span class="returnvalue">GList</span> *
56 </td>
57 <td class="function_name">
58 <a class="link" href="GUdevClient.html#g-udev-client-query-by-subsystem" title="g_udev_client_query_by_subsystem ()">g_udev_client_query_by_subsystem</a> <span class="c_punctuation">()</span>
59 </td>
60 </tr>
61 <tr>
62 <td class="function_type">
63 <a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="returnvalue">GUdevDevice</span></a> *
64 </td>
65 <td class="function_name">
66 <a class="link" href="GUdevClient.html#g-udev-client-query-by-device-number" title="g_udev_client_query_by_device_number ()">g_udev_client_query_by_device_number</a> <span class="c_punctuation">()</span>
67 </td>
68 </tr>
69 <tr>
70 <td class="function_type">
71 <a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="returnvalue">GUdevDevice</span></a> *
72 </td>
73 <td class="function_name">
74 <a class="link" href="GUdevClient.html#g-udev-client-query-by-device-file" title="g_udev_client_query_by_device_file ()">g_udev_client_query_by_device_file</a> <span class="c_punctuation">()</span>
75 </td>
76 </tr>
77 <tr>
78 <td class="function_type">
79 <a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="returnvalue">GUdevDevice</span></a> *
80 </td>
81 <td class="function_name">
82 <a class="link" href="GUdevClient.html#g-udev-client-query-by-sysfs-path" title="g_udev_client_query_by_sysfs_path ()">g_udev_client_query_by_sysfs_path</a> <span class="c_punctuation">()</span>
83 </td>
84 </tr>
85 <tr>
86 <td class="function_type">
87 <a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="returnvalue">GUdevDevice</span></a> *
88 </td>
89 <td class="function_name">
90 <a class="link" href="GUdevClient.html#g-udev-client-query-by-subsystem-and-name" title="g_udev_client_query_by_subsystem_and_name ()">g_udev_client_query_by_subsystem_and_name</a> <span class="c_punctuation">()</span>
91 </td>
92 </tr>
93 </tbody>
94 </table></div>
95 </div>
96 <div class="refsect1">
97 <a name="GUdevClient.properties"></a><h2>Properties</h2>
98 <div class="informaltable"><table border="0">
99 <colgroup>
100 <col width="150px" class="properties_type">
101 <col width="300px" class="properties_name">
102 <col width="200px" class="properties_flags">
103 </colgroup>
104 <tbody><tr>
105 <td class="property_type"><span class="type">GStrv</span></td>
106 <td class="property_name"><a class="link" href="GUdevClient.html#GUdevClient--subsystems" title="The “subsystems” property">subsystems</a></td>
107 <td class="property_flags">Read / Write / Construct Only</td>
108 </tr></tbody>
109 </table></div>
110 </div>
111 <div class="refsect1">
112 <a name="GUdevClient.signals"></a><h2>Signals</h2>
113 <div class="informaltable"><table border="0">
114 <colgroup>
115 <col width="150px" class="signals_return">
116 <col width="300px" class="signals_name">
117 <col width="200px" class="signals_flags">
118 </colgroup>
119 <tbody><tr>
120 <td class="signal_type"><span class="returnvalue">void</span></td>
121 <td class="signal_name"><a class="link" href="GUdevClient.html#GUdevClient-uevent" title="The “uevent” signal">uevent</a></td>
122 <td class="signal_flags">Run Last</td>
123 </tr></tbody>
124 </table></div>
125 </div>
126 <div class="refsect1">
127 <a name="GUdevClient.other"></a><h2>Types and Values</h2>
128 <div class="informaltable"><table width="100%" border="0">
129 <colgroup>
130 <col width="150px" class="name">
131 <col class="description">
132 </colgroup>
133 <tbody>
134 <tr>
135 <td class="datatype_keyword"> </td>
136 <td class="function_name"><a class="link" href="GUdevClient.html#GUdevClient-struct" title="GUdevClient">GUdevClient</a></td>
137 </tr>
138 <tr>
139 <td class="datatype_keyword">struct</td>
140 <td class="function_name"><a class="link" href="GUdevClient.html#GUdevClientClass" title="struct GUdevClientClass">GUdevClientClass</a></td>
141 </tr>
142 <tr>
143 <td class="datatype_keyword">enum</td>
144 <td class="function_name"><a class="link" href="GUdevClient.html#GUdevDeviceType" title="enum GUdevDeviceType">GUdevDeviceType</a></td>
145 </tr>
146 <tr>
147 <td class="typedef_keyword">typedef</td>
148 <td class="function_name"><a class="link" href="GUdevClient.html#GUdevDeviceNumber" title="GUdevDeviceNumber">GUdevDeviceNumber</a></td>
149 </tr>
150 </tbody>
151 </table></div>
152 </div>
153 <div class="refsect1">
154 <a name="GUdevClient.object-hierarchy"></a><h2>Object Hierarchy</h2>
155 <pre class="screen"> GEnum
156 <span class="lineart">╰──</span> GUdevDeviceType
157 GObject
158 <span class="lineart">╰──</span> GUdevClient
159 </pre>
160 </div>
161 <div class="refsect1">
162 <a name="GUdevClient.description"></a><h2>Description</h2>
163 <p><a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a> is used to query information about devices on a Linux
164 system from the Linux kernel and the udev device
165 manager.</p>
166 <p>Device information is retrieved from the kernel (through the
167 <code class="literal">sysfs</code> filesystem) and the udev daemon (through a
168 <code class="literal">tmpfs</code> filesystem) and presented through
169 <a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="type">GUdevDevice</span></a> objects. This means that no blocking IO ever happens
170 (in both cases, we are essentially just reading data from kernel
171 memory) and as such there are no asynchronous versions of the
172 provided methods.</p>
173 <p>To get <a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="type">GUdevDevice</span></a> objects, use
174 <a class="link" href="GUdevClient.html#g-udev-client-query-by-subsystem" title="g_udev_client_query_by_subsystem ()"><code class="function">g_udev_client_query_by_subsystem()</code></a>,
175 <a class="link" href="GUdevClient.html#g-udev-client-query-by-device-number" title="g_udev_client_query_by_device_number ()"><code class="function">g_udev_client_query_by_device_number()</code></a>,
176 <a class="link" href="GUdevClient.html#g-udev-client-query-by-device-file" title="g_udev_client_query_by_device_file ()"><code class="function">g_udev_client_query_by_device_file()</code></a>,
177 <a class="link" href="GUdevClient.html#g-udev-client-query-by-sysfs-path" title="g_udev_client_query_by_sysfs_path ()"><code class="function">g_udev_client_query_by_sysfs_path()</code></a>,
178 <a class="link" href="GUdevClient.html#g-udev-client-query-by-subsystem-and-name" title="g_udev_client_query_by_subsystem_and_name ()"><code class="function">g_udev_client_query_by_subsystem_and_name()</code></a>
179 or the <a class="link" href="GUdevEnumerator.html" title="GUdevEnumerator"><span class="type">GUdevEnumerator</span></a> type.</p>
180 <p>To listen to uevents, connect to the <a class="link" href="GUdevClient.html#GUdevClient-uevent" title="The “uevent” signal"><span class="type">“uevent”</span></a> signal.</p>
181 </div>
182 <div class="refsect1">
183 <a name="GUdevClient.functions_details"></a><h2>Functions</h2>
184 <div class="refsect2">
185 <a name="g-udev-client-new"></a><h3>g_udev_client_new ()</h3>
186 <pre class="programlisting"><a class="link" href="GUdevClient.html" title="GUdevClient"><span class="returnvalue">GUdevClient</span></a> *
187 g_udev_client_new (<em class="parameter"><code>const <span class="type">gchar</span> * const *subsystems</code></em>);</pre>
188 <p>Constructs a <a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a> object that can be used to query
189 information about devices. Connect to the <a class="link" href="GUdevClient.html#GUdevClient-uevent" title="The “uevent” signal"><span class="type">“uevent”</span></a>
190 signal to listen for uevents. Note that signals are emitted in the</p>
191 thread-default main loop<p>of the thread that you call this constructor from.</p>
192 <div class="refsect3">
193 <a name="id-1.2.2.9.2.7"></a><h4>Parameters</h4>
194 <div class="informaltable"><table width="100%" border="0">
195 <colgroup>
196 <col width="150px" class="parameters_name">
197 <col class="parameters_description">
198 <col width="200px" class="parameters_annotations">
199 </colgroup>
200 <tbody><tr>
201 <td class="parameter_name"><p>subsystems</p></td>
202 <td class="parameter_description"><p> A <code class="literal">NULL</code> terminated string array of subsystems to listen for uevents on, <code class="literal">NULL</code> to not listen on uevents at all, or an empty array to listen to uevents on all subsystems. See the documentation for the <a class="link" href="GUdevClient.html#GUdevClient--subsystems" title="The “subsystems” property"><span class="type">“subsystems”</span></a> property for details on this parameter. </p></td>
203 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
204 </tr></tbody>
205 </table></div>
206 </div>
207 <div class="refsect3">
208 <a name="id-1.2.2.9.2.8"></a><h4>Returns</h4>
209 <p> A new <a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a> object. Free with <code class="function">g_object_unref()</code>.</p>
210 </div>
211 </div>
212 <hr>
213 <div class="refsect2">
214 <a name="g-udev-client-query-by-subsystem"></a><h3>g_udev_client_query_by_subsystem ()</h3>
215 <pre class="programlisting"><span class="returnvalue">GList</span> *
216 g_udev_client_query_by_subsystem (<em class="parameter"><code><a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a> *client</code></em>,
217 <em class="parameter"><code>const <span class="type">gchar</span> *subsystem</code></em>);</pre>
218 <p>Gets all devices belonging to <em class="parameter"><code>subsystem</code></em>
219 .</p>
220 <div class="refsect3">
221 <a name="id-1.2.2.9.3.5"></a><h4>Parameters</h4>
222 <div class="informaltable"><table width="100%" border="0">
223 <colgroup>
224 <col width="150px" class="parameters_name">
225 <col class="parameters_description">
226 <col width="200px" class="parameters_annotations">
227 </colgroup>
228 <tbody>
229 <tr>
230 <td class="parameter_name"><p>client</p></td>
231 <td class="parameter_description"><p>A <a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a>.</p></td>
232 <td class="parameter_annotations"> </td>
233 </tr>
234 <tr>
235 <td class="parameter_name"><p>subsystem</p></td>
236 <td class="parameter_description"><p> The subsystem to get devices for or <code class="literal">NULL</code> to get all devices. </p></td>
237 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
238 </tr>
239 </tbody>
240 </table></div>
241 </div>
242 <div class="refsect3">
243 <a name="id-1.2.2.9.3.6"></a><h4>Returns</h4>
244 <p> A
245 list of <a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="type">GUdevDevice</span></a> objects. The caller should free the result by
246 using <code class="function">g_object_unref()</code> on each element in the list and then
247 <code class="function">g_list_free()</code> on the list. </p>
248 <p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GUdevDevice][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
249 </div>
250 </div>
251 <hr>
252 <div class="refsect2">
253 <a name="g-udev-client-query-by-device-number"></a><h3>g_udev_client_query_by_device_number ()</h3>
254 <pre class="programlisting"><a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="returnvalue">GUdevDevice</span></a> *
255 g_udev_client_query_by_device_number (<em class="parameter"><code><a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a> *client</code></em>,
256 <em class="parameter"><code><a class="link" href="GUdevClient.html#GUdevDeviceType" title="enum GUdevDeviceType"><span class="type">GUdevDeviceType</span></a> type</code></em>,
257 <em class="parameter"><code><a class="link" href="GUdevClient.html#GUdevDeviceNumber" title="GUdevDeviceNumber"><span class="type">GUdevDeviceNumber</span></a> number</code></em>);</pre>
258 <p>Looks up a device for a type and device number.</p>
259 <div class="refsect3">
260 <a name="id-1.2.2.9.4.5"></a><h4>Parameters</h4>
261 <div class="informaltable"><table width="100%" border="0">
262 <colgroup>
263 <col width="150px" class="parameters_name">
264 <col class="parameters_description">
265 <col width="200px" class="parameters_annotations">
266 </colgroup>
267 <tbody>
268 <tr>
269 <td class="parameter_name"><p>client</p></td>
270 <td class="parameter_description"><p>A <a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a>.</p></td>
271 <td class="parameter_annotations"> </td>
272 </tr>
273 <tr>
274 <td class="parameter_name"><p>type</p></td>
275 <td class="parameter_description"><p>A value from the <a class="link" href="GUdevClient.html#GUdevDeviceType" title="enum GUdevDeviceType"><span class="type">GUdevDeviceType</span></a> enumeration.</p></td>
276 <td class="parameter_annotations"> </td>
277 </tr>
278 <tr>
279 <td class="parameter_name"><p>number</p></td>
280 <td class="parameter_description"><p>A device number.</p></td>
281 <td class="parameter_annotations"> </td>
282 </tr>
283 </tbody>
284 </table></div>
285 </div>
286 <div class="refsect3">
287 <a name="id-1.2.2.9.4.6"></a><h4>Returns</h4>
288 <p> A <a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="type">GUdevDevice</span></a> object or <code class="literal">NULL</code>
289 if the device was not found. Free with <code class="function">g_object_unref()</code>. </p>
290 <p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
291 </div>
292 </div>
293 <hr>
294 <div class="refsect2">
295 <a name="g-udev-client-query-by-device-file"></a><h3>g_udev_client_query_by_device_file ()</h3>
296 <pre class="programlisting"><a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="returnvalue">GUdevDevice</span></a> *
297 g_udev_client_query_by_device_file (<em class="parameter"><code><a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a> *client</code></em>,
298 <em class="parameter"><code>const <span class="type">gchar</span> *device_file</code></em>);</pre>
299 <p>Looks up a device for a device file.</p>
300 <div class="refsect3">
301 <a name="id-1.2.2.9.5.5"></a><h4>Parameters</h4>
302 <div class="informaltable"><table width="100%" border="0">
303 <colgroup>
304 <col width="150px" class="parameters_name">
305 <col class="parameters_description">
306 <col width="200px" class="parameters_annotations">
307 </colgroup>
308 <tbody>
309 <tr>
310 <td class="parameter_name"><p>client</p></td>
311 <td class="parameter_description"><p>A <a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a>.</p></td>
312 <td class="parameter_annotations"> </td>
313 </tr>
314 <tr>
315 <td class="parameter_name"><p>device_file</p></td>
316 <td class="parameter_description"><p>A device file.</p></td>
317 <td class="parameter_annotations"> </td>
318 </tr>
319 </tbody>
320 </table></div>
321 </div>
322 <div class="refsect3">
323 <a name="id-1.2.2.9.5.6"></a><h4>Returns</h4>
324 <p> A <a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="type">GUdevDevice</span></a> object or <code class="literal">NULL</code>
325 if the device was not found. Free with <code class="function">g_object_unref()</code>. </p>
326 <p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
327 </div>
328 </div>
329 <hr>
330 <div class="refsect2">
331 <a name="g-udev-client-query-by-sysfs-path"></a><h3>g_udev_client_query_by_sysfs_path ()</h3>
332 <pre class="programlisting"><a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="returnvalue">GUdevDevice</span></a> *
333 g_udev_client_query_by_sysfs_path (<em class="parameter"><code><a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a> *client</code></em>,
334 <em class="parameter"><code>const <span class="type">gchar</span> *sysfs_path</code></em>);</pre>
335 <p>Looks up a device for a sysfs path.</p>
336 <div class="refsect3">
337 <a name="id-1.2.2.9.6.5"></a><h4>Parameters</h4>
338 <div class="informaltable"><table width="100%" border="0">
339 <colgroup>
340 <col width="150px" class="parameters_name">
341 <col class="parameters_description">
342 <col width="200px" class="parameters_annotations">
343 </colgroup>
344 <tbody>
345 <tr>
346 <td class="parameter_name"><p>client</p></td>
347 <td class="parameter_description"><p>A <a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a>.</p></td>
348 <td class="parameter_annotations"> </td>
349 </tr>
350 <tr>
351 <td class="parameter_name"><p>sysfs_path</p></td>
352 <td class="parameter_description"><p>A sysfs path.</p></td>
353 <td class="parameter_annotations"> </td>
354 </tr>
355 </tbody>
356 </table></div>
357 </div>
358 <div class="refsect3">
359 <a name="id-1.2.2.9.6.6"></a><h4>Returns</h4>
360 <p> A <a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="type">GUdevDevice</span></a> object or <code class="literal">NULL</code>
361 if the device was not found. Free with <code class="function">g_object_unref()</code>. </p>
362 <p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
363 </div>
364 </div>
365 <hr>
366 <div class="refsect2">
367 <a name="g-udev-client-query-by-subsystem-and-name"></a><h3>g_udev_client_query_by_subsystem_and_name ()</h3>
368 <pre class="programlisting"><a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="returnvalue">GUdevDevice</span></a> *
369 g_udev_client_query_by_subsystem_and_name
370 (<em class="parameter"><code><a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a> *client</code></em>,
371 <em class="parameter"><code>const <span class="type">gchar</span> *subsystem</code></em>,
372 <em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);</pre>
373 <p>Looks up a device for a subsystem and name.</p>
374 <div class="refsect3">
375 <a name="id-1.2.2.9.7.5"></a><h4>Parameters</h4>
376 <div class="informaltable"><table width="100%" border="0">
377 <colgroup>
378 <col width="150px" class="parameters_name">
379 <col class="parameters_description">
380 <col width="200px" class="parameters_annotations">
381 </colgroup>
382 <tbody>
383 <tr>
384 <td class="parameter_name"><p>client</p></td>
385 <td class="parameter_description"><p>A <a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a>.</p></td>
386 <td class="parameter_annotations"> </td>
387 </tr>
388 <tr>
389 <td class="parameter_name"><p>subsystem</p></td>
390 <td class="parameter_description"><p>A subsystem name.</p></td>
391 <td class="parameter_annotations"> </td>
392 </tr>
393 <tr>
394 <td class="parameter_name"><p>name</p></td>
395 <td class="parameter_description"><p>The name of the device.</p></td>
396 <td class="parameter_annotations"> </td>
397 </tr>
398 </tbody>
399 </table></div>
400 </div>
401 <div class="refsect3">
402 <a name="id-1.2.2.9.7.6"></a><h4>Returns</h4>
403 <p> A <a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="type">GUdevDevice</span></a> object or <code class="literal">NULL</code>
404 if the device was not found. Free with <code class="function">g_object_unref()</code>. </p>
405 <p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
406 </div>
407 </div>
408 </div>
409 <div class="refsect1">
410 <a name="GUdevClient.other_details"></a><h2>Types and Values</h2>
411 <div class="refsect2">
412 <a name="GUdevClient-struct"></a><h3>GUdevClient</h3>
413 <pre class="programlisting">typedef struct _GUdevClient GUdevClient;</pre>
414 <p>The <a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a> struct is opaque and should not be accessed directly.</p>
415 </div>
416 <hr>
417 <div class="refsect2">
418 <a name="GUdevClientClass"></a><h3>struct GUdevClientClass</h3>
419 <pre class="programlisting">struct GUdevClientClass {
420 GObjectClass parent_class;
421
422 /* signals */
423 void (*uevent) (GUdevClient *client,
424 const gchar *action,
425 GUdevDevice *device);
426 };
427 </pre>
428 <p>Class structure for <a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a>.</p>
429 <div class="refsect3">
430 <a name="id-1.2.2.10.3.5"></a><h4>Members</h4>
431 <div class="informaltable"><table width="100%" border="0">
432 <colgroup>
433 <col width="300px" class="struct_members_name">
434 <col class="struct_members_description">
435 <col width="200px" class="struct_members_annotations">
436 </colgroup>
437 <tbody>
438 <tr>
439 <td class="struct_member_name"><p><span class="type">GObjectClass</span> <em class="structfield"><code><a name="GUdevClientClass.parent-class"></a>parent_class</code></em>;</p></td>
440 <td class="struct_member_description"><p>Parent class.</p></td>
441 <td class="struct_member_annotations"> </td>
442 </tr>
443 <tr>
444 <td class="struct_member_name"><p><em class="structfield"><code><a name="GUdevClientClass.uevent"></a>uevent</code></em> ()</p></td>
445 <td class="struct_member_description"><p>Signal class handler for the <a class="link" href="GUdevClient.html#GUdevClient-uevent" title="The “uevent” signal"><span class="type">“uevent”</span></a> signal.</p></td>
446 <td class="struct_member_annotations"> </td>
447 </tr>
448 </tbody>
449 </table></div>
450 </div>
451 </div>
452 <hr>
453 <div class="refsect2">
454 <a name="GUdevDeviceType"></a><h3>enum GUdevDeviceType</h3>
455 <p>Enumeration used to specify a the type of a device.</p>
456 <div class="refsect3">
457 <a name="id-1.2.2.10.4.4"></a><h4>Members</h4>
458 <div class="informaltable"><table width="100%" border="0">
459 <colgroup>
460 <col width="300px" class="enum_members_name">
461 <col class="enum_members_description">
462 <col width="200px" class="enum_members_annotations">
463 </colgroup>
464 <tbody>
465 <tr>
466 <td class="enum_member_name"><p><a name="G-UDEV-DEVICE-TYPE-NONE:CAPS"></a>G_UDEV_DEVICE_TYPE_NONE</p></td>
467 <td class="enum_member_description">
468 <p>Device does not have a device file.</p>
469 </td>
470 <td class="enum_member_annotations"> </td>
471 </tr>
472 <tr>
473 <td class="enum_member_name"><p><a name="G-UDEV-DEVICE-TYPE-BLOCK:CAPS"></a>G_UDEV_DEVICE_TYPE_BLOCK</p></td>
474 <td class="enum_member_description">
475 <p>Device is a block device.</p>
476 </td>
477 <td class="enum_member_annotations"> </td>
478 </tr>
479 <tr>
480 <td class="enum_member_name"><p><a name="G-UDEV-DEVICE-TYPE-CHAR:CAPS"></a>G_UDEV_DEVICE_TYPE_CHAR</p></td>
481 <td class="enum_member_description">
482 <p>Device is a character device.</p>
483 </td>
484 <td class="enum_member_annotations"> </td>
485 </tr>
486 </tbody>
487 </table></div>
488 </div>
489 </div>
490 <hr>
491 <div class="refsect2">
492 <a name="GUdevDeviceNumber"></a><h3>GUdevDeviceNumber</h3>
493 <pre class="programlisting">typedef guint64 GUdevDeviceNumber; /* __UQUAD_TYPE */
494 </pre>
495 <p>Corresponds to the standard <span class="type">dev_t</span> type as defined by POSIX (Until
496 bug 584517 is resolved this work-around is needed).</p>
497 </div>
498 </div>
499 <div class="refsect1">
500 <a name="GUdevClient.property-details"></a><h2>Property Details</h2>
501 <div class="refsect2">
502 <a name="GUdevClient--subsystems"></a><h3>The <code class="literal">“subsystems”</code> property</h3>
503 <pre class="programlisting"> “subsystems” <span class="type">GStrv</span></pre>
504 <p>The subsystems to listen for uevents on.</p>
505 <p>To listen for only a specific DEVTYPE for a given SUBSYSTEM, use
506 "subsystem/devtype". For example, to only listen for uevents
507 where SUBSYSTEM is usb and DEVTYPE is usb_interface, use
508 "usb/usb_interface".</p>
509 <p>If this property is <code class="literal">NULL</code>, then no events will be reported. If
510 it's the empty array, events from all subsystems will be
511 reported.</p>
512 <p>Flags: Read / Write / Construct Only</p>
513 </div>
514 </div>
515 <div class="refsect1">
516 <a name="GUdevClient.signal-details"></a><h2>Signal Details</h2>
517 <div class="refsect2">
518 <a name="GUdevClient-uevent"></a><h3>The <code class="literal">“uevent”</code> signal</h3>
519 <pre class="programlisting"><span class="returnvalue">void</span>
520 user_function (<a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a> *client,
521 <span class="type">gchar</span> *action,
522 <a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="type">GUdevDevice</span></a> *device,
523 <span class="type">gpointer</span> user_data)</pre>
524 <p>Emitted when <em class="parameter"><code>client</code></em>
525 receives an uevent.</p>
526 <p>This signal is emitted in the</p>
527 thread-default main loop<p>of the thread that <em class="parameter"><code>client</code></em>
528 was created in.</p>
529 <div class="refsect3">
530 <a name="id-1.2.2.12.2.8"></a><h4>Parameters</h4>
531 <div class="informaltable"><table width="100%" border="0">
532 <colgroup>
533 <col width="150px" class="parameters_name">
534 <col class="parameters_description">
535 <col width="200px" class="parameters_annotations">
536 </colgroup>
537 <tbody>
538 <tr>
539 <td class="parameter_name"><p>client</p></td>
540 <td class="parameter_description"><p>The <a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a> receiving the event.</p></td>
541 <td class="parameter_annotations"> </td>
542 </tr>
543 <tr>
544 <td class="parameter_name"><p>action</p></td>
545 <td class="parameter_description"><p>The action for the uevent e.g. "add", "remove", "change", "move", etc.</p></td>
546 <td class="parameter_annotations"> </td>
547 </tr>
548 <tr>
549 <td class="parameter_name"><p>device</p></td>
550 <td class="parameter_description"><p>Details about the <a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="type">GUdevDevice</span></a> the event is for.</p></td>
551 <td class="parameter_annotations"> </td>
552 </tr>
553 <tr>
554 <td class="parameter_name"><p>user_data</p></td>
555 <td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
556 <td class="parameter_annotations"> </td>
557 </tr>
558 </tbody>
559 </table></div>
560 </div>
561 <p>Flags: Run Last</p>
562 </div>
563 </div>
564 </div>
565 <div class="footer">
566 <hr>Generated by GTK-Doc V1.23</div>
567 </body>
568 </html>