File indexing completed on 2025-03-16 04:36:09
0001 /** 0002 * SPDX-FileCopyrightText: 2019 Matthijs Tijink <matthijstijink@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0005 */ 0006 0007 #include "mprisremoteplayermediaplayer2.h" 0008 #include "mprisremoteplayer.h" 0009 #include "mprisremoteplugin.h" 0010 0011 MprisRemotePlayerMediaPlayer2::MprisRemotePlayerMediaPlayer2(MprisRemotePlayer *parent, const MprisRemotePlugin *plugin) 0012 : QDBusAbstractAdaptor{parent} 0013 , m_parent{parent} 0014 , m_plugin{plugin} 0015 { 0016 } 0017 0018 bool MprisRemotePlayerMediaPlayer2::CanQuit() const 0019 { 0020 return false; 0021 } 0022 0023 bool MprisRemotePlayerMediaPlayer2::CanRaise() const 0024 { 0025 return false; 0026 } 0027 0028 bool MprisRemotePlayerMediaPlayer2::HasTrackList() const 0029 { 0030 return false; 0031 } 0032 0033 QString MprisRemotePlayerMediaPlayer2::DesktopEntry() const 0034 { 0035 // Allows controlling mpris from the KDE Connect application's taskbar entry. 0036 return QStringLiteral("org.kde.kdeconnect.app"); 0037 } 0038 0039 QString MprisRemotePlayerMediaPlayer2::Identity() const 0040 { 0041 return m_parent->identity() + QStringLiteral(" - ") + m_plugin->device()->name(); 0042 } 0043 0044 void MprisRemotePlayerMediaPlayer2::Quit() 0045 { 0046 } 0047 0048 void MprisRemotePlayerMediaPlayer2::Raise() 0049 { 0050 } 0051 0052 QStringList MprisRemotePlayerMediaPlayer2::SupportedUriSchemes() const 0053 { 0054 return {}; 0055 } 0056 0057 QStringList MprisRemotePlayerMediaPlayer2::SupportedMimeTypes() const 0058 { 0059 return {}; 0060 } 0061 0062 #include "moc_mprisremoteplayermediaplayer2.cpp"