mirror of
https://github.com/kavishdevar/librepods.git
synced 2026-04-25 23:54:16 +00:00
[Linux] Play/Pause via DBus
This commit is contained in:
committed by
Tim Gromeyer
parent
38d6f8ceae
commit
aaf82c9738
@@ -1,12 +1,12 @@
|
||||
#ifndef MEDIACONTROLLER_H
|
||||
#define MEDIACONTROLLER_H
|
||||
|
||||
#include <QDBusInterface>
|
||||
#include <QObject>
|
||||
|
||||
class QProcess;
|
||||
class EarDetection;
|
||||
class PlayerStatusWatcher;
|
||||
class QDBusInterface;
|
||||
|
||||
class MediaController : public QObject
|
||||
{
|
||||
@@ -41,6 +41,7 @@ public:
|
||||
void setEarDetectionBehavior(EarDetectionBehavior behavior);
|
||||
inline EarDetectionBehavior getEarDetectionBehavior() const { return earDetectionBehavior; }
|
||||
|
||||
void play();
|
||||
void pause();
|
||||
|
||||
Q_SIGNALS:
|
||||
@@ -49,6 +50,8 @@ Q_SIGNALS:
|
||||
private:
|
||||
MediaState mediaStateFromPlayerctlOutput(const QString &output);
|
||||
QString getAudioDeviceName();
|
||||
bool sendMediaPlayerCommand(const QString &method);
|
||||
QDBusInterface *getMediaPlayerInterface();
|
||||
|
||||
bool wasPausedByApp = false;
|
||||
int initialVolume = -1;
|
||||
|
||||
Reference in New Issue
Block a user