1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<title>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">
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">
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>
33
<tr><td colspan="5" class="shortcuts">
34
<a href="#gnome-vfs-20-gnome-vfs-dns-sd.synopsis" class="shortcut">Top</a>
36
<a href="#gnome-vfs-20-gnome-vfs-dns-sd.description" class="shortcut">Description</a>
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>
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>
46
<td valign="top" align="right"></td>
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,
56
const GHashTable *text,
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,
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,
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,
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,
94
int *text_raw_len_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,
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>
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>
106
<div class="refsect1" lang="en">
107
<a name="gnome-vfs-20-gnome-vfs-dns-sd.description"></a><h2>Description</h2>
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,
120
const GHashTable *text,
122
const char *text_raw,
123
gpointer callback_data);</pre>
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.
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.
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>
139
<div class="variablelist"><table border="0">
140
<col align="left" valign="top">
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
148
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
149
<td> whether the resolve succeeded or not
153
<td><p><span class="term"><em class="parameter"><code>service</code></em> :</span></p></td>
154
<td> the service that was resolved
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
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
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
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>
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>
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
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;
202
<div class="refsect2" lang="en">
203
<a name="GnomeVFSDNSSDService"></a><h3>GnomeVFSDNSSDService</h3>
204
<pre class="programlisting">typedef struct {
208
} GnomeVFSDNSSDService;
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>
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>
225
<div class="variablelist"><table border="0">
226
<col align="left" valign="top">
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
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
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
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
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,
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>
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.
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.
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>
275
<div class="variablelist"><table border="0">
276
<col align="left" valign="top">
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.
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.
289
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
290
<td> type of service to browse for.
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.
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>.
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>.
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.
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>
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>
324
<div class="variablelist"><table border="0">
325
<col align="left" valign="top">
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.
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.
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,
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>
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
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
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>
366
<div class="variablelist"><table border="0">
367
<col align="left" valign="top">
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.
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.
380
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
381
<td> type of the service to resolve.
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.
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.
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.
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>.
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>.
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.
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>
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>
425
<div class="variablelist"><table border="0">
426
<col align="left" valign="top">
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.
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.
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,
448
<a class="link" href="gnome-vfs-20-gnome-vfs-dns-sd.html#GnomeVFSDNSSDService" title="GnomeVFSDNSSDService">GnomeVFSDNSSDService</a> **services);</pre>
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>.
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.
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>.
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
466
<div class="variablelist"><table border="0">
467
<col align="left" valign="top">
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.
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.
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.
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.
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.
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.
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,
512
int *text_raw_len_out,
513
char **text_raw_out);</pre>
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
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>
524
<div class="variablelist"><table border="0">
525
<col align="left" valign="top">
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.
533
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
534
<td> type of the service to resolve.
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.
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.
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.
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.
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.
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>.
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>.
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.
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>
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>
589
<div class="variablelist"><table border="0">
590
<col align="left" valign="top">
593
<td><p><span class="term"><em class="parameter"><code>services</code></em> :</span></p></td>
594
<td> the list of services to free.
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.
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
611
GList **domains);</pre>
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>
618
<div class="variablelist"><table border="0">
619
<col align="left" valign="top">
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.
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.
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.
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.
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
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.
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>
663
<div class="variablelist"><table border="0">
664
<col align="left" valign="top">
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.
676
Generated by GTK-Doc V1.11</div>