Changeset View
Changeset View
Standalone View
Standalone View
src/modulemanager.h
Show All 23 Lines | |||||
24 | #include <QString> | 24 | #include <QString> | ||
25 | 25 | | |||
26 | #include <pulse/introspect.h> | 26 | #include <pulse/introspect.h> | ||
27 | 27 | | |||
28 | #include "context.h" | 28 | #include "context.h" | ||
29 | // Properties need fully qualified classes even with pointers. | 29 | // Properties need fully qualified classes even with pointers. | ||
30 | #include "client.h" | 30 | #include "client.h" | ||
31 | 31 | | |||
32 | class GConfItem; | | |||
33 | | ||||
34 | namespace QPulseAudio | 32 | namespace QPulseAudio | ||
35 | { | 33 | { | ||
36 | class GConfModule; | 34 | class ConfigModule; | ||
37 | 35 | | |||
38 | class ModuleManager : public QObject | 36 | class ModuleManager : public QObject | ||
39 | { | 37 | { | ||
40 | Q_OBJECT | 38 | Q_OBJECT | ||
41 | Q_PROPERTY(bool settingsSupported READ settingsSupported CONSTANT) | 39 | Q_PROPERTY(bool settingsSupported READ settingsSupported CONSTANT) | ||
42 | Q_PROPERTY(bool combineSinks READ combineSinks WRITE setCombineSinks NOTIFY combineSinksChanged) | 40 | Q_PROPERTY(bool combineSinks READ combineSinks WRITE setCombineSinks NOTIFY combineSinksChanged) | ||
43 | Q_PROPERTY(bool switchOnConnect READ switchOnConnect WRITE setSwitchOnConnect NOTIFY switchOnConnectChanged) | 41 | Q_PROPERTY(bool switchOnConnect READ switchOnConnect WRITE setSwitchOnConnect NOTIFY switchOnConnectChanged) | ||
42 | Q_PROPERTY(bool configModuleLoaded READ configModuleLoaded NOTIFY loadedModulesChanged) | ||||
43 | Q_PROPERTY(QString configModuleName READ configModuleName CONSTANT) | ||||
44 | Q_PROPERTY(QStringList loadedModules READ loadedModules NOTIFY loadedModulesChanged) | 44 | Q_PROPERTY(QStringList loadedModules READ loadedModules NOTIFY loadedModulesChanged) | ||
45 | public: | 45 | public: | ||
46 | explicit ModuleManager(QObject *parent = nullptr); | 46 | explicit ModuleManager(QObject *parent = nullptr); | ||
47 | ~ModuleManager() override; | 47 | ~ModuleManager() override; | ||
48 | 48 | | |||
49 | bool settingsSupported() const; | 49 | bool settingsSupported() const; | ||
50 | bool combineSinks() const; | 50 | bool combineSinks() const; | ||
51 | void setCombineSinks(bool combineSinks); | 51 | void setCombineSinks(bool combineSinks); | ||
52 | bool switchOnConnect() const; | 52 | bool switchOnConnect() const; | ||
53 | void setSwitchOnConnect(bool switchOnConnect); | 53 | void setSwitchOnConnect(bool switchOnConnect); | ||
54 | QStringList loadedModules() const; | 54 | QStringList loadedModules() const; | ||
55 | bool configModuleLoaded() const; | ||||
56 | QString configModuleName() const; | ||||
55 | 57 | | |||
56 | Q_SIGNALS: | 58 | Q_SIGNALS: | ||
57 | void combineSinksChanged(); | 59 | void combineSinksChanged(); | ||
58 | void switchOnConnectChanged(); | 60 | void switchOnConnectChanged(); | ||
59 | void loadedModulesChanged(); | 61 | void loadedModulesChanged(); | ||
60 | 62 | | |||
61 | private: | 63 | private: | ||
62 | void updateLoadedModules(); | 64 | void updateLoadedModules(); | ||
63 | 65 | | |||
64 | GConfModule *m_combineSinks; | 66 | ConfigModule *m_combineSinks; | ||
65 | GConfModule *m_switchOnConnect; | 67 | ConfigModule *m_switchOnConnect; | ||
66 | GConfModule *m_deviceManager; | 68 | ConfigModule *m_deviceManager; | ||
67 | QStringList m_loadedModules; | 69 | QStringList m_loadedModules; | ||
68 | }; | 70 | }; | ||
69 | 71 | | |||
70 | } // QPulseAudio | 72 | } // QPulseAudio | ||
71 | 73 | | |||
72 | #endif // STREAM_H | 74 | #endif // STREAM_H |