certmanager

storedtransferjob.h

00001 /*
00002     Copyright (C) 2004 David Faure <faure@kde.org>
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License as published by the Free Software Foundation; either
00007     version 2 of the License, or (at your option) any later version.
00008 
00009     This library 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 GNU
00012     Library General Public License for more details.
00013 
00014     You should have received a copy of the GNU Library General Public License
00015     along with this library; see the file COPYING.LIB.  If not, write to
00016     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017     Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef STOREDTRANSFERJOB_H
00021 #define STOREDTRANSFERJOB_H
00022 
00023 #include <kio/job.h>
00024 
00025 // To be moved to KIO?
00026 namespace KIOext {
00027 
00047 class StoredTransferJob : public KIO::TransferJob {
00048     Q_OBJECT
00049 
00050 public:
00060     StoredTransferJob(const KURL& url, int command,
00061                       const QByteArray &packedArgs,
00062                       const QByteArray &_staticData,
00063                       bool showProgressInfo);
00064 
00069     void setData( const QByteArray& arr );
00070 
00075     QByteArray data() const { return m_data; }
00076 
00077 private slots:
00078     void slotData( KIO::Job *job, const QByteArray &data );
00079     void slotDataReq( KIO::Job *job, QByteArray &data );
00080 private:
00081     QByteArray m_data;
00082     int m_uploadOffset;
00083 };
00084 
00094     StoredTransferJob *storedGet( const KURL& url, bool reload=false, bool showProgressInfo = true );
00095 
00108     StoredTransferJob *put( const QByteArray& arr, const KURL& url, int permissions,
00109                             bool overwrite, bool resume, bool showProgressInfo = true );
00110 
00111 } // namespace
00112 
00113 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys