mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2024-05-08 23:22:42 +00:00
Chris Josten
54235f298e
Besides MPRIS support, this also adds support for hasPrevious() and hasNext() in several parts to determine whether the player/playlist/shuffler has a previous or next item.
119 lines
3.6 KiB
C++
119 lines
3.6 KiB
C++
/*
|
|
* This file was generated by qdbusxml2cpp version 0.8
|
|
* Command line was: qdbusxml2cpp org.mpris.MediaPlayer2.xml -a ../include/JellyfinQt/platform/freedesktop/mediaplayer2.h:../src/platform/freedesktop/mediaplayer2.cpp
|
|
*
|
|
* qdbusxml2cpp is Copyright (C) 2020 The Qt Company Ltd.
|
|
*
|
|
* This is an auto-generated file.
|
|
* This file may have been hand-edited. Look for HAND-EDIT comments
|
|
* before re-generating it.
|
|
*/
|
|
|
|
//HAND-EDIT: include-guard
|
|
#ifndef JELLYFIN_PLATFORM_FREEDESKTOP_MEDIAPLAYER2_H
|
|
#define JELLYFIN_PLATFORM_FREEDESKTKOP_MEDIAPLAYER2_H
|
|
|
|
#include <QtCore/QObject>
|
|
#include <QtDBus/QtDBus>
|
|
QT_BEGIN_NAMESPACE
|
|
class QByteArray;
|
|
template<class T> class QList;
|
|
template<class Key, class Value> class QMap;
|
|
class QString;
|
|
class QStringList;
|
|
class QVariant;
|
|
QT_END_NAMESPACE
|
|
|
|
//HAND-EDIT: added namespaces
|
|
namespace Jellyfin {
|
|
namespace ViewModel {
|
|
class PlatformMediaControl;
|
|
}
|
|
|
|
namespace Platform {
|
|
namespace FreeDesktop {
|
|
|
|
/*
|
|
* Adaptor class for interface org.mpris.MediaPlayer2
|
|
*/
|
|
class MediaPlayer2Adaptor: public QDBusAbstractAdaptor
|
|
{
|
|
Q_OBJECT
|
|
Q_CLASSINFO("D-Bus Interface", "org.mpris.MediaPlayer2")
|
|
Q_CLASSINFO("D-Bus Introspection", ""
|
|
" <interface name=\"org.mpris.MediaPlayer2\">\n"
|
|
" <annotation value=\"true\" name=\"org.freedesktop.DBus.Property.EmitsChangedSignal\"/>\n"
|
|
" <method name=\"Raise\">\n"
|
|
" </method>\n"
|
|
" <method name=\"Quit\">\n"
|
|
" </method>\n"
|
|
" <property access=\"read\" type=\"b\" name=\"CanQuit\">\n"
|
|
" </property>\n"
|
|
" <property access=\"readwrite\" type=\"b\" name=\"Fullscreen\">\n"
|
|
" <annotation value=\"true\" name=\"org.mpris.MediaPlayer2.property.optional\"/>\n"
|
|
" </property>\n"
|
|
" <property access=\"read\" type=\"b\" name=\"CanSetFullscreen\">\n"
|
|
" <annotation value=\"true\" name=\"org.mpris.MediaPlayer2.property.optional\"/>\n"
|
|
" </property>\n"
|
|
" <property access=\"read\" type=\"b\" name=\"CanRaise\">\n"
|
|
" </property>\n"
|
|
" <property access=\"read\" type=\"b\" name=\"HasTrackList\">\n"
|
|
" </property>\n"
|
|
" <property access=\"read\" type=\"s\" name=\"Identity\">\n"
|
|
" </property>\n"
|
|
" <property access=\"read\" type=\"s\" name=\"DesktopEntry\">\n"
|
|
" <annotation value=\"true\" name=\"org.mpris.MediaPlayer2.property.optional\"/>\n"
|
|
" </property>\n"
|
|
" <property access=\"read\" type=\"as\" name=\"SupportedUriSchemes\">\n"
|
|
" </property>\n"
|
|
" <property access=\"read\" type=\"as\" name=\"SupportedMimeTypes\">\n"
|
|
" </property>\n"
|
|
" </interface>\n"
|
|
"")
|
|
public:
|
|
MediaPlayer2Adaptor(ViewModel::PlatformMediaControl *parent);
|
|
virtual ~MediaPlayer2Adaptor();
|
|
|
|
public: // PROPERTIES
|
|
Q_PROPERTY(bool CanQuit READ canQuit)
|
|
bool canQuit() const;
|
|
|
|
Q_PROPERTY(bool CanRaise READ canRaise)
|
|
bool canRaise() const;
|
|
|
|
Q_PROPERTY(bool CanSetFullscreen READ canSetFullscreen)
|
|
bool canSetFullscreen() const;
|
|
|
|
Q_PROPERTY(QString DesktopEntry READ desktopEntry)
|
|
QString desktopEntry() const;
|
|
|
|
Q_PROPERTY(bool Fullscreen READ fullscreen WRITE setFullscreen)
|
|
bool fullscreen() const;
|
|
void setFullscreen(bool value);
|
|
|
|
Q_PROPERTY(bool HasTrackList READ hasTrackList)
|
|
bool hasTrackList() const;
|
|
|
|
Q_PROPERTY(QString Identity READ identity)
|
|
QString identity() const;
|
|
|
|
Q_PROPERTY(QStringList SupportedMimeTypes READ supportedMimeTypes)
|
|
QStringList supportedMimeTypes() const;
|
|
|
|
Q_PROPERTY(QStringList SupportedUriSchemes READ supportedUriSchemes)
|
|
QStringList supportedUriSchemes() const;
|
|
|
|
public Q_SLOTS: // METHODS
|
|
void Quit();
|
|
void Raise();
|
|
Q_SIGNALS: // SIGNALS
|
|
private:
|
|
ViewModel::PlatformMediaControl *m_mediaControl;
|
|
};
|
|
|
|
} // NS FreeDesktop
|
|
} // NS Platform
|
|
} // NS Jellyfin
|
|
|
|
#endif
|