| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
#pragma once |
| 22 |
|
| 23 |
#include <QDBusContext> |
| 24 |
#include <QDBusObjectPath> |
| 25 |
#include <QObject> |
| 26 |
|
| 27 |
#include "DBusPropertiesNotifier.h" |
| 28 |
|
| 29 |
namespace ayatana |
| 30 |
{ |
| 31 |
|
| 32 |
namespace indicators |
| 33 |
{ |
| 34 |
|
| 35 |
namespace testing |
| 36 |
{ |
| 37 |
|
| 38 |
class MediaPlayerMprisMock : public QObject, protected QDBusContext |
| 39 |
{ |
| 40 |
Q_OBJECT |
| 41 |
Q_PROPERTY(bool CanPlay READ canPlay WRITE setCanPlay) |
| 42 |
Q_PROPERTY(bool CanPause READ canPause WRITE setCanPause) |
| 43 |
Q_PROPERTY(bool CanGoNext READ canGoNext WRITE setCanGoNext) |
| 44 |
Q_PROPERTY(bool CanGoPrevious READ canGoPrevious WRITE setCanGoPrevious) |
| 45 |
Q_PROPERTY(QString DesktopEntry READ desktopEntry WRITE setDesktopEntry) |
| 46 |
|
| 47 |
public Q_SLOTS: |
| 48 |
bool canPlay() const; |
| 49 |
void setCanPlay(bool canPlay); |
| 50 |
|
| 51 |
bool canPause() const; |
| 52 |
void setCanPause(bool canPause); |
| 53 |
|
| 54 |
bool canGoNext() const; |
| 55 |
void setCanGoNext(bool canGoNext); |
| 56 |
|
| 57 |
bool canGoPrevious() const; |
| 58 |
void setCanGoPrevious(bool canGoPrevious); |
| 59 |
|
| 60 |
QString desktopEntry() const; |
| 61 |
void setDesktopEntry(QString const &destopEntry); |
| 62 |
|
| 63 |
public: |
| 64 |
MediaPlayerMprisMock(QString const &playerName, QObject* parent); |
| 65 |
virtual ~MediaPlayerMprisMock(); |
| 66 |
|
| 67 |
private: |
| 68 |
bool can_play_; |
| 69 |
bool can_pause_; |
| 70 |
bool can_gonext_; |
| 71 |
bool can_goprevious_; |
| 72 |
DBusPropertiesNotifier notifier_; |
| 73 |
QString player_name_; |
| 74 |
}; |
| 75 |
|
| 76 |
} |
| 77 |
|
| 78 |
} |
| 79 |
|
| 80 |
} |