1 /* This file is part of the KDE project
3 * Copyright (C) 2000 Wynn Wilkes <wynnw@caldera.com>
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.
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.
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.
22 #ifndef KJAVADOWNLOADER_H
23 #define KJAVADOWNLOADER_H
25 #include <QtCore/QObject>
28 * @short A class for handling downloads from KIO
30 * This class handles a KIO::get job and passes the data
31 * back to the AppletServer.
33 * @author Wynn Wilkes, wynnw@calderasystems.com
41 class KJavaDownloaderPrivate
;
42 class KJavaUploaderPrivate
;
44 class KJavaKIOJob
: public QObject
48 virtual ~KJavaKIOJob();
49 virtual void jobCommand( int cmd
) = 0;
50 virtual void data( const QByteArray
& qb
);
53 class KJavaDownloader
: public KJavaKIOJob
58 KJavaDownloader( int ID
, const QString
& url
);
61 virtual void jobCommand( int cmd
);
63 void slotData( KIO::Job
*, const QByteArray
& );
64 void slotConnected( KIO::Job
* );
65 void slotMimetype( KIO::Job
*, const QString
& );
66 void slotResult( KJob
* );
69 KJavaDownloaderPrivate
* const d
;
73 class KJavaUploader
: public KJavaKIOJob
78 KJavaUploader( int ID
, const QString
& url
);
81 virtual void jobCommand( int cmd
);
82 virtual void data( const QByteArray
& qb
);
85 void slotDataRequest( KIO::Job
*, QByteArray
& );
86 void slotResult( KJob
* );
88 KJavaUploaderPrivate
* const d
;