Changeset View
Changeset View
Standalone View
Standalone View
src/context.h
Show All 17 Lines | 1 | /* | |||
---|---|---|---|---|---|
18 | License along with this library. If not, see <http://www.gnu.org/licenses/>. | 18 | License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||
19 | */ | 19 | */ | ||
20 | 20 | | |||
21 | #ifndef CONTEXT_H | 21 | #ifndef CONTEXT_H | ||
22 | #define CONTEXT_H | 22 | #define CONTEXT_H | ||
23 | 23 | | |||
24 | #include <QObject> | 24 | #include <QObject> | ||
25 | #include "kf5pulseaudioqt_export.h" | 25 | #include "kf5pulseaudioqt_export.h" | ||
26 | #include "pulse/volume.h" | | |||
27 | 26 | | |||
28 | namespace PulseAudioQt | 27 | namespace PulseAudioQt | ||
29 | { | 28 | { | ||
30 | 29 | | |||
31 | class Card; | 30 | class Card; | ||
32 | class Client; | 31 | class Client; | ||
33 | class Sink; | 32 | class Sink; | ||
34 | class SinkInput; | 33 | class SinkInput; | ||
35 | class Source; | 34 | class Source; | ||
36 | class SourceOutput; | 35 | class SourceOutput; | ||
37 | class StreamRestore; | 36 | class StreamRestore; | ||
38 | class Module; | 37 | class Module; | ||
39 | class Server; | 38 | class Server; | ||
40 | 39 | | |||
40 | KF5PULSEAUDIOQT_EXPORT qint64 normalVolume(); | ||||
41 | KF5PULSEAUDIOQT_EXPORT qint64 minimumVolume(); | ||||
42 | KF5PULSEAUDIOQT_EXPORT qint64 maximumVolume(); | ||||
43 | | ||||
41 | class KF5PULSEAUDIOQT_EXPORT Context : public QObject | 44 | class KF5PULSEAUDIOQT_EXPORT Context : public QObject | ||
42 | { | 45 | { | ||
43 | Q_OBJECT | 46 | Q_OBJECT | ||
44 | 47 | | |||
45 | public: | 48 | public: | ||
46 | ~Context(); | 49 | ~Context(); | ||
47 | 50 | | |||
48 | static Context *instance(); | 51 | static Context *instance(); | ||
49 | 52 | | |||
50 | static const qint64 NormalVolume = PA_VOLUME_NORM; | | |||
51 | static const qint64 MinimalVolume = 0; | | |||
52 | static const qint64 MaximalVolume = (PA_VOLUME_NORM / 100.0) * 150; | | |||
53 | | ||||
54 | void ref(); | 53 | void ref(); | ||
55 | void unref(); | 54 | void unref(); | ||
56 | 55 | | |||
57 | bool isValid(); | 56 | bool isValid(); | ||
58 | 57 | | |||
59 | /** | 58 | /** | ||
60 | * Returns a list of all sinks. | 59 | * Returns a list of all sinks. | ||
61 | * | 60 | * | ||
▲ Show 20 Lines • Show All 164 Lines • Show Last 20 Lines |