2019-07-25 22:40:58 +01:00
|
|
|
/**
|
2020-08-17 10:48:10 +01:00
|
|
|
* SPDX-FileCopyrightText: 2019 Matthijs Tijink <matthijstijink@gmail.com>
|
2019-07-25 22:40:58 +01:00
|
|
|
*
|
2020-08-17 10:48:10 +01:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
2019-07-25 22:40:58 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "mprisremoteplayermediaplayer2.h"
|
2022-09-10 22:23:52 +01:00
|
|
|
#include "mprisremoteplayer.h"
|
2019-07-25 22:40:58 +01:00
|
|
|
#include "mprisremoteplugin.h"
|
|
|
|
|
2022-09-10 22:23:52 +01:00
|
|
|
MprisRemotePlayerMediaPlayer2::MprisRemotePlayerMediaPlayer2(MprisRemotePlayer *parent, const MprisRemotePlugin *plugin)
|
|
|
|
: QDBusAbstractAdaptor{parent}
|
|
|
|
, m_parent{parent}
|
|
|
|
, m_plugin{plugin}
|
|
|
|
{
|
|
|
|
}
|
2019-07-25 22:40:58 +01:00
|
|
|
|
2022-09-10 22:23:52 +01:00
|
|
|
bool MprisRemotePlayerMediaPlayer2::CanQuit() const
|
|
|
|
{
|
2019-07-25 22:40:58 +01:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-09-10 22:23:52 +01:00
|
|
|
bool MprisRemotePlayerMediaPlayer2::CanRaise() const
|
|
|
|
{
|
2019-07-25 22:40:58 +01:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-09-10 22:23:52 +01:00
|
|
|
bool MprisRemotePlayerMediaPlayer2::HasTrackList() const
|
|
|
|
{
|
2019-07-25 22:40:58 +01:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-09-10 22:23:52 +01:00
|
|
|
QString MprisRemotePlayerMediaPlayer2::DesktopEntry() const
|
|
|
|
{
|
|
|
|
// Allows controlling mpris from the KDE Connect application's taskbar entry.
|
2019-07-25 22:40:58 +01:00
|
|
|
return QStringLiteral("org.kde.kdeconnect.app");
|
|
|
|
}
|
|
|
|
|
2022-09-10 22:23:52 +01:00
|
|
|
QString MprisRemotePlayerMediaPlayer2::Identity() const
|
|
|
|
{
|
2019-07-25 22:40:58 +01:00
|
|
|
return m_parent->identity() + QStringLiteral(" - ") + m_plugin->device()->name();
|
|
|
|
}
|
|
|
|
|
2022-09-10 22:23:52 +01:00
|
|
|
void MprisRemotePlayerMediaPlayer2::Quit()
|
|
|
|
{
|
|
|
|
}
|
2019-07-25 22:40:58 +01:00
|
|
|
|
2022-09-10 22:23:52 +01:00
|
|
|
void MprisRemotePlayerMediaPlayer2::Raise()
|
|
|
|
{
|
|
|
|
}
|
2019-07-25 22:40:58 +01:00
|
|
|
|
2022-09-10 22:23:52 +01:00
|
|
|
QStringList MprisRemotePlayerMediaPlayer2::SupportedUriSchemes() const
|
|
|
|
{
|
2019-07-25 22:40:58 +01:00
|
|
|
return {};
|
|
|
|
}
|
|
|
|
|
2022-09-10 22:23:52 +01:00
|
|
|
QStringList MprisRemotePlayerMediaPlayer2::SupportedMimeTypes() const
|
|
|
|
{
|
2019-07-25 22:40:58 +01:00
|
|
|
return {};
|
|
|
|
}
|
2023-07-26 09:15:11 +01:00
|
|
|
|
|
|
|
#include "moc_mprisremoteplayermediaplayer2.cpp"
|