blob: f6db437b9205726f540226d5c9294c1e85b5d9b6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
#ifndef fooserverinfohhfoo
#define fooserverinfohhfoo
#include <gtkmm.h>
#include <map>
#include <polyp/polyplib.h>
class SinkInfo;
class SourceInfo;
class ServerInfo;
#include "SinkWindow.hh"
#include "SourceWindow.hh"
#include "MainWindow.hh"
class SinkInfo {
public:
SinkInfo(const struct pa_sink_info &i);
~SinkInfo();
void update(const struct pa_sink_info &i);
void showWindow();
Glib::ustring name, description;
uint32_t index;
struct pa_sample_spec sample_spec;
uint32_t monitor_source;
uint32_t owner_module;
uint32_t volume;
uint32_t latency;
Gtk::TreePath treePath;
bool treePathValid;
SinkWindow *sinkWindow;
};
class SourceInfo {
public:
SourceInfo(const struct pa_source_info &i);
~SourceInfo();
void update(const struct pa_source_info &i);
void showWindow();
Glib::ustring name, description;
uint32_t index;
struct pa_sample_spec sample_spec;
uint32_t owner_module;
uint32_t monitor_of_sink;
Gtk::TreePath treePath;
bool treePathValid;
SourceWindow *sourceWindow;
};
class ServerInfo {
public:
ServerInfo(struct pa_context &c);
~ServerInfo();
void updateInfo(const struct pa_sink_info &i);
void updateInfo(const struct pa_source_info &i);
void showSinkWindow(uint32_t index);
void showSourceWindow(uint32_t index);
SourceInfo* getSourceInfo(uint32_t index);
SinkInfo* getSinkInfo(uint32_t index);
void removeSinkInfo(uint32_t index);
void removeSourceInfo(uint32_t index);
protected:
std::map<int, SinkInfo*> sinks;
std::map<int, SourceInfo*> sources;
struct pa_context &context;
};
#endif
|