# kio Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# forwardingslavebase.h

    00001 /* This file is part of the KDE project
    00002    Copyright (c) 2004 Kevin Ottens <ervin ipsquad net>
    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., 59 Temple Place - Suite 330,
    00017    Boston, MA 02111-1307, USA.
    00018 */
    00019
    00020 #ifndef _FORWARDING_SLAVE_BASE_H_
    00021 #define _FORWARDING_SLAVE_BASE_H_
    00022
    00023 #include <kio/slavebase.h>
    00024 #include <kio/jobclasses.h>
    00025
    00026 #include <qobject.h>
    00027
    00028 namespace KIO
    00029 {
    00030
    00031 class ForwardingSlaveBasePrivate;
    00032
    00088 class KIO_EXPORT ForwardingSlaveBase : public QObject, public SlaveBase
    00089 {
    00090 Q_OBJECT
    00091 public:
    00092     ForwardingSlaveBase(const QCString &protocol,
    00093                         const QCString &poolSocket,
    00094                         const QCString &appSocket);
    00095     virtual ~ForwardingSlaveBase();
    00096
    00097     virtual void get(const KURL &url);
    00098
    00099     virtual void put(const KURL &url, int permissions,
    00100                      bool overwrite, bool resume);
    00101
    00102     virtual void stat(const KURL &url);
    00103
    00104     virtual void mimetype(const KURL &url);
    00105
    00106     virtual void listDir(const KURL &url);
    00107
    00108     virtual void mkdir(const KURL &url, int permissions);
    00109
    00110     virtual void rename(const KURL &src, const KURL &dest, bool overwrite);
    00111
    00112     virtual void symlink(const QString &target, const KURL &dest,
    00113                          bool overwrite);
    00114
    00115     virtual void chmod(const KURL &url, int permissions);
    00116
    00117     virtual void copy(const KURL &src, const KURL &dest,
    00118                       int permissions, bool overwrite);
    00119
    00120     virtual void del(const KURL &url, bool isfile);
    00121
    00122 protected:
    00135     virtual bool rewriteURL(const KURL &url, KURL &newURL)=0;
    00136
    00147     virtual void prepareUDSEntry(KIO::UDSEntry &entry,
    00148                                  bool listing=false) const;
    00149
    00154     KURL processedURL() const { return m_processedURL; }
    00155
    00160     KURL requestedURL() const { return m_requestedURL; }
    00161
    00162 private:
    00163     KURL m_processedURL;
    00164     KURL m_requestedURL;
    00165     ForwardingSlaveBasePrivate *d;
    00166
    00167     bool internalRewriteURL(const KURL &url, KURL &newURL);
    00168
    00169     void connectJob(Job *job);
    00170     void connectSimpleJob(SimpleJob *job);
    00171     void connectListJob(ListJob *job);
    00172     void connectTransferJob(TransferJob *job);
    00173
    00174 private slots:
    00175     // KIO::Job
    00176     void slotResult(KIO::Job *job);
    00177     void slotInfoMessage(KIO::Job *job, const QString &msg);
    00178     void slotTotalSize(KIO::Job *job, KIO::filesize_t size);
    00179     void slotProcessedSize(KIO::Job *job, KIO::filesize_t size);
    00180     void slotSpeed(KIO::Job *job, unsigned long bytesPerSecond);
    00181
    00182     // KIO::SimpleJob subclasses
    00183     void slotRedirection(KIO::Job *job, const KURL &url);
    00184
    00185     // KIO::ListJob
    00186     void slotEntries(KIO::Job *job, const KIO::UDSEntryList &entries);
    00187
    00188     // KIO::TransferJob
    00189     void slotData(KIO::Job *job, const QByteArray &data);
    00190     void slotDataReq(KIO::Job *job, QByteArray &data);
    00191     void slotMimetype (KIO::Job *job, const QString &type);
    00192     void slotCanResume (KIO::Job *job, KIO::filesize_t offset);
    00193 };
    00194
    00195 }
    00196
    00197 #endif

This file is part of the documentation for kio Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:23:52 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003