Debian Codegraph @

tests/service-mocks/accounts-mock/AccountsServiceSoundMock.h

raw
1 /*
2 * Copyright (C) 2015 Canonical Ltd.
3 *
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.
7 *
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.
12 *
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/>.
15 *
16 * Author: Xavi Garcia <[email protected]>
17 */
18 #pragma once
19
20 #include <QDBusContext>
21 #include <QObject>
22
23 #include "DBusPropertiesNotifier.h"
24
25 namespace ayatana
26 {
27
28 namespace indicators
29 {
30
31 namespace testing
32 {
33
34 class DBusPropertiesNotifier;
35
36 class AccountsServiceSoundMock : public QObject, protected QDBusContext
37 {
38 Q_OBJECT
39 Q_PROPERTY(double Volume READ volume WRITE setVolume)
40 Q_PROPERTY(QString LastRunningPlayer READ lastRunningPlayer WRITE setLastRunningPlayer)
41
42 public Q_SLOTS:
43 double volume() const;
44 void setVolume(double volume);
45 QString lastRunningPlayer() const;
46 void setLastRunningPlayer(QString const & lastRunningPlayer);
47
48 public:
49 AccountsServiceSoundMock(QObject* parent = 0);
50 virtual ~AccountsServiceSoundMock();
51
52 private:
53 double volume_;
54 QString lastRunningPlayer_;
55 DBusPropertiesNotifier notifier_;
56 };
57
58 } // namespace testing
59
60 } // namespace indicators
61
62 } // namespace ayatana