certmanager

storedtransferjob.h
1/*
2 Copyright (C) 2004 David Faure <faure@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
18*/
19
20#ifndef STOREDTRANSFERJOB_H
21#define STOREDTRANSFERJOB_H
22
23#include <tdeio/job.h>
24
25// To be moved to TDEIO?
26namespace TDEIOext {
27
47class StoredTransferJob : public TDEIO::TransferJob {
48 TQ_OBJECT
49
50
51public:
61 StoredTransferJob(const KURL& url, int command,
62 const TQByteArray &packedArgs,
63 const TQByteArray &_staticData,
64 bool showProgressInfo);
65
70 void setData( const TQByteArray& arr );
71
76 TQByteArray data() const { return m_data; }
77
78private slots:
79 void slotData( TDEIO::Job *job, const TQByteArray &data );
80 void slotDataReq( TDEIO::Job *job, TQByteArray &data );
81private:
82 TQByteArray m_data;
83 int m_uploadOffset;
84};
85
95 StoredTransferJob *storedGet( const KURL& url, bool reload=false, bool showProgressInfo = true );
96
109 StoredTransferJob *put( const TQByteArray& arr, const KURL& url, int permissions,
110 bool overwrite, bool resume, bool showProgressInfo = true );
111
112} // namespace
113
114#endif
StoredTransferJob is a TransferJob (for downloading or uploading data) that also stores a TQByteArray...
StoredTransferJob(const KURL &url, int command, const TQByteArray &packedArgs, const TQByteArray &_staticData, bool showProgressInfo)
Do not create a StoredTransferJob.
TQByteArray data() const
Get hold of the downloaded data.
void setData(const TQByteArray &arr)
Set data to be uploaded.