-
Notifications
You must be signed in to change notification settings - Fork 0
/
imetadatafetcher.h
45 lines (33 loc) · 1017 Bytes
/
imetadatafetcher.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef IMPRISFETCHER_H
#define IMPRISFETCHER_H
#include <QObject>
#include <QtDBus/QtDBus>
#include "usertunetypes.h"
#define ORG_MPRIS_1 QLatin1String("org.mpris.")
#define ORG_MPRIS_2 QLatin1String("org.mpris.MediaPlayer2.")
QStringList getPlayersList(const int &ver);
class IMetaDataFetcher : public QObject
{
Q_OBJECT
public:
IMetaDataFetcher(QObject *parent);
virtual ~IMetaDataFetcher();
virtual void updateStatus() = 0;
QString getPlayerName() const { return FPlayerName; }
signals:
void statusChanged(PlayerStatus);
void trackChanged(UserTuneData);
public slots:
virtual void playerPlay() const = 0;
virtual void playerStop() const = 0;
virtual void playerPrev() const = 0;
virtual void playerNext() const = 0;
virtual void onPlayerNameChange(const QString &) = 0;
protected slots:
virtual void onPlayersExistenceChanged(QString, QString, QString) = 0;
protected:
QString FPlayerName;
QDBusInterface *FPlayerInterface;
};
Q_DECLARE_METATYPE(PlayerStatus)
#endif // IMPRISFETCHER_H