24 #ifndef __LIBS_GUI_UTILS_SERVICE_MODEL_H_ 25 #define __LIBS_GUI_UTILS_SERVICE_MODEL_H_ 27 #include <netcomm/service_discovery/browse_handler.h> 28 #include <core/utils/lock_queue.h> 59 Gtk::TreeModelColumn<Glib::ustring>
name;
60 Gtk::TreeModelColumn<Glib::ustring>
type;
61 Gtk::TreeModelColumn<Glib::ustring>
domain;
64 Gtk::TreeModelColumn<Glib::ustring>
ipaddr;
65 Gtk::TreeModelColumn<unsigned short>
port;
67 Gtk::TreeModelColumn<struct sockaddr_storage>
sockaddr;
81 const struct sockaddr* addr,
const socklen_t addr_size,
82 uint16_t
port, std::list<std::string>& txt,
int flags );
120 bool m_own_avahi_thread;
Abstract base class for widgets that allow to view the detected services of a certain type...
ServiceRecord & get_column_record()
Access the column record.
void all_for_now()
All results have been retrieved.
Glib::RefPtr< Gtk::ListStore > m_service_list
Storage object.
virtual ~ServiceModel()
Destructor.
std::string ipaddr
the IP address of the new service
Gtk::TreeModelColumn< Glib::ustring > hostname
The name of the host the service is running on.
void browse_failed(const char *name, const char *type, const char *domain)
Failed to browse for a given service.
std::string hostname
the hostname of the new service
Fawkes library namespace.
Detects services and manages information about detected services.
std::string type
the type of the service
Glib::RefPtr< Gtk::ListStore > & get_list_store()
Get a reference to the model.
Gtk::TreeModelColumn< Glib::ustring > type
The type of the service.
fawkes::LockQueue< ServiceRemovedRecord > m_removed_services
Queue that holds the recently removed services.
std::string interface
name of network interface to reach service
Interface for class that process browse results.
void service_added(const char *name, const char *type, const char *domain, const char *host_name, const char *interface, const struct sockaddr *addr, const socklen_t addr_size, uint16_t port, std::list< std::string > &txt, int flags)
A service has been announced on the network.
Glib::Dispatcher m_signal_service_removed
This signal is emitted whenever a service is removed.
virtual void on_service_removed()
Signal handler for the service-removed signal.
Gtk::TreeModelColumn< struct sockaddr_storage > sockaddr
sockaddr structure
unsigned short port
the port the new service is running on
ServiceRecord m_service_record
Column record class.
Data structure to hold information about a recently removed services.
std::string type
the type of the new service
fawkes::AvahiThread * m_avahi
Avahi thread.
virtual void on_service_added()
Signal handler for the service-added signal.
std::string name
the name of the new service
Gtk::TreeModelColumn< Glib::ustring > domain
The domain of the service.
Gtk::TreeModelColumn< unsigned short > port
The port the service is running on.
Gtk::TreeModelColumn< Glib::ustring > addrport
Address:port string.
std::string domain
the domain of the service
std::string addrport
address:port
void cache_exhausted()
Cache exhausted.
ServiceModel(const char *service="_fawkes._tcp")
Constructor.
Data structure to hold information about a newly added services.
Gtk::TreeModelColumn< Glib::ustring > name
The name of the service.
void service_removed(const char *name, const char *type, const char *domain)
A service has been removed from the network.
std::string domain
the domain of the new service
Glib::Dispatcher m_signal_service_added
This signal is emitted whenever a new service has been added.
Gtk::TreeModelColumn< Glib::ustring > interface
Name of network interface to reach service.
Gtk::TreeModelColumn< Glib::ustring > ipaddr
The IP address as string of the host the service is running on.
std::string name
the name of the service
fawkes::LockQueue< ServiceAddedRecord > m_added_services
Queue that holds the newly added services.