tizen 2.0
[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.76.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.18 (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">
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">
45 <a name="GUdevClient.synopsis"></a><h2>Synopsis</h2>
46 <a name="GUdevDeviceType"></a><pre class="synopsis">                    <a class="link" href="GUdevClient.html#GUdevClient-struct" title="GUdevClient">GUdevClient</a>;
47 struct              <a class="link" href="GUdevClient.html#GUdevClientClass" title="struct GUdevClientClass">GUdevClientClass</a>;
48 enum                <a class="link" href="GUdevClient.html#GUdevDeviceType-enum" 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"><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">
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 <pre class="synopsis">
74   GEnum
75    +----GUdevDeviceType
76 </pre>
77 </div>
78 <div class="refsect1">
79 <a name="GUdevClient.properties"></a><h2>Properties</h2>
80 <pre class="synopsis">
81   "<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
82 </pre>
83 </div>
84 <div class="refsect1">
85 <a name="GUdevClient.signals"></a><h2>Signals</h2>
86 <pre class="synopsis">
87   "<a class="link" href="GUdevClient.html#GUdevClient-uevent" title='The "uevent" signal'>uevent</a>"                                         : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a>
88 </pre>
89 </div>
90 <div class="refsect1">
91 <a name="GUdevClient.description"></a><h2>Description</h2>
92 <p>
93 <a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a> is used to query information about devices on a Linux
94 system from the Linux kernel and the udev device
95 manager.
96 </p>
97 <p>
98 Device information is retrieved from the kernel (through the
99 <code class="literal">sysfs</code> filesystem) and the udev daemon (through a
100 <code class="literal">tmpfs</code> filesystem) and presented through
101 <a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="type">GUdevDevice</span></a> objects. This means that no blocking IO ever happens
102 (in both cases, we are essentially just reading data from kernel
103 memory) and as such there are no asynchronous versions of the
104 provided methods.
105 </p>
106 <p>
107 To get <a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="type">GUdevDevice</span></a> objects, use
108 <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>,
109 <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>,
110 <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>,
111 <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>,
112 <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>
113 or the <a class="link" href="GUdevEnumerator.html" title="GUdevEnumerator"><span class="type">GUdevEnumerator</span></a> type.
114 </p>
115 <p>
116 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.
117 </p>
118 </div>
119 <div class="refsect1">
120 <a name="GUdevClient.details"></a><h2>Details</h2>
121 <div class="refsect2">
122 <a name="GUdevClient-struct"></a><h3>GUdevClient</h3>
123 <pre class="programlisting">typedef struct _GUdevClient GUdevClient;</pre>
124 <p>
125 The <a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a> struct is opaque and should not be accessed directly.
126 </p>
127 </div>
128 <hr>
129 <div class="refsect2">
130 <a name="GUdevClientClass"></a><h3>struct GUdevClientClass</h3>
131 <pre class="programlisting">struct GUdevClientClass {
132   GObjectClass   parent_class;
133
134   /* signals */
135   void (*uevent) (GUdevClient  *client,
136                   const gchar  *action,
137                   GUdevDevice  *device);
138 };
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.</td>
149 </tr>
150 <tr>
151 <td><p><span class="term"><em class="structfield"><code><a name="GUdevClientClass.uevent"></a>uevent</code></em> ()</span></p></td>
152 <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.</td>
153 </tr>
154 </tbody>
155 </table></div>
156 </div>
157 <hr>
158 <div class="refsect2">
159 <a name="GUdevDeviceType-enum"></a><h3>enum GUdevDeviceType</h3>
160 <pre class="programlisting">typedef enum {
161   G_UDEV_DEVICE_TYPE_NONE = 0,
162   G_UDEV_DEVICE_TYPE_BLOCK = 'b',
163   G_UDEV_DEVICE_TYPE_CHAR = 'c',
164 } GUdevDeviceType;
165 </pre>
166 <p>
167 Enumeration used to specify a the type of a device.
168 </p>
169 <div class="variablelist"><table border="0">
170 <col align="left" valign="top">
171 <tbody>
172 <tr>
173 <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>
174 <td>Device does not have a device file.
175 </td>
176 </tr>
177 <tr>
178 <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>
179 <td>Device is a block device.
180 </td>
181 </tr>
182 <tr>
183 <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>
184 <td>Device is a character device.
185 </td>
186 </tr>
187 </tbody>
188 </table></div>
189 </div>
190 <hr>
191 <div class="refsect2">
192 <a name="GUdevDeviceNumber"></a><h3>GUdevDeviceNumber</h3>
193 <pre class="programlisting">typedef guint64 GUdevDeviceNumber; /* __UQUAD_TYPE */
194 </pre>
195 <p>
196 Corresponds to the standard <span class="type">dev_t</span> type as defined by POSIX (Until
197 bug 584517 is resolved this work-around is needed).
198 </p>
199 </div>
200 <hr>
201 <div class="refsect2">
202 <a name="g-udev-client-new"></a><h3>g_udev_client_new ()</h3>
203 <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>
204 <p>
205 Constructs a <a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a> object that can be used to query
206 information about devices. Connect to the <a class="link" href="GUdevClient.html#GUdevClient-uevent" title='The "uevent" signal'><span class="type">"uevent"</span></a>
207 signal to listen for uevents. Note that signals are emitted in the
208 <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>
209 of the thread that you call this constructor from.
210 </p>
211 <div class="variablelist"><table border="0">
212 <col align="left" valign="top">
213 <tbody>
214 <tr>
215 <td><p><span class="term"><em class="parameter"><code>subsystems</code></em> :</span></p></td>
216 <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>][<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span>
217 </td>
218 </tr>
219 <tr>
220 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
221 <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>.</td>
222 </tr>
223 </tbody>
224 </table></div>
225 </div>
226 <hr>
227 <div class="refsect2">
228 <a name="g-udev-client-query-by-subsystem"></a><h3>g_udev_client_query_by_subsystem ()</h3>
229 <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>,
230                                                          <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>
231 <p>
232 Gets all devices belonging to <em class="parameter"><code>subsystem</code></em>.
233 </p>
234 <div class="variablelist"><table border="0">
235 <col align="left" valign="top">
236 <tbody>
237 <tr>
238 <td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
239 <td>A <a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a>.</td>
240 </tr>
241 <tr>
242 <td><p><span class="term"><em class="parameter"><code>subsystem</code></em> :</span></p></td>
243 <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>
244 </td>
245 </tr>
246 <tr>
247 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
248 <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>]</span>
249 </td>
250 </tr>
251 </tbody>
252 </table></div>
253 </div>
254 <hr>
255 <div class="refsect2">
256 <a name="g-udev-client-query-by-device-number"></a><h3>g_udev_client_query_by_device_number ()</h3>
257 <pre class="programlisting"><a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="returnvalue">GUdevDevice</span></a> *       g_udev_client_query_by_device_number
258                                                         (<em class="parameter"><code><a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a> *client</code></em>,
259                                                          <em class="parameter"><code><a class="link" href="GUdevClient.html#GUdevDeviceType"><span class="type">GUdevDeviceType</span></a> type</code></em>,
260                                                          <em class="parameter"><code><a class="link" href="GUdevClient.html#GUdevDeviceNumber" title="GUdevDeviceNumber"><span class="type">GUdevDeviceNumber</span></a> number</code></em>);</pre>
261 <p>
262 Looks up a device for a type and device number.
263 </p>
264 <div class="variablelist"><table border="0">
265 <col align="left" valign="top">
266 <tbody>
267 <tr>
268 <td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
269 <td>A <a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a>.</td>
270 </tr>
271 <tr>
272 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
273 <td>A value from the <a class="link" href="GUdevClient.html#GUdevDeviceType"><span class="type">GUdevDeviceType</span></a> enumeration.</td>
274 </tr>
275 <tr>
276 <td><p><span class="term"><em class="parameter"><code>number</code></em> :</span></p></td>
277 <td>A device number.</td>
278 </tr>
279 <tr>
280 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
281 <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>
282 </td>
283 </tr>
284 </tbody>
285 </table></div>
286 </div>
287 <hr>
288 <div class="refsect2">
289 <a name="g-udev-client-query-by-device-file"></a><h3>g_udev_client_query_by_device_file ()</h3>
290 <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>,
291                                                          <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>
292 <p>
293 Looks up a device for a device file.
294 </p>
295 <div class="variablelist"><table border="0">
296 <col align="left" valign="top">
297 <tbody>
298 <tr>
299 <td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
300 <td>A <a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a>.</td>
301 </tr>
302 <tr>
303 <td><p><span class="term"><em class="parameter"><code>device_file</code></em> :</span></p></td>
304 <td>A device file.</td>
305 </tr>
306 <tr>
307 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
308 <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>
309 </td>
310 </tr>
311 </tbody>
312 </table></div>
313 </div>
314 <hr>
315 <div class="refsect2">
316 <a name="g-udev-client-query-by-sysfs-path"></a><h3>g_udev_client_query_by_sysfs_path ()</h3>
317 <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>,
318                                                          <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>
319 <p>
320 Looks up a device for a sysfs path.
321 </p>
322 <div class="variablelist"><table border="0">
323 <col align="left" valign="top">
324 <tbody>
325 <tr>
326 <td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
327 <td>A <a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a>.</td>
328 </tr>
329 <tr>
330 <td><p><span class="term"><em class="parameter"><code>sysfs_path</code></em> :</span></p></td>
331 <td>A sysfs path.</td>
332 </tr>
333 <tr>
334 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
335 <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>
336 </td>
337 </tr>
338 </tbody>
339 </table></div>
340 </div>
341 <hr>
342 <div class="refsect2">
343 <a name="g-udev-client-query-by-subsystem-and-name"></a><h3>g_udev_client_query_by_subsystem_and_name ()</h3>
344 <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
345                                                         (<em class="parameter"><code><a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a> *client</code></em>,
346                                                          <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>,
347                                                          <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>
348 <p>
349 Looks up a device for a subsystem and name.
350 </p>
351 <div class="variablelist"><table border="0">
352 <col align="left" valign="top">
353 <tbody>
354 <tr>
355 <td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
356 <td>A <a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a>.</td>
357 </tr>
358 <tr>
359 <td><p><span class="term"><em class="parameter"><code>subsystem</code></em> :</span></p></td>
360 <td>A subsystem name.</td>
361 </tr>
362 <tr>
363 <td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
364 <td>The name of the device.</td>
365 </tr>
366 <tr>
367 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
368 <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>
369 </td>
370 </tr>
371 </tbody>
372 </table></div>
373 </div>
374 </div>
375 <div class="refsect1">
376 <a name="GUdevClient.property-details"></a><h2>Property Details</h2>
377 <div class="refsect2">
378 <a name="GUdevClient--subsystems"></a><h3>The <code class="literal">"subsystems"</code> property</h3>
379 <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>
380 <p>
381 The subsystems to listen for uevents on.
382 </p>
383 <p>
384 To listen for only a specific DEVTYPE for a given SUBSYSTEM, use
385 "subsystem/devtype". For example, to only listen for uevents
386 where SUBSYSTEM is usb and DEVTYPE is usb_interface, use
387 "usb/usb_interface".
388 </p>
389 <p>
390 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
391 it's the empty array, events from all subsystems will be
392 reported.
393 </p>
394 </div>
395 </div>
396 <div class="refsect1">
397 <a name="GUdevClient.signal-details"></a><h2>Signal Details</h2>
398 <div class="refsect2">
399 <a name="GUdevClient-uevent"></a><h3>The <code class="literal">"uevent"</code> signal</h3>
400 <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,
401                                                         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>       *action,
402                                                         <a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="type">GUdevDevice</span></a> *device,
403                                                         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>     user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre>
404 <p>
405 Emitted when <em class="parameter"><code>client</code></em> receives an uevent.
406 </p>
407 <p>
408 This signal is emitted in the
409 <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>
410 of the thread that <em class="parameter"><code>client</code></em> was created in.
411 </p>
412 <div class="variablelist"><table border="0">
413 <col align="left" valign="top">
414 <tbody>
415 <tr>
416 <td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
417 <td>The <a class="link" href="GUdevClient.html" title="GUdevClient"><span class="type">GUdevClient</span></a> receiving the event.</td>
418 </tr>
419 <tr>
420 <td><p><span class="term"><em class="parameter"><code>action</code></em> :</span></p></td>
421 <td>The action for the uevent e.g. "add", "remove", "change", "move", etc.</td>
422 </tr>
423 <tr>
424 <td><p><span class="term"><em class="parameter"><code>device</code></em> :</span></p></td>
425 <td>Details about the <a class="link" href="GUdevDevice.html" title="GUdevDevice"><span class="type">GUdevDevice</span></a> the event is for.</td>
426 </tr>
427 <tr>
428 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
429 <td>user data set when the signal handler was connected.</td>
430 </tr>
431 </tbody>
432 </table></div>
433 </div>
434 </div>
435 </div>
436 <div class="footer">
437 <hr>
438           Generated by GTK-Doc V1.18</div>
439 </body>
440 </html>