From 4d38b0a057c9c78c3e400c953b6ab5ea6d2a37b0 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 12 Aug 2004 23:26:31 +0000 Subject: add support for listing clients and modules git-svn-id: file:///home/lennart/svn/public/paman/trunk@5 cdefa82f-4ce1-0310-97f5-ab6066f37c3c --- ServerInfo.hh | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 53 insertions(+), 9 deletions(-) (limited to 'ServerInfo.hh') diff --git a/ServerInfo.hh b/ServerInfo.hh index f6db437..bba87b3 100644 --- a/ServerInfo.hh +++ b/ServerInfo.hh @@ -9,9 +9,13 @@ class SinkInfo; class SourceInfo; class ServerInfo; +class ClientInfo; +class ModuleInfo; #include "SinkWindow.hh" #include "SourceWindow.hh" +#include "ClientWindow.hh" +#include "ModuleWindow.hh" #include "MainWindow.hh" class SinkInfo { @@ -31,10 +35,9 @@ public: uint32_t volume; uint32_t latency; - Gtk::TreePath treePath; - bool treePathValid; + Gtk::TreeRowReference treeRef; - SinkWindow *sinkWindow; + SinkWindow *window; }; class SourceInfo { @@ -51,32 +54,73 @@ public: uint32_t owner_module; uint32_t monitor_of_sink; - Gtk::TreePath treePath; - bool treePathValid; + Gtk::TreeRowReference treeRef; + SourceWindow *window; +}; + +class ModuleInfo { +public: + ModuleInfo(const struct pa_module_info &i); + ~ModuleInfo(); + + void update(const struct pa_module_info &i); + void showWindow(); + + uint32_t index; + Glib::ustring name, argument; + bool autoloaded; + uint32_t used; + + Gtk::TreeRowReference treeRef; + ModuleWindow *window; +}; + +class ClientInfo { +public: + ClientInfo(const struct pa_client_info &i); + ~ClientInfo(); + + void update(const struct pa_client_info &i); + void showWindow(); - SourceWindow *sourceWindow; + uint32_t index; + Glib::ustring name, protocol_name; + uint32_t owner_module; + + Gtk::TreeRowReference treeRef; + ClientWindow *window; }; -class ServerInfo { +class ServerInfoManager { public: - ServerInfo(struct pa_context &c); - ~ServerInfo(); + ServerInfoManager(struct pa_context &c); + ~ServerInfoManager(); void updateInfo(const struct pa_sink_info &i); void updateInfo(const struct pa_source_info &i); + void updateInfo(const struct pa_client_info &i); + void updateInfo(const struct pa_module_info &i); void showSinkWindow(uint32_t index); void showSourceWindow(uint32_t index); + void showClientWindow(uint32_t index); + void showModuleWindow(uint32_t index); SourceInfo* getSourceInfo(uint32_t index); SinkInfo* getSinkInfo(uint32_t index); + ClientInfo* getClientInfo(uint32_t index); + ModuleInfo* getModuleInfo(uint32_t index); void removeSinkInfo(uint32_t index); void removeSourceInfo(uint32_t index); + void removeClientInfo(uint32_t index); + void removeModuleInfo(uint32_t index); protected: std::map sinks; std::map sources; + std::map clients; + std::map modules; struct pa_context &context; }; -- cgit