KProtocolInfo Class Reference
Information about I/O (Internet, etc.) protocols supported by KDE. More...
#include <kprotocolinfo.h>
Inheritance diagram for KProtocolInfo:

Public Types | |
typedef KSharedPtr< KProtocolInfo > | Ptr |
typedef QValueList< ExtraField > | ExtraFieldList |
enum | Type { T_STREAM, T_FILESYSTEM, T_NONE, T_ERROR } |
Public Member Functions | |
KProtocolInfo (const QString &path) | |
virtual bool | isValid () const |
virtual QString | name () const |
KProtocolInfo (QDataStream &_str, int offset) | |
virtual void | load (QDataStream &) |
virtual void | save (QDataStream &) |
Static Public Member Functions | |
QStringList | protocols () |
bool | isKnownProtocol (const KURL &url) |
QString | exec (const QString &protocol) |
Type | inputType (const KURL &url) |
Type | outputType (const KURL &url) |
QStringList | listing (const KURL &url) |
ExtraFieldList | extraFields (const KURL &url) |
bool | isSourceProtocol (const KURL &url) |
bool | isHelperProtocol (const KURL &url) |
bool | isFilterProtocol (const KURL &url) |
bool | supportsListing (const KURL &url) |
bool | supportsReading (const KURL &url) |
bool | supportsWriting (const KURL &url) |
bool | supportsMakeDir (const KURL &url) |
bool | supportsDeleting (const KURL &url) |
bool | supportsLinking (const KURL &url) |
bool | supportsMoving (const KURL &url) |
bool | canCopyFromFile (const KURL &url) |
bool | canCopyToFile (const KURL &url) |
QString | defaultMimetype (const KURL &url) |
QString | icon (const QString &protocol) |
QString | config (const QString &protocol) |
int | maxSlaves (const QString &protocol) |
bool | determineMimetypeFromExtension (const QString &protocol) |
QString | docPath (const QString &protocol) |
QString | protocolClass (const QString &protocol) |
bool | showFilePreview (const QString &protocol) |
KURL::URIMode | uriParseMode (const QString &protocol) |
Type | inputType (const QString &protocol) KDE_DEPRECATED |
Type | outputType (const QString &protocol) KDE_DEPRECATED |
QStringList | listing (const QString &protocol) KDE_DEPRECATED |
bool | isSourceProtocol (const QString &protocol) KDE_DEPRECATED |
bool | isHelperProtocol (const QString &protocol) KDE_DEPRECATED |
bool | isFilterProtocol (const QString &protocol) KDE_DEPRECATED |
bool | isKnownProtocol (const QString &protocol) KDE_DEPRECATED |
bool | supportsListing (const QString &protocol) KDE_DEPRECATED |
bool | supportsReading (const QString &protocol) KDE_DEPRECATED |
bool | supportsWriting (const QString &protocol) KDE_DEPRECATED |
bool | supportsMakeDir (const QString &protocol) KDE_DEPRECATED |
bool | supportsDeleting (const QString &protocol) KDE_DEPRECATED |
bool | supportsLinking (const QString &protocol) KDE_DEPRECATED |
bool | supportsMoving (const QString &protocol) KDE_DEPRECATED |
bool | canCopyFromFile (const QString &protocol) KDE_DEPRECATED |
bool | canCopyToFile (const QString &protocol) KDE_DEPRECATED |
QString | defaultMimetype (const QString &protocol) KDE_DEPRECATED |
Protected Member Functions | |
virtual void | virtual_hook (int id, void *data) |
Protected Attributes | |
QString | m_name |
QString | m_exec |
Type | m_inputType |
Type | m_outputType |
QStringList | m_listing |
bool | m_isSourceProtocol |
bool | m_isHelperProtocol |
bool | m_supportsListing |
bool | m_supportsReading |
bool | m_supportsWriting |
bool | m_supportsMakeDir |
bool | m_supportsDeleting |
bool | m_supportsLinking |
bool | m_supportsMoving |
QString | m_defaultMimetype |
bool | m_determineMimetypeFromExtension |
QString | m_icon |
bool | m_canCopyFromFile |
bool | m_canCopyToFile |
QString | m_config |
int | m_maxSlaves |
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. A KProtocolInfo instance represents a single protocol. Most of the functionality is provided by the static methods that scan 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 44 of file kprotocolinfo.h.
Member Enumeration Documentation
|
Describes the type of a protocol.
Definition at line 110 of file kprotocolinfo.h. Referenced by inputType(), and outputType(). |
Constructor & Destructor Documentation
|
Read a protocol description file.
|
Member Function Documentation
|
Returns whether the protocol description file is valid.
Implements KSycocaEntry. Definition at line 63 of file kprotocolinfo.h. References QString::isEmpty(). |
|
Returns the name of the protocol. This corresponds to the "protocol=" field in the protocol description file.
Implements KSycocaEntry. Definition at line 73 of file kprotocolinfo.h. |
|
Returns list of all known protocols.
|
|
Returns whether a protocol is installed that is able to handle
Definition at line 84 of file kprotocolinfo.cpp. References KProtocolInfoFactory::findProtocol(), KURL::protocol(), and KProtocolInfoFactory::self(). Referenced by KURLBar::readItem(). |
|
Returns the library / executable to open for the protocol This corresponds to the "exec=" field in the protocol description file.
|
|
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 36 of file kprotocolinfo.cpp. |
|
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 45 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 as well as Extra1, Extra2 etc. for extra fields (see extraFields). This corresponds to the "listing=" field in the protocol description file. The supported fields should be separated with ',' in the protocol description file.
Definition at line 100 of file kprotocolinfo.cpp. |
|
Definition of extra fields in the UDS entries, returned by a listDir operation. This corresponds to the "ExtraNames=" and "ExtraTypes=" fields in the protocol description file. Those two lists should be separated with ',' in the protocol description file.
|
|
Returns whether the protocol can act as a source protocol. 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.
Definition at line 55 of file kprotocolinfo.cpp. |
|
Returns whether the protocol can act as a helper protocol. A helper protocol invokes an external application and does not return a file or stream. This corresponds to the "helper=" field in the protocol description file. Valid values for this field are "true" or "false" (default).
Definition at line 74 of file kprotocolinfo.cpp. References KProtocolInfoFactory::findProtocol(), m_isHelperProtocol, KURL::protocol(), and KProtocolInfoFactory::self(). |
|
Returns whether the protocol can act as a filter protocol. A filter protocol can operate on data that is passed to it but does not retrieve/store data itself, like gzip. 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 64 of file kprotocolinfo.cpp. References KProtocolInfoFactory::findProtocol(), m_isSourceProtocol, KURL::protocol(), and KProtocolInfoFactory::self(). |
|
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.)
Definition at line 91 of file kprotocolinfo.cpp. Referenced by KFileDialog::getStartURL(), KFileDialog::setSelection(), and KURLRequester::slotOpenDialog(). |
|
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 109 of file kprotocolinfo.cpp. |
|
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 118 of file kprotocolinfo.cpp. |
|
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 127 of file kprotocolinfo.cpp. |
|
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 136 of file kprotocolinfo.cpp. |
|
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 145 of file kprotocolinfo.cpp. |
|
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 154 of file kprotocolinfo.cpp. |
|
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 163 of file kprotocolinfo.cpp. |
|
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 173 of file kprotocolinfo.cpp. |
|
Returns default mimetype for this URL based on the protocol. This corresponds to the "defaultMimetype=" field in the protocol description file.
Definition at line 182 of file kprotocolinfo.cpp. Referenced by KMimeType::findByURL(). |
|
Returns the name of the icon, associated with the specified protocol. This corresponds to the "Icon=" field in the protocol description file.
Referenced by KMimeType::iconForURL(). |
|
Returns the name of the config file associated with the specified protocol. This is useful 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()
|
|
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.
|
|
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".
Referenced by KMimeType::findByURL(). |
|
Returns the documentation path for the specified protocol. This corresponds to the "DocPath=" field in the protocol description file.
|
|
Returns the protocol class for the specified protocol. This corresponds to the "Class=" field in the protocol description file. The following classes are defined:
|
|
Returns whether file previews should be shown for the specified protocol. This corresponds to the "ShowPreviews=" field in the protocol description file. By default previews are shown if protocolClass is :local.
|
|
Returns the suggested URI parsing mode for the KURL parser. This corresponds to the "URIMode=" field in the protocol description file. The following parsing modes are defined:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The documentation for this class was generated from the following files: