netaccess.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef __kio_netaccess_h
00025 #define __kio_netaccess_h
00026
00027 #include <qobject.h>
00028 #include <qstring.h>
00029 #include <kio/global.h>
00030 class QStringList;
00031 class KURL;
00032
00033 namespace KIO {
00034
00035 class Job;
00036
00052 class NetAccess : public QObject
00053 {
00054 Q_OBJECT
00055
00056 public:
00095 static bool download(const KURL& src, QString & target);
00096
00108 static void removeTempFile(const QString& name);
00109
00123 static bool upload(const QString& src, const KURL& target);
00124
00132 static bool copy( const KURL& src, const KURL& target );
00133
00141 static bool dircopy( const KURL& src, const KURL& target );
00142
00151 static bool exists(const KURL& url);
00152
00165 static bool exists(const KURL& url, bool source);
00166
00177 static bool stat(const KURL& url, KIO::UDSEntry & entry);
00178
00188 static bool del( const KURL & url );
00189
00199 static bool mkdir( const KURL & url, int permissions = -1 );
00200
00201
00215 static QString mimetype( const KURL & url );
00216
00220 static QString lastErrorString() { return lastErrorMsg ? *lastErrorMsg : QString::null; }
00221
00222 private:
00226 NetAccess() {}
00230 ~NetAccess() {}
00234 bool copyInternal(const KURL& src, const KURL& target, bool overwrite);
00235 bool dircopyInternal(const KURL& src, const KURL& target);
00236 bool statInternal(const KURL & url, int details, bool source);
00237 UDSEntry m_entry;
00238 bool delInternal(const KURL & url);
00239 bool mkdirInternal(const KURL & url, int permissions);
00240 QString mimetypeInternal(const KURL & url);
00241 void enter_loop();
00242 QString m_mimetype;
00246 static QStringList* tmpfiles;
00247
00248 static QString* lastErrorMsg;
00252 bool bJobOK;
00253 friend class I_like_this_class;
00254
00255 private slots:
00256 void slotResult( KIO::Job * job );
00257 void slotMimetype( KIO::Job * job, const QString & type );
00258 private:
00259 class NetAccessPrivate* d;
00260 };
00261
00262 }
00263
00264 #endif
This file is part of the documentation for kdelibs Version 3.1.4.