23#ifndef SRC_HEADERS_AVAHI_DISCOVER_H_
24#define SRC_HEADERS_AVAHI_DISCOVER_H_
27#include <avahi-gobject/ga-client.h>
28#include <avahi-gobject/ga-service-browser.h>
29#include <avahi-gobject/ga-service-resolver.h>
41 Entry(AvahiIfIndex interface_, AvahiProtocol protocol_,
const char *name_,
42 const char *type_,
const char *domain_, AvahiLookupResultFlags flags_)
61 GaServiceBrowser *
browser, AvahiIfIndex interface, AvahiProtocol protocol,
62 const char *name,
const char *type,
const char *domain, AvahiLookupResultFlags flags,
void *data);
64 GaServiceBrowser *
browser, AvahiIfIndex interface, AvahiProtocol protocol,
65 const char *name,
const char *type,
const char *domain, AvahiLookupResultFlags flags,
void *data);
67 static void on_found(GaServiceResolver *
resolver, AvahiIfIndex interface, AvahiProtocol protocol,
68 const char *name,
const char *type,
const char *domain,
const char *host_name,
69 const AvahiAddress * a, uint16_t port, AvahiStringList * txt,
70 AvahiLookupResultFlags flags,
void *data);
78 bool get_address_port(Glib::ustring& address,
int& port, Glib::ustring& name, Glib::ustring& host);
89 Gtk::TreeModelColumn<Glib::ustring>
name;
94 void on_row(
const Gtk::TreePath& path, Gtk::TreeViewColumn* column);
100 bool get_address_port(Glib::ustring& address,
int& port, Glib::ustring& name, Glib::ustring& host)
static void cache_exhausted(GaServiceBrowser *browser, void *data)
GaServiceResolver * resolver
bool get_address_port(Glib::ustring &address, int &port, Glib::ustring &name, Glib::ustring &host)
static void new_service(GaServiceBrowser *browser, AvahiIfIndex interface, AvahiProtocol protocol, const char *name, const char *type, const char *domain, AvahiLookupResultFlags flags, void *data)
GaServiceBrowser * browser
static void removed_service(GaServiceBrowser *browser, AvahiIfIndex interface, AvahiProtocol protocol, const char *name, const char *type, const char *domain, AvahiLookupResultFlags flags, void *data)
std::map< Glib::ustring, int > service_names
sigc::signal< void > & signal_changed()
std::list< Entry > services
static void on_failure(GaServiceResolver *resolver, GError *error, void *data)
bool invoke_resolver(const Glib::ustring &name)
sigc::signal< void > changed
static void on_found(GaServiceResolver *resolver, AvahiIfIndex interface, AvahiProtocol protocol, const char *name, const char *type, const char *domain, const char *host_name, const AvahiAddress *a, uint16_t port, AvahiStringList *txt, AvahiLookupResultFlags flags, void *data)
void get_service_names(std::vector< Glib::ustring > &r)
Gtk::TreeModelColumn< Glib::ustring > name
bool get_address_port(Glib::ustring &address, int &port, Glib::ustring &name, Glib::ustring &host)
SelectInstance(gx_system::CmdlineOptions &options, Gtk::Window *splash)
void on_selection_changed()
void on_row(const Gtk::TreePath &path, Gtk::TreeViewColumn *column)
void on_response(int response_id)
SelectInstance::ModelColumns cols
Entry(AvahiIfIndex interface_, AvahiProtocol protocol_, const char *name_, const char *type_, const char *domain_, AvahiLookupResultFlags flags_)
bool operator==(const Entry &e) const
AvahiLookupResultFlags flags