2
* Copyright (C) 2015 Canonical, Ltd.
4
* This program is free software: you can redistribute it and/or modify it
5
* under the terms of the GNU General Public License version 3, as published
6
* by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful, but
9
* WITHOUT ANY WARRANTY; without even the implied warranties of
10
* MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
11
* PURPOSE. See the GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License along
14
* with this program. If not, see <http://www.gnu.org/licenses/>.
16
* Author: Xavi Garcia <xavi.garcia.mena@canonical.com>
22
class PulseaudioVolume
26
PulseaudioVolume(unsigned int type, unsigned int volume);
27
PulseaudioVolume(const PulseaudioVolume &other);
28
PulseaudioVolume& operator=(const PulseaudioVolume &other);
31
friend QDBusArgument &operator<<(QDBusArgument &argument, PulseaudioVolume const & volume);
32
friend const QDBusArgument &operator>>(QDBusArgument const & argument, PulseaudioVolume &volume);
34
unsigned int getType() const;
35
unsigned int getVolume() const;
37
//register Message with the Qt type system
38
static void registerMetaType();
45
class PulseaudioVolumeArray
48
PulseaudioVolumeArray();
49
PulseaudioVolumeArray(QString const &interface, QString const &property, QDBusVariant const& value);
50
PulseaudioVolumeArray(const PulseaudioVolumeArray &other);
51
PulseaudioVolumeArray& operator=(const PulseaudioVolumeArray &other);
52
~PulseaudioVolumeArray();
54
friend QDBusArgument &operator<<(QDBusArgument &argument, PulseaudioVolumeArray const & volume);
55
friend const QDBusArgument &operator>>(QDBusArgument const & argument, PulseaudioVolumeArray &volume);
57
int getNumItems() const;
58
PulseaudioVolume getItem(int i) const;
59
void addItem(PulseaudioVolume const &item);
61
//register Message with the Qt type system
62
static void registerMetaType();
65
QVector<PulseaudioVolume> volume_array_;
68
Q_DECLARE_METATYPE(PulseaudioVolume)
69
Q_DECLARE_METATYPE(PulseaudioVolumeArray)