Plasma
servicejob.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include "servicejob.h"
00021 #include <plasma/private/servicejob_p.h>
00022
00023 namespace Plasma
00024 {
00025
00026 ServiceJobPrivate::ServiceJobPrivate(ServiceJob *owner, const QString &dest,
00027 const QString &op, const QMap<QString, QVariant> ¶ms)
00028 : q(owner),
00029 destination(dest),
00030 operation(op),
00031 parameters(params)
00032 {
00033 }
00034
00035 void ServiceJobPrivate::slotStart()
00036 {
00037 q->start();
00038 }
00039
00040 ServiceJob::ServiceJob(const QString &destination, const QString &operation,
00041 const QMap<QString, QVariant> ¶meters, QObject *parent)
00042 : KJob(parent),
00043 d(new ServiceJobPrivate(this, destination, operation, parameters))
00044 {
00045 }
00046
00047 ServiceJob::~ServiceJob()
00048 {
00049 delete d;
00050 }
00051
00052 QString ServiceJob::destination() const
00053 {
00054 return d->destination;
00055 }
00056
00057 QString ServiceJob::operationName() const
00058 {
00059 return d->operation;
00060 }
00061
00062 QMap<QString, QVariant> ServiceJob::parameters() const
00063 {
00064 return d->parameters;
00065 }
00066
00067 Credentials ServiceJob::identity() const
00068 {
00069 return d->identity;
00070 }
00071
00072 QVariant ServiceJob::result() const
00073 {
00074 return d->result;
00075 }
00076
00077 void ServiceJob::setResult(const QVariant &result)
00078 {
00079 d->result = result;
00080 emitResult();
00081 }
00082
00083 void ServiceJob::start()
00084 {
00085 setResult(false);
00086 }
00087
00088 }
00089
00090 #include "servicejob.moc"
00091