ae5c6467cc043df5a5ab9c1885fd859b24c7836a
[external/udev.git] / extras / gudev / docs / 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</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
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.15 (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="2">
16 <tr valign="middle">
17 <td><a accesskey="p" href="ref-API.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="ref-API.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">GUDev Reference Manual</th>
21 <td><a accesskey="n" href="GUdevDevice.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22 </tr>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#GUdevClient.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#GUdevClient.description" class="shortcut">Description</a>
27                    | 
28                   <a href="#GUdevClient.object-hierarchy" class="shortcut">Object Hierarchy</a>
29                    | 
30                   <a href="#GUdevClient.properties" class="shortcut">Properties</a>
31                    | 
32                   <a href="#GUdevClient.signals" class="shortcut">Signals</a>
33 </td></tr>
34 </table>
35 <div class="refentry" title="GUdevClient">
36 <a name="GUdevClient"></a><div class="titlepage"></div>
37 <div class="refnamediv"><table width="100%"><tr>
38 <td valign="top">
39 <h2><span class="refentrytitle"><a name="GUdevClient.top_of_page"></a>GUdevClient</span></h2>
40 <p>GUdevClient — Query devices and listen to uevents</p>
41 </td>
42 <td valign="top" align="right"></td>
43 </tr></table></div>
44 <div class="refsynopsisdiv" title="Synopsis">
45 <a name="GUdevClient.synopsis"></a><h2>Synopsis</h2>
46 <pre class="synopsis">                    <a class="link" href="GUdevClient.html#GUdevClient-struct" title="GUdevClient">GUdevClient</a>;
47                     <a class="link" href="GUdevClient.html#GUdevClientClass" title="GUdevClientClass">GUdevClientClass</a>;
48 enum                <a class="link" href="GUdevClient.html#GUdevDeviceType" title="enum GUdevDeviceType">GUdevDeviceType</a>;
49 typedef             <a class="link" href="GUdevClient.html#GUdevDeviceNumber" title="GUdevDeviceNumber">GUdevDeviceNumber</a>;
50 <a class="link" href="GUdevClient.html" title="GUdevClient"><span class="returnvalue">GUdevClient</span></a> *       <a class="link" href="GUdevClient.html#g-udev-client-new" title="g_udev_client_new ()">g_udev_client_new</a>                   (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> * const *subsystems</code></em>);
51 <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *             <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>    (<em class="parameter"><code><a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a> *client</code></em>,
52                                                          <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *subsystem</code></em>);
53 <a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="returnvalue">GUdevDevice</span></a> *       <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>
54                                                         (<em class="parameter"><code><a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a> *client</code></em>,
55                                                          <em class="parameter"><code><a class="link" href="GUdevClient.html#GUdevDeviceType" title="enum GUdevDeviceType"><span class="type">GUdevDeviceType</span></a> type</code></em>,
56                                                          <em class="parameter"><code><a class="link" href="GUdevClient.html#GUdevDeviceNumber" title="GUdevDeviceNumber"><span class="type">GUdevDeviceNumber</span></a> number</code></em>);
57 <a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="returnvalue">GUdevDevice</span></a> *       <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>  (<em class="parameter"><code><a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a> *client</code></em>,
58                                                          <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *device_file</code></em>);
59 <a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="returnvalue">GUdevDevice</span></a> *       <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>   (<em class="parameter"><code><a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a> *client</code></em>,
60                                                          <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *sysfs_path</code></em>);
61 <a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="returnvalue">GUdevDevice</span></a> *       <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>
62                                                         (<em class="parameter"><code><a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a> *client</code></em>,
63                                                          <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *subsystem</code></em>,
64                                                          <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);
65 </pre>
66 </div>
67 <div class="refsect1" title="Object Hierarchy">
68 <a name="GUdevClient.object-hierarchy"></a><h2>Object Hierarchy</h2>
69 <pre class="synopsis">
70   <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
71    +----GUdevClient
72 </pre>
73 </div>
74 <div class="refsect1" title="Properties">
75 <a name="GUdevClient.properties"></a><h2>Properties</h2>
76 <pre class="synopsis">
77   "<a class="link" href="GUdevClient.html#GUdevClient--subsystems" title='The "subsystems" property'>subsystems</a>"               <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Boxed-Types.html#GStrv"><span class="type">GStrv</span></a>*                : Read / Write / Construct Only
78 </pre>
79 </div>
80 <div class="refsect1" title="Signals">
81 <a name="GUdevClient.signals"></a><h2>Signals</h2>
82 <pre class="synopsis">
83   "<a class="link" href="GUdevClient.html#GUdevClient-uevent" title='The "uevent" signal'>uevent</a>"                                         : Run Last
84 </pre>
85 </div>
86 <div class="refsect1" title="Description">
87 <a name="GUdevClient.description"></a><h2>Description</h2>
88 <p>
89 <a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a> is used to query information about devices on a Linux
90 system from the Linux kernel and the udev device
91 manager.
92 </p>
93 <p>
94 Device information is retrieved from the kernel (through the
95 <code class="literal">sysfs</code> filesystem) and the udev daemon (through a
96 <code class="literal">tmpfs</code> filesystem) and presented through
97 <a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="type">GUdevDevice</span></a> objects. This means that no blocking IO ever happens
98 (in both cases, we are essentially just reading data from kernel
99 memory) and as such there are no asynchronous versions of the
100 provided methods.
101 </p>
102 <p>
103 To get <a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="type">GUdevDevice</span></a> objects, use
104 <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>,
105 <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>,
106 <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>,
107 <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>,
108 <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>
109 or the <a class="link" href="GUdevEnumerator.html" title="GUdevEnumerator"><span class="type">GUdevEnumerator</span></a> type.
110 </p>
111 <p>
112 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.
113 </p>
114 </div>
115 <div class="refsect1" title="Details">
116 <a name="GUdevClient.details"></a><h2>Details</h2>
117 <div class="refsect2" title="GUdevClient">
118 <a name="GUdevClient-struct"></a><h3>GUdevClient</h3>
119 <pre class="programlisting">typedef struct _GUdevClient GUdevClient;</pre>
120 <p>
121 The <a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a> struct is opaque and should not be accessed directly.
122 </p>
123 <div class="variablelist"><table border="0">
124 <col align="left" valign="top">
125 <tbody></tbody>
126 </table></div>
127 </div>
128 <hr>
129 <div class="refsect2" title="GUdevClientClass">
130 <a name="GUdevClientClass"></a><h3>GUdevClientClass</h3>
131 <pre class="programlisting">typedef struct {
132   GObjectClass   parent_class;
133
134   /* signals */
135   void (*uevent) (GUdevClient  *client,
136                   const gchar  *action,
137                   GUdevDevice  *device);
138 } GUdevClientClass;
139 </pre>
140 <p>
141 Class structure for <a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a>.
142 </p>
143 <div class="variablelist"><table border="0">
144 <col align="left" valign="top">
145 <tbody>
146 <tr>
147 <td><p><span class="term"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObjectClass"><span class="type">GObjectClass</span></a> <em class="structfield"><code><a name="GUdevClientClass.parent-class"></a>parent_class</code></em>;</span></p></td>
148 <td>Parent class.
149 </td>
150 </tr>
151 <tr>
152 <td><p><span class="term"><em class="structfield"><code><a name="GUdevClientClass.uevent"></a>uevent</code></em> ()</span></p></td>
153 <td>Signal class handler for the <a class="link" href="GUdevClient.html#GUdevClient-uevent" title='The "uevent" signal'><span class="type">"uevent"</span></a> signal.
154 </td>
155 </tr>
156 </tbody>
157 </table></div>
158 </div>
159 <hr>
160 <div class="refsect2" title="enum GUdevDeviceType">
161 <a name="GUdevDeviceType"></a><h3>enum GUdevDeviceType</h3>
162 <pre class="programlisting">typedef enum
163 {
164   G_UDEV_DEVICE_TYPE_NONE = 0,
165   G_UDEV_DEVICE_TYPE_BLOCK = 'b',
166   G_UDEV_DEVICE_TYPE_CHAR = 'c',
167 } GUdevDeviceType;
168 </pre>
169 <p>
170 Enumeration used to specify a the type of a device.
171 </p>
172 <div class="variablelist"><table border="0">
173 <col align="left" valign="top">
174 <tbody>
175 <tr>
176 <td><p><a name="G-UDEV-DEVICE-TYPE-NONE:CAPS"></a><span class="term"><code class="literal">G_UDEV_DEVICE_TYPE_NONE</code></span></p></td>
177 <td>Device does not have a device file.
178 </td>
179 </tr>
180 <tr>
181 <td><p><a name="G-UDEV-DEVICE-TYPE-BLOCK:CAPS"></a><span class="term"><code class="literal">G_UDEV_DEVICE_TYPE_BLOCK</code></span></p></td>
182 <td>Device is a block device.
183 </td>
184 </tr>
185 <tr>
186 <td><p><a name="G-UDEV-DEVICE-TYPE-CHAR:CAPS"></a><span class="term"><code class="literal">G_UDEV_DEVICE_TYPE_CHAR</code></span></p></td>
187 <td>Device is a character device.
188 </td>
189 </tr>
190 </tbody>
191 </table></div>
192 </div>
193 <hr>
194 <div class="refsect2" title="GUdevDeviceNumber">
195 <a name="GUdevDeviceNumber"></a><h3>GUdevDeviceNumber</h3>
196 <p>
197 Corresponds to the standard <span class="type">dev_t</span> type as defined by POSIX (Until
198 bug 584517 is resolved this work-around is needed).
199 </p>
200 </div>
201 <hr>
202 <div class="refsect2" title="g_udev_client_new ()">
203 <a name="g-udev-client-new"></a><h3>g_udev_client_new ()</h3>
204 <pre class="programlisting"><a class="link" href="GUdevClient.html" title="GUdevClient"><span class="returnvalue">GUdevClient</span></a> *       g_udev_client_new                   (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> * const *subsystems</code></em>);</pre>
205 <p>
206 Constructs a <a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a> object that can be used to query
207 information about devices. Connect to the <a class="link" href="GUdevClient.html#GUdevClient-uevent" title='The "uevent" signal'><span class="type">"uevent"</span></a>
208 signal to listen for uevents. Note that signals are emitted in the
209 <a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#g-main-context-push-thread-default">thread-default main loop</a>
210 of the thread that you call this constructor from.
211 </p>
212 <div class="variablelist"><table border="0">
213 <col align="left" valign="top">
214 <tbody>
215 <tr>
216 <td><p><span class="term"><em class="parameter"><code>subsystems</code></em> :</span></p></td>
217 <td> A <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> terminated string array of subsystems to listen for uevents on, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> 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. <span class="annotation">[<a href="http://foldoc.org/array"><span class="acronym">array</span></a> zero-terminated=1][<a href="http://foldoc.org/element-type"><span class="acronym">element-type</span></a> utf8][<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a> utf8][<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a> utf8]</span>
218 </td>
219 </tr>
220 <tr>
221 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
222 <td> A new <a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a> object. Free with <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.
223 </td>
224 </tr>
225 </tbody>
226 </table></div>
227 </div>
228 <hr>
229 <div class="refsect2" title="g_udev_client_query_by_subsystem ()">
230 <a name="g-udev-client-query-by-subsystem"></a><h3>g_udev_client_query_by_subsystem ()</h3>
231 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *             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>,
232                                                          <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *subsystem</code></em>);</pre>
233 <p>
234 Gets all devices belonging to <em class="parameter"><code>subsystem</code></em>.
235 </p>
236 <div class="variablelist"><table border="0">
237 <col align="left" valign="top">
238 <tbody>
239 <tr>
240 <td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
241 <td>A <a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a>.
242 </td>
243 </tr>
244 <tr>
245 <td><p><span class="term"><em class="parameter"><code>subsystem</code></em> :</span></p></td>
246 <td> The subsystem to get devices for or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to get all devices. <span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span>
247 </td>
248 </tr>
249 <tr>
250 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
251 <td> A list of <a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="type">GUdevDevice</span></a> objects. The caller should free the result by using <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> on each element in the list and then <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#g-list-free"><code class="function">g_list_free()</code></a> on the list. <span class="annotation">[<a href="http://foldoc.org/element-type"><span class="acronym">element-type</span></a> GUdevDevice][<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a> GUdevDevice]</span>
252 </td>
253 </tr>
254 </tbody>
255 </table></div>
256 </div>
257 <hr>
258 <div class="refsect2" title="g_udev_client_query_by_device_number ()">
259 <a name="g-udev-client-query-by-device-number"></a><h3>g_udev_client_query_by_device_number ()</h3>
260 <pre class="programlisting"><a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="returnvalue">GUdevDevice</span></a> *       g_udev_client_query_by_device_number
261                                                         (<em class="parameter"><code><a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a> *client</code></em>,
262                                                          <em class="parameter"><code><a class="link" href="GUdevClient.html#GUdevDeviceType" title="enum GUdevDeviceType"><span class="type">GUdevDeviceType</span></a> type</code></em>,
263                                                          <em class="parameter"><code><a class="link" href="GUdevClient.html#GUdevDeviceNumber" title="GUdevDeviceNumber"><span class="type">GUdevDeviceNumber</span></a> number</code></em>);</pre>
264 <p>
265 Looks up a device for a type and device number.
266 </p>
267 <div class="variablelist"><table border="0">
268 <col align="left" valign="top">
269 <tbody>
270 <tr>
271 <td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
272 <td>A <a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a>.
273 </td>
274 </tr>
275 <tr>
276 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
277 <td>A value from the <a class="link" href="GUdevClient.html#GUdevDeviceType" title="enum GUdevDeviceType"><span class="type">GUdevDeviceType</span></a> enumeration.
278 </td>
279 </tr>
280 <tr>
281 <td><p><span class="term"><em class="parameter"><code>number</code></em> :</span></p></td>
282 <td>A device number.
283 </td>
284 </tr>
285 <tr>
286 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
287 <td> A <a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="type">GUdevDevice</span></a> object or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the device was not found. Free with <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. <span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span>
288 </td>
289 </tr>
290 </tbody>
291 </table></div>
292 </div>
293 <hr>
294 <div class="refsect2" title="g_udev_client_query_by_device_file ()">
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> *       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>,
297                                                          <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *device_file</code></em>);</pre>
298 <p>
299 Looks up a device for a device file.
300 </p>
301 <div class="variablelist"><table border="0">
302 <col align="left" valign="top">
303 <tbody>
304 <tr>
305 <td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
306 <td>A <a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a>.
307 </td>
308 </tr>
309 <tr>
310 <td><p><span class="term"><em class="parameter"><code>device_file</code></em> :</span></p></td>
311 <td>A device file.
312 </td>
313 </tr>
314 <tr>
315 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
316 <td> A <a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="type">GUdevDevice</span></a> object or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the device was not found. Free with <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. <span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span>
317 </td>
318 </tr>
319 </tbody>
320 </table></div>
321 </div>
322 <hr>
323 <div class="refsect2" title="g_udev_client_query_by_sysfs_path ()">
324 <a name="g-udev-client-query-by-sysfs-path"></a><h3>g_udev_client_query_by_sysfs_path ()</h3>
325 <pre class="programlisting"><a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="returnvalue">GUdevDevice</span></a> *       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>,
326                                                          <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *sysfs_path</code></em>);</pre>
327 <p>
328 Looks up a device for a sysfs path.
329 </p>
330 <div class="variablelist"><table border="0">
331 <col align="left" valign="top">
332 <tbody>
333 <tr>
334 <td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
335 <td>A <a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a>.
336 </td>
337 </tr>
338 <tr>
339 <td><p><span class="term"><em class="parameter"><code>sysfs_path</code></em> :</span></p></td>
340 <td>A sysfs path.
341 </td>
342 </tr>
343 <tr>
344 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
345 <td>
346 </td>
347 </tr>
348 </tbody>
349 </table></div>
350 </div>
351 <hr>
352 <div class="refsect2" title="g_udev_client_query_by_subsystem_and_name ()">
353 <a name="g-udev-client-query-by-subsystem-and-name"></a><h3>g_udev_client_query_by_subsystem_and_name ()</h3>
354 <pre class="programlisting"><a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="returnvalue">GUdevDevice</span></a> *       g_udev_client_query_by_subsystem_and_name
355                                                         (<em class="parameter"><code><a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a> *client</code></em>,
356                                                          <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *subsystem</code></em>,
357                                                          <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
358 <p>
359 Looks up a device for a subsystem and name.
360 </p>
361 <div class="variablelist"><table border="0">
362 <col align="left" valign="top">
363 <tbody>
364 <tr>
365 <td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
366 <td>A <a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a>.
367 </td>
368 </tr>
369 <tr>
370 <td><p><span class="term"><em class="parameter"><code>subsystem</code></em> :</span></p></td>
371 <td>A subsystem name.
372 </td>
373 </tr>
374 <tr>
375 <td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
376 <td>The name of the device.
377 </td>
378 </tr>
379 <tr>
380 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
381 <td> A <a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="type">GUdevDevice</span></a> object or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the device was not found. Free with <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. <span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span>
382 </td>
383 </tr>
384 </tbody>
385 </table></div>
386 </div>
387 </div>
388 <div class="refsect1" title="Property Details">
389 <a name="GUdevClient.property-details"></a><h2>Property Details</h2>
390 <div class="refsect2" title='The "subsystems" property'>
391 <a name="GUdevClient--subsystems"></a><h3>The <code class="literal">"subsystems"</code> property</h3>
392 <pre class="programlisting">  "subsystems"               <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Boxed-Types.html#GStrv"><span class="type">GStrv</span></a>*                : Read / Write / Construct Only</pre>
393 <p>
394 The subsystems to listen for uevents on.
395 </p>
396 <p>
397 To listen for only a specific DEVTYPE for a given SUBSYSTEM, use
398 "subsystem/devtype". For example, to only listen for uevents
399 where SUBSYSTEM is usb and DEVTYPE is usb_interface, use
400 "usb/usb_interface".
401 </p>
402 <p>
403 If this property is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then no events will be reported. If
404 it's the empty array, events from all subsystems will be
405 reported.
406 </p>
407 </div>
408 </div>
409 <div class="refsect1" title="Signal Details">
410 <a name="GUdevClient.signal-details"></a><h2>Signal Details</h2>
411 <div class="refsect2" title='The "uevent" signal'>
412 <a name="GUdevClient-uevent"></a><h3>The <code class="literal">"uevent"</code> signal</h3>
413 <pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a> *client,
414                                                         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>       *action,
415                                                         <a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="type">GUdevDevice</span></a> *device,
416                                                         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>     user_data)      : Run Last</pre>
417 <p>
418 Emitted when <em class="parameter"><code>client</code></em> receives an uevent.
419 </p>
420 <p>
421 This signal is emitted in the
422 <a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#g-main-context-push-thread-default">thread-default main loop</a>
423 of the thread that <em class="parameter"><code>client</code></em> was created in.
424 </p>
425 <div class="variablelist"><table border="0">
426 <col align="left" valign="top">
427 <tbody>
428 <tr>
429 <td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
430 <td>The <a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a> receiving the event.
431 </td>
432 </tr>
433 <tr>
434 <td><p><span class="term"><em class="parameter"><code>action</code></em> :</span></p></td>
435 <td>The action for the uevent e.g. "add", "remove", "change", "move", etc.
436 </td>
437 </tr>
438 <tr>
439 <td><p><span class="term"><em class="parameter"><code>device</code></em> :</span></p></td>
440 <td>Details about the <a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="type">GUdevDevice</span></a> the event is for.
441 </td>
442 </tr>
443 <tr>
444 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
445 <td>user data set when the signal handler was connected.</td>
446 </tr>
447 </tbody>
448 </table></div>
449 </div>
450 </div>
451 </div>
452 <div class="footer">
453 <hr>
454           Generated by GTK-Doc V1.15</div>
455 </body>
456 </html>