23 #ifndef __kio_netaccess_h
24 #define __kio_netaccess_h
28 #include <kio/global.h>
33 template<
typename T,
typename K>
class TQMap;
117 static bool download(
const KURL& src, TQString & target, TQWidget* window);
122 static bool download(
const KURL& src, TQString & target) KDE_DEPRECATED;
135 static void removeTempFile(
const TQString& name);
156 static bool upload(
const TQString& src,
const KURL& target, TQWidget* window);
161 static bool upload(
const TQString& src,
const KURL& target) KDE_DEPRECATED;
181 static bool copy(
const KURL& src,
const KURL& target, TQWidget* window );
187 static bool copy(
const KURL& src,
const KURL& target ) KDE_DEPRECATED;
193 static bool file_copy(
const KURL& src,
const KURL& dest,
int permissions=-1,
194 bool overwrite=
false,
bool resume=
false, TQWidget* window = 0L );
201 static bool file_move(
const KURL& src,
const KURL& target,
int permissions=-1,
202 bool overwrite=
false,
bool resume=
false, TQWidget* window = 0L );
224 static bool dircopy(
const KURL& src,
const KURL& target, TQWidget* window );
229 static bool dircopy(
const KURL& src,
const KURL& target ) KDE_DEPRECATED;
234 static bool dircopy(
const KURL::List& src,
const KURL& target, TQWidget* window = 0L );
241 static bool move(
const KURL& src,
const KURL& target, TQWidget* window = 0L );
248 static bool move(
const KURL::List& src,
const KURL& target, TQWidget* window = 0L );
266 static bool exists(
const KURL& url,
bool source, TQWidget* window);
272 static bool exists(
const KURL& url, TQWidget* window) KDE_DEPRECATED;
277 static bool exists(
const KURL& url) KDE_DEPRECATED;
282 static bool exists(
const KURL& url,
bool source) KDE_DEPRECATED;
323 static KURL mostLocalURL(
const KURL& url, TQWidget* window);
339 static bool del(
const KURL & url, TQWidget* window );
347 static bool del(
const KURL & url ) KDE_DEPRECATED;
364 static bool mkdir(
const KURL & url, TQWidget* window,
int permissions = -1 );
372 static bool mkdir(
const KURL & url,
int permissions = -1 ) KDE_DEPRECATED;
392 static TQString fish_execute(
const KURL & url,
const TQString command, TQWidget* window );
428 static bool synchronousRun(
Job* job, TQWidget* window, TQByteArray* data=0,
429 KURL* finalURL=0, TQMap<TQString,TQString>* metaData=0 );
453 static TQString
mimetype(
const KURL & url, TQWidget* window );
461 static TQString
mimetype(
const KURL & url ) KDE_DEPRECATED;
468 static TQString
lastErrorString() {
return lastErrorMsg ? *lastErrorMsg : TQString::null; }
491 bool filecopyInternal(
const KURL& src,
const KURL& target,
int permissions,
492 bool overwrite,
bool resume, TQWidget* window,
bool move);
493 bool dircopyInternal(
const KURL::List& src,
const KURL& target,
494 TQWidget* window,
bool move);
495 bool statInternal(
const KURL & url,
int details,
bool source, TQWidget* window = 0);
497 bool delInternal(
const KURL & url, TQWidget* window = 0);
498 bool mkdirInternal(
const KURL & url,
int permissions, TQWidget* window = 0);
499 TQString fish_executeInternal(
const KURL & url,
const TQString command, TQWidget* window = 0);
500 bool synchronousRunInternal( Job* job, TQWidget* window, TQByteArray* data,
501 KURL* finalURL, TQMap<TQString,TQString>* metaData );
503 TQString mimetypeInternal(
const KURL & url, TQWidget* window = 0);
509 static TQStringList* tmpfiles;
511 static TQString* lastErrorMsg;
512 static int lastErrorCode;
514 friend class I_like_this_class;
518 void slotMimetype(
KIO::Job * job,
const TQString & type );
519 void slotData(
KIO::Job*,
const TQByteArray& );
520 void slotRedirection(
KIO::Job*,
const KURL& );
527 TQMap<TQString, TQString> *m_metaData;
535 class NetAccessPrivate* d;