25 #ifndef __LIBS_GUI_UTILS_SERVICE_SELECTOR_CBE_H_ 26 #define __LIBS_GUI_UTILS_SERVICE_SELECTOR_CBE_H_ 28 #include <netcomm/fawkes/client_handler.h> 32 # include <libglademm/xml.h> 40 class FawkesNetworkClient;
42 class ConnectionDispatcher;
47 #if GTK_VERSION_GE(3,0) 51 const char* service =
"_fawkes._tcp" );
53 Gtk::ToolButton* connect,
55 const char* service =
"_fawkes._tcp" );
60 const char* service =
"_fawkes._tcp" );
62 Gtk::ToolButton* connect,
64 const char* service =
"_fawkes._tcp" );
67 const char* cbe_name =
"cbeServices",
68 const char* btn_name =
"btnConnect",
69 const char* wnd_name =
"wndMain",
70 const char* service =
"_fawkes._tcp" );
89 #if GTK_VERSION_GE(3,0) 102 Glib::ustring __hostname;
103 Glib::ustring __servicename;
104 unsigned short __port;
Abstract base class for widgets that allow to view the detected services of a certain type...
void on_btn_connect_clicked()
Signal handler that is called whenever the connect button is clicked or an entry in the combo box is ...
Simple Fawkes network client.
Gtk::Window * m_parent
The parent Gtk::Window.
sigc::signal< void > signal_disconnected()
This signal is emitted whenever a network connection is terminated.
void on_disconnected()
Signal handler for the connection terminated signal.
Fawkes library namespace.
void initialize()
Initializer method.
unsigned int get_port()
Returns the currently used port (after connect)
ServiceModel * m_service_model
A liststore which contains information about detected services.
Gtk::ComboBoxEntry * m_cbe_services
A Gtk::ComboBox that lists all available services.
ServiceSelectorCBE(Gtk::ComboBoxEntry *services, Gtk::Button *connect, Gtk::Window *parent, const char *service="_fawkes._tcp")
Construtor.
Glib::ustring get_name()
Returns the currently selected service name (after connect)
void on_service_selected()
Signal handler that is called whenever an entry is selected from the combo box.
Glib::ustring get_hostname()
Returns the currently selected hostname (after connect)
ConnectionDispatcher * m_dispatcher
A ConnectionDispatcher which dispatches connection signals.
FawkesNetworkClient * get_network_client()
Access the current network client.
void on_connected()
Signal handler for the connection established signal.
Gtk::ToolButton * m_tbtn_connect
A Gtk::ToolButton that triggers the connection.
sigc::signal< void > signal_connected()
This signal is emitted whenever a network connection is established.
Gtk::Button * m_btn_connect
A Gtk::Button that triggers the connection.
Watches network client events and dispatches them as signals.
virtual ~ServiceSelectorCBE()
Destructor.
This widget consists of a Gtk::ComboBox and a Gtk::Button.