23 #ifndef __FIREVISION_FVWIDGETS_FUSE_IMAGE_LIST_WIDGET_H_
24 #define __FIREVISION_FVWIDGETS_FUSE_IMAGE_LIST_WIDGET_H_
26 #include <fvutils/net/fuse_client_handler.h>
27 #include <fvutils/net/fuse_client.h>
29 #include <core/utils/lock_queue.h>
30 #include <core/utils/lock_list.h>
31 #include <core/threading/mutex.h>
35 namespace firevision {
46 void add_fountain_service(
const char* name,
47 const char* host_name,
49 void remove_fountain_service(
const char* name);
51 void set_toggle_compression_chk(Gtk::CheckButton* chk);
52 void set_auto_update_chk(Gtk::CheckButton* chk);
53 void set_image_list_trv(Gtk::TreeView* trv);
54 Glib::Dispatcher& image_selected();
57 void set_auto_update(
bool active,
unsigned int interval_sec = 5);
59 bool get_selected_image( std::string& host_name,
unsigned short& port,
60 std::string& image_id,
bool& compression );
63 void fuse_invalid_server_version( uint32_t local_version,
64 uint32_t remote_version )
throw();
65 void fuse_connection_established()
throw();
66 void fuse_connection_died()
throw();
71 class ImageRecord :
public Gtk::TreeModelColumnRecord
87 Gtk::TreeModelColumn<Glib::ustring> display_text;
88 Gtk::TreeModelColumn<Glib::ustring> service_name;
89 Gtk::TreeModelColumn<Glib::ustring> host_name;
90 Gtk::TreeModelColumn<unsigned int> port;
91 Gtk::TreeModelColumn<Glib::ustring> image_id;
92 Gtk::TreeModelColumn<unsigned int> colorspace;
93 Gtk::TreeModelColumn<unsigned int> width;
94 Gtk::TreeModelColumn<unsigned int> height;
95 Gtk::TreeModelColumn<unsigned int> buffer_size;
101 std::string service_name;
102 std::string host_name;
108 bool on_image_event(GdkEvent *event);
109 void on_add_host_manually();
110 void on_image_selected();
111 void on_auto_update_toggled();
112 void on_compression_toggled();
113 void get_image_list();
114 void delete_clients();
115 void update_image_list();
116 bool on_update_timeout();
121 ClientData m_cur_client;
123 Gtk::Menu* m_popup_menu;
124 Gtk::CheckButton* m_chk_auto_update;
125 Gtk::CheckButton* m_chk_compression;
126 Gtk::TreeView* m_trv_image_list;
127 Glib::RefPtr<Gtk::TreeStore> m_image_list;
130 ImageRecord m_image_record;
132 Glib::Dispatcher m_signal_get_image_list;
133 Glib::Dispatcher m_signal_delete_clients;
134 Glib::Dispatcher m_signal_image_selected;
135 Glib::Dispatcher m_signal_update_image_l;
138 unsigned int m_interval_sec;
139 sigc::connection m_timeout_conn;
141 Glib::ustring m_cur_image_id;
Mutex mutual exclusion lock.