KHtml

kjavadownloader.h
1 /* This file is part of the KDE project
2  *
3  * Copyright (C) 2000 Wynn Wilkes <[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 #ifndef KJAVADOWNLOADER_H
22 #define KJAVADOWNLOADER_H
23 
24 #include <QObject>
25 
26 /**
27  * @short A class for handling downloads from KIO
28  *
29  * This class handles a KIO::get job and passes the data
30  * back to the AppletServer.
31  *
32  * @author Wynn Wilkes, [email protected]
33  */
34 
35 class KJob;
36 namespace KIO
37 {
38 class Job;
39 }
40 
41 class KJavaDownloaderPrivate;
42 class KJavaUploaderPrivate;
43 
44 class KJavaKIOJob : public QObject
45 {
46  Q_OBJECT
47 public:
48  virtual ~KJavaKIOJob();
49  virtual void jobCommand(int cmd) = 0;
50  virtual void data(const QByteArray &qb);
51 };
52 
53 class KJavaDownloader : public KJavaKIOJob
54 {
55  Q_OBJECT
56 
57 public:
58  KJavaDownloader(int ID, const QString &url);
59  ~KJavaDownloader();
60 
61  void jobCommand(int cmd) override;
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 *);
67 
68 private:
69  KJavaDownloaderPrivate *const d;
70 
71 };
72 
73 class KJavaUploader : public KJavaKIOJob
74 {
75  Q_OBJECT
76 
77 public:
78  KJavaUploader(int ID, const QString &url);
79  ~KJavaUploader();
80 
81  void jobCommand(int cmd) override;
82  void data(const QByteArray &qb) override;
83  void start();
84 protected Q_SLOTS:
85  void slotDataRequest(KIO::Job *, QByteArray &);
86  void slotResult(KJob *);
87 private:
88  KJavaUploaderPrivate *const d;
89 
90 };
91 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Oct 25 2021 22:48:17 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.