KProtocolInfo Class Reference
Information about I/O (Internet, etc.) protocols supported by
KDE.
More...
#include <kprotocolinfo.h>
Inheritance diagram for KProtocolInfo:
List of all members.
Detailed Description
Information about I/O (Internet, etc.) protocols supported by
KDE.
This class is useful if you want to know which protocols KDE supports. In addition you can find out lots of information about a certain protocol. KProtocolInfo scans the *.protocol files of all installed kioslaves to get this information.
*.protocol files are installed in the "services" resource.
- Author:
-
Torben Weis <weis@kde.org>
Definition at line 40 of file kprotocolinfo.h.
Constructor & Destructor Documentation
KProtocolInfo::KProtocolInfo |
( |
const QString & |
path |
) |
|
|
Member Function Documentation
virtual bool KProtocolInfo::isValid |
( |
|
) |
const [inline, virtual] |
|
virtual QString KProtocolInfo::name |
( |
|
) |
const [inline, virtual] |
|
|
- Returns:
-
the name of the protocol.
This corresponds to the "protocol=" field in the protocol description file.
- See also:
-
KURL::protocol()
Definition at line 66 of file kprotocolinfo.h. |
bool KProtocolInfo::isKnownProtocol |
( |
const KURL & |
url |
) |
[static] |
|
|
- Returns:
-
the library / executable to open for the protocol
protocol Example : "kio_ftp", meaning either the executable "kio_ftp" or the library "kio_ftp.la" (recommended), whichever is available. This corresponds to the "exec=" field in the protocol description file.
Definition at line 351 of file kprotocolinfo.cpp. |
KProtocolInfo::Type KProtocolInfo::inputType |
( |
const KURL & |
url |
) |
[static] |
|
|
- Returns:
-
whether the protocol should be treated as a filesystem or as a stream when reading from it.
This corresponds to the "input=" field in the protocol description file. Valid values for this field are "filesystem", "stream" or "none" (default).
Definition at line 379 of file kprotocolinfo.cpp. |
KProtocolInfo::Type KProtocolInfo::outputType |
( |
const KURL & |
url |
) |
[static] |
|
|
- Returns:
-
whether the protocol should be treated as a filesystem or as a stream when writing to it.
This corresponds to the "output=" field in the protocol description file. Valid values for this field are "filesystem", "stream" or "none" (default).
Definition at line 388 of file kprotocolinfo.cpp. |
|
- Returns:
-
the list of fields this protocol returns when listing The current possibilities are Name, Type, Size, Date, AccessDate, Access, Owner, Group, Link, URL, MimeType
This corresponds to the "listing=" field in the protocol description file. The supported fields should be seperated with ',' in the protocol description file.
Definition at line 443 of file kprotocolinfo.cpp. |
bool KProtocolInfo::isSourceProtocol |
( |
const KURL & |
url |
) |
[static] |
|
|
- Returns:
-
whether the protocol can act as a source protocol. TODO: What does that mean? Obsolete? A source protocol retrieves data from or stores data to the location specified by a URL. A source protocol is the opposite of a filter protocol.
The "source=" field in the protocol description file determines whether a protocol is a source protocol or a filter protocol. Valid values for this field are "true" (default) for source protocol or "false" for filter protocol.
Definition at line 398 of file kprotocolinfo.cpp. |
bool KProtocolInfo::isHelperProtocol |
( |
const KURL & |
url |
) |
[static] |
|
|
- Returns:
-
whether the protocol can act as a helper protocol. TODO: What does that mean?
This corresponds to the "helper=" field in the protocol description file. Valid values for this field are "true" or "false" (default).
Definition at line 417 of file kprotocolinfo.cpp.
References KURL::protocol(). |
bool KProtocolInfo::isFilterProtocol |
( |
const KURL & |
url |
) |
[static] |
|
|
- Returns:
-
whether the protocol can act as a filter protocol. TODO: What does that mean? A filter protocol can operate on data that is passed to it but does not retrieve/store data itself. A filter protocol is the opposite of a source protocol.
The "source=" field in the protocol description file determines whether a protocol is a source protocol or a filter protocol. Valid values for this field are "true" (default) for source protocol or "false" for filter protocol.
Definition at line 407 of file kprotocolinfo.cpp.
References KURL::protocol(). |
bool KProtocolInfo::supportsListing |
( |
const KURL & |
url |
) |
[static] |
|
|
- Returns:
-
whether the protocol can list files/objects. If a protocol supports listing it can be browsed in e.g. file-dialogs and konqueror.
Whether a protocol supports listing is determined by the "listing=" field in the protocol description file. If the protocol support listing it should list the fields it provides in this field. If the protocol does not support listing this field should remain empty (default.) - See also:
-
listing()
Definition at line 434 of file kprotocolinfo.cpp.
Referenced by KFileDialog::getStartURL(), KFileDialog::setSelection(), and KURLRequester::slotOpenDialog(). |
bool KProtocolInfo::supportsReading |
( |
const KURL & |
url |
) |
[static] |
|
|
- Returns:
-
whether the protocol can retrieve data from URLs.
This corresponds to the "reading=" field in the protocol description file. Valid values for this field are "true" or "false" (default).
Definition at line 452 of file kprotocolinfo.cpp. |
bool KProtocolInfo::supportsWriting |
( |
const KURL & |
url |
) |
[static] |
|
|
- Returns:
-
whether the protocol can store data to URLs.
This corresponds to the "writing=" field in the protocol description file. Valid values for this field are "true" or "false" (default).
Definition at line 461 of file kprotocolinfo.cpp. |
bool KProtocolInfo::supportsMakeDir |
( |
const KURL & |
url |
) |
[static] |
|
|
- Returns:
-
whether the protocol can create directories/folders.
This corresponds to the "makedir=" field in the protocol description file. Valid values for this field are "true" or "false" (default).
Definition at line 470 of file kprotocolinfo.cpp. |
bool KProtocolInfo::supportsDeleting |
( |
const KURL & |
url |
) |
[static] |
|
|
- Returns:
-
whether the protocol can delete files/objects.
This corresponds to the "deleting=" field in the protocol description file. Valid values for this field are "true" or "false" (default).
Definition at line 479 of file kprotocolinfo.cpp. |
bool KProtocolInfo::supportsLinking |
( |
const KURL & |
url |
) |
[static] |
|
|
- Returns:
-
whether the protocol can create links between files/objects.
This corresponds to the "linking=" field in the protocol description file. Valid values for this field are "true" or "false" (default).
Definition at line 488 of file kprotocolinfo.cpp. |
bool KProtocolInfo::supportsMoving |
( |
const KURL & |
url |
) |
[static] |
|
|
- Returns:
-
whether the protocol can move files/objects between different locations.
This corresponds to the "moving=" field in the protocol description file. Valid values for this field are "true" or "false" (default).
Definition at line 497 of file kprotocolinfo.cpp. |
bool KProtocolInfo::canCopyFromFile |
( |
const KURL & |
url |
) |
[static] |
|
|
- Returns:
-
whether the protocol can copy files/objects directly from the filesystem itself. If not, the application will read files from the filesystem using the file-protocol and pass the data on to the destination protocol.
This corresponds to the "copyFromFile=" field in the protocol description file. Valid values for this field are "true" or "false" (default).
Definition at line 506 of file kprotocolinfo.cpp. |
bool KProtocolInfo::canCopyToFile |
( |
const KURL & |
url |
) |
[static] |
|
|
- Returns:
-
whether the protocol can copy files/objects directly to the filesystem itself. If not, the application will receive the data from the source protocol and store it in the filesystem using the file-protocol.
This corresponds to the "copyToFile=" field in the protocol description file. Valid values for this field are "true" or "false" (default).
Definition at line 516 of file kprotocolinfo.cpp. |
QString KProtocolInfo::defaultMimetype |
( |
const KURL & |
url |
) |
[static] |
|
|
- Returns:
-
default mimetype for this URL based on the protocol
This corresponds to the "defaultMimetype=" field in the protocol description file.
Definition at line 525 of file kprotocolinfo.cpp.
Referenced by KMimeType::findByURL(). |
|
- Returns:
-
the name of the config file associated with the specified protocol. This is usefull if two similar protocols need to share a single config file, e.g. http and https.
This corresponds to the "config=" field in the protocol description file. The default is the protocol name, see name()
Definition at line 315 of file kprotocolinfo.cpp.
Referenced by KProtocolInfo(). |
int KProtocolInfo::maxSlaves |
( |
const QString & |
protocol |
) |
[static] |
|
|
- Returns:
-
the soft limit on the number of slaves for this protocol. This limits the number of slaves used for a single operation, note that multiple operations may result in a number of instances that exceeds this soft limit.
This corresponds to the "maxInstances=" field in the protocol description file. The default is 1.
Definition at line 324 of file kprotocolinfo.cpp. |
bool KProtocolInfo::determineMimetypeFromExtension |
( |
const QString & |
protocol |
) |
[static] |
|
|
- Returns:
-
whether mimetypes can be determined based on extension for this protocol. For some protocols, e.g. http, the filename extension in the URL can not be trusted to truly reflect the file type.
This corresponds to the "determineMimetypeFromExtension=" field in the protocol description file. Valid values for this field are "true" (default) or "false".
Definition at line 342 of file kprotocolinfo.cpp.
Referenced by KMimeType::findByURL(). |
|
- Returns:
-
the list of fields this protocol returns when listing The current possibilities are Name, Type, Size, Date, AccessDate, Access, Owner, Group, Link, URL, MimeType
Definition at line 224 of file kprotocolinfo.cpp. |
The documentation for this class was generated from the following files:
This file is part of the documentation for kdelibs Version 3.1.0.