2009-09-02 04:21:41 +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 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.
|
|
|
|
*/
|
|
|
|
|
2009-09-02 04:27:16 +02:00
|
|
|
#ifndef PLASMA_REMOTESERVICEJOB_H
|
|
|
|
#define PLASMA_REMOTESERVICEJOB_H
|
2009-09-02 04:21:41 +02:00
|
|
|
|
2009-09-02 04:27:16 +02:00
|
|
|
#include <QtCore/QByteArray>
|
2009-09-02 08:07:09 +02:00
|
|
|
#include <kurl.h>
|
2009-09-02 04:21:41 +02:00
|
|
|
|
|
|
|
#include "../servicejob.h"
|
|
|
|
|
2009-10-20 21:15:32 +02:00
|
|
|
class KConfigGroup;
|
|
|
|
|
2009-09-02 04:27:16 +02:00
|
|
|
namespace Jolie
|
|
|
|
{
|
|
|
|
class PendingCallWatcher;
|
|
|
|
}
|
|
|
|
|
2009-09-02 04:21:41 +02:00
|
|
|
namespace Plasma
|
|
|
|
{
|
|
|
|
|
2009-09-02 04:27:16 +02:00
|
|
|
class RemoteService;
|
|
|
|
|
2009-09-02 04:21:41 +02:00
|
|
|
class RemoteServiceJob : public Plasma::ServiceJob
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
RemoteServiceJob(KUrl location,
|
2009-09-02 04:27:16 +02:00
|
|
|
const QString& destination,
|
2009-09-02 04:21:41 +02:00
|
|
|
const QString& operation,
|
|
|
|
QMap<QString,QVariant>& parameters,
|
2009-09-02 04:27:16 +02:00
|
|
|
QByteArray initialToken,
|
|
|
|
RemoteService *parent);
|
2009-10-20 21:15:32 +02:00
|
|
|
~RemoteServiceJob();
|
2009-09-02 04:21:41 +02:00
|
|
|
|
|
|
|
void start();
|
2009-10-20 21:15:32 +02:00
|
|
|
void setDelayedDescription(const KConfigGroup &desc);
|
2009-09-02 04:21:41 +02:00
|
|
|
|
2009-09-02 04:27:16 +02:00
|
|
|
private Q_SLOTS:
|
|
|
|
void callCompleted(Jolie::PendingCallWatcher *watcher);
|
|
|
|
void timeout();
|
|
|
|
|
2009-09-02 04:21:41 +02:00
|
|
|
private:
|
2009-10-20 20:23:32 +02:00
|
|
|
void checkValidity();
|
|
|
|
|
2009-09-02 04:27:16 +02:00
|
|
|
QByteArray m_token;
|
2009-09-02 04:21:41 +02:00
|
|
|
KUrl m_location;
|
2009-09-02 04:27:16 +02:00
|
|
|
RemoteService *m_service;
|
2009-10-20 21:15:32 +02:00
|
|
|
KConfigGroup *m_delayedDesc;
|
2009-09-02 04:21:41 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Plasma
|
|
|
|
|
|
|
|
#endif //REMOTESERVICEJOB_H
|