~ubuntu-branches/ubuntu/natty/gnome-vfs/natty

« back to all changes in this revision

Viewing changes to doc/html/gnome-vfs-20-gnome-vfs-dns-sd.html

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2009-03-17 16:12:58 UTC
  • mfrom: (0.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090317161258-px3a2czt9g2ktjz3
Tags: 1:2.24.1-0ubuntu1
New upstream version

Show diffs side-by-side

added added

removed removed

Lines of Context:
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>Zeroconf networking support</title>
6
 
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
7
 
<link rel="start" href="index.html" title="GnomeVFS - Filesystem Abstraction library">
8
 
<link rel="up" href="networking.html" title="Networking">
9
 
<link rel="prev" href="networking.html" title="Networking">
10
 
<link rel="next" href="gnome-vfs-20-gnome-vfs-resolve.html" title="DNS Resolution">
11
 
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
12
 
<link rel="stylesheet" href="style.css" type="text/css">
13
 
<link rel="chapter" href="about.html" title="Introduction to GnomeVFS">
14
 
<link rel="chapter" href="data-types.html" title="Basic Data Types">
15
 
<link rel="chapter" href="gnome-vfs-basic-file-ops.html" title="File Operations">
16
 
<link rel="chapter" href="gnome-vfs-directory-ops.html" title="Directory-Specific Operations">
17
 
<link rel="chapter" href="gnome-vfs-file-and-dirs-ops.html" title="Advanced File/Directory Operations">
18
 
<link rel="chapter" href="gnome-vfs-file-async-ops.html" title="Asynchronous Operations">
19
 
<link rel="chapter" href="volumes.html" title="Volumes and Drives Handling">
20
 
<link rel="chapter" href="networking.html" title="Networking">
21
 
<link rel="chapter" href="mime-registry.html" title="MIME Registry">
22
 
<link rel="chapter" href="modules.html" title="Filesystem Modules">
23
 
</head>
24
 
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
25
 
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
26
 
<tr valign="middle">
27
 
<td><a accesskey="p" href="networking.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
28
 
<td><a accesskey="u" href="networking.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
29
 
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
30
 
<th width="100%" align="center">GnomeVFS - Filesystem Abstraction library</th>
31
 
<td><a accesskey="n" href="gnome-vfs-20-gnome-vfs-resolve.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
32
 
</tr>
33
 
<tr><td colspan="5" class="shortcuts">
34
 
<a href="#gnome-vfs-20-gnome-vfs-dns-sd.synopsis" class="shortcut">Top</a>
35
 
                 | 
36
 
                <a href="#gnome-vfs-20-gnome-vfs-dns-sd.description" class="shortcut">Description</a>
37
 
</td></tr>
38
 
</table>
39
 
<div class="refentry" lang="en">
40
 
<a name="gnome-vfs-20-gnome-vfs-dns-sd"></a><div class="titlepage"></div>
41
 
<div class="refnamediv"><table width="100%"><tr>
42
 
<td valign="top">
43
 
<h2><span class="refentrytitle"><a name="gnome-vfs-20-gnome-vfs-dns-sd.top_of_page"></a>Zeroconf networking support</span></h2>
44
 
<p>Zeroconf networking support — Gets information about available Zeroconf (aka <span class="trademark">RendezVous</span>™) services on a local network.</p>
45
 
</td>
46
 
<td valign="top" align="right"></td>
47
 
</tr></table></div>
48
 
<div class="refsynopsisdiv">
49
 
<a name="gnome-vfs-20-gnome-vfs-dns-sd.synopsis"></a><h2>Synopsis</h2>
50
 
<pre class="synopsis">
51
 
void                (<a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#GnomeVFSDNSSDResolveCallback" title="GnomeVFSDNSSDResolveCallback ()">*GnomeVFSDNSSDResolveCallback</a>)     (GnomeVFSDNSSDResolveHandle *handle,
52
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a> result,
53
 
                                                         const <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#GnomeVFSDNSSDService" title="GnomeVFSDNSSDService">GnomeVFSDNSSDService</a> *service,
54
 
                                                         const char *host,
55
 
                                                         int port,
56
 
                                                         const GHashTable *text,
57
 
                                                         int text_raw_len,
58
 
                                                         const char *text_raw,
59
 
                                                         gpointer callback_data);
60
 
enum                <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#GnomeVFSDNSSDServiceStatus" title="enum GnomeVFSDNSSDServiceStatus">GnomeVFSDNSSDServiceStatus</a>;
61
 
                    <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#GnomeVFSDNSSDService" title="GnomeVFSDNSSDService">GnomeVFSDNSSDService</a>;
62
 
void                (<a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#GnomeVFSDNSSDBrowseCallback" title="GnomeVFSDNSSDBrowseCallback ()">*GnomeVFSDNSSDBrowseCallback</a>)      (GnomeVFSDNSSDBrowseHandle *handle,
63
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#GnomeVFSDNSSDServiceStatus" title="enum GnomeVFSDNSSDServiceStatus">GnomeVFSDNSSDServiceStatus</a> status,
64
 
                                                         const <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#GnomeVFSDNSSDService" title="GnomeVFSDNSSDService">GnomeVFSDNSSDService</a> *service,
65
 
                                                         gpointer callback_data);
66
 
<a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#gnome-vfs-dns-sd-browse" title="gnome_vfs_dns_sd_browse ()">gnome_vfs_dns_sd_browse</a>             (GnomeVFSDNSSDBrowseHandle **handle,
67
 
                                                         const char *domain,
68
 
                                                         const char *type,
69
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#GnomeVFSDNSSDBrowseCallback" title="GnomeVFSDNSSDBrowseCallback ()">GnomeVFSDNSSDBrowseCallback</a> callback,
70
 
                                                         gpointer callback_data,
71
 
                                                         GDestroyNotify callback_data_destroy_func);
72
 
<a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#gnome-vfs-dns-sd-stop-browse" title="gnome_vfs_dns_sd_stop_browse ()">gnome_vfs_dns_sd_stop_browse</a>        (GnomeVFSDNSSDBrowseHandle *handle);
73
 
<a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#gnome-vfs-dns-sd-resolve" title="gnome_vfs_dns_sd_resolve ()">gnome_vfs_dns_sd_resolve</a>            (GnomeVFSDNSSDResolveHandle **handle,
74
 
                                                         const char *name,
75
 
                                                         const char *type,
76
 
                                                         const char *domain,
77
 
                                                         int timeout,
78
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#GnomeVFSDNSSDResolveCallback" title="GnomeVFSDNSSDResolveCallback ()">GnomeVFSDNSSDResolveCallback</a> callback,
79
 
                                                         gpointer callback_data,
80
 
                                                         GDestroyNotify callback_data_destroy_func);
81
 
<a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#gnome-vfs-dns-sd-cancel-resolve" title="gnome_vfs_dns_sd_cancel_resolve ()">gnome_vfs_dns_sd_cancel_resolve</a>     (GnomeVFSDNSSDResolveHandle *handle);
82
 
<a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#gnome-vfs-dns-sd-browse-sync" title="gnome_vfs_dns_sd_browse_sync ()">gnome_vfs_dns_sd_browse_sync</a>        (const char *domain,
83
 
                                                         const char *type,
84
 
                                                         int timeout_msec,
85
 
                                                         int *n_services,
86
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#GnomeVFSDNSSDService" title="GnomeVFSDNSSDService">GnomeVFSDNSSDService</a> **services);
87
 
<a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#gnome-vfs-dns-sd-resolve-sync" title="gnome_vfs_dns_sd_resolve_sync ()">gnome_vfs_dns_sd_resolve_sync</a>       (const char *name,
88
 
                                                         const char *type,
89
 
                                                         const char *domain,
90
 
                                                         int timeout_msec,
91
 
                                                         char **host,
92
 
                                                         int *port,
93
 
                                                         GHashTable **text,
94
 
                                                         int *text_raw_len_out,
95
 
                                                         char **text_raw_out);
96
 
void                <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#gnome-vfs-dns-sd-service-list-free" title="gnome_vfs_dns_sd_service_list_free ()">gnome_vfs_dns_sd_service_list_free</a>  (<a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#GnomeVFSDNSSDService" title="GnomeVFSDNSSDService">GnomeVFSDNSSDService</a> *services,
97
 
                                                         int n_services);
98
 
<a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#gnome-vfs-dns-sd-list-browse-domains-sync" title="gnome_vfs_dns_sd_list_browse_domains_sync ()">gnome_vfs_dns_sd_list_browse_domains_sync</a>
99
 
                                                        (const char *domain,
100
 
                                                         int timeout_msec,
101
 
                                                         GList **domains);
102
 
GList *             <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#gnome-vfs-get-default-browse-domains" title="gnome_vfs_get_default_browse_domains ()">gnome_vfs_get_default_browse_domains</a>
103
 
                                                        (void);
104
 
</pre>
105
 
</div>
106
 
<div class="refsect1" lang="en">
107
 
<a name="gnome-vfs-20-gnome-vfs-dns-sd.description"></a><h2>Description</h2>
108
 
<p>
109
 
</p>
110
 
</div>
111
 
<div class="refsect1" lang="en">
112
 
<a name="gnome-vfs-20-gnome-vfs-dns-sd.details"></a><h2>Details</h2>
113
 
<div class="refsect2" lang="en">
114
 
<a name="GnomeVFSDNSSDResolveCallback"></a><h3>GnomeVFSDNSSDResolveCallback ()</h3>
115
 
<pre class="programlisting">void                (*GnomeVFSDNSSDResolveCallback)     (GnomeVFSDNSSDResolveHandle *handle,
116
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a> result,
117
 
                                                         const <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#GnomeVFSDNSSDService" title="GnomeVFSDNSSDService">GnomeVFSDNSSDService</a> *service,
118
 
                                                         const char *host,
119
 
                                                         int port,
120
 
                                                         const GHashTable *text,
121
 
                                                         int text_raw_len,
122
 
                                                         const char *text_raw,
123
 
                                                         gpointer callback_data);</pre>
124
 
<p>
125
 
Callback for the <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#gnome-vfs-dns-sd-resolve" title="gnome_vfs_dns_sd_resolve ()"><code class="function">gnome_vfs_dns_sd_resolve()</code></a> function that is called
126
 
when a service has been resolved.
127
 
</p>
128
 
<p>
129
 
The <em class="parameter"><code>host</code></em> and <em class="parameter"><code>port</code></em> can be used to contact the requested service, and
130
 
<em class="parameter"><code>text</code></em> contains additional options as defined for the type requested.
131
 
</p>
132
 
<p>
133
 
To check for options being set in <em class="parameter"><code>text</code></em> without any value ("key" as
134
 
opposed to "key=value") you must use <code class="function">g_hash_table_lookup_extended()</code>, since
135
 
they are stored in the hash table with a NULL value, and <code class="function">g_hash_table_lookup()</code>
136
 
can't tell that from the case where the key is not in the hash table.</p>
137
 
<p>
138
 
</p>
139
 
<div class="variablelist"><table border="0">
140
 
<col align="left" valign="top">
141
 
<tbody>
142
 
<tr>
143
 
<td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td>
144
 
<td> handle of the operation generating the callback
145
 
</td>
146
 
</tr>
147
 
<tr>
148
 
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
149
 
<td> whether the resolve succeeded or not
150
 
</td>
151
 
</tr>
152
 
<tr>
153
 
<td><p><span class="term"><em class="parameter"><code>service</code></em> :</span></p></td>
154
 
<td> the service that was resolved
155
 
</td>
156
 
</tr>
157
 
<tr>
158
 
<td><p><span class="term"><em class="parameter"><code>host</code></em> :</span></p></td>
159
 
<td> the host name or ip of the host hosting the service
160
 
</td>
161
 
</tr>
162
 
<tr>
163
 
<td><p><span class="term"><em class="parameter"><code>port</code></em> :</span></p></td>
164
 
<td> the port number to use for the service
165
 
</td>
166
 
</tr>
167
 
<tr>
168
 
<td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
169
 
<td> a hash table giving additional options about the service
170
 
</td>
171
 
</tr>
172
 
<tr>
173
 
<td><p><span class="term"><em class="parameter"><code>text_raw_len</code></em> :</span></p></td>
174
 
<td> length of <em class="parameter"><code>text_raw</code></em>
175
 
</td>
176
 
</tr>
177
 
<tr>
178
 
<td><p><span class="term"><em class="parameter"><code>text_raw</code></em> :</span></p></td>
179
 
<td> raw version of the additional options in <em class="parameter"><code>text</code></em>
180
 
</td>
181
 
</tr>
182
 
<tr>
183
 
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
184
 
<td> user data defined when the callback was established
185
 
</td>
186
 
</tr>
187
 
</tbody>
188
 
</table></div>
189
 
</div>
190
 
<hr>
191
 
<div class="refsect2" lang="en">
192
 
<a name="GnomeVFSDNSSDServiceStatus"></a><h3>enum GnomeVFSDNSSDServiceStatus</h3>
193
 
<pre class="programlisting">typedef enum {
194
 
        GNOME_VFS_DNS_SD_SERVICE_ADDED,
195
 
        GNOME_VFS_DNS_SD_SERVICE_REMOVED
196
 
} GnomeVFSDNSSDServiceStatus;
197
 
</pre>
198
 
<p>
199
 
</p>
200
 
</div>
201
 
<hr>
202
 
<div class="refsect2" lang="en">
203
 
<a name="GnomeVFSDNSSDService"></a><h3>GnomeVFSDNSSDService</h3>
204
 
<pre class="programlisting">typedef struct {
205
 
        char *name;
206
 
        char *type;
207
 
        char *domain;
208
 
} GnomeVFSDNSSDService;
209
 
</pre>
210
 
<p>
211
 
</p>
212
 
</div>
213
 
<hr>
214
 
<div class="refsect2" lang="en">
215
 
<a name="GnomeVFSDNSSDBrowseCallback"></a><h3>GnomeVFSDNSSDBrowseCallback ()</h3>
216
 
<pre class="programlisting">void                (*GnomeVFSDNSSDBrowseCallback)      (GnomeVFSDNSSDBrowseHandle *handle,
217
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#GnomeVFSDNSSDServiceStatus" title="enum GnomeVFSDNSSDServiceStatus">GnomeVFSDNSSDServiceStatus</a> status,
218
 
                                                         const <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#GnomeVFSDNSSDService" title="GnomeVFSDNSSDService">GnomeVFSDNSSDService</a> *service,
219
 
                                                         gpointer callback_data);</pre>
220
 
<p>
221
 
Callback for the <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#gnome-vfs-dns-sd-browse" title="gnome_vfs_dns_sd_browse ()"><code class="function">gnome_vfs_dns_sd_browse()</code></a> function that informs
222
 
the user of services that are added or removed.</p>
223
 
<p>
224
 
</p>
225
 
<div class="variablelist"><table border="0">
226
 
<col align="left" valign="top">
227
 
<tbody>
228
 
<tr>
229
 
<td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td>
230
 
<td> handle of the operation generating the callback
231
 
</td>
232
 
</tr>
233
 
<tr>
234
 
<td><p><span class="term"><em class="parameter"><code>status</code></em> :</span></p></td>
235
 
<td> whether a service addition or removal was detected
236
 
</td>
237
 
</tr>
238
 
<tr>
239
 
<td><p><span class="term"><em class="parameter"><code>service</code></em> :</span></p></td>
240
 
<td> the service that was discovered or removed
241
 
</td>
242
 
</tr>
243
 
<tr>
244
 
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
245
 
<td> user data defined when the callback was established
246
 
</td>
247
 
</tr>
248
 
</tbody>
249
 
</table></div>
250
 
</div>
251
 
<hr>
252
 
<div class="refsect2" lang="en">
253
 
<a name="gnome-vfs-dns-sd-browse"></a><h3>gnome_vfs_dns_sd_browse ()</h3>
254
 
<pre class="programlisting"><a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      gnome_vfs_dns_sd_browse             (GnomeVFSDNSSDBrowseHandle **handle,
255
 
                                                         const char *domain,
256
 
                                                         const char *type,
257
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#GnomeVFSDNSSDBrowseCallback" title="GnomeVFSDNSSDBrowseCallback ()">GnomeVFSDNSSDBrowseCallback</a> callback,
258
 
                                                         gpointer callback_data,
259
 
                                                         GDestroyNotify callback_data_destroy_func);</pre>
260
 
<p>
261
 
Browses <em class="parameter"><code>domain</code></em> for service of the type <em class="parameter"><code>type</code></em>, calling <em class="parameter"><code>callback</code></em> whenever
262
 
a new one is found or removed.
263
 
</p>
264
 
<p>
265
 
The domain to use can be "local" for multicast dns on the local network
266
 
(known as mDNS), or it can be the domain of the current host. You can also
267
 
use <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#gnome-vfs-dns-sd-list-browse-domains-sync" title="gnome_vfs_dns_sd_list_browse_domains_sync ()"><code class="function">gnome_vfs_dns_sd_list_browse_domains_sync()</code></a> to get a list of domains
268
 
that are interested in a particular domain.
269
 
</p>
270
 
<p>
271
 
The type is a string of the form "_type._tcp" or "_type._udp", where type
272
 
is a service type registered at http://www.dns-sd.org/ServiceTypes.html.</p>
273
 
<p>
274
 
</p>
275
 
<div class="variablelist"><table border="0">
276
 
<col align="left" valign="top">
277
 
<tbody>
278
 
<tr>
279
 
<td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td>
280
 
<td> pointer to a pointer to a <span class="type">GnomeVFSDNSSDBrowseHandle</span> object.
281
 
</td>
282
 
</tr>
283
 
<tr>
284
 
<td><p><span class="term"><em class="parameter"><code>domain</code></em> :</span></p></td>
285
 
<td> dns domain to browse, or "local" for multicast DNS.
286
 
</td>
287
 
</tr>
288
 
<tr>
289
 
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
290
 
<td> type of service to browse for.
291
 
</td>
292
 
</tr>
293
 
<tr>
294
 
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
295
 
<td> function to be called when service is discovered.
296
 
</td>
297
 
</tr>
298
 
<tr>
299
 
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
300
 
<td> data to pass to <em class="parameter"><code>callback</code></em>.
301
 
</td>
302
 
</tr>
303
 
<tr>
304
 
<td><p><span class="term"><em class="parameter"><code>callback_data_destroy_func</code></em> :</span></p></td>
305
 
<td> optional destructor function for <em class="parameter"><code>callback_data</code></em>.
306
 
</td>
307
 
</tr>
308
 
<tr>
309
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
310
 
<td> an integer representing the result of the operation.
311
 
</td>
312
 
</tr>
313
 
</tbody>
314
 
</table></div>
315
 
</div>
316
 
<hr>
317
 
<div class="refsect2" lang="en">
318
 
<a name="gnome-vfs-dns-sd-stop-browse"></a><h3>gnome_vfs_dns_sd_stop_browse ()</h3>
319
 
<pre class="programlisting"><a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      gnome_vfs_dns_sd_stop_browse        (GnomeVFSDNSSDBrowseHandle *handle);</pre>
320
 
<p>
321
 
Stops browsing a domain started with <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#gnome-vfs-dns-sd-browse" title="gnome_vfs_dns_sd_browse ()"><code class="function">gnome_vfs_dns_sd_browse()</code></a>.</p>
322
 
<p>
323
 
</p>
324
 
<div class="variablelist"><table border="0">
325
 
<col align="left" valign="top">
326
 
<tbody>
327
 
<tr>
328
 
<td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td>
329
 
<td> handle of the browse operation to be stopped.
330
 
</td>
331
 
</tr>
332
 
<tr>
333
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
334
 
<td> an integer representing the result of the operation.
335
 
</td>
336
 
</tr>
337
 
</tbody>
338
 
</table></div>
339
 
</div>
340
 
<hr>
341
 
<div class="refsect2" lang="en">
342
 
<a name="gnome-vfs-dns-sd-resolve"></a><h3>gnome_vfs_dns_sd_resolve ()</h3>
343
 
<pre class="programlisting"><a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      gnome_vfs_dns_sd_resolve            (GnomeVFSDNSSDResolveHandle **handle,
344
 
                                                         const char *name,
345
 
                                                         const char *type,
346
 
                                                         const char *domain,
347
 
                                                         int timeout,
348
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#GnomeVFSDNSSDResolveCallback" title="GnomeVFSDNSSDResolveCallback ()">GnomeVFSDNSSDResolveCallback</a> callback,
349
 
                                                         gpointer callback_data,
350
 
                                                         GDestroyNotify callback_data_destroy_func);</pre>
351
 
<p>
352
 
Tries to resolve a specific service (typically recieved from
353
 
<a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#gnome-vfs-dns-sd-browse" title="gnome_vfs_dns_sd_browse ()"><code class="function">gnome_vfs_dns_sd_browse()</code></a>) into a hostname/ip, port number and additional
354
 
options.
355
 
</p>
356
 
<p>
357
 
If you ever have to save a reference to a service you should store the
358
 
unresolved name/type/domain tripplet, because the actual host for the
359
 
service can change.
360
 
</p>
361
 
<p>
362
 
The <em class="parameter"><code>timeout</code></em> argument is primarily useful for local resolves, since the
363
 
host owning the service might no longer be around to answer.</p>
364
 
<p>
365
 
</p>
366
 
<div class="variablelist"><table border="0">
367
 
<col align="left" valign="top">
368
 
<tbody>
369
 
<tr>
370
 
<td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td>
371
 
<td> pointer to a pointer to a <span class="type">GnomeVFSDNSSDResolveHandle</span> object.
372
 
</td>
373
 
</tr>
374
 
<tr>
375
 
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
376
 
<td> name of the service to resolve in UTF-8 encoding.
377
 
</td>
378
 
</tr>
379
 
<tr>
380
 
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
381
 
<td> type of the service to resolve.
382
 
</td>
383
 
</tr>
384
 
<tr>
385
 
<td><p><span class="term"><em class="parameter"><code>domain</code></em> :</span></p></td>
386
 
<td> dns domain of the service to resolve, or "local" for multicast DNS.
387
 
</td>
388
 
</tr>
389
 
<tr>
390
 
<td><p><span class="term"><em class="parameter"><code>timeout</code></em> :</span></p></td>
391
 
<td> maximum time (in milliseconds) to try to resolve, or zero if no maximum.
392
 
</td>
393
 
</tr>
394
 
<tr>
395
 
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
396
 
<td> function to be called when the service has been resolved.
397
 
</td>
398
 
</tr>
399
 
<tr>
400
 
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
401
 
<td> data to pass to <em class="parameter"><code>callback</code></em>.
402
 
</td>
403
 
</tr>
404
 
<tr>
405
 
<td><p><span class="term"><em class="parameter"><code>callback_data_destroy_func</code></em> :</span></p></td>
406
 
<td> optional destructor function for <em class="parameter"><code>callback_data</code></em>.
407
 
</td>
408
 
</tr>
409
 
<tr>
410
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
411
 
<td> an integer representing the result of the operation.
412
 
</td>
413
 
</tr>
414
 
</tbody>
415
 
</table></div>
416
 
</div>
417
 
<hr>
418
 
<div class="refsect2" lang="en">
419
 
<a name="gnome-vfs-dns-sd-cancel-resolve"></a><h3>gnome_vfs_dns_sd_cancel_resolve ()</h3>
420
 
<pre class="programlisting"><a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      gnome_vfs_dns_sd_cancel_resolve     (GnomeVFSDNSSDResolveHandle *handle);</pre>
421
 
<p>
422
 
Cancels resolving a service started with <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#gnome-vfs-dns-sd-resolve" title="gnome_vfs_dns_sd_resolve ()"><code class="function">gnome_vfs_dns_sd_resolve()</code></a>.</p>
423
 
<p>
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>handle</code></em> :</span></p></td>
430
 
<td> handle of the resolve operation to be cancelled.
431
 
</td>
432
 
</tr>
433
 
<tr>
434
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
435
 
<td> an integer representing the result of the operation.
436
 
</td>
437
 
</tr>
438
 
</tbody>
439
 
</table></div>
440
 
</div>
441
 
<hr>
442
 
<div class="refsect2" lang="en">
443
 
<a name="gnome-vfs-dns-sd-browse-sync"></a><h3>gnome_vfs_dns_sd_browse_sync ()</h3>
444
 
<pre class="programlisting"><a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      gnome_vfs_dns_sd_browse_sync        (const char *domain,
445
 
                                                         const char *type,
446
 
                                                         int timeout_msec,
447
 
                                                         int *n_services,
448
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#GnomeVFSDNSSDService" title="GnomeVFSDNSSDService">GnomeVFSDNSSDService</a> **services);</pre>
449
 
<p>
450
 
Browses <em class="parameter"><code>domain</code></em> for service of the type <em class="parameter"><code>type</code></em>, returning the result
451
 
after blocking for the duration of the browse. For details about <em class="parameter"><code>domain</code></em>
452
 
and <em class="parameter"><code>type</code></em>, see <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#gnome-vfs-dns-sd-browse" title="gnome_vfs_dns_sd_browse ()"><code class="function">gnome_vfs_dns_sd_browse()</code></a>.
453
 
</p>
454
 
<p>
455
 
<em class="parameter"><code>timeout</code></em> is essential for the "local" domain, since you can never really
456
 
know when you've gotten the full set of return values when using multicast.
457
 
</p>
458
 
<p>
459
 
The returned list can be freed with <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#gnome-vfs-dns-sd-service-list-free" title="gnome_vfs_dns_sd_service_list_free ()"><code class="function">gnome_vfs_dns_sd_service_list_free()</code></a>.
460
 
</p>
461
 
<p>
462
 
This is a synchronous version of <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#gnome-vfs-dns-sd-browse" title="gnome_vfs_dns_sd_browse ()"><code class="function">gnome_vfs_dns_sd_browse()</code></a>, see that for
463
 
more details.</p>
464
 
<p>
465
 
</p>
466
 
<div class="variablelist"><table border="0">
467
 
<col align="left" valign="top">
468
 
<tbody>
469
 
<tr>
470
 
<td><p><span class="term"><em class="parameter"><code>domain</code></em> :</span></p></td>
471
 
<td> The dns domain to browse, or "local" for multicast DNS.
472
 
</td>
473
 
</tr>
474
 
<tr>
475
 
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
476
 
<td> type of the service to browse for.
477
 
</td>
478
 
</tr>
479
 
<tr>
480
 
<td><p><span class="term"><em class="parameter"><code>timeout_msec</code></em> :</span></p></td>
481
 
<td> maximum time to browse, in milliseconds.
482
 
</td>
483
 
</tr>
484
 
<tr>
485
 
<td><p><span class="term"><em class="parameter"><code>n_services</code></em> :</span></p></td>
486
 
<td> pointer to location to store number of returned services.
487
 
</td>
488
 
</tr>
489
 
<tr>
490
 
<td><p><span class="term"><em class="parameter"><code>services</code></em> :</span></p></td>
491
 
<td> pointer to location to store returned services.
492
 
</td>
493
 
</tr>
494
 
<tr>
495
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
496
 
<td> an integer representing the result of the operation.
497
 
</td>
498
 
</tr>
499
 
</tbody>
500
 
</table></div>
501
 
</div>
502
 
<hr>
503
 
<div class="refsect2" lang="en">
504
 
<a name="gnome-vfs-dns-sd-resolve-sync"></a><h3>gnome_vfs_dns_sd_resolve_sync ()</h3>
505
 
<pre class="programlisting"><a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      gnome_vfs_dns_sd_resolve_sync       (const char *name,
506
 
                                                         const char *type,
507
 
                                                         const char *domain,
508
 
                                                         int timeout_msec,
509
 
                                                         char **host,
510
 
                                                         int *port,
511
 
                                                         GHashTable **text,
512
 
                                                         int *text_raw_len_out,
513
 
                                                         char **text_raw_out);</pre>
514
 
<p>
515
 
Tries to resolve a specific service (typically recieved from
516
 
<a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#gnome-vfs-dns-sd-browse" title="gnome_vfs_dns_sd_browse ()"><code class="function">gnome_vfs_dns_sd_browse()</code></a>) into a hostname/ip, port number and additional
517
 
options.
518
 
</p>
519
 
<p>
520
 
This is a synchronous version of <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#gnome-vfs-dns-sd-resolve" title="gnome_vfs_dns_sd_resolve ()"><code class="function">gnome_vfs_dns_sd_resolve()</code></a>, see that (and
521
 
its callback <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#GnomeVFSDNSSDResolveCallback" title="GnomeVFSDNSSDResolveCallback ()"><code class="function">GnomeVFSDNSSDResolveCallback()</code></a>) for more details.</p>
522
 
<p>
523
 
</p>
524
 
<div class="variablelist"><table border="0">
525
 
<col align="left" valign="top">
526
 
<tbody>
527
 
<tr>
528
 
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
529
 
<td> name of the service to resolve in UTF-8 encoding.
530
 
</td>
531
 
</tr>
532
 
<tr>
533
 
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
534
 
<td> type of the service to resolve.
535
 
</td>
536
 
</tr>
537
 
<tr>
538
 
<td><p><span class="term"><em class="parameter"><code>domain</code></em> :</span></p></td>
539
 
<td> dns domain of the service to resolve, or "local" for multicast DNS.
540
 
</td>
541
 
</tr>
542
 
<tr>
543
 
<td><p><span class="term"><em class="parameter"><code>timeout_msec</code></em> :</span></p></td>
544
 
<td> maximum time(in milliseconds) to try to resolve.
545
 
</td>
546
 
</tr>
547
 
<tr>
548
 
<td><p><span class="term"><em class="parameter"><code>host</code></em> :</span></p></td>
549
 
<td> location to store the host name or ip of the host hosting the service.
550
 
</td>
551
 
</tr>
552
 
<tr>
553
 
<td><p><span class="term"><em class="parameter"><code>port</code></em> :</span></p></td>
554
 
<td> location to store the port number to use for the service.
555
 
</td>
556
 
</tr>
557
 
<tr>
558
 
<td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
559
 
<td> location to store a hash table giving additional options about the service.
560
 
</td>
561
 
</tr>
562
 
<tr>
563
 
<td><p><span class="term"><em class="parameter"><code>text_raw_len_out</code></em> :</span></p></td>
564
 
<td> location to store length of <em class="parameter"><code>text_raw_out</code></em>.
565
 
</td>
566
 
</tr>
567
 
<tr>
568
 
<td><p><span class="term"><em class="parameter"><code>text_raw_out</code></em> :</span></p></td>
569
 
<td> location to store raw version of the additional options in <em class="parameter"><code>text</code></em>.
570
 
</td>
571
 
</tr>
572
 
<tr>
573
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
574
 
<td> an integer representing the result of the operation.
575
 
</td>
576
 
</tr>
577
 
</tbody>
578
 
</table></div>
579
 
</div>
580
 
<hr>
581
 
<div class="refsect2" lang="en">
582
 
<a name="gnome-vfs-dns-sd-service-list-free"></a><h3>gnome_vfs_dns_sd_service_list_free ()</h3>
583
 
<pre class="programlisting">void                gnome_vfs_dns_sd_service_list_free  (<a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#GnomeVFSDNSSDService" title="GnomeVFSDNSSDService">GnomeVFSDNSSDService</a> *services,
584
 
                                                         int n_services);</pre>
585
 
<p>
586
 
Frees a list of services as returned by <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#gnome-vfs-dns-sd-browse-sync" title="gnome_vfs_dns_sd_browse_sync ()"><code class="function">gnome_vfs_dns_sd_browse_sync()</code></a>.</p>
587
 
<p>
588
 
</p>
589
 
<div class="variablelist"><table border="0">
590
 
<col align="left" valign="top">
591
 
<tbody>
592
 
<tr>
593
 
<td><p><span class="term"><em class="parameter"><code>services</code></em> :</span></p></td>
594
 
<td> the list of services to free.
595
 
</td>
596
 
</tr>
597
 
<tr>
598
 
<td><p><span class="term"><em class="parameter"><code>n_services</code></em> :</span></p></td>
599
 
<td> the number of services to free.
600
 
</td>
601
 
</tr>
602
 
</tbody>
603
 
</table></div>
604
 
</div>
605
 
<hr>
606
 
<div class="refsect2" lang="en">
607
 
<a name="gnome-vfs-dns-sd-list-browse-domains-sync"></a><h3>gnome_vfs_dns_sd_list_browse_domains_sync ()</h3>
608
 
<pre class="programlisting"><a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      gnome_vfs_dns_sd_list_browse_domains_sync
609
 
                                                        (const char *domain,
610
 
                                                         int timeout_msec,
611
 
                                                         GList **domains);</pre>
612
 
<p>
613
 
Lists the recommended browsing domains for a specific dns domain.
614
 
This can be used to find interesting domains for the domain
615
 
you are currently in. These can then be browsed with <a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#gnome-vfs-dns-sd-browse" title="gnome_vfs_dns_sd_browse ()"><code class="function">gnome_vfs_dns_sd_browse()</code></a>.</p>
616
 
<p>
617
 
</p>
618
 
<div class="variablelist"><table border="0">
619
 
<col align="left" valign="top">
620
 
<tbody>
621
 
<tr>
622
 
<td><p><span class="term"><em class="parameter"><code>domain</code></em> :</span></p></td>
623
 
<td> the domain to list browsable domains in.
624
 
</td>
625
 
</tr>
626
 
<tr>
627
 
<td><p><span class="term"><em class="parameter"><code>timeout_msec</code></em> :</span></p></td>
628
 
<td> maximum time to run, in milliseconds.
629
 
</td>
630
 
</tr>
631
 
<tr>
632
 
<td><p><span class="term"><em class="parameter"><code>domains</code></em> :</span></p></td>
633
 
<td> location to store the returned list of domain names strings.
634
 
</td>
635
 
</tr>
636
 
<tr>
637
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
638
 
<td> an integer representing the result of the operation.
639
 
</td>
640
 
</tr>
641
 
</tbody>
642
 
</table></div>
643
 
</div>
644
 
<hr>
645
 
<div class="refsect2" lang="en">
646
 
<a name="gnome-vfs-get-default-browse-domains"></a><h3>gnome_vfs_get_default_browse_domains ()</h3>
647
 
<pre class="programlisting">GList *             gnome_vfs_get_default_browse_domains
648
 
                                                        (void);</pre>
649
 
<p>
650
 
Returns a list of domain names that is useful to
651
 
browse for standard services. The list is generated
652
 
by contacting the dns server of the domain part the
653
 
hostname and asking for the list of browse domains.
654
 
Then extra domains from a gconf setting is added.
655
 
</p>
656
 
<p>
657
 
The "local" domain is not normally returned by this.
658
 
Care should be taken with local services so that its
659
 
obvious that they are local, and cannot be confused
660
 
with non-local services.</p>
661
 
<p>
662
 
</p>
663
 
<div class="variablelist"><table border="0">
664
 
<col align="left" valign="top">
665
 
<tbody><tr>
666
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
667
 
<td> a <span class="type">GList</span> of domain name strings.
668
 
</td>
669
 
</tr></tbody>
670
 
</table></div>
671
 
</div>
672
 
</div>
673
 
</div>
674
 
<div class="footer">
675
 
<hr>
676
 
          Generated by GTK-Doc V1.11</div>
677
 
</body>
678
 
</html>