24 #ifndef _LIBS_GUI_UTILS_SERVICE_CHOOSER_DIALOG_H_
25 #define _LIBS_GUI_UTILS_SERVICE_CHOOSER_DIALOG_H_
27 #include <gtkmm/dialog.h>
28 #include <gtkmm/entry.h>
29 #include <gtkmm/expander.h>
30 #include <gtkmm/scrolledwindow.h>
31 #include <gtkmm/treeview.h>
32 #include <gui_utils/service_model.h>
37 #include <sys/socket.h>
38 #include <sys/types.h>
42 class FawkesNetworkClient;
50 Glib::ustring title =
"Select Service",
51 const char * service =
"_fawkes._tcp");
54 Glib::ustring title =
"Select Service",
55 const char * service =
"_fawkes._tcp");
59 void get_selected_service(Glib::ustring &name, Glib::ustring &hostname,
unsigned short int &port);
73 Gtk::Window & parent_;
74 Gtk::TreeView treeview_;
76 Gtk::Expander expander_;
77 Gtk::ScrolledWindow scrollwin_;
79 Glib::RefPtr<Gnome::Conf::Client> gconf_;
Simple Fawkes network client.
void get_raw_address(struct sockaddr *addr, socklen_t addr_size)
Get raw address.
ServiceChooserDialog(Gtk::Window &parent, FawkesNetworkClient *client, Glib::ustring title="Select Service", const char *service="_fawkes._tcp")
Constructor.
virtual ~ServiceChooserDialog()
Destructor.
virtual void on_expander_changed()
Signal handler for expander event.
void run_and_connect()
Run dialog and try to connect.
void get_selected_service(Glib::ustring &name, Glib::ustring &hostname, unsigned short int &port)
Get selected service.
Abstract base class for widgets that allow to view the detected services of a certain type.
Fawkes library namespace.