<refentry id="gnome-vfs-20-gnome-vfs-dns-sd">
<refmeta>
<refentrytitle id="top_of_page">Zeroconf networking support</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GNOME-VFS-2.0 Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>Zeroconf networking support</refname>
<refpurpose>Gets information about available Zeroconf (aka <trademark>RendezVous</trademark>) services on a local network.</refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>

<refsynopsisdiv id="synopsis">
<title id="synopsis.title">Synopsis</title>

<synopsis>



<link linkend="void">void</link>        (<link linkend="GnomeVFSDNSSDResolveCallback">*GnomeVFSDNSSDResolveCallback</link>) (<link linkend="GnomeVFSDNSSDResolveHandle">GnomeVFSDNSSDResolveHandle</link> *handle,
                                             <link linkend="GnomeVFSResult">GnomeVFSResult</link> result,
                                             const <link linkend="GnomeVFSDNSSDService">GnomeVFSDNSSDService</link> *service,
                                             const <link linkend="char">char</link> *host,
                                             <link linkend="int">int</link> port,
                                             const <link linkend="GHashTable">GHashTable</link> *text,
                                             <link linkend="int">int</link> text_raw_len,
                                             const <link linkend="char">char</link> *text_raw,
                                             <link linkend="gpointer">gpointer</link> callback_data);
enum        <link linkend="GnomeVFSDNSSDServiceStatus">GnomeVFSDNSSDServiceStatus</link>;
            <link linkend="GnomeVFSDNSSDService">GnomeVFSDNSSDService</link>;
<link linkend="void">void</link>        (<link linkend="GnomeVFSDNSSDBrowseCallback">*GnomeVFSDNSSDBrowseCallback</link>)  (<link linkend="GnomeVFSDNSSDBrowseHandle">GnomeVFSDNSSDBrowseHandle</link> *handle,
                                             <link linkend="GnomeVFSDNSSDServiceStatus">GnomeVFSDNSSDServiceStatus</link> status,
                                             const <link linkend="GnomeVFSDNSSDService">GnomeVFSDNSSDService</link> *service,
                                             <link linkend="gpointer">gpointer</link> callback_data);
<link linkend="GnomeVFSResult">GnomeVFSResult</link> <link linkend="gnome-vfs-dns-sd-browse">gnome_vfs_dns_sd_browse</link>      (<link linkend="GnomeVFSDNSSDBrowseHandle">GnomeVFSDNSSDBrowseHandle</link> **handle,
                                             const <link linkend="char">char</link> *domain,
                                             const <link linkend="char">char</link> *type,
                                             <link linkend="GnomeVFSDNSSDBrowseCallback">GnomeVFSDNSSDBrowseCallback</link> callback,
                                             <link linkend="gpointer">gpointer</link> callback_data,
                                             <link linkend="GDestroyNotify">GDestroyNotify</link> callback_data_destroy_func);
<link linkend="GnomeVFSResult">GnomeVFSResult</link> <link linkend="gnome-vfs-dns-sd-stop-browse">gnome_vfs_dns_sd_stop_browse</link> (<link linkend="GnomeVFSDNSSDBrowseHandle">GnomeVFSDNSSDBrowseHandle</link> *handle);
<link linkend="GnomeVFSResult">GnomeVFSResult</link> <link linkend="gnome-vfs-dns-sd-resolve">gnome_vfs_dns_sd_resolve</link>     (<link linkend="GnomeVFSDNSSDResolveHandle">GnomeVFSDNSSDResolveHandle</link> **handle,
                                             const <link linkend="char">char</link> *name,
                                             const <link linkend="char">char</link> *type,
                                             const <link linkend="char">char</link> *domain,
                                             <link linkend="int">int</link> timeout,
                                             <link linkend="GnomeVFSDNSSDResolveCallback">GnomeVFSDNSSDResolveCallback</link> callback,
                                             <link linkend="gpointer">gpointer</link> callback_data,
                                             <link linkend="GDestroyNotify">GDestroyNotify</link> callback_data_destroy_func);
<link linkend="GnomeVFSResult">GnomeVFSResult</link> <link linkend="gnome-vfs-dns-sd-cancel-resolve">gnome_vfs_dns_sd_cancel_resolve</link>
                                            (<link linkend="GnomeVFSDNSSDResolveHandle">GnomeVFSDNSSDResolveHandle</link> *handle);
<link linkend="GnomeVFSResult">GnomeVFSResult</link> <link linkend="gnome-vfs-dns-sd-browse-sync">gnome_vfs_dns_sd_browse_sync</link> (const <link linkend="char">char</link> *domain,
                                             const <link linkend="char">char</link> *type,
                                             <link linkend="int">int</link> timeout_msec,
                                             <link linkend="int">int</link> *n_services,
                                             <link linkend="GnomeVFSDNSSDService">GnomeVFSDNSSDService</link> **services);
<link linkend="GnomeVFSResult">GnomeVFSResult</link> <link linkend="gnome-vfs-dns-sd-resolve-sync">gnome_vfs_dns_sd_resolve_sync</link>
                                            (const <link linkend="char">char</link> *name,
                                             const <link linkend="char">char</link> *type,
                                             const <link linkend="char">char</link> *domain,
                                             <link linkend="int">int</link> timeout_msec,
                                             <link linkend="char">char</link> **host,
                                             <link linkend="int">int</link> *port,
                                             <link linkend="GHashTable">GHashTable</link> **text,
                                             <link linkend="int">int</link> *text_raw_len,
                                             <link linkend="char">char</link> **text_raw);
<link linkend="void">void</link>        <link linkend="gnome-vfs-dns-sd-service-list-free">gnome_vfs_dns_sd_service_list_free</link>
                                            (<link linkend="GnomeVFSDNSSDService">GnomeVFSDNSSDService</link> *services,
                                             <link linkend="int">int</link> n_services);
<link linkend="GnomeVFSResult">GnomeVFSResult</link> <link linkend="gnome-vfs-dns-sd-list-browse-domains-sync">gnome_vfs_dns_sd_list_browse_domains_sync</link>
                                            (const <link linkend="char">char</link> *domain,
                                             <link linkend="int">int</link> timeout_msec,
                                             <link linkend="GList">GList</link> **domains);
<link linkend="GList">GList</link>*      <link linkend="gnome-vfs-get-default-browse-domains">gnome_vfs_get_default_browse_domains</link>
                                            (void);
</synopsis>
</refsynopsisdiv>









<refsect1 id="desc">
<title id="desc.title">Description</title>
<para>

</para>
</refsect1>

<refsect1 id="details">
<title id="details.title">Details</title>
<refsect2>
<title><anchor id="GnomeVFSDNSSDResolveCallback" role="function"/>GnomeVFSDNSSDResolveCallback ()</title>
<indexterm><primary>GnomeVFSDNSSDResolveCallback</primary></indexterm><programlisting><link linkend="void">void</link>        (*GnomeVFSDNSSDResolveCallback) (<link linkend="GnomeVFSDNSSDResolveHandle">GnomeVFSDNSSDResolveHandle</link> *handle,
                                             <link linkend="GnomeVFSResult">GnomeVFSResult</link> result,
                                             const <link linkend="GnomeVFSDNSSDService">GnomeVFSDNSSDService</link> *service,
                                             const <link linkend="char">char</link> *host,
                                             <link linkend="int">int</link> port,
                                             const <link linkend="GHashTable">GHashTable</link> *text,
                                             <link linkend="int">int</link> text_raw_len,
                                             const <link linkend="char">char</link> *text_raw,
                                             <link linkend="gpointer">gpointer</link> callback_data);</programlisting>
<para>
Callback for the <link linkend="gnome-vfs-dns-sd-resolve"><function>gnome_vfs_dns_sd_resolve()</function></link> function that is called
when a service has been resolved.
</para>
<para>
The <parameter>host</parameter> and <parameter>port</parameter> can be used to contact the requested service, and
<parameter>text</parameter> contains additional options as defined for the type requested.
</para>
<para>
To check for options being set in <parameter>text</parameter> without any value ("key" as
opposed to "key=value") you must use <link linkend="g-hash-table-lookup-extended"><function>g_hash_table_lookup_extended()</function></link>, since
they are stored in the hash table with a NULL value, and <link linkend="g-hash-table-lookup"><function>g_hash_table_lookup()</function></link>
can't tell that from the case where the key is not in the hash table.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>handle</parameter>&nbsp;:</term>
<listitem><simpara> handle of the operation generating the callback
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>result</parameter>&nbsp;:</term>
<listitem><simpara> whether the resolve succeeded or not
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>service</parameter>&nbsp;:</term>
<listitem><simpara> the service that was resolved
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>host</parameter>&nbsp;:</term>
<listitem><simpara> the host name or ip of the host hosting the service
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>port</parameter>&nbsp;:</term>
<listitem><simpara> the port number to use for the service
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>text</parameter>&nbsp;:</term>
<listitem><simpara> a hash table giving additional options about the service
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>text_raw_len</parameter>&nbsp;:</term>
<listitem><simpara> length of <parameter>text_raw</parameter>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>text_raw</parameter>&nbsp;:</term>
<listitem><simpara> raw version of the additional options in <parameter>text</parameter>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback_data</parameter>&nbsp;:</term>
<listitem><simpara> user data defined when the callback was established
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="GnomeVFSDNSSDServiceStatus" role="enum"/>enum GnomeVFSDNSSDServiceStatus</title>
<indexterm><primary>GnomeVFSDNSSDServiceStatus</primary></indexterm><programlisting>typedef enum {
	GNOME_VFS_DNS_SD_SERVICE_ADDED,
	GNOME_VFS_DNS_SD_SERVICE_REMOVED
} GnomeVFSDNSSDServiceStatus;
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="GnomeVFSDNSSDService" role="struct"/>GnomeVFSDNSSDService</title>
<indexterm><primary>GnomeVFSDNSSDService</primary></indexterm><programlisting>typedef struct {
	char *name;
	char *type;
	char *domain;
} GnomeVFSDNSSDService;
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="GnomeVFSDNSSDBrowseCallback" role="function"/>GnomeVFSDNSSDBrowseCallback ()</title>
<indexterm><primary>GnomeVFSDNSSDBrowseCallback</primary></indexterm><programlisting><link linkend="void">void</link>        (*GnomeVFSDNSSDBrowseCallback)  (<link linkend="GnomeVFSDNSSDBrowseHandle">GnomeVFSDNSSDBrowseHandle</link> *handle,
                                             <link linkend="GnomeVFSDNSSDServiceStatus">GnomeVFSDNSSDServiceStatus</link> status,
                                             const <link linkend="GnomeVFSDNSSDService">GnomeVFSDNSSDService</link> *service,
                                             <link linkend="gpointer">gpointer</link> callback_data);</programlisting>
<para>
Callback for the <link linkend="gnome-vfs-dns-sd-browse"><function>gnome_vfs_dns_sd_browse()</function></link> function that informs
the user of services that are added or removed.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>handle</parameter>&nbsp;:</term>
<listitem><simpara> handle of the operation generating the callback
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>status</parameter>&nbsp;:</term>
<listitem><simpara> whether a service addition or removal was detected
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>service</parameter>&nbsp;:</term>
<listitem><simpara> the service that was discovered or removed
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback_data</parameter>&nbsp;:</term>
<listitem><simpara> user data defined when the callback was established
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-dns-sd-browse" role="function"/>gnome_vfs_dns_sd_browse ()</title>
<indexterm><primary>gnome_vfs_dns_sd_browse</primary></indexterm><programlisting><link linkend="GnomeVFSResult">GnomeVFSResult</link> gnome_vfs_dns_sd_browse      (<link linkend="GnomeVFSDNSSDBrowseHandle">GnomeVFSDNSSDBrowseHandle</link> **handle,
                                             const <link linkend="char">char</link> *domain,
                                             const <link linkend="char">char</link> *type,
                                             <link linkend="GnomeVFSDNSSDBrowseCallback">GnomeVFSDNSSDBrowseCallback</link> callback,
                                             <link linkend="gpointer">gpointer</link> callback_data,
                                             <link linkend="GDestroyNotify">GDestroyNotify</link> callback_data_destroy_func);</programlisting>
<para>
Browses <parameter>domain</parameter> for service of the type <parameter>type</parameter>, calling <parameter>callback</parameter> whenever
a new one is found or removed.
</para>
<para>
The domain to use can be "local" for multicast dns on the local network
(known as mDNS), or it can be the domain of the current host. You can also
use <link linkend="gnome-vfs-dns-sd-list-browse-domains-sync"><function>gnome_vfs_dns_sd_list_browse_domains_sync()</function></link> to get a list of domains
that are interested in a particular domain.
</para>
<para>
The type is a string of the form "_type._tcp" or "_type._udp", where type
is a service type registered at http://www.dns-sd.org/ServiceTypes.html.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>handle</parameter>&nbsp;:</term>
<listitem><simpara> pointer to a pointer to a <link linkend="GnomeVFSDNSSDBrowseHandle"><type>GnomeVFSDNSSDBrowseHandle</type></link> object.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>domain</parameter>&nbsp;:</term>
<listitem><simpara> dns domain to browse, or "local" for multicast DNS.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>type</parameter>&nbsp;:</term>
<listitem><simpara> type of service to browse for.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&nbsp;:</term>
<listitem><simpara> function to be called when service is discovered.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback_data</parameter>&nbsp;:</term>
<listitem><simpara> data to pass to <parameter>callback</parameter>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback_data_destroy_func</parameter>&nbsp;:</term>
<listitem><simpara> optional destructor function for <parameter>callback_data</parameter>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> an integer representing the result of the operation.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-dns-sd-stop-browse" role="function"/>gnome_vfs_dns_sd_stop_browse ()</title>
<indexterm><primary>gnome_vfs_dns_sd_stop_browse</primary></indexterm><programlisting><link linkend="GnomeVFSResult">GnomeVFSResult</link> gnome_vfs_dns_sd_stop_browse (<link linkend="GnomeVFSDNSSDBrowseHandle">GnomeVFSDNSSDBrowseHandle</link> *handle);</programlisting>
<para>
Stops browsing a domain started with <link linkend="gnome-vfs-dns-sd-browse"><function>gnome_vfs_dns_sd_browse()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>handle</parameter>&nbsp;:</term>
<listitem><simpara> handle of the browse operation to be stopped.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> an integer representing the result of the operation.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-dns-sd-resolve" role="function"/>gnome_vfs_dns_sd_resolve ()</title>
<indexterm><primary>gnome_vfs_dns_sd_resolve</primary></indexterm><programlisting><link linkend="GnomeVFSResult">GnomeVFSResult</link> gnome_vfs_dns_sd_resolve     (<link linkend="GnomeVFSDNSSDResolveHandle">GnomeVFSDNSSDResolveHandle</link> **handle,
                                             const <link linkend="char">char</link> *name,
                                             const <link linkend="char">char</link> *type,
                                             const <link linkend="char">char</link> *domain,
                                             <link linkend="int">int</link> timeout,
                                             <link linkend="GnomeVFSDNSSDResolveCallback">GnomeVFSDNSSDResolveCallback</link> callback,
                                             <link linkend="gpointer">gpointer</link> callback_data,
                                             <link linkend="GDestroyNotify">GDestroyNotify</link> callback_data_destroy_func);</programlisting>
<para>
Tries to resolve a specific service (typically recieved from
<link linkend="gnome-vfs-dns-sd-browse"><function>gnome_vfs_dns_sd_browse()</function></link>) into a hostname/ip, port number and additional
options.
</para>
<para>
If you ever have to save a reference to a service you should store the
unresolved name/type/domain tripplet, because the actual host for the
service can change.
</para>
<para>
The <parameter>timeout</parameter> argument is primarily useful for local resolves, since the
host owning the service might no longer be around to answer.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>handle</parameter>&nbsp;:</term>
<listitem><simpara> pointer to a pointer to a <link linkend="GnomeVFSDNSSDResolveHandle"><type>GnomeVFSDNSSDResolveHandle</type></link> object.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> name of the service to resolve in UTF-8 encoding.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>type</parameter>&nbsp;:</term>
<listitem><simpara> type of the service to resolve.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>domain</parameter>&nbsp;:</term>
<listitem><simpara> dns domain of the service to resolve, or "local" for multicast DNS.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>timeout</parameter>&nbsp;:</term>
<listitem><simpara> maximum time (in milliseconds) to try to resolve, or zero if no maximum.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&nbsp;:</term>
<listitem><simpara> function to be called when the service has been resolved.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback_data</parameter>&nbsp;:</term>
<listitem><simpara> data to pass to <parameter>callback</parameter>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback_data_destroy_func</parameter>&nbsp;:</term>
<listitem><simpara> optional destructor function for <parameter>callback_data</parameter>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> an integer representing the result of the operation.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-dns-sd-cancel-resolve" role="function"/>gnome_vfs_dns_sd_cancel_resolve ()</title>
<indexterm><primary>gnome_vfs_dns_sd_cancel_resolve</primary></indexterm><programlisting><link linkend="GnomeVFSResult">GnomeVFSResult</link> gnome_vfs_dns_sd_cancel_resolve
                                            (<link linkend="GnomeVFSDNSSDResolveHandle">GnomeVFSDNSSDResolveHandle</link> *handle);</programlisting>
<para>
Cancels resolving a service started with <link linkend="gnome-vfs-dns-sd-resolve"><function>gnome_vfs_dns_sd_resolve()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>handle</parameter>&nbsp;:</term>
<listitem><simpara> handle of the resolve operation to be cancelled.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> an integer representing the result of the operation.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-dns-sd-browse-sync" role="function"/>gnome_vfs_dns_sd_browse_sync ()</title>
<indexterm><primary>gnome_vfs_dns_sd_browse_sync</primary></indexterm><programlisting><link linkend="GnomeVFSResult">GnomeVFSResult</link> gnome_vfs_dns_sd_browse_sync (const <link linkend="char">char</link> *domain,
                                             const <link linkend="char">char</link> *type,
                                             <link linkend="int">int</link> timeout_msec,
                                             <link linkend="int">int</link> *n_services,
                                             <link linkend="GnomeVFSDNSSDService">GnomeVFSDNSSDService</link> **services);</programlisting>
<para>
Browses <parameter>domain</parameter> for service of the type <parameter>type</parameter>, returning the result
after blocking for the duration of the browse. For details about <parameter>domain</parameter>
and <parameter>type</parameter>, see <link linkend="gnome-vfs-dns-sd-browse"><function>gnome_vfs_dns_sd_browse()</function></link>.
</para>
<para>
<parameter>timeout</parameter> is essential for the "local" domain, since you can never really
know when you've gotten the full set of return values when using multicast.
</para>
<para>
The returned list can be freed with <link linkend="gnome-vfs-dns-sd-service-list-free"><function>gnome_vfs_dns_sd_service_list_free()</function></link>.
</para>
<para>
This is a synchronous version of <link linkend="gnome-vfs-dns-sd-browse"><function>gnome_vfs_dns_sd_browse()</function></link>, see that for
more details.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>domain</parameter>&nbsp;:</term>
<listitem><simpara> The dns domain to browse, or "local" for multicast DNS.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>type</parameter>&nbsp;:</term>
<listitem><simpara> type of the service to browse for.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>timeout_msec</parameter>&nbsp;:</term>
<listitem><simpara> maximum time to browse, in milliseconds.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>n_services</parameter>&nbsp;:</term>
<listitem><simpara> pointer to location to store number of returned services.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>services</parameter>&nbsp;:</term>
<listitem><simpara> pointer to location to store returned services.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> an integer representing the result of the operation.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-dns-sd-resolve-sync" role="function"/>gnome_vfs_dns_sd_resolve_sync ()</title>
<indexterm><primary>gnome_vfs_dns_sd_resolve_sync</primary></indexterm><programlisting><link linkend="GnomeVFSResult">GnomeVFSResult</link> gnome_vfs_dns_sd_resolve_sync
                                            (const <link linkend="char">char</link> *name,
                                             const <link linkend="char">char</link> *type,
                                             const <link linkend="char">char</link> *domain,
                                             <link linkend="int">int</link> timeout_msec,
                                             <link linkend="char">char</link> **host,
                                             <link linkend="int">int</link> *port,
                                             <link linkend="GHashTable">GHashTable</link> **text,
                                             <link linkend="int">int</link> *text_raw_len,
                                             <link linkend="char">char</link> **text_raw);</programlisting>
<para>
Tries to resolve a specific service (typically recieved from
<link linkend="gnome-vfs-dns-sd-browse"><function>gnome_vfs_dns_sd_browse()</function></link>) into a hostname/ip, port number and additional
options.
</para>
<para>
This is a synchronous version of <link linkend="gnome-vfs-dns-sd-resolve"><function>gnome_vfs_dns_sd_resolve()</function></link>, see that (and
its callback <link linkend="GnomeVFSDNSSDResolveCallback"><function>GnomeVFSDNSSDResolveCallback()</function></link>) for more details.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> name of the service to resolve in UTF-8 encoding.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>type</parameter>&nbsp;:</term>
<listitem><simpara> type of the service to resolve.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>domain</parameter>&nbsp;:</term>
<listitem><simpara> dns domain of the service to resolve, or "local" for multicast DNS.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>timeout_msec</parameter>&nbsp;:</term>
<listitem><simpara> maximum time(in milliseconds) to try to resolve.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>host</parameter>&nbsp;:</term>
<listitem><simpara> location to store the host name or ip of the host hosting the service.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>port</parameter>&nbsp;:</term>
<listitem><simpara> location to store the port number to use for the service.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>text</parameter>&nbsp;:</term>
<listitem><simpara> location to store a hash table giving additional options about the service.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>text_raw_len</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>text_raw</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> an integer representing the result of the operation.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-dns-sd-service-list-free" role="function"/>gnome_vfs_dns_sd_service_list_free ()</title>
<indexterm><primary>gnome_vfs_dns_sd_service_list_free</primary></indexterm><programlisting><link linkend="void">void</link>        gnome_vfs_dns_sd_service_list_free
                                            (<link linkend="GnomeVFSDNSSDService">GnomeVFSDNSSDService</link> *services,
                                             <link linkend="int">int</link> n_services);</programlisting>
<para>
Frees a list of services as returned by <link linkend="gnome-vfs-dns-sd-browse-sync"><function>gnome_vfs_dns_sd_browse_sync()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>services</parameter>&nbsp;:</term>
<listitem><simpara> the list of services to free.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>n_services</parameter>&nbsp;:</term>
<listitem><simpara> the number of services to free.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-dns-sd-list-browse-domains-sync" role="function"/>gnome_vfs_dns_sd_list_browse_domains_sync ()</title>
<indexterm><primary>gnome_vfs_dns_sd_list_browse_domains_sync</primary></indexterm><programlisting><link linkend="GnomeVFSResult">GnomeVFSResult</link> gnome_vfs_dns_sd_list_browse_domains_sync
                                            (const <link linkend="char">char</link> *domain,
                                             <link linkend="int">int</link> timeout_msec,
                                             <link linkend="GList">GList</link> **domains);</programlisting>
<para>
Lists the recommended browsing domains for a specific dns domain.
This can be used to find interesting domains for the domain
you are currently in. These can then be browsed with <link linkend="gnome-vfs-dns-sd-browse"><function>gnome_vfs_dns_sd_browse()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>domain</parameter>&nbsp;:</term>
<listitem><simpara> the domain to list browsable domains in.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>timeout_msec</parameter>&nbsp;:</term>
<listitem><simpara> maximum time to run, in milliseconds.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>domains</parameter>&nbsp;:</term>
<listitem><simpara> location to store the returned list of domain names strings.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> an integer representing the result of the operation.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-get-default-browse-domains" role="function"/>gnome_vfs_get_default_browse_domains ()</title>
<indexterm><primary>gnome_vfs_get_default_browse_domains</primary></indexterm><programlisting><link linkend="GList">GList</link>*      gnome_vfs_get_default_browse_domains
                                            (void);</programlisting>
<para>
Returns a list of domain names that is useful to
browse for standard services. The list is generated
by contacting the dns server of the domain part the
hostname and asking for the list of browse domains.
Then extra domains from a gconf setting is added.
</para>
<para>
The "local" domain is not normally returned by this.
Care should be taken with local services so that its
obvious that they are local, and cannot be confused
with non-local services.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="GList"><type>GList</type></link> of domain name strings.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
