kde-workspace/plasma/dataengines/mpris2/mpris2engine.h
Ivailo Monev af45159765 generic: replace forward declarations with headers inclusions
this was done with namefsck script from Katie, solves namespace issues

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2019-05-05 02:36:36 +00:00

65 lines
1.9 KiB
C++

/*
* Copyright 2007-2012 Alex Merry <alex.merry@kdemail.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License version 2 as
* published by the Free Software Foundation
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef MPRIS2ENGINE_H
#define MPRIS2ENGINE_H
#include <Plasma/DataEngine>
#include <QtCore/qsharedpointer.h>
#include <QDBusPendingCallWatcher>
class PlayerContainer;
class Multiplexer;
/**
* The MPRIS2 data engine.
*/
class Mpris2Engine : public Plasma::DataEngine
{
Q_OBJECT
public:
Mpris2Engine(QObject* parent, const QVariantList& args);
Plasma::Service* serviceForSource(const QString& source);
virtual QStringList sources() const;
protected:
virtual bool sourceRequestEvent(const QString& source);
virtual bool updateSourceEvent(const QString& source);
private slots:
void serviceOwnerChanged(
const QString& serviceName,
const QString& oldOwner,
const QString& newOwner);
void initialFetchFinished(PlayerContainer* container);
void initialFetchFailed(PlayerContainer* container);
void serviceNameFetchFinished(QDBusPendingCallWatcher* watcher);
private:
void addMediaPlayer(const QString& serviceName, const QString& sourceName);
void createMultiplexer();
QWeakPointer<Multiplexer> m_multiplexer;
};
K_EXPORT_PLASMA_DATAENGINE(mpris2, Mpris2Engine)
#endif // MPRIS2ENGINE_H