24 #include <kconfigbase.h>
25 #include <kio/global.h>
26 #include <kio/authinfo.h>
34 class SlaveBasePrivate;
48 SlaveBase(
const TQCString &protocol,
const TQCString &pool_socket,
const TQCString &app_socket);
65 void setConnection(
Connection* connection ) { m_pConnection = connection; }
69 Connection *connection()
const {
return m_pConnection; }
84 void data(
const TQByteArray &data );
109 void error(
int _errid,
const TQString &_text );
125 void needSubURLData();
133 void slaveStatus(
const TQString &host,
bool connected);
141 void statEntry(
const UDSEntry& _entry );
148 void listEntries(
const UDSEntryList& _entry );
193 void processedPercent(
float percent );
200 void speed(
unsigned long _bytes_per_second );
206 void redirection(
const KURL &_url );
219 void mimeType(
const TQString &_type );
224 void warning(
const TQString &msg );
230 void infoMessage(
const TQString &msg );
232 enum MessageBoxType { QuestionYesNo = 1, WarningYesNo = 2, WarningContinueCancel = 3, WarningYesNoCancel = 4, Information = 5, SSLMessageBox = 6 };
247 int messageBox( MessageBoxType type,
const TQString &text,
248 const TQString &caption = TQString::null,
249 const TQString &buttonYes = TQString::null,
250 const TQString &buttonNo = TQString::null );
268 int messageBox(
const TQString &text, MessageBoxType type,
269 const TQString &caption = TQString::null,
270 const TQString &buttonYes = TQString::null,
271 const TQString &buttonNo = TQString::null,
272 const TQString &dontAskAgainName = TQString::null );
278 void setMetaData(
const TQString &key,
const TQString &value);
285 bool hasMetaData(
const TQString &key)
const;
291 TQString metaData(
const TQString &key)
const;
298 bool hasMetaData(
const TQString &key);
304 TQString metaData(
const TQString &key);
311 MetaData allMetaData()
const {
return mIncomingMetaData; }
320 KConfigBase* config();
347 virtual void setHost(
const TQString& host,
int port,
const TQString& user,
const TQString& pass);
352 virtual void setSubURL(
const KURL&url);
363 virtual void openConnection();
373 virtual void closeConnection();
381 virtual void get(
const KURL& url );
398 virtual void put(
const KURL& url,
int permissions,
bool overwrite,
bool resume );
405 virtual void stat(
const KURL& url );
419 virtual void mimetype(
const KURL& url );
428 virtual void listDir(
const KURL& url );
437 virtual void mkdir(
const KURL&url,
int permissions );
447 virtual void rename(
const KURL& src,
const KURL& dest,
bool overwrite );
456 virtual void symlink(
const TQString& target,
const KURL& dest,
bool overwrite );
462 virtual void chmod(
const KURL& url,
int permissions );
474 virtual void copy(
const KURL &src,
const KURL &dest,
int permissions,
bool overwrite );
482 virtual void del(
const KURL &url,
bool isfile);
495 virtual void special(
const TQByteArray & data );
504 virtual void multiGet(
const TQByteArray & data );
510 virtual void slave_status();
516 virtual void reparseConfiguration();
522 int connectTimeout();
527 int proxyConnectTimeout();
533 int responseTimeout();
555 void setTimeoutSpecialCommand(
int timeout,
const TQByteArray &data=TQByteArray());
560 static void sigsegv_handler(
int);
564 static void sigpipe_handler(
int);
573 virtual bool dispatch();
577 virtual void dispatch(
int command,
const TQByteArray &data );
587 int readData( TQByteArray &buffer );
600 void listEntry(
const UDSEntry& _entry,
bool ready);
606 void connectSlave(
const TQString& path);
607 void disconnectSlave();
658 bool openPassDlg(
KIO::AuthInfo& info,
const TQString &errorMsg );
693 bool checkCachedAuthentication(
AuthInfo& info );
701 bool cacheAuthentication(
const AuthInfo& info );
707 bool pingCacheDaemon()
const;
715 TQString createAuthCacheKey(
const KURL& url );
724 void sendAuthenticationKey(
const TQCString& gKey,
const TQCString& key,
bool keep );
734 void delCachedAuthentication(
const TQString& key );
766 bool requestNetwork(
const TQString& host = TQString::null);
781 void dropNetwork(
const TQString& host = TQString::null);
787 DCOPClient *dcopClient();
793 int waitForAnswer(
int expected1,
int expected2, TQByteArray & data,
int * pCmd = 0 );
816 bool wasKilled()
const;
825 UDSEntryList pendingListEntries;
826 uint listEntryCurrentSize;
827 long listEntry_sec, listEntry_usec;
829 TQString mPoolSocket;
831 bool mConnectedToApp;
833 virtual void virtual_hook(
int id,
void* data );
This class is intended to make it easier to prompt for, cache and retrieve authorization information.
This class provides a simple means for IPC between two applications via a pipe.
There are two classes that specifies the protocol between application (job) and kioslave.
TQCString mProtocol
Name of the protocol supported by this slave.
bool multipleAuthCaching() const
void setMultipleAuthCaching(bool)
Allows encoding and decoding properly remote filenames into Unicode.
A namespace for KIO globals.
TQValueList< UDSAtom > UDSEntry
An entry is the list of atoms containing all the information for a file or URL.
KIO_EXPORT TransferJob * get(const KURL &url, bool reload=false, bool showProgressInfo=true)
Get (a.k.a.
KIO_EXPORT SimpleJob * symlink(const TQString &target, const KURL &dest, bool overwrite, bool showProgressInfo=true)
Create or move a symlink.
KIO_EXPORT StatJob * stat(const KURL &url, bool showProgressInfo=true)
Find all details for one file or directory.
TQ_ULLONG filesize_t
64-bit file size
KIO_EXPORT MimetypeJob * mimetype(const KURL &url, bool showProgressInfo=true)
Find mimetype for one file or directory.
KIO_EXPORT SimpleJob * special(const KURL &url, const TQByteArray &data, bool showProgressInfo=true)
Execute any command that is specific to one slave (protocol).
KIO_EXPORT TransferJob * put(const KURL &url, int permissions, bool overwrite, bool resume, bool showProgressInfo=true)
Put (a.k.a.
KIO_EXPORT DeleteJob * del(const KURL &src, bool shred=false, bool showProgressInfo=true)
Delete a file or directory.
KIO_EXPORT ChmodJob * chmod(const KFileItemList &lstItems, int permissions, int mask, TQString newOwner, TQString newGroup, bool recursive, bool showProgressInfo=true)
Creates a job that changes permissions/ownership on several files or directories, optionally recursiv...
KIO_EXPORT SimpleJob * rename(const KURL &src, const KURL &dest, bool overwrite)
Rename a file or directory.
KIO_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...
KIO_EXPORT ListJob * listDir(const KURL &url, bool showProgressInfo=true, bool includeHidden=true)
List the contents of url, which is assumed to be a directory.
KIO_EXPORT SimpleJob * mkdir(const KURL &url, int permissions=-1)
Creates a single directory.