• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kioslave

file.h

Go to the documentation of this file.
00001 /*
00002    Copyright (C) 2000-2002 Stephan Kulow <coolo@kde.org>
00003    Copyright (C) 2000-2002 David Faure <faure@kde.org>
00004    Copyright (C) 2000-2002 Waldo Bastian <bastian@kde.org>
00005 
00006    This library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Library General Public
00008    License (LGPL) as published by the Free Software Foundation;
00009    either version 2 of the License, or (at your option) any later
00010    version.
00011 
00012    This library is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015    Library General Public License for more details.
00016 
00017    You should have received a copy of the GNU Library General Public License
00018    along with this library; see the file COPYING.LIB.  If not, write to
00019    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00020    Boston, MA 02110-1301, USA.
00021 */
00022 
00023 #ifndef __file_h__
00024 #define __file_h__ "$Id: file.h 591636 2006-10-02 21:47:38Z adridg $"
00025 
00026 #include <sys/types.h>
00027 #include <sys/stat.h>
00028 
00029 #include <stdio.h>
00030 #include <unistd.h>
00031 
00032 #include <qobject.h>
00033 #include <qintdict.h>
00034 #include <qstring.h>
00035 #include <qvaluelist.h>
00036 
00037 #include <kio/global.h>
00038 #include <kio/slavebase.h>
00039 
00040 // Note that this header file is installed, so think twice
00041 // before breaking binary compatibility (read: it is forbidden :)
00042 
00043 class FileProtocol : public QObject, public KIO::SlaveBase
00044 {
00045   Q_OBJECT
00046 public:
00047   FileProtocol( const QCString &pool, const QCString &app);
00048   virtual ~FileProtocol() { }
00049 
00050   virtual void get( const KURL& url );
00051   virtual void put( const KURL& url, int permissions,
00052             bool overwrite, bool resume );
00053   virtual void copy( const KURL &src, const KURL &dest,
00054                      int permissions, bool overwrite );
00055   virtual void rename( const KURL &src, const KURL &dest,
00056                        bool overwrite );
00057   virtual void symlink( const QString &target, const KURL &dest,
00058                         bool overwrite );
00059 
00060   virtual void stat( const KURL& url );
00061   virtual void listDir( const KURL& url );
00062   virtual void mkdir( const KURL& url, int permissions );
00063   virtual void chmod( const KURL& url, int permissions );
00064   virtual void del( const KURL& url, bool isfile);
00065 
00072   virtual void special( const QByteArray &data);
00073   void unmount( const QString& point );
00074   void mount( bool _ro, const char *_fstype, const QString& dev, const QString& point );
00075   bool pumount( const QString &point );
00076   bool pmount( const QString &dev );
00077 
00078 protected slots:
00079   void slotProcessedSize( KIO::filesize_t _bytes );
00080   void slotInfoMessage( const QString & msg );
00081 
00082 protected:
00083 
00084   bool createUDSEntry( const QString & filename, const QCString & path, KIO::UDSEntry & entry, 
00085                        short int details, bool withACL );
00086   int setACL( const char *path, mode_t perm, bool _directoryDefault );
00087   
00088   QString getUserName( uid_t uid );
00089   QString getGroupName( gid_t gid );
00090 
00091   QIntDict<QString> usercache;      // maps long ==> QString *
00092   QIntDict<QString> groupcache;
00093 
00094   class FileProtocolPrivate;
00095   FileProtocolPrivate *d;
00096 };
00097 
00098 #endif

kioslave

Skip menu "kioslave"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal