KIO

specialjob.cpp
1 /* This file is part of the KDE libraries
2  Copyright (C) 2000 Stephan Kulow <[email protected]>
3  2000-2013 David Faure <[email protected]>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
21 #include "specialjob.h"
22 #include "job_p.h"
23 
24 using namespace KIO;
25 
26 class KIO::SpecialJobPrivate: public TransferJobPrivate
27 {
28  SpecialJobPrivate(const QUrl &url, int command,
29  const QByteArray &packedArgs,
30  const QByteArray &_staticData)
31  : TransferJobPrivate(url, command, packedArgs, _staticData)
32  {}
33 };
34 
35 SpecialJob::SpecialJob(const QUrl &url, const QByteArray &packedArgs)
36  : TransferJob(*new TransferJobPrivate(url, CMD_SPECIAL, packedArgs, QByteArray()))
37 {
38 }
39 
40 SpecialJob::~SpecialJob()
41 {
42 }
43 
45 {
46  Q_D(SpecialJob);
47  d->m_packedArgs = data;
48 }
49 
51 {
52  return d_func()->m_packedArgs;
53 }
54 
55 #include "moc_specialjob.cpp"
A namespace for KIO globals.
Definition: authinfo.h:34
A class that sends a special command to an ioslave.
Definition: specialjob.h:44
SpecialJob(const QUrl &url, const QByteArray &data=QByteArray())
Creates a KIO::SpecialJob.
Definition: specialjob.cpp:35
void setArguments(const QByteArray &data)
Sets the QByteArray that is passed to SlaveBase::special() on the ioslave.
Definition: specialjob.cpp:44
QByteArray arguments() const
Returns the QByteArray data that will be sent (or has been sent) to the ioslave.
Definition: specialjob.cpp:50
void data(KIO::Job *job, const QByteArray &data)
Data from the slave has arrived.
The transfer job pumps data into and/or out of a Slave.
Definition: transferjob.h:38
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 30 2020 23:07:51 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.