File indexing completed on 2024-05-05 04:50:49

0001 /*
0002  * SPDX-FileCopyrightText: 2021 George Florea Bănuș <georgefb899@gmail.com>
0003  *
0004  * SPDX-License-Identifier: GPL-3.0-or-later
0005  */
0006 
0007 #ifndef MEDIAPLAYER2_H
0008 #define MEDIAPLAYER2_H
0009 
0010 #include <QDBusAbstractAdaptor>
0011 
0012 class QDBusObjectPath;
0013 
0014 class MediaPlayer2 : public QDBusAbstractAdaptor
0015 {
0016     Q_OBJECT
0017     Q_CLASSINFO("D-Bus Interface", "org.mpris.MediaPlayer2")
0018 
0019     Q_PROPERTY(bool CanRaise READ CanRaise CONSTANT)
0020     Q_PROPERTY(bool CanQuit READ CanQuit CONSTANT)
0021     Q_PROPERTY(bool HasTrackList READ HasTrackList CONSTANT)
0022     Q_PROPERTY(QString Identity READ Identity CONSTANT)
0023     Q_PROPERTY(QString DesktopEntry READ DesktopEntry CONSTANT)
0024     Q_PROPERTY(QStringList SupportedUriSchemes READ SupportedUriSchemes CONSTANT)
0025     Q_PROPERTY(QStringList SupportedMimeTypes READ SupportedMimeTypes CONSTANT)
0026 
0027 public:
0028     explicit MediaPlayer2(QObject *obj);
0029     ~MediaPlayer2() = default;
0030 
0031 public Q_SLOTS:
0032     void Raise();
0033     void Quit();
0034     bool CanRaise() const;
0035     bool CanQuit() const;
0036     bool HasTrackList() const;
0037     QString Identity() const;
0038     QString DesktopEntry() const;
0039     QStringList SupportedUriSchemes() const;
0040     QStringList SupportedMimeTypes() const;
0041 
0042 Q_SIGNALS:
0043     void raise();
0044 };
0045 
0046 #endif // MEDIAPLAYER2_H