avahi
0.6.31
|
A Gtk dialog for browsing for services. More...
Go to the source code of this file.
Typedefs | |
typedef typedefG_BEGIN_DECLS struct _AuiServiceDialog | AuiServiceDialog |
The GTK service dialog structure. More... | |
Functions | |
Construction | |
GtkWidget * | aui_service_dialog_new (const gchar *title, GtkWindow *parent, const gchar *first_button_text,...) G_GNUC_NULL_TERMINATED |
Create a new service browser dialog with the specific title, parent window and the speicified buttons. More... | |
Service types to browse for | |
void | aui_service_dialog_set_browse_service_types (AuiServiceDialog *d, const gchar *type,...) G_GNUC_NULL_TERMINATED |
Select the service types to browse for. More... | |
void | aui_service_dialog_set_browse_service_typesv (AuiServiceDialog *d, const gchar *const *type) |
Same as aui_service_dialog_set_browse_service_types() but take a NULL terminated array. More... | |
const gchar *const * | aui_service_dialog_get_browse_service_types (AuiServiceDialog *d) |
Return the service types currently browsed for. More... | |
void | aui_service_dialog_set_service_type_name (AuiServiceDialog *d, const gchar *type, const gchar *name) |
Overwrite the pretty name shown in the service type column. More... | |
Domain to browse in | |
void | aui_service_dialog_set_domain (AuiServiceDialog *d, const gchar *domain) |
Set the domain to browse in. More... | |
const gchar * | aui_service_dialog_get_domain (AuiServiceDialog *d) |
Query the domain that is browsed in. More... | |
Selected service item | |
void | aui_service_dialog_set_service_type (AuiServiceDialog *d, const gchar *name) |
Set the service type for the service to select. More... | |
const gchar * | aui_service_dialog_get_service_type (AuiServiceDialog *d) |
Query the service type of the currently selected service. More... | |
void | aui_service_dialog_set_service_name (AuiServiceDialog *d, const gchar *name) |
Set the service name for the service to select. More... | |
const gchar * | aui_service_dialog_get_service_name (AuiServiceDialog *d) |
Query the service name of the currently select service. More... | |
Resolved service information | |
const AvahiAddress * | aui_service_dialog_get_address (AuiServiceDialog *d) |
Return the IP address of the selected service. More... | |
guint16 | aui_service_dialog_get_port (AuiServiceDialog *d) |
Return the IP port number of the selected service. More... | |
const gchar * | aui_service_dialog_get_host_name (AuiServiceDialog *d) |
Return the host name of the selected service. More... | |
const AvahiStringList * | aui_service_dialog_get_txt_data (AuiServiceDialog *d) |
Return the TXT metadata of the selected service. More... | |
Resolving settings | |
void | aui_service_dialog_set_resolve_service (AuiServiceDialog *d, gboolean resolve) |
Disable/Enable automatic service resolving. More... | |
gboolean | aui_service_dialog_get_resolve_service (AuiServiceDialog *d) |
Query the last status of aui_service_dialog_set_resolve_service() More... | |
void | aui_service_dialog_set_resolve_host_name (AuiServiceDialog *d, gboolean resolve) |
Disable/Enable automatic host name resolving. More... | |
gboolean | aui_service_dialog_get_resolve_host_name (AuiServiceDialog *d) |
Query the last status of aui_service_dialog_set_resolve_host_name() More... | |
Address family | |
void | aui_service_dialog_set_address_family (AuiServiceDialog *d, AvahiProtocol proto) |
Select the address family to look for services of. More... | |
AvahiProtocol | aui_service_dialog_get_address_family (AuiServiceDialog *d) |
Query the address family we're looking for. More... | |
A Gtk dialog for browsing for services.
Definition in file avahi-ui.h.
typedef typedefG_BEGIN_DECLS struct _AuiServiceDialog AuiServiceDialog |
The GTK service dialog structure.
Definition at line 64 of file avahi-ui.h.
const AvahiAddress* aui_service_dialog_get_address | ( | AuiServiceDialog * | d | ) |
Return the IP address of the selected service.
(Only valid if host name resolving has not been disabled via aui_service_dialog_set_resolve_host_name())
AvahiProtocol aui_service_dialog_get_address_family | ( | AuiServiceDialog * | d | ) |
Query the address family we're looking for.
const gchar* const* aui_service_dialog_get_browse_service_types | ( | AuiServiceDialog * | d | ) |
Return the service types currently browsed for.
i.e. what was previously set with aui_service_dialog_set_browse_service_types()
const gchar* aui_service_dialog_get_domain | ( | AuiServiceDialog * | d | ) |
Query the domain that is browsed in.
const gchar* aui_service_dialog_get_host_name | ( | AuiServiceDialog * | d | ) |
Return the host name of the selected service.
guint16 aui_service_dialog_get_port | ( | AuiServiceDialog * | d | ) |
Return the IP port number of the selected service.
gboolean aui_service_dialog_get_resolve_host_name | ( | AuiServiceDialog * | d | ) |
Query the last status of aui_service_dialog_set_resolve_host_name()
gboolean aui_service_dialog_get_resolve_service | ( | AuiServiceDialog * | d | ) |
Query the last status of aui_service_dialog_set_resolve_service()
const gchar* aui_service_dialog_get_service_name | ( | AuiServiceDialog * | d | ) |
Query the service name of the currently select service.
const gchar* aui_service_dialog_get_service_type | ( | AuiServiceDialog * | d | ) |
Query the service type of the currently selected service.
const AvahiStringList* aui_service_dialog_get_txt_data | ( | AuiServiceDialog * | d | ) |
Return the TXT metadata of the selected service.
GtkWidget* aui_service_dialog_new | ( | const gchar * | title, |
GtkWindow * | parent, | ||
const gchar * | first_button_text, | ||
... | |||
) |
Create a new service browser dialog with the specific title, parent window and the speicified buttons.
The buttons are specified in a similar way to GtkFileChooserDialog. Please note that at least one button has to respond GTK_RESPONSE_ACCEPT.
void aui_service_dialog_set_address_family | ( | AuiServiceDialog * | d, |
AvahiProtocol | proto | ||
) |
Select the address family to look for services of.
This can be used to look only for IPv6 services or only for IPv4 services. By default avahi-ui will browse for both IPv4 and IPv6 services.
void aui_service_dialog_set_browse_service_types | ( | AuiServiceDialog * | d, |
const gchar * | type, | ||
... | |||
) |
Select the service types to browse for.
Takes a NULL terminated list of DNS-SD service types. i.e. _http._tcp
void aui_service_dialog_set_browse_service_typesv | ( | AuiServiceDialog * | d, |
const gchar *const * | type | ||
) |
Same as aui_service_dialog_set_browse_service_types() but take a NULL terminated array.
void aui_service_dialog_set_domain | ( | AuiServiceDialog * | d, |
const gchar * | domain | ||
) |
Set the domain to browse in.
void aui_service_dialog_set_resolve_host_name | ( | AuiServiceDialog * | d, |
gboolean | resolve | ||
) |
Disable/Enable automatic host name resolving.
Disabling this feature will cause aui_service_dialog_get_address() return NULL in all case because avahi-ui will not resolve the host name of the selected service to an address. This is a slight optimization regarding the traffic imposed by this query to the network. By default, avahi-ui will resolve the host names of selected services.
void aui_service_dialog_set_resolve_service | ( | AuiServiceDialog * | d, |
gboolean | resolve | ||
) |
Disable/Enable automatic service resolving.
Disabling this feature will require you to resolve the selected service on our own. I.e. the port number, the TXT data and the host name/IP address will not be available after a service has been selected. This functionality offers a certain optimization in the traffic imposed on the network. Most people will not want to touch this.
void aui_service_dialog_set_service_name | ( | AuiServiceDialog * | d, |
const gchar * | name | ||
) |
Set the service name for the service to select.
void aui_service_dialog_set_service_type | ( | AuiServiceDialog * | d, |
const gchar * | name | ||
) |
Set the service type for the service to select.
void aui_service_dialog_set_service_type_name | ( | AuiServiceDialog * | d, |
const gchar * | type, | ||
const gchar * | name | ||
) |
Overwrite the pretty name shown in the service type column.