23#ifndef __tdeio_netaccess_h
24#define __tdeio_netaccess_h
28#include <tdeio/global.h>
33template<
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) TDE_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) TDE_DEPRECATED;
181 static bool copy(
const KURL& src,
const KURL& target, TQWidget* window );
187 static bool copy(
const KURL& src,
const KURL& target ) TDE_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 ) TDE_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 );
262 static KURL
localURL(
const KURL& url, TQWidget* window);
280 static bool exists(
const KURL& url,
bool source, TQWidget* window);
286 static bool exists(
const KURL& url, TQWidget* window) TDE_DEPRECATED;
291 static bool exists(
const KURL& url) TDE_DEPRECATED;
296 static bool exists(
const KURL& url,
bool source) TDE_DEPRECATED;
337 static KURL mostLocalURL(
const KURL& url, TQWidget* window);
353 static bool del(
const KURL & url, TQWidget* window );
361 static bool del(
const KURL & url ) TDE_DEPRECATED;
378 static bool mkdir(
const KURL & url, TQWidget* window,
int permissions = -1 );
386 static bool mkdir(
const KURL & url,
int permissions = -1 ) TDE_DEPRECATED;
406 static TQString fish_execute(
const KURL & url,
const TQString command, TQWidget* window );
442 static bool synchronousRun(
Job* job, TQWidget* window, TQByteArray* data=0,
443 KURL* finalURL=0, TQMap<TQString,TQString>* metaData=0 );
467 static TQString
mimetype(
const KURL & url, TQWidget* window );
475 static TQString
mimetype(
const KURL & url ) TDE_DEPRECATED;
482 static TQString
lastErrorString() {
return lastErrorMsg ? *lastErrorMsg : TQString::null; }
505 bool filecopyInternal(
const KURL& src,
const KURL& target,
int permissions,
506 bool overwrite,
bool resume, TQWidget* window,
bool move);
507 bool dircopyInternal(
const KURL::List& src,
const KURL& target,
508 TQWidget* window,
bool move);
509 bool statInternal(
const KURL & url,
int details,
bool source, TQWidget* window = 0);
510 KURL localURLInternal(
const KURL & url, TQWidget* window = 0);
512 bool delInternal(
const KURL & url, TQWidget* window = 0);
513 bool mkdirInternal(
const KURL & url,
int permissions, TQWidget* window = 0);
514 TQString fish_executeInternal(
const KURL & url,
const TQString command, TQWidget* window = 0);
515 bool synchronousRunInternal( Job* job, TQWidget* window, TQByteArray* data,
516 KURL* finalURL, TQMap<TQString,TQString>* metaData );
518 TQString mimetypeInternal(
const KURL & url, TQWidget* window = 0);
524 static TQStringList* tmpfiles;
526 static TQString* lastErrorMsg;
527 static int lastErrorCode;
529 friend class I_like_this_class;
533 void slotMimetype(
TDEIO::Job * job,
const TQString & type );
534 void slotLocalURL(
TDEIO::Job*,
const KURL&,
bool);
535 void slotData(
TDEIO::Job*,
const TQByteArray& );
536 void slotRedirection(
TDEIO::Job*,
const KURL& );
544 TQMap<TQString, TQString> *m_metaData;
552 class NetAccessPrivate* d;
The base class for all jobs.
static int lastError()
Returns the error code for the last job, in case it failed.
static TQString lastErrorString()
Returns the error string for the last job, in case it failed.
A namespace for TDEIO globals.
TDEIO_EXPORT FileCopyJob * file_move(const KURL &src, const KURL &dest, int permissions=-1, bool overwrite=false, bool resume=false, bool showProgressInfo=true)
Move a single file.
TDEIO_EXPORT CopyJob * move(const KURL &src, const KURL &dest, bool showProgressInfo=true)
Moves a file or directory src to the given destination dest.
TDEIO_EXPORT FileCopyJob * file_copy(const KURL &src, const KURL &dest, int permissions=-1, bool overwrite=false, bool resume=false, bool showProgressInfo=true)
Copy a single file.
TDEIO_EXPORT DeleteJob * del(const KURL &src, bool shred=false, bool showProgressInfo=true)
Delete a file or directory.
TDEIO_EXPORT LocalURLJob * localURL(const KURL &remoteUrl)
Retrieve local URL if available.
TDEIO_EXPORT MimetypeJob * mimetype(const KURL &url, bool showProgressInfo=true)
Find mimetype for one file or directory.
TDEIO_EXPORT SimpleJob * mkdir(const KURL &url, int permissions=-1)
Creates a single directory.
TQValueList< UDSAtom > UDSEntry
An entry is the list of atoms containing all the information for a file or URL.
TDEIO_EXPORT CopyJob * copy(const KURL &src, const KURL &dest, bool showProgressInfo=true)
Copy a file or directory src into the destination dest, which can be a file (including the final file...
TDEIO_EXPORT StatJob * stat(const KURL &url, bool showProgressInfo=true)
Find all details for one file or directory.