From 41677b58d971ab57a79514d972f10acb04797130 Mon Sep 17 00:00:00 2001 From: Javier Date: Sun, 27 Dec 2015 21:55:19 +0100 Subject: initial music controller implementation --- musiccontroller_p.h | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'musiccontroller_p.h') diff --git a/musiccontroller_p.h b/musiccontroller_p.h index 5711e65..dd26ff0 100644 --- a/musiccontroller_p.h +++ b/musiccontroller_p.h @@ -1,15 +1,15 @@ #ifndef WATCHFISH_MUSICCONTROLLER_P_H #define WATCHFISH_MUSICCONTROLLER_P_H -#include -#include +#include +#include #include "musiccontroller.h" namespace watchfish { -class MusicControllerPrivate : public QObject, protected QDBusContext +class MusicControllerPrivate : public QObject { Q_OBJECT @@ -17,6 +17,27 @@ public: MusicControllerPrivate(MusicController *q); ~MusicControllerPrivate(); +public: + MprisManager *manager; + MusicController::Status curStatus; + QString curTitle; + QString curAlbum; + QString curArtist; + QString curAlbumArt; + int curDuration; + +private: + static QString stripAlbumArtComponent(const QString& component); + static QString findAlbumArt(const QString &artist, const QString &album); + void updateStatus(); + void updateAlbumArt(); + void updateMetadata(); + +private slots: + void handleCurrentServiceChanged(); + void handlePlaybackStatusChanged(); + void handleMetadataChanged(); + private: MusicController * const q_ptr; Q_DECLARE_PUBLIC(MusicController) -- cgit v1.2.3