• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kio/kio
 

kio/kio

  • kio
  • kio
forwardingslavebase.h
1 /* This file is part of the KDE project
2  Copyright (c) 2004 Kevin Ottens <ervin ipsquad net>
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 _FORWARDING_SLAVE_BASE_H_
21 #define _FORWARDING_SLAVE_BASE_H_
22 
23 #include <kio/slavebase.h>
24 #include <kio/jobclasses.h>
25 
26 #include <tqobject.h>
27 
28 namespace KIO
29 {
30 
31 class ForwardingSlaveBasePrivate;
32 
88 class KIO_EXPORT ForwardingSlaveBase : public TQObject, public SlaveBase
89 {
90 Q_OBJECT
91 public:
92  ForwardingSlaveBase(const TQCString &protocol,
93  const TQCString &poolSocket,
94  const TQCString &appSocket);
95  virtual ~ForwardingSlaveBase();
96 
97  virtual void get(const KURL &url);
98 
99  virtual void put(const KURL &url, int permissions,
100  bool overwrite, bool resume);
101 
102  virtual void stat(const KURL &url);
103 
104  virtual void mimetype(const KURL &url);
105 
106  virtual void listDir(const KURL &url);
107 
108  virtual void mkdir(const KURL &url, int permissions);
109 
110  virtual void rename(const KURL &src, const KURL &dest, bool overwrite);
111 
112  virtual void symlink(const TQString &target, const KURL &dest,
113  bool overwrite);
114 
115  virtual void chmod(const KURL &url, int permissions);
116 
117  virtual void copy(const KURL &src, const KURL &dest,
118  int permissions, bool overwrite);
119 
120  virtual void del(const KURL &url, bool isfile);
121 
122 protected:
135  virtual bool rewriteURL(const KURL &url, KURL &newURL)=0;
136 
147  virtual void prepareUDSEntry(KIO::UDSEntry &entry,
148  bool listing=false) const;
149 
154  KURL processedURL() const { return m_processedURL; }
155 
160  KURL requestedURL() const { return m_requestedURL; }
161 
162 private:
163  KURL m_processedURL;
164  KURL m_requestedURL;
165  ForwardingSlaveBasePrivate *d;
166 
167  bool internalRewriteURL(const KURL &url, KURL &newURL);
168 
169  void connectJob(Job *job);
170  void connectSimpleJob(SimpleJob *job);
171  void connectListJob(ListJob *job);
172  void connectTransferJob(TransferJob *job);
173 
174 private slots:
175  // KIO::Job
176  void slotResult(KIO::Job *job);
177  void slotWarning(KIO::Job *job, const TQString &msg);
178  void slotInfoMessage(KIO::Job *job, const TQString &msg);
179  void slotTotalSize(KIO::Job *job, KIO::filesize_t size);
180  void slotProcessedSize(KIO::Job *job, KIO::filesize_t size);
181  void slotSpeed(KIO::Job *job, unsigned long bytesPerSecond);
182 
183  // KIO::SimpleJob subclasses
184  void slotRedirection(KIO::Job *job, const KURL &url);
185 
186  // KIO::ListJob
187  void slotEntries(KIO::Job *job, const KIO::UDSEntryList &entries);
188 
189  // KIO::TransferJob
190  void slotData(KIO::Job *job, const TQByteArray &data);
191  void slotDataReq(KIO::Job *job, TQByteArray &data);
192  void slotMimetype (KIO::Job *job, const TQString &type);
193  void slotCanResume (KIO::Job *job, KIO::filesize_t offset);
194 };
195 
196 }
197 
198 #endif

kio/kio

Skip menu "kio/kio"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kio/kio

Skip menu "kio/kio"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kio/kio by doxygen 1.8.1.2
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |