don't discard iframe children.
[kdelibs.git] / khtml / java / kjavadownloader.h
blobe700dfa18ec12e4642a17d2232e615aecd5db871
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>
27 /**
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
36 class KJob;
37 namespace KIO {
38 class Job;
41 class KJavaDownloaderPrivate;
42 class KJavaUploaderPrivate;
44 class KJavaKIOJob : public QObject
46 Q_OBJECT
47 public:
48 virtual ~KJavaKIOJob();
49 virtual void jobCommand( int cmd ) = 0;
50 virtual void data( const QByteArray& qb );
53 class KJavaDownloader : public KJavaKIOJob
55 Q_OBJECT
57 public:
58 KJavaDownloader( int ID, const QString& url );
59 ~KJavaDownloader();
61 virtual void jobCommand( int cmd );
62 protected Q_SLOTS:
63 void slotData( KIO::Job*, const QByteArray& );
64 void slotConnected( KIO::Job* );
65 void slotMimetype( KIO::Job*, const QString& );
66 void slotResult( KJob* );
68 private:
69 KJavaDownloaderPrivate* const d;
73 class KJavaUploader : public KJavaKIOJob
75 Q_OBJECT
77 public:
78 KJavaUploader( int ID, const QString& url );
79 ~KJavaUploader();
81 virtual void jobCommand( int cmd );
82 virtual void data( const QByteArray& qb );
83 void start();
84 protected Q_SLOTS:
85 void slotDataRequest( KIO::Job*, QByteArray& );
86 void slotResult( KJob* );
87 private:
88 KJavaUploaderPrivate* const d;
91 #endif