class KProtocolInfo |
|
|
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 |
|
Internal construct a KProtocolInfo from a stream |
|
Read a protocol description file path - the path of the description file |
|
|
|
|
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:
protocol - the protocol to check Returns the suggested parsing mode, or KUrl.Auto if unspecified Returns the list of capabilities provided by the kioslave implementing this protocol. This corresponds to the "Capabilities=" field in the protocol description file. The capability names are not defined globally, they are up to each slave implementation. For example when adding support for a new special command for mounting, one would add the string "Mount" to the capabilities list, and applications could check for that string before sending a special() command that would otherwise do nothing on older kioslave implementations.
protocol - the protocol to check Returns the list of capabilities. |
|
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()
protocol - the protocol to check Returns the config file, or null if unknown |
|
Internal . Use KProtocolManager instead . |
|
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".
protocol - the protocol to check Returns true if the mime types can be determined by extension |
|
Returns the documentation path for the specified protocol. This corresponds to the "DocPath=" field in the protocol description file.
protocol - the protocol to check Returns the docpath of the protocol, or null if unknown |
|
|
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. See ExtraField for details about names and types |
|
|
Returns the name of the icon, associated with the specified protocol. This corresponds to the "Icon=" field in the protocol description file.
protocol - the protocol to check Returns the icon of the protocol, or null if unknown |
|
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.
url - the url to check Returns true if the protocol is a filter (e.g. gzip), false if the protocol is a helper or source |
|
Same as above except you can supply just the protocol instead of the whole URL. |
|
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).
url - the url to check Returns true if the protocol is a helper protocol (e.g. vnc), false if not (e.g. http) |
|
Same as above except you can supply just the protocol instead of the whole URL. |
|
Returns whether a protocol is installed that is able to handle url.
url - the url to check Returns true if the protocol is known See also name() |
|
Same as above except you can supply just the protocol instead of the whole URL. |
|
Returns whether the protocol description file is valid. Returns true if valid, false otherwise |
|
Internal Load the protocol info from a stream. |
|
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.
protocol - the protocol to check Returns the maximum number of slaves, or 1 if unknown |
|
Returns the name of the protocol. This corresponds to the "protocol=" field in the protocol description file. Returns the name of the protocol See also KUrl.protocol() |
|
Returns the protocol class for the specified protocol. This corresponds to the "Class=" field in the protocol description file. The following classes are defined: Protocol classes always start with a ':' so that they can not be confused with the protocols themselves.
protocol - the protocol to check Returns the class of the protocol, or null if unknown |
|
Returns list of all known protocols. Returns a list of all known protocols |
|
Returns the name of the protocol through which the request will be routed if proxy support is enabled. A good example of this is the ftp protocol for which proxy support is commonly handled by the http protocol. This corresponds to the "ProxiedBy=" in the protocol description file. |
|
Internal Save the protocol info to a stream. |
|
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.
protocol - the protocol to check Returns true if previews should be shown by default, false otherwise |
|
Internal . Use KProtocolManager instead . |
Name | - | ||
FromUrl | - |
T_STREAM | - | protocol returns a stream | |
T_FILESYSTEM | - | protocol describes location in a file system | |
T_NONE | - | no information about the tyope available | |
T_ERROR | - | used to signal an error |