
@c %start of fragment

@deffn Function gnome-vfs-dns-sd-browse  (handle@tie{}@code{<gnome-vfsdnssd-browse-handle**>}) (domain@tie{}@code{mchars}) (type@tie{}@code{mchars}) (callback@tie{}@code{<gnome-vfsdnssd-browse-callback>}) (callback_data@tie{}@code{<gpointer>}) (callback_data_destroy_func@tie{}@code{<g-destroy-notify>}) @result{}@tie{} (ret@tie{}@code{<gnome-vfs-result>})
Browses @var{domain} for service of the type @var{type}, calling @var{callback}
whenever a new one is found or removed.

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
@code{gnome-vfs-dns-sd-list-browse-domains-sync} to get a list of domains that
are interested in a particular domain.

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.

@table @var
@item handle
pointer to a pointer to a @code{<gnome-vfsdnssd-browse-handle>} object.

@item domain
dns domain to browse, or "local" for multicast DNS.

@item type
type of service to browse for.

@item callback
function to be called when service is discovered.

@item callback-data
data to pass to @var{callback}.

@item callback-data-destroy-func
optional destructor function for @var{callback-data}.

@item ret
an integer representing the result of the operation.

@end table

@end deffn

@deffn Function gnome-vfs-dns-sd-stop-browse  (handle@tie{}@code{<gnome-vfsdnssd-browse-handle*>}) @result{}@tie{} (ret@tie{}@code{<gnome-vfs-result>})
Stops browsing a domain started with @code{gnome-vfs-dns-sd-browse}.

@table @var
@item handle
handle of the browse operation to be stopped.

@item ret
an integer representing the result of the operation.

@end table

@end deffn

@deffn Function gnome-vfs-dns-sd-resolve  (handle@tie{}@code{<gnome-vfsdnssd-resolve-handle**>}) (name@tie{}@code{mchars}) (type@tie{}@code{mchars}) (domain@tie{}@code{mchars}) (timeout@tie{}@code{int}) (callback@tie{}@code{<gnome-vfsdnssd-resolve-callback>}) (callback_data@tie{}@code{<gpointer>}) (callback_data_destroy_func@tie{}@code{<g-destroy-notify>}) @result{}@tie{} (ret@tie{}@code{<gnome-vfs-result>})
Tries to resolve a specific service (typically recieved from
@code{gnome-vfs-dns-sd-browse}) into a hostname/ip, port number and additional
options.

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.

The @var{timeout} argument is primarily useful for local resolves, since the
host owning the service might no longer be around to answer.

@table @var
@item handle
pointer to a pointer to a @code{<gnome-vfsdnssd-resolve-handle>} object.

@item name
name of the service to resolve in UTF-8 encoding.

@item type
type of the service to resolve.

@item domain
dns domain of the service to resolve, or "local" for multicast DNS.

@item timeout
maximum time (in milliseconds) to try to resolve, or zero if no maximum.

@item callback
function to be called when the service has been resolved.

@item callback-data
data to pass to @var{callback}.

@item callback-data-destroy-func
optional destructor function for @var{callback-data}.

@item ret
an integer representing the result of the operation.

@end table

@end deffn

@deffn Function gnome-vfs-dns-sd-cancel-resolve  (handle@tie{}@code{<gnome-vfsdnssd-resolve-handle*>}) @result{}@tie{} (ret@tie{}@code{<gnome-vfs-result>})
Cancels resolving a service started with @code{gnome-vfs-dns-sd-resolve}.

@table @var
@item handle
handle of the resolve operation to be cancelled.

@item ret
an integer representing the result of the operation.

@end table

@end deffn

@deffn Function gnome-vfs-dns-sd-browse-sync  (domain@tie{}@code{mchars}) (type@tie{}@code{mchars}) (timeout_msec@tie{}@code{int}) (services@tie{}@code{<gnome-vfsdnssd-service**>}) @result{}@tie{} (ret@tie{}@code{<gnome-vfs-result>}) (n_services@tie{}@code{int})
Browses @var{domain} for service of the type @var{type}, returning the result
after blocking for the duration of the browse. For details about @var{domain}
and @var{type}, see @code{gnome-vfs-dns-sd-browse}.

@var{timeout} 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.

The returned list can be freed with @code{gnome-vfs-dns-sd-service-list-free}.

This is a synchronous version of @code{gnome-vfs-dns-sd-browse}, see that for
more details.

@table @var
@item domain
The dns domain to browse, or "local" for multicast DNS.

@item type
type of the service to browse for.

@item timeout-msec
maximum time to browse, in milliseconds.

@item n-services
pointer to location to store number of returned services.

@item services
pointer to location to store returned services.

@item ret
an integer representing the result of the operation.

@end table

@end deffn

@deffn Function gnome-vfs-dns-sd-resolve-sync  (name@tie{}@code{mchars}) (type@tie{}@code{mchars}) (domain@tie{}@code{mchars}) (timeout_msec@tie{}@code{int}) (host@tie{}@code{<char**>}) (text@tie{}@code{<g-hash-table**>}) (text_raw_out@tie{}@code{<char**>}) @result{}@tie{} (ret@tie{}@code{<gnome-vfs-result>}) (port@tie{}@code{int}) (text_raw_len_out@tie{}@code{int})
Tries to resolve a specific service (typically recieved from
@code{gnome-vfs-dns-sd-browse}) into a hostname/ip, port number and additional
options.

This is a synchronous version of @code{gnome-vfs-dns-sd-resolve}, see that (and
its callback @code{gnome-vfsdnssd-resolve-callback}) for more details.

@table @var
@item name
name of the service to resolve in UTF-8 encoding.

@item type
type of the service to resolve.

@item domain
dns domain of the service to resolve, or "local" for multicast DNS.

@item timeout-msec
maximum time(in milliseconds) to try to resolve.

@item host
location to store the host name or ip of the host hosting the service.

@item port
location to store the port number to use for the service.

@item text
location to store a hash table giving additional options about the service.

@item text-raw-len-out
location to store length of @var{text-raw-out}.

@item text-raw-out
location to store raw version of the additional options in @var{text}.

@item ret
an integer representing the result of the operation.

@end table

@end deffn


@c %end of fragment
