2009-09-02 04:27:16 +02:00
|
|
|
/*
|
|
|
|
* Copyright 2009 Rob Scheepmaker <r.scheepmaker@student.utwente.nl
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2009-12-27 23:16:11 +01:00
|
|
|
#ifndef PLASMA_ACCESSAPPLETJOB_H
|
|
|
|
#define PLASMA_ACCESSAPPLETJOB_H
|
2009-09-02 04:27:16 +02:00
|
|
|
|
|
|
|
#include <kjob.h>
|
|
|
|
|
|
|
|
#include <plasma/plasma_export.h>
|
|
|
|
|
2012-03-11 10:28:36 +01:00
|
|
|
class QUrl;
|
2009-09-02 04:27:16 +02:00
|
|
|
|
|
|
|
namespace Plasma
|
|
|
|
{
|
|
|
|
|
|
|
|
class Applet;
|
|
|
|
class AccessAppletJobPrivate;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @class AccessAppletJob plasma/accessappletjob.h <Plasma/AccessAppletJob>
|
|
|
|
*
|
|
|
|
* @short This class is used for asynchronously accessing an applet published on a remote system.
|
|
|
|
* After calling AccessManager::accessApplet, monitor this job to track when the remote applet
|
|
|
|
* is ready to be used, and to obtain the service when finished.
|
|
|
|
*/
|
|
|
|
class PLASMA_EXPORT AccessAppletJob : public KJob
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
~AccessAppletJob();
|
|
|
|
|
|
|
|
Applet *applet() const;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
/**
|
|
|
|
* Default constructor
|
|
|
|
*
|
2011-06-13 14:47:29 +02:00
|
|
|
* @param location the location of the service
|
|
|
|
* @param parent the parent object for this service
|
2009-09-02 04:27:16 +02:00
|
|
|
*/
|
2012-03-11 10:28:36 +01:00
|
|
|
AccessAppletJob(const QUrl &location, QObject *parent = 0);
|
2009-09-02 04:27:16 +02:00
|
|
|
|
|
|
|
void start();
|
|
|
|
|
|
|
|
private:
|
|
|
|
AccessAppletJob();
|
|
|
|
|
|
|
|
Q_PRIVATE_SLOT(d, void slotPackageDownloaded(Plasma::ServiceJob*))
|
|
|
|
Q_PRIVATE_SLOT(d, void slotStart())
|
|
|
|
Q_PRIVATE_SLOT(d, void slotServiceReady(Plasma::Service*))
|
|
|
|
Q_PRIVATE_SLOT(d, void slotTimeout())
|
|
|
|
|
|
|
|
AccessAppletJobPrivate * const d;
|
2012-03-11 10:28:36 +01:00
|
|
|
|
2009-09-02 04:27:16 +02:00
|
|
|
friend class AccessManager;
|
|
|
|
friend class AccessManagerPrivate;
|
|
|
|
friend class AccessAppletJobPrivate;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Plasma
|
|
|
|
|
2009-12-27 23:16:11 +01:00
|
|
|
#endif // PLASMA_ACCESSAPPLETJOB_H
|
2009-09-02 04:27:16 +02:00
|
|
|
|