Fawkes API
Fawkes Development Version
|
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>
37 class FawkesNetworkClient;
39 class ConnectionDispatcher;
41 class ServiceSelectorCBE
44 #if GTK_VERSION_GE(3, 0)
46 Gtk::Button * connect,
48 const char * service =
"_fawkes._tcp");
50 Gtk::ToolButton *connect,
52 const char * service =
"_fawkes._tcp");
55 Gtk::Button * connect,
57 const char * service =
"_fawkes._tcp");
59 Gtk::ToolButton * connect,
61 const char * service =
"_fawkes._tcp");
64 const char * cbe_name =
"cbeServices",
65 const char * btn_name =
"btnConnect",
66 const char * wnd_name =
"wndMain",
67 const char * service =
"_fawkes._tcp");
86 #if GTK_VERSION_GE(3, 0)
99 Glib::ustring hostname_;
100 Glib::ustring servicename_;
101 unsigned short port_;
virtual ~ServiceSelectorCBE()
Destructor.
void on_disconnected()
Signal handler for the connection terminated signal.
sigc::signal< void > signal_disconnected()
This signal is emitted whenever a network connection is terminated.
void on_btn_connect_clicked()
Signal handler that is called whenever the connect button is clicked or an entry in the combo box is ...
ServiceModel * m_service_model
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)
void initialize()
Initializer method.
unsigned int get_port()
Returns the currently used port (after connect)
ServiceSelectorCBE(Gtk::ComboBoxEntry *services, Gtk::Button *connect, Gtk::Window *parent, const char *service="_fawkes._tcp")
Construtor.
Gtk::ComboBoxEntry * m_cbe_services
ConnectionDispatcher * m_dispatcher
Gtk::Button * m_btn_connect
FawkesNetworkClient * get_network_client()
Access the current network client.
sigc::signal< void > signal_connected()
This signal is emitted whenever a network connection is established.
Gtk::ToolButton * m_tbtn_connect
void on_connected()
Signal handler for the connection established signal.