slavebase.h
48 SlaveBase( const TQCString &protocol, const TQCString &pool_socket, const TQCString &app_socket);
232 enum MessageBoxType { QuestionYesNo = 1, WarningYesNo = 2, WarningContinueCancel = 3, WarningYesNoCancel = 4, Information = 5, SSLMessageBox = 6 };
347 virtual void setHost(const TQString& host, int port, const TQString& user, const TQString& pass);
Allows encoding and decoding properly remote filenames into Unicode.
Definition kremoteencoding.h:45
This class is intended to make it easier to prompt for, cache and retrieve authorization information.
Definition authinfo.h:52
This class provides a simple means for IPC between two applications via a pipe.
Definition connection.h:49
virtual void setSubURL(const KURL &url)
Prepare slave for streaming operation.
Definition slavebase.cpp:803
bool wasKilled() const
If your ioslave was killed by a signal, wasKilled() returns true.
Definition slavebase.cpp:1307
virtual void symlink(const TQString &target, const KURL &dest, bool overwrite)
Creates a symbolic link named dest, pointing to target, which may be a relative or an absolute path.
Definition slavebase.cpp:793
bool openPassDlg(TDEIO::AuthInfo &info, const TQString &errorMsg)
Prompt the user for Authorization info (login & password).
Definition slavebase.cpp:854
void delCachedAuthentication(const TQString &key)
Definition slavebase.cpp:718
virtual void stat(const KURL &url)
Finds all details for one file or directory.
Definition slavebase.cpp:779
TDEConfigBase * config()
Returns a configuration object to query config/meta-data information from.
Definition slavebase.cpp:386
void speed(unsigned long _bytes_per_second)
Call this in get and copy, to give the current transfer speed, but only if it can't be calculated out...
Definition slavebase.cpp:540
void sendAuthenticationKey(const TQCString &gKey, const TQCString &key, bool keep)
Definition slavebase.cpp:710
void data(const TQByteArray &data)
Sends data in the slave to the job (i.e.
Definition slavebase.cpp:409
TQString createAuthCacheKey(const KURL &url)
Definition slavebase.cpp:1166
bool canResume(TDEIO::filesize_t offset)
Call this at the beginning of put(), to give the size of the existing partial file,...
Definition slavebase.cpp:937
virtual void reparseConfiguration()
Called by the scheduler to tell the slave that the configuration changed (i.e.
Definition slavebase.cpp:812
void infoMessage(const TQString &msg)
Call to signal a message, to be displayed if the application wants to, for instance in a status bar.
Definition slavebase.cpp:620
void setTimeoutSpecialCommand(int timeout, const TQByteArray &data=TQByteArray())
This function sets a timeout of timeout seconds and calls special(data) when the timeout occurs as if...
Definition slavebase.cpp:994
virtual void mimetype(const KURL &url)
Finds mimetype for one file or directory.
Definition slavebase.cpp:789
void finished()
Call to signal successful completion of any command (besides openConnection and closeConnection).
Definition slavebase.cpp:449
virtual void openConnection()
Opens the connection (forced) When this function gets called the slave is operating in connection-ori...
Definition slavebase.cpp:775
virtual void special(const TQByteArray &data)
Used for any command that is specific to this slave (protocol) Examples are : HTTP POST,...
Definition slavebase.cpp:783
bool cacheAuthentication(const AuthInfo &info)
Explicitly store authentication information.
Definition slavebase.cpp:1250
void mimeType(const TQString &_type)
Call this in mimetype() and in get(), when you know the mimetype.
Definition slavebase.cpp:571
void warning(const TQString &msg)
Call to signal a warning, to be displayed in a dialog box.
Definition slavebase.cpp:614
void statEntry(const UDSEntry &_entry)
Call this from stat() to express details about an object, the UDSEntry customarily contains the atoms...
Definition slavebase.cpp:647
int readData(TQByteArray &buffer)
Read data send by the job, after a dataReq.
Definition slavebase.cpp:987
void connected()
Call in openConnection, if you reimplement it, when you're done.
Definition slavebase.cpp:442
int messageBox(MessageBoxType type, const TQString &text, const TQString &caption=TQString::null, const TQString &buttonYes=TQString::null, const TQString &buttonNo=TQString::null)
Call this to show a message box from the slave.
Definition slavebase.cpp:914
KRemoteEncoding * remoteEncoding()
Returns an object that can translate remote filenames into proper Unicode forms.
Definition slavebase.cpp:401
virtual void chmod(const KURL &url, int permissions)
Change permissions on path The slave emits ERR_DOES_NOT_EXIST or ERR_CANNOT_CHMOD.
Definition slavebase.cpp:801
void redirection(const KURL &_url)
Call this to signal a redirection The job will take care of going to that url.
Definition slavebase.cpp:548
void setMetaData(const TQString &key, const TQString &value)
Sets meta-data to be send to the application before the first data() or finished() signal.
Definition slavebase.cpp:355
virtual void copy(const KURL &src, const KURL &dest, int permissions, bool overwrite)
Copy src into dest.
Definition slavebase.cpp:795
void needSubURLData()
Call to signal that data from the sub-URL is needed.
Definition slavebase.cpp:462
bool hasMetaData(const TQString &key) const
Queries for the existence of a certain config/meta-data entry send by the application to the slave.
Definition slavebase.cpp:369
void processedPercent(float percent)
Only use this if you can't know in advance the size of the copied data.
Definition slavebase.cpp:534
virtual void rename(const KURL &src, const KURL &dest, bool overwrite)
Rename oldname into newname.
Definition slavebase.cpp:791
virtual void put(const KURL &url, int permissions, bool overwrite, bool resume)
put, i.e.
Definition slavebase.cpp:781
void listEntries(const UDSEntryList &_entry)
Call this in listDir, each time you have a bunch of entries to report.
Definition slavebase.cpp:697
void listEntry(const UDSEntry &_entry, bool ready)
internal function to be called by the slave.
Definition slavebase.cpp:655
void processedSize(TDEIO::filesize_t _bytes)
Call this during get and copy, once in a while, to give some info about the current state.
Definition slavebase.cpp:498
virtual void closeConnection()
Closes the connection (forced) Called when the application disconnects the slave to close any open ne...
Definition slavebase.cpp:777
virtual void setHost(const TQString &host, int port, const TQString &user, const TQString &pass)
Set the host.
Definition slavebase.cpp:771
TQString metaData(const TQString &key) const
Queries for config/meta-data send by the application to the slave.
Definition slavebase.cpp:360
void connectSlave(const TQString &path)
internal function to connect a slave to/ disconnect from either the slave pool or the application
Definition slavebase.cpp:336
virtual void del(const KURL &url, bool isfile)
Delete a file or directory.
Definition slavebase.cpp:797
void slaveStatus(const TQString &host, bool connected)
Used to report the status of the slave.
Definition slavebase.cpp:467
bool checkCachedAuthentication(AuthInfo &info)
Checks for cached authentication based on parameters given by info.
Definition slavebase.cpp:1207
void totalSize(TDEIO::filesize_t _bytes)
Call this in get and copy, to give the total size of the file Call in listDir too,...
Definition slavebase.cpp:482
virtual void localURL(const KURL &remoteURL)
For use with for ForwardingSlaveBase Returns the local URL of the given remote URL if possible.
Definition slavebase.cpp:816
TQValueList< UDSAtom > UDSEntry
An entry is the list of atoms containing all the information for a file or URL.
Definition global.h:507
Trinity API Reference