slavebase.cpp
89 KEntryMap internalEntryMap( const TQString &pGroup) const { Q_UNUSED(pGroup); return KEntryMap(); }
320 << (errno==EBADF?"EBADF":errno==EINTR?"EINTR":errno==EINVAL?"EINVAL":errno==ENOMEM?"ENOMEM":"unknown")
677 else if (((pendingListEntries.count()*maximum_updatetime)/diff) > (d->totalSize-d->sentListEntries))
736 snprintf(buffer, sizeof(buffer), "tdeioslave: ####### CRASH ###### protocol = %s pid = %d signal = %d\n", s_protocol, getpid(), sig);
864 kdDebug(7019) << "SlaveBase::openPassDlg window-id=" << windowId << " progress-id=" << progressId << endl;
879 bool callOK = d->dcopClient->call( "kded", "kpasswdserver", "queryAuthInfo(TDEIO::AuthInfo, TQString, long int, long int, unsigned long int)",
923 kdDebug(7019) << "messageBox " << type << " " << text << " - " << caption << buttonYes << buttonNo << endl;
1216 kdDebug(7019) << "SlaveBase::checkCachedAuthInfo window = " << windowId << " url = " << info.url.url() << endl;
1223 if ( !d->dcopClient->call( "kded", "kpasswdserver", "checkAuthInfo(TDEIO::AuthInfo, long int, unsigned long int)",
1226 kdWarning(7019) << "Can't communicate with kded_kpasswdserver (checkCachedAuthentication)!" << endl;
void listEntry(const UDSEntry &_entry, bool ready)
internal function to be called by the slave.
Definition: slavebase.cpp:655
virtual void stat(const KURL &url)
Finds all details for one file or directory.
Definition: slavebase.cpp:779
virtual void mimetype(const KURL &url)
Finds mimetype for one file or directory.
Definition: slavebase.cpp:789
bool isModified() const
Use this method to check if the object was modified.
Definition: authinfo.h:76
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
This class is intended to make it easier to prompt for, cache and retrieve authorization information.
Definition: authinfo.h:51
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 setHost(const TQString &host, int port, const TQString &user, const TQString &pass)
Set the host.
Definition: slavebase.cpp:771
bool openPassDlg(TDEIO::AuthInfo &info, const TQString &errorMsg)
Prompt the user for Authorization info (login & password).
Definition: slavebase.cpp:854
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 processedPercent(float percent)
Only use this if you can't know in advance the size of the copied data.
Definition: slavebase.cpp:534
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
TQValueList< UDSAtom > UDSEntry
An entry is the list of atoms containing all the information for a file or URL.
Definition: global.h:507
virtual void reparseConfiguration()
Called by the scheduler to tell the slave that the configuration changed (i.e.
Definition: slavebase.cpp:812
void needSubURLData()
Call to signal that data from the sub-URL is needed.
Definition: slavebase.cpp:462
bool requestNetwork(const TQString &host=TQString::null)
Used by the slave to check if it can connect to a given host.
Definition: slavebase.cpp:626
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
TQString createAuthCacheKey(const KURL &url)
Definition: slavebase.cpp:1166
void connected()
Call in openConnection, if you reimplement it, when you're done.
Definition: slavebase.cpp:442
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 finished()
Call to signal successful completion of any command (besides openConnection and closeConnection)
Definition: slavebase.cpp:449
virtual void setSubURL(const KURL &url)
Prepare slave for streaming operation.
Definition: slavebase.cpp:803
virtual void copy(const KURL &src, const KURL &dest, int permissions, bool overwrite)
Copy src into dest.
Definition: slavebase.cpp:795
Allows encoding and decoding properly remote filenames into Unicode.
Definition: kremoteencoding.h:44
virtual void closeConnection()
Closes the connection (forced) Called when the application disconnects the slave to close any open ne...
Definition: slavebase.cpp:777
KRemoteEncoding * remoteEncoding()
Returns an object that can translate remote filenames into proper Unicode forms.
Definition: slavebase.cpp:401
int readData(TQByteArray &buffer)
Read data send by the job, after a dataReq.
Definition: slavebase.cpp:987
There are two classes that specifies the protocol between application (job) and tdeioslave.
Definition: slavebase.h:45
void init(TDESocket *sock)
Initialize this connection to use the given socket.
Definition: connection.cpp:131
bool wasKilled() const
If your ioslave was killed by a signal, wasKilled() returns true.
Definition: slavebase.cpp:1307
bool checkCachedAuthentication(AuthInfo &info)
Checks for cached authentication based on parameters given by info.
Definition: slavebase.cpp:1207
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
TDEIO_EXPORT TQString number(TDEIO::filesize_t size)
Converts a size to a string representation Not unlike TQString::number(...)
Definition: global.cpp:96
void data(const TQByteArray &data)
Sends data in the slave to the job (i.e.
Definition: slavebase.cpp:409
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
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 special(const TQByteArray &data)
Used for any command that is specific to this slave (protocol) Examples are : HTTP POST,...
Definition: slavebase.cpp:783
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
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
virtual void put(const KURL &url, int permissions, bool overwrite, bool resume)
put, i.e.
Definition: slavebase.cpp:781
void mimeType(const TQString &_type)
Call this in mimetype() and in get(), when you know the mimetype.
Definition: slavebase.cpp:571
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
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
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
bool cacheAuthentication(const AuthInfo &info)
Explicitly store authentication information.
Definition: slavebase.cpp:1250
TQString metaData(const TQString &key) const
Queries for config/meta-data send by the application to the slave.
Definition: slavebase.cpp:360
void dropNetwork(const TQString &host=TQString::null)
Used by the slave to withdraw a connection requested by requestNetwork.
Definition: slavebase.cpp:641
TDEConfigBase * config()
Returns a configuration object to query config/meta-data information from.
Definition: slavebase.cpp:386
virtual void mkdir(const KURL &url, int permissions)
Create a directory.
Definition: slavebase.cpp:799
void sendMetaData()
Internal function to transmit meta data to the application.
Definition: slavebase.cpp:391
void slaveStatus(const TQString &host, bool connected)
Used to report the status of the slave.
Definition: slavebase.cpp:467
void send(int cmd, const TQByteArray &arr=TQByteArray())
Sends/queues the given command to be sent.
Definition: connection.cpp:105
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
virtual void del(const KURL &url, bool isfile)
Delete a file or directory.
Definition: slavebase.cpp:797
void sendAuthenticationKey(const TQCString &gKey, const TQCString &key, bool keep)
Definition: slavebase.cpp:710
void warning(const TQString &msg)
Call to signal a warning, to be displayed in a dialog box.
Definition: slavebase.cpp:614
TDEIO_EXPORT TQString unsupportedActionErrorString(const TQString &protocol, int cmd)
Returns an appropriate error message if the given command cmd is an unsupported action (ERR_UNSUPPORT...
Definition: global.cpp:439
This class provides a simple means for IPC between two applications via a pipe.
Definition: connection.h:48
void delCachedAuthentication(const TQString &key)
Definition: slavebase.cpp:718
void listEntries(const UDSEntryList &_entry)
Call this in listDir, each time you have a bunch of entries to report.
Definition: slavebase.cpp:697
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
virtual void rename(const KURL &src, const KURL &dest, bool overwrite)
Rename oldname into newname.
Definition: slavebase.cpp:791
int waitForAnswer(int expected1, int expected2, TQByteArray &data, int *pCmd=0)
Wait for an answer to our request, until we get expected1 or expected2.
Definition: slavebase.cpp:959