~phablet-team/telephony-service/trunk

866.1.3 by Tiago Salem Herrmann
expose AudioOutput devices to qml
1
/*
2
 * Copyright (C) 2013 Canonical, Ltd.
3
 *
4
 * Authors:
5
 *  Tiago Salem Herrmann <tiago.herrmann@canonical.com>
6
 *
7
 * This file is part of telephony-service.
8
 *
9
 * telephony-service is free software; you can redistribute it and/or modify
10
 * it under the terms of the GNU General Public License as published by
11
 * the Free Software Foundation; version 3.
12
 *
13
 * telephony-service is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 * GNU General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU General Public License
19
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
 */
21
22
#ifndef AUDIOOUTPUT_H
23
#define AUDIOOUTPUT_H
24
25
#include <QObject>
26
27
struct AudioOutputDBus {
28
    QString id;
29
    QString type;
30
    QString name;
31
};
32
Q_DECLARE_METATYPE(AudioOutputDBus)
33
34
typedef QList<AudioOutputDBus> AudioOutputDBusList;
35
Q_DECLARE_METATYPE(AudioOutputDBusList)
36
37
class AudioOutput : public QObject
38
{
39
    Q_OBJECT
40
    Q_PROPERTY(QString id READ id CONSTANT)
41
    Q_PROPERTY(QString name READ name CONSTANT)
42
    Q_PROPERTY(QString type READ type CONSTANT)
43
44
public:
45
    AudioOutput(const QString &id, const QString &name, const QString &type, QObject *parent = 0);
46
    QString id() const;
47
    QString name() const;
48
    QString type() const;
49
50
private:
51
    QString mId;
52
    QString mName;
53
    QString mType;
54
};
55
56
#endif // AUDIOOUTPUT_H