2009-04-01 01:51:52 +02:00
|
|
|
/*
|
|
|
|
* Copyright 2005 by Aaron Seigo <aseigo@kde.org>
|
|
|
|
* Copyright 2007 by Riccardo Iaconelli <riccardo@kde.org>
|
|
|
|
* Copyright 2008 by Ménard Alexis <darktears31@gmail.com>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Library General Public License as
|
|
|
|
* published by the Free Software Foundation; either version 2, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* 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 PLASMA_DATAENGINECONSUMER_H
|
|
|
|
#define PLASMA_DATAENGINECONSUMER_H
|
|
|
|
|
2009-04-07 22:57:19 +02:00
|
|
|
#include <QtCore/QSet>
|
|
|
|
|
|
|
|
#include <kdebug.h>
|
2009-04-01 01:51:52 +02:00
|
|
|
|
|
|
|
#include "plasma/dataenginemanager.h"
|
2009-09-02 04:27:16 +02:00
|
|
|
#include "plasma/private/remotedataengine.h"
|
|
|
|
#include <servicejob.h>
|
2009-04-01 01:51:52 +02:00
|
|
|
|
|
|
|
namespace Plasma
|
|
|
|
{
|
|
|
|
|
2009-09-02 04:27:16 +02:00
|
|
|
class DataEngineConsumer : public QObject
|
2009-04-01 01:51:52 +02:00
|
|
|
{
|
2009-09-02 04:27:16 +02:00
|
|
|
Q_OBJECT
|
|
|
|
|
2009-04-01 01:51:52 +02:00
|
|
|
public:
|
2009-09-02 04:27:16 +02:00
|
|
|
~DataEngineConsumer();
|
|
|
|
DataEngine *dataEngine(const QString &name);
|
|
|
|
DataEngine *remoteDataEngine(const KUrl &location, const QString &name);
|
2009-04-01 01:51:52 +02:00
|
|
|
|
2009-09-02 04:27:16 +02:00
|
|
|
private Q_SLOTS:
|
|
|
|
void slotJobFinished(Plasma::ServiceJob *job);
|
|
|
|
void slotServiceReady(Plasma::Service *service);
|
2009-04-01 01:51:52 +02:00
|
|
|
|
|
|
|
private:
|
2009-04-07 22:57:19 +02:00
|
|
|
QSet<QString> m_loadedEngines;
|
2009-09-02 04:27:16 +02:00
|
|
|
QMap<QPair<QString, QString>, RemoteDataEngine*> m_remoteEngines;
|
|
|
|
QMap<Service*, QString> m_engineNameForService;
|
2009-04-01 01:51:52 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Plasma
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|