kio Library API Documentation

KIO Namespace Reference

A namespace for KIO globals. More...


Classes

class  AuthInfo
 This class is intended to make it easier to prompt for, cache and retrieve authorization information. A two way messaging class for passing authentication information. More...
class  NetRC
 A Singleton class that provides access to passwords stored in .netrc files for automatic login purposes. An interface to the ftp .netrc files. More...
class  ChmodJob
 This job changes permissions on a list of files or directories, optionally in a recursive manner. More...
class  Connection
 This class provides a simple means for IPC between two applications via a pipe. More...
class  DataProtocol
 This kioslave provides support of data urls as specified by rfc 2397. More...
class  DataSlave
 This class provides a high performance implementation for the data url scheme (rfc2397). More...
class  DavJob
 The transfer job pumps data into and/or out of a Slave. More...
class  ForwardingSlaveBase
 This class should be used as a base for ioslaves acting as a forwarder to other ioslaves. More...
class  MetaData
 MetaData is a simple map of key/value strings. More...
class  Job
 The base class for all jobs. More...
class  SimpleJob
 A simple job (one url and one command). More...
class  StatJob
 A KIO job that retrieves information about a file or directory. More...
class  MkdirJob
 A KIO job that creates a directory. More...
class  TransferJob
 The transfer job pumps data into and/or out of a Slave. More...
class  StoredTransferJob
 StoredTransferJob is a TransferJob (for downloading or uploading data) that also stores a QByteArray with the data, making it simpler to use than the standard TransferJob. More...
class  MultiGetJob
 The MultiGetJob is a TransferJob that allows you to get several files from a single server. More...
class  MimetypeJob
 A MimetypeJob is a TransferJob that allows you to get the mime type of an URL. More...
class  FileCopyJob
 The FileCopyJob copies data from one place to another. More...
class  ListJob
 A ListJob is allows you to get the get the content of a directory. More...
class  CopyJob
 CopyJob is used to move, copy or symlink files and directories. More...
class  DeleteJob
 A more complex Job to delete files and directories. More...
class  MetaInfoJob
 MetaInfoJob is a KIO Job to retrieve meta information from files. KIO Job to retrieve meta information from files.
Since:
3.1.
More...
class  NetAccess
 Net Transparency. Provides an easy, synchronous interface to KIO file operations. More...
class  PasswordDialog
 A dialog for requesting a login and a password from the end user. dialog for requesting login and password from the end user. More...
class  PreviewJob
 KIO Job to get a thumbnail picture. More...
class  ProgressBase
 This class does all initialization stuff for progress, like connecting signals to slots. Base class for IO progress dialogs. More...
class  RenameDlg
 A dialog for the options to rename two files. A dialog for renaming files.
Since:
3.1.
More...
class  Scheduler
 The KIO::Scheduler manages io-slaves for the application. More...
class  SlaveBase
 There are two classes that specifies the protocol between application (job) and kioslave. More...
class  SlaveConfig
 SlaveConfig. More...
class  SlaveInterface
 There are two classes that specifies the protocol between application ( KIO::Job) and kioslave. More...
class  StatusbarProgress
 This is a special IO progress widget. IO progress widget for embedding in a statusbar. More...
class  TCPSlaveBase
 There are two classes that specifies the protocol between application (job) and kioslave. More...

Typedefs

typedef Q_LLONG fileoffset_t
typedef Q_ULLONG filesize_t
typedef QValueList< UDSAtom > UDSEntry
typedef QValueList< UDSEntryUDSEntryList
typedef QValueListIterator<
UDSEntry
UDSEntryListIterator
typedef QValueListConstIterator<
UDSEntry
UDSEntryListConstIterator

Enumerations

enum  Command {
  CMD_HOST = '0', CMD_CONNECT = '1', CMD_DISCONNECT = '2', CMD_SLAVE_STATUS = '3',
  CMD_SLAVE_CONNECT = '4', CMD_SLAVE_HOLD = '5', CMD_NONE = 'A', CMD_TESTDIR = 'B',
  CMD_GET = 'C', CMD_PUT = 'D', CMD_STAT = 'E', CMD_MIMETYPE = 'F',
  CMD_LISTDIR = 'G', CMD_MKDIR = 'H', CMD_RENAME = 'I', CMD_COPY = 'J',
  CMD_DEL = 'K', CMD_CHMOD = 'L', CMD_SPECIAL = 'M', CMD_USERPASS = 'N',
  CMD_REPARSECONFIGURATION = 'O', CMD_META_DATA = 'P', CMD_SYMLINK = 'Q', CMD_SUBURL = 'R',
  CMD_MESSAGEBOXANSWER = 'S', CMD_RESUMEANSWER = 'T', CMD_CONFIG = 'U', CMD_MULTI_GET = 'V'
}
enum  Error {
  ERR_CANNOT_OPEN_FOR_READING = 1, ERR_CANNOT_OPEN_FOR_WRITING = 2, ERR_CANNOT_LAUNCH_PROCESS = 3, ERR_INTERNAL = 4,
  ERR_MALFORMED_URL = 5, ERR_UNSUPPORTED_PROTOCOL = 6, ERR_NO_SOURCE_PROTOCOL = 7, ERR_UNSUPPORTED_ACTION = 8,
  ERR_IS_DIRECTORY = 9, ERR_IS_FILE = 10, ERR_DOES_NOT_EXIST = 11, ERR_FILE_ALREADY_EXIST = 12,
  ERR_DIR_ALREADY_EXIST = 13, ERR_UNKNOWN_HOST = 14, ERR_ACCESS_DENIED = 15, ERR_WRITE_ACCESS_DENIED = 16,
  ERR_CANNOT_ENTER_DIRECTORY = 17, ERR_PROTOCOL_IS_NOT_A_FILESYSTEM = 18, ERR_CYCLIC_LINK = 19, ERR_USER_CANCELED = 20,
  ERR_CYCLIC_COPY = 21, ERR_COULD_NOT_CREATE_SOCKET = 22, ERR_COULD_NOT_CONNECT = 23, ERR_CONNECTION_BROKEN = 24,
  ERR_NOT_FILTER_PROTOCOL = 25, ERR_COULD_NOT_MOUNT = 26, ERR_COULD_NOT_UNMOUNT = 27, ERR_COULD_NOT_READ = 28,
  ERR_COULD_NOT_WRITE = 29, ERR_COULD_NOT_BIND = 30, ERR_COULD_NOT_LISTEN = 31, ERR_COULD_NOT_ACCEPT = 32,
  ERR_COULD_NOT_LOGIN = 33, ERR_COULD_NOT_STAT = 34, ERR_COULD_NOT_CLOSEDIR = 35, ERR_COULD_NOT_MKDIR = 37,
  ERR_COULD_NOT_RMDIR = 38, ERR_CANNOT_RESUME = 39, ERR_CANNOT_RENAME = 40, ERR_CANNOT_CHMOD = 41,
  ERR_CANNOT_DELETE = 42, ERR_SLAVE_DIED = 43, ERR_OUT_OF_MEMORY = 44, ERR_UNKNOWN_PROXY_HOST = 45,
  ERR_COULD_NOT_AUTHENTICATE = 46, ERR_ABORTED = 47, ERR_INTERNAL_SERVER = 48, ERR_SERVER_TIMEOUT = 49,
  ERR_SERVICE_NOT_AVAILABLE = 50, ERR_UNKNOWN = 51, ERR_UNKNOWN_INTERRUPT = 53, ERR_CANNOT_DELETE_ORIGINAL = 54,
  ERR_CANNOT_DELETE_PARTIAL = 55, ERR_CANNOT_RENAME_ORIGINAL = 56, ERR_CANNOT_RENAME_PARTIAL = 57, ERR_NEED_PASSWD = 58,
  ERR_CANNOT_SYMLINK = 59, ERR_NO_CONTENT = 60, ERR_DISK_FULL = 61, ERR_IDENTICAL_FILES = 62,
  ERR_SLAVE_DEFINED = 63, ERR_UPGRADE_REQUIRED = 64, ERR_POST_DENIED = 65
}
enum  UDSAtomTypes {
  UDS_STRING = 1, UDS_LONG = 2, UDS_TIME = 4 | UDS_LONG, UDS_SIZE = 8 | UDS_LONG,
  UDS_SIZE_LARGE = 32768 | UDS_LONG, UDS_USER = 16 | UDS_STRING, UDS_ICON_NAME = 24 | UDS_STRING, UDS_GROUP = 32 | UDS_STRING,
  UDS_EXTRA = 48 | UDS_STRING, UDS_NAME = 64 | UDS_STRING, UDS_LOCAL_PATH = 72 | UDS_STRING, UDS_ACCESS = 128 | UDS_LONG,
  UDS_MODIFICATION_TIME = 256 | UDS_TIME, UDS_ACCESS_TIME = 512 | UDS_TIME, UDS_CREATION_TIME = 1024 | UDS_TIME, UDS_FILE_TYPE = 2048 | UDS_LONG,
  UDS_LINK_DEST = 4096 | UDS_STRING, UDS_URL = 8192 | UDS_STRING, UDS_MIME_TYPE = 16384 | UDS_STRING, UDS_GUESSED_MIME_TYPE = 16392 | UDS_STRING,
  UDS_XML_PROPERTIES = 32768 | UDS_STRING
}
enum  CacheControl {
  CC_CacheOnly, CC_Cache, CC_Verify, CC_Refresh,
  CC_Reload
}
enum  FileSystemFlag {
  SupportsChmod, SupportsChown, SupportsUTime, SupportsSymlinks,
  CaseInsensitive
}
enum  Progress { DEFAULT = 1, STATUSBAR = 2, LIST = 3 }
enum  RenameDlg_Mode {
  M_OVERWRITE = 1, M_OVERWRITE_ITSELF = 2, M_SKIP = 4, M_SINGLE = 8,
  M_MULTI = 16, M_RESUME = 32, M_NORENAME = 64
}
enum  RenameDlg_Result {
  R_RESUME = 6, R_RESUME_ALL = 7, R_OVERWRITE = 4, R_OVERWRITE_ALL = 5,
  R_SKIP = 2, R_AUTO_SKIP = 3, R_RENAME = 1, R_CANCEL = 0
}
enum  SkipDlg_Result { S_SKIP = 1, S_AUTO_SKIP = 2, S_CANCEL = 0 }
enum  Info {
  INF_TOTAL_SIZE = 10, INF_PROCESSED_SIZE = 11, INF_SPEED, INF_REDIRECTION = 20,
  INF_MIME_TYPE = 21, INF_ERROR_PAGE = 22, INF_WARNING = 23, INF_GETTING_FILE,
  INF_NEED_PASSWD = 25, INF_INFOMESSAGE, INF_META_DATA, INF_NETWORK_STATUS,
  INF_MESSAGEBOX
}
enum  Message {
  MSG_DATA = 100, MSG_DATA_REQ, MSG_ERROR, MSG_CONNECTED,
  MSG_FINISHED, MSG_STAT_ENTRY, MSG_LIST_ENTRIES, MSG_RENAMED,
  MSG_RESUME, MSG_SLAVE_STATUS, MSG_SLAVE_ACK, MSG_NET_REQUEST,
  MSG_NET_DROP, MSG_NEED_SUBURL_DATA, MSG_CANRESUME, MSG_AUTH_KEY,
  MSG_DEL_AUTH_KEY
}

Functions

KIO_EXPORT QDataStreamoperator<< (QDataStream &s, const AuthInfo &a)
KIO_EXPORT QDataStreamoperator>> (QDataStream &s, AuthInfo &a)
KIO_EXPORT ChmodJobchmod (const KFileItemList &lstItems, int permissions, int mask, QString newOwner, QString newGroup, bool recursive, bool showProgressInfo=true)
KIO_EXPORT DavJobdavPropFind (const KURL &url, const QDomDocument &properties, QString depth, bool showProgressInfo=true)
KIO_EXPORT DavJobdavPropPatch (const KURL &url, const QDomDocument &properties, bool showProgressInfo=true)
KIO_EXPORT DavJobdavSearch (const KURL &url, const QString &nsURI, const QString &qName, const QString &query, bool showProgressInfo=true)
KIO_EXPORT QString convertSize (KIO::filesize_t size)
KIO_EXPORT QString number (KIO::filesize_t size)
KIO_EXPORT QString convertSizeFromKB (KIO::filesize_t kbSize)
KIO_EXPORT unsigned int calculateRemainingSeconds (KIO::filesize_t totalSize, KIO::filesize_t processedSize, KIO::filesize_t speed)
KIO_EXPORT QString convertSeconds (unsigned int seconds)
KIO_EXPORT QTime calculateRemaining (KIO::filesize_t totalSize, KIO::filesize_t processedSize, KIO::filesize_t speed) KDE_DEPRECATED
KIO_EXPORT QString itemsSummaryString (uint items, uint files, uint dirs, KIO::filesize_t size, bool showSize)
KIO_EXPORT QString encodeFileName (const QString &str)
KIO_EXPORT QString decodeFileName (const QString &str)
KIO_EXPORT QString buildErrorString (int errorCode, const QString &errorText)
KIO_EXPORT QString buildHTMLErrorString (int errorCode, const QString &errorText, const KURL *reqUrl=0L, int method=-1)
KIO_EXPORT QByteArray rawErrorDetail (int errorCode, const QString &errorText, const KURL *reqUrl=0L, int method=-1)
KIO_EXPORT QString unsupportedActionErrorString (const QString &protocol, int cmd)
KIO_EXPORT KIO::CacheControl parseCacheControl (const QString &cacheControl)
KIO_EXPORT QString getCacheControlString (KIO::CacheControl cacheControl)
KIO_EXPORT QString findDeviceMountPoint (const QString &device)
KIO_EXPORT QString findPathMountPoint (const QString &filename)
KIO_EXPORT bool probably_slow_mounted (const QString &filename)
KIO_EXPORT bool manually_mounted (const QString &filename)
KIO_EXPORT bool testFileSystemFlag (const QString &filename, FileSystemFlag flag)
KIO_EXPORT SimpleJobmkdir (const KURL &url, int permissions=-1)
KIO_EXPORT SimpleJobrmdir (const KURL &url)
KIO_EXPORT SimpleJobchmod (const KURL &url, int permissions)
KIO_EXPORT SimpleJobrename (const KURL &src, const KURL &dest, bool overwrite)
KIO_EXPORT SimpleJobsymlink (const QString &target, const KURL &dest, bool overwrite, bool showProgressInfo=true)
KIO_EXPORT SimpleJobspecial (const KURL &url, const QByteArray &data, bool showProgressInfo=true)
KIO_EXPORT SimpleJobmount (bool ro, const char *fstype, const QString &dev, const QString &point, bool showProgressInfo=true)
KIO_EXPORT SimpleJobunmount (const QString &point, bool showProgressInfo=true)
KIO_EXPORT SimpleJobhttp_update_cache (const KURL &url, bool no_cache, time_t expireDate)
KIO_EXPORT StatJobstat (const KURL &url, bool showProgressInfo=true)
KIO_EXPORT StatJobstat (const KURL &url, bool sideIsSource, short int details, bool showProgressInfo=true)
KIO_EXPORT TransferJobget (const KURL &url, bool reload=false, bool showProgressInfo=true)
KIO_EXPORT TransferJobput (const KURL &url, int permissions, bool overwrite, bool resume, bool showProgressInfo=true)
KIO_EXPORT TransferJobhttp_post (const KURL &url, const QByteArray &postData, bool showProgressInfo=true)
KIO_EXPORT StoredTransferJobstoredGet (const KURL &url, bool reload=false, bool showProgressInfo=true)
KIO_EXPORT StoredTransferJobstoredPut (const QByteArray &arr, const KURL &url, int permissions, bool overwrite, bool resume, bool showProgressInfo=true)
KIO_EXPORT MultiGetJobmulti_get (long id, const KURL &url, const MetaData &metaData)
KIO_EXPORT MimetypeJobmimetype (const KURL &url, bool showProgressInfo=true)
KIO_EXPORT FileCopyJobfile_copy (const KURL &src, const KURL &dest, int permissions=-1, bool overwrite=false, bool resume=false, bool showProgressInfo=true)
KIO_EXPORT FileCopyJobfile_move (const KURL &src, const KURL &dest, int permissions=-1, bool overwrite=false, bool resume=false, bool showProgressInfo=true)
KIO_EXPORT SimpleJobfile_delete (const KURL &src, bool showProgressInfo=true)
KIO_EXPORT ListJoblistDir (const KURL &url, bool showProgressInfo=true, bool includeHidden=true)
KIO_EXPORT ListJoblistRecursive (const KURL &url, bool showProgressInfo=true, bool includeHidden=true)
KIO_EXPORT CopyJobcopy (const KURL &src, const KURL &dest, bool showProgressInfo=true)
KIO_EXPORT CopyJobcopyAs (const KURL &src, const KURL &dest, bool showProgressInfo=true)
KIO_EXPORT CopyJobcopy (const KURL::List &src, const KURL &dest, bool showProgressInfo=true)
KIO_EXPORT CopyJobmove (const KURL &src, const KURL &dest, bool showProgressInfo=true)
KIO_EXPORT CopyJobmoveAs (const KURL &src, const KURL &dest, bool showProgressInfo=true)
KIO_EXPORT CopyJobmove (const KURL::List &src, const KURL &dest, bool showProgressInfo=true)
KIO_EXPORT CopyJoblink (const KURL &src, const KURL &destDir, bool showProgressInfo=true)
KIO_EXPORT CopyJoblink (const KURL::List &src, const KURL &destDir, bool showProgressInfo=true)
KIO_EXPORT CopyJoblinkAs (const KURL &src, const KURL &dest, bool showProgressInfo=true)
KIO_EXPORT CopyJobtrash (const KURL &src, bool showProgressInfo=true)
KIO_EXPORT CopyJobtrash (const KURL::List &src, bool showProgressInfo=true)
KIO_EXPORT DeleteJobdel (const KURL &src, bool shred=false, bool showProgressInfo=true)
KIO_EXPORT DeleteJobdel (const KURL::List &src, bool shred=false, bool showProgressInfo=true)
int matchConstraint (const ParseTreeBase *_tree, const KService::Ptr &_service, const KServiceTypeProfile::OfferList &_list)
PreferencesReturn matchPreferences (const ParseTreeBase *_tree, const KService::Ptr &_service, const KServiceTypeProfile::OfferList &_list)
KIO_EXPORT ParseTreeBase::Ptr parseConstraints (const QString &_constr)
KIO_EXPORT ParseTreeBase::Ptr parsePreferences (const QString &_prefs)
KIO_EXPORT MetaInfoJobfileMetaInfo (const KFileItemList &items)
KIO_EXPORT MetaInfoJobfileMetaInfo (const KURL::List &items)
class KIO_EXPORT JobpasteClipboard (const KURL &_dest_url, bool move=false)
KIO_EXPORT void pasteData (const KURL &_dest_url, const QByteArray &_data)
KIO_EXPORT CopyJobpasteDataAsync (const KURL &_dest_url, const QByteArray &_data)
KIO_EXPORT CopyJobpasteDataAsync (const KURL &_dest_url, const QByteArray &_data, const QString &text)
KIO_EXPORT bool isClipboardEmpty ()
KIO_EXPORT PreviewJobfilePreview (const KFileItemList &items, int width, int height=0, int iconSize=0, int iconAlpha=70, bool scale=true, bool save=true, const QStringList *enabledPlugins=0)
KIO_EXPORT PreviewJobfilePreview (const KURL::List &items, int width, int height=0, int iconSize=0, int iconAlpha=70, bool scale=true, bool save=true, const QStringList *enabledPlugins=0)
KIO_EXPORT RenameDlg_Result open_RenameDlg (const QString &caption, const QString &src, const QString &dest, RenameDlg_Mode mode, QString &newDestPath, KIO::filesize_t sizeSrc=(KIO::filesize_t)-1, KIO::filesize_t sizeDest=(KIO::filesize_t)-1, time_t ctimeSrc=(time_t)-1, time_t ctimeDest=(time_t)-1, time_t mtimeSrc=(time_t)-1, time_t mtimeDest=(time_t)-1)
KIO_EXPORT SkipDlg_Result open_SkipDlg (bool _multi, const QString &_error_text=QString::null)
static void readConfig (KConfig *config, const QString &group, MetaData *metaData)

Variables

static KStaticDeleter< SlaveConfigslaveconfigsd


Detailed Description

A namespace for KIO globals.

Typedef Documentation

typedef Q_LLONG KIO::fileoffset_t
 

64-bit file offset

Definition at line 37 of file global.h.

typedef Q_ULLONG KIO::filesize_t
 

64-bit file size

Definition at line 39 of file global.h.

typedef QValueList<UDSAtom> KIO::UDSEntry
 

An entry is the list of atoms containing all the informations for a file or URL.

Definition at line 483 of file global.h.


Enumeration Type Documentation

enum KIO::Command
 

Commands that can be invoked by a job.

Definition at line 130 of file global.h.

enum KIO::Error
 

Error codes that can be emitted by KIO.

Definition at line 166 of file global.h.

enum KIO::UDSAtomTypes
 

Constants used to specify the type of a KUDSAtom.

Enumeration values:
UDS_STRING  First let's define the item types.
UDS_SIZE  Size of the file.
UDS_USER  User ID of the file owner.
UDS_ICON_NAME  Name of the icon, that should be used for displaying.

It overrides all other detection mechanisms

Since:
3.2
UDS_GROUP  Group ID of the file owner.
UDS_EXTRA  Extra data (used only if you specified Columns/ColumnsTypes) This is the only UDS entry that can be repeated.

Since:
3.2
UDS_NAME  Filename - as displayed in directory listings etc.

"." has the usual special meaning of "current directory"

UDS_LOCAL_PATH  A local file path if the ioslave display files sitting on the local filesystem (but in another hierarchy, e.g.

media:/)

UDS_ACCESS  Access permissions (part of the mode returned by stat).
UDS_MODIFICATION_TIME  The last time the file was modified.
UDS_ACCESS_TIME  The last time the file was opened.
UDS_CREATION_TIME  The time the file was created.
UDS_FILE_TYPE  File type, part of the mode returned by stat (for a link, this returns the file type of the pointed item) check UDS_LINK_DEST to know if this is a link.
UDS_LINK_DEST  Name of the file where the link points to Allows to check for a symlink (don't use S_ISLNK !).
UDS_URL  An alternative URL (If different from the caption).
UDS_MIME_TYPE  A mime type; prevents guessing.
UDS_GUESSED_MIME_TYPE  A mime type to be used for displaying only.

But when 'running' the file, the mimetype is re-determined

UDS_XML_PROPERTIES  XML properties, e.g.

for WebDAV

Since:
3.1

Definition at line 297 of file global.h.

enum KIO::CacheControl
 

Specifies how to use the cache.

See also:
parseCacheControl()

getCacheControlString()

Enumeration values:
CC_CacheOnly  Fail request if not in cache.
CC_Cache  Use cached entry if available.
CC_Verify  Validate cached entry with remote site if expired.
CC_Refresh  Always validate cached entry with remote site
Since:
3.1.
CC_Reload  Always fetch from remote site.

Definition at line 363 of file global.h.

enum KIO::RenameDlg_Result
 

The result of open_RenameDlg().

Definition at line 40 of file renamedlg.h.

enum KIO::Info
 

Identifiers for KIO informational messages.

Definition at line 44 of file slaveinterface.h.

enum KIO::Message
 

Identifiers for KIO data messages.

Definition at line 64 of file slaveinterface.h.


Function Documentation

KIO_EXPORT ChmodJob * KIO::chmod const KFileItemList lstItems,
int  permissions,
int  mask,
QString  newOwner,
QString  newGroup,
bool  recursive,
bool  showProgressInfo = true
 

Creates a job that changes permissions/ownership on several files or directories, optionally recursively.

This version of chmod uses a KFileItemList so that it directly knows what to do with the items. TODO: a version that takes a KURL::List, and a general job that stats each url and returns a KFileItemList.

Note that change of ownership is only supported for local files.

Inside directories, the "x" bits will only be changed for files that had at least one "x" bit before, and for directories. This emulates the behavior of chmod +X.

Parameters:
lstItems The file items representing several files or directories.
permissions the permissions we want to set
mask the bits we are allowed to change. For instance, if mask is 0077, we don't change the "user" bits, only "group" and "others".
newOwner If non-empty, the new owner for the files
newGroup If non-empty, the new group for the files
recursive whether to open directories recursively
showProgressInfo true to show progess information
Returns:
The job handling the operation.

Definition at line 223 of file chmodjob.cpp.

References endl(), QString::isEmpty(), and kdError().

Referenced by KFilePermissionsPropsPlugin::applyChanges(), and KIO::ForwardingSlaveBase::chmod().

DavJob * KIO::davPropFind const KURL url,
const QDomDocument properties,
QString  depth,
bool  showProgressInfo = true
 

Creates a new DavJob that issues a PROPFIND command.

PROPFIND retrieves the properties of the resource identified by the given url.

Parameters:
url the URL of the resource
properties a propfind document that describes the properties that should be retrieved
depth the depth of the request. Can be "0", "1" or "infinity"
showProgressInfo true to show progress information
Returns:
the new DavJob

Definition at line 117 of file davjob.cpp.

References KIO::Job::addMetaData().

DavJob * KIO::davPropPatch const KURL url,
const QDomDocument properties,
bool  showProgressInfo = true
 

Creates a new DavJob that issues a PROPPATCH command.

PROPPATCH sets the properties of the resource identified by the given url.

Parameters:
url the URL of the resource
properties a PROPPACTCH document that describes the properties that should be modified and its new values
showProgressInfo true to show progress information
Returns:
the new DavJob

Definition at line 125 of file davjob.cpp.

DavJob * KIO::davSearch const KURL url,
const QString nsURI,
const QString qName,
const QString query,
bool  showProgressInfo = true
 

Creates a new DavJob that issues a SEARCH command.

Parameters:
url the URL of the resource
nsURI the URI of the search method's qualified name
qName the local part of the search method's qualified name
query the search string
showProgressInfo true to show progress information
Returns:
the new DavJob

Definition at line 130 of file davjob.cpp.

References QDomDocument::createElementNS(), QDomDocument::createTextNode(), and QDomDocument::toString().

KIO_EXPORT QString KIO::convertSize KIO::filesize_t  size  ) 
 

Converts size from bytes to the string representation.

Parameters:
size size in bytes
Returns:
converted size as a string - e.g. 123.4 kB , 12.0 MB

Definition at line 45 of file global.cpp.

References QString::arg().

Referenced by convertSizeFromKB(), and KFileMimeTypeInfo::ItemInfo::string().

KIO_EXPORT QString KIO::number KIO::filesize_t  size  ) 
 

Converts a size to a string representation Not unlike QString::number(...).

Parameters:
size size in bytes
Returns:
converted size as a string - e.g. 123456789

Definition at line 83 of file global.cpp.

References QString::fromLatin1().

Referenced by KIO::SlaveBase::canResume(), and KFileView::sortingKey().

KIO_EXPORT QString KIO::convertSizeFromKB KIO::filesize_t  kbSize  ) 
 

Converts size from kilo-bytes to the string representation.

Parameters:
kbSize size in kilo-bytes
Returns:
converted size as a string - e.g. 123.4 kB , 12.0 MB

Definition at line 78 of file global.cpp.

References convertSize().

Referenced by KFileMimeTypeInfo::ItemInfo::string().

KIO_EXPORT unsigned int KIO::calculateRemainingSeconds KIO::filesize_t  totalSize,
KIO::filesize_t  processedSize,
KIO::filesize_t  speed
 

Calculates remaining time in seconds from total size, processed size and speed.

Parameters:
totalSize total size in bytes
processedSize processed size in bytes
speed speed in bytes per second
Returns:
calculated remaining time in seconds
Since:
3.4

Definition at line 90 of file global.cpp.

KIO_EXPORT QString KIO::convertSeconds unsigned int  seconds  ) 
 

Convert seconds to a string representing number of days, hours, minutes and seconds.

Parameters:
seconds number of seconds to convert
Returns:
string representation in a locale depending format
Since:
3.4

Definition at line 99 of file global.cpp.

References QString::arg().

KIO_EXPORT QTime KIO::calculateRemaining KIO::filesize_t  totalSize,
KIO::filesize_t  processedSize,
KIO::filesize_t  speed
 

Calculates remaining time from total size, processed size and speed.

Warning: As QTime is limited to 23:59:59, use calculateRemainingSeconds() instead

Parameters:
totalSize total size in bytes
processedSize processed size in bytes
speed speed in bytes per second
Returns:
calculated remaining time

Definition at line 114 of file global.cpp.

References QTime::setHMS().

KIO_EXPORT QString KIO::itemsSummaryString uint  items,
uint  files,
uint  dirs,
KIO::filesize_t  size,
bool  showSize
 

Helper for showing information about a set of files and directories.

Parameters:
items the number of items (= files + dirs + number of symlinks :)
files the number of files
dirs the number of dirs
size the sum of the size of the files
showSize whether to show the size in the result
Returns:
the summary string

Definition at line 137 of file global.cpp.

References QString::arg().

KIO_EXPORT QString KIO::encodeFileName const QString str  ) 
 

Encodes (from the text displayed to the real filename) This translates into % and / into 2f Used by KIO::link, for instance.

Parameters:
str the file name to encode
Returns:
the encoded file name

Definition at line 152 of file global.cpp.

References QString::find(), and QString::replace().

Referenced by KFilePropsPlugin::applyChanges().

KIO_EXPORT QString KIO::decodeFileName const QString str  ) 
 

Decodes (from the filename to the text displayed) This translates 2[fF] into / and % into .

Parameters:
str the file name to decode
Returns:
the decoded file name

Definition at line 167 of file global.cpp.

References QString::append().

Referenced by KFileItem::readUDSEntry(), and KFileItem::setName().

KIO_EXPORT QString KIO::buildErrorString int  errorCode,
const QString errorText
 

Returns a translated error message for errorCode using the additional error information provided by errorText.

Parameters:
errorCode the error code
errorText the additional error text
Returns:
the created error string

Definition at line 200 of file global.cpp.

References QString::arg(), QString::fromLatin1(), and QString::isEmpty().

Referenced by KIO::Job::errorString(), and rawErrorDetail().

KIO_EXPORT QString buildHTMLErrorString int  errorCode,
const QString errorText,
const KURL reqUrl = 0L,
int  method = -1
 

Returns a translated html error message for errorCode using the additional error information provided by errorText , reqUrl (the request URL), and the ioslave method .

Parameters:
errorCode the error code
errorText the additional error text
reqUrl the request URL
method the ioslave method
Returns:
the created error string

KIO_EXPORT QByteArray KIO::rawErrorDetail int  errorCode,
const QString errorText,
const KURL reqUrl = 0L,
int  method = -1
 

Returns translated error details for errorCode using the additional error information provided by errorText , reqUrl (the request URL), and the ioslave method .

Parameters:
errorCode the error code
errorText the additional error text
reqUrl the request URL
method the ioslave method
Returns:
the following data:
  • QString errorName - the name of the error
  • QString techName - if not null, the more technical name of the error
  • QString description - a description of the error
  • QStringList causes - a list of possible causes of the error
  • QStringList solutions - a liso of solutions for the error

Definition at line 495 of file global.cpp.

References QString::arg(), buildErrorString(), KLocale::formatDateTime(), QString::isNull(), QString::left(), KGlobal::locale(), and QString::mid().

Referenced by KIO::Job::detailedErrorStrings().

KIO_EXPORT QString KIO::unsupportedActionErrorString const QString protocol,
int  cmd
 

Returns an appropriate error message if the given command cmd is an unsupported action (ERR_UNSUPPORTED_ACTION).

Parameters:
protocol name of the protocol
cmd given command
See also:
enum Command
Since:
3.2

Definition at line 406 of file global.cpp.

References QString::arg().

Referenced by KIO::SlaveBase::chmod(), KIO::SlaveBase::copy(), KIO::SlaveBase::del(), KIO::SlaveBase::get(), KIO::SlaveBase::listDir(), KIO::SlaveBase::mkdir(), KIO::SlaveBase::multiGet(), KIO::SlaveBase::openConnection(), KIO::SlaveBase::put(), KIO::SlaveBase::rename(), KIO::SlaveBase::setSubURL(), KIO::SlaveBase::special(), KIO::SlaveBase::stat(), and KIO::SlaveBase::symlink().

KIO::CacheControl KIO::parseCacheControl const QString cacheControl  ) 
 

Parses the string representation of the cache control option.

Parameters:
cacheControl the string representation
Returns:
the cache control value
See also:
getCacheControlString()

Definition at line 1947 of file global.cpp.

References endl(), and kdDebug().

Referenced by KProtocolManager::cacheControl().