• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • kdelibs
  • KDE Home
  • Contact Us
 

Plasma

servicejob.cpp

Go to the documentation of this file.
00001 /*
00002  *   Copyright 2008 Aaron Seigo <aseigo@kde.org>
00003  *
00004  *   This program is free software; you can redistribute it and/or modify
00005  *   it under the terms of the GNU Library General Public License as
00006  *   published by the Free Software Foundation; either version 2, or
00007  *   (at your option) any later version.
00008  *
00009  *   This program is distributed in the hope that it will be useful,
00010  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *   GNU General Public License for more details
00013  *
00014  *   You should have received a copy of the GNU Library General Public
00015  *   License along with this program; if not, write to the
00016  *   Free Software Foundation, Inc.,
00017  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
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> &params)
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> &parameters, 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 } // namespace Plasma
00089 
00090 #include "servicejob.moc"
00091 

Plasma

Skip menu "Plasma"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal