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
#include <kdemacros.h>
00031
00032
class QStringList;
00033
class QWidget;
00034
class KURL;
00035
00036
namespace KIO {
00037
00038
class Job;
00039
00060 class NetAccess :
public QObject
00061 {
00062 Q_OBJECT
00063
00064
public:
00110
static bool download(
const KURL& src,
QString & target,
QWidget* window);
00111
00115
static bool download(
const KURL& src,
QString & target) KDE_DEPRECATED;
00116
00128
static void removeTempFile(
const QString& name);
00129
00148
static bool upload(
const QString& src,
const KURL& target,
QWidget* window);
00149
00153
static bool upload(
const QString& src,
const KURL& target) KDE_DEPRECATED;
00154
00173
static bool copy(
const KURL& src,
const KURL& target,
QWidget* window );
00174
00175
00179
static bool copy(
const KURL& src,
const KURL& target ) KDE_DEPRECATED;
00180
00181
00185
static bool file_copy(
const KURL& src,
const KURL& dest,
int permissions=-1,
00186
bool overwrite=
false,
bool resume=
false,
QWidget* window = 0L );
00187
00193
static bool file_move(
const KURL& src,
const KURL& target,
int permissions=-1,
00194
bool overwrite=
false,
bool resume=
false,
QWidget* window = 0L );
00195
00196
00216
static bool dircopy(
const KURL& src,
const KURL& target,
QWidget* window );
00217
00221
static bool dircopy(
const KURL& src,
const KURL& target ) KDE_DEPRECATED;
00222
00226
static bool dircopy(
const KURL::List& src,
const KURL& target,
QWidget* window = 0L );
00227
00233
static bool move(
const KURL& src,
const KURL& target,
QWidget* window = 0L );
00234
00240
static bool move(
const KURL::List& src,
const KURL& target,
QWidget* window = 0L );
00241
00257
static bool exists(
const KURL& url,
bool source,
QWidget* window);
00258
00262
static bool exists(
const KURL& url,
QWidget* window) KDE_DEPRECATED;
00263
00267
static bool exists(
const KURL& url) KDE_DEPRECATED;
00268
00272
static bool exists(
const KURL& url,
bool source) KDE_DEPRECATED;
00273
00290
static bool stat(
const KURL& url,
KIO::UDSEntry & entry,
QWidget* window);
00291
00295
static bool stat(
const KURL& url,
KIO::UDSEntry & entry) KDE_DEPRECATED;
00296
00311
static bool del(
const KURL & url,
QWidget* window );
00312
00316
static bool del(
const KURL & url ) KDE_DEPRECATED;
00317
00332
static bool mkdir(
const KURL & url,
QWidget* window,
int permissions = -1 );
00333
00337
static bool mkdir(
const KURL & url,
int permissions = -1 ) KDE_DEPRECATED;
00338
00357
static QString fish_execute(
const KURL & url,
const QString command,
QWidget* window );
00358
00381
static QString mimetype(
const KURL & url,
QWidget* window );
00382
00386
static QString mimetype(
const KURL & url ) KDE_DEPRECATED;
00387
00392 static QString lastErrorString() {
return lastErrorMsg ? *lastErrorMsg : QString::null; }
00393
00399 static int lastError() {
return lastErrorCode; }
00400
00401
private:
00405
NetAccess() {}
00406
00410 ~
NetAccess() {}
00411
00415
bool filecopyInternal(
const KURL& src,
const KURL& target,
int permissions,
00416
bool overwrite,
bool resume,
QWidget* window,
bool move);
00417
bool dircopyInternal(
const KURL::List& src,
const KURL& target,
00418
QWidget* window,
bool move);
00419
bool statInternal(
const KURL & url,
int details,
bool source,
QWidget* window = 0);
00420
UDSEntry m_entry;
00421
bool delInternal(
const KURL & url,
QWidget* window = 0);
00422
bool mkdirInternal(
const KURL & url,
int permissions,
QWidget* window = 0);
00423
QString fish_executeInternal(
const KURL & url,
const QString command,
QWidget* window = 0);
00424
00425
QString mimetypeInternal(
const KURL & url,
QWidget* window = 0);
00426
void enter_loop();
00427
QString m_mimetype;
00428
00432
static QStringList* tmpfiles;
00433
00434
static QString* lastErrorMsg;
00435
static int lastErrorCode;
00439
bool bJobOK;
00440
friend class I_like_this_class;
00441
00442
private slots:
00443
void slotResult(
KIO::Job * job );
00444
void slotMimetype(
KIO::Job * job,
const QString & type );
00445
private:
00446
class NetAccessPrivate* d;
00447 };
00448
00449 }
00450
00451
#endif
This file is part of the documentation for kio Library Version 3.3.0.