.TH "KProtocolInfo" 3 "28 Jan 2004" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KProtocolInfo \- Information about I/O (Internet, etc.) protocols supported by \fBKDE\fP.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kprotocolinfo.h>\fP
.PP
Inherits \fBKSycocaEntry\fP.
.PP
.SS "Public Types"

.in +1c
.ti -1c
.RI "typedef \fBKSharedPtr\fP< \fBKProtocolInfo\fP > \fBPtr\fP"
.br
.ti -1c
.RI "enum \fBType\fP { \fBT_STREAM\fP, \fBT_FILESYSTEM\fP, \fBT_NONE\fP, \fBT_ERROR\fP }"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKProtocolInfo\fP (const  \fBQString\fP &path)"
.br
.RI "\fIRead a protocol description file. \fP"
.ti -1c
.RI "virtual bool \fBisValid\fP () const "
.br
.ti -1c
.RI "virtual \fBQString\fP \fBname\fP () const "
.br
.ti -1c
.RI "\fBKProtocolInfo\fP (\fBQDataStream\fP &_str, int \fBoffset\fP)"
.br
.ti -1c
.RI "virtual void \fBload\fP (\fBQDataStream\fP &)"
.br
.ti -1c
.RI "virtual void \fBsave\fP (\fBQDataStream\fP &)"
.br
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "\fBQStringList\fP \fBprotocols\fP ()"
.br
.ti -1c
.RI "bool \fBisKnownProtocol\fP (const  \fBKURL\fP &url)"
.br
.ti -1c
.RI "\fBQString\fP \fBexec\fP (const  \fBQString\fP &protocol)"
.br
.ti -1c
.RI "Type \fBinputType\fP (const  \fBKURL\fP &url)"
.br
.ti -1c
.RI "Type \fBoutputType\fP (const  \fBKURL\fP &url)"
.br
.ti -1c
.RI "\fBQStringList\fP \fBlisting\fP (const  \fBKURL\fP &url)"
.br
.ti -1c
.RI "bool \fBisSourceProtocol\fP (const  \fBKURL\fP &url)"
.br
.ti -1c
.RI "bool \fBisHelperProtocol\fP (const  \fBKURL\fP &url)"
.br
.ti -1c
.RI "bool \fBisFilterProtocol\fP (const  \fBKURL\fP &url)"
.br
.ti -1c
.RI "bool \fBsupportsListing\fP (const  \fBKURL\fP &url)"
.br
.ti -1c
.RI "bool \fBsupportsReading\fP (const  \fBKURL\fP &url)"
.br
.ti -1c
.RI "bool \fBsupportsWriting\fP (const  \fBKURL\fP &url)"
.br
.ti -1c
.RI "bool \fBsupportsMakeDir\fP (const  \fBKURL\fP &url)"
.br
.ti -1c
.RI "bool \fBsupportsDeleting\fP (const  \fBKURL\fP &url)"
.br
.ti -1c
.RI "bool \fBsupportsLinking\fP (const  \fBKURL\fP &url)"
.br
.ti -1c
.RI "bool \fBsupportsMoving\fP (const  \fBKURL\fP &url)"
.br
.ti -1c
.RI "bool \fBcanCopyFromFile\fP (const  \fBKURL\fP &url)"
.br
.ti -1c
.RI "bool \fBcanCopyToFile\fP (const  \fBKURL\fP &url)"
.br
.ti -1c
.RI "\fBQString\fP \fBdefaultMimetype\fP (const  \fBKURL\fP &url)"
.br
.ti -1c
.RI "\fBQString\fP \fBicon\fP (const  \fBQString\fP &protocol)"
.br
.ti -1c
.RI "\fBQString\fP \fBconfig\fP (const  \fBQString\fP &protocol)"
.br
.ti -1c
.RI "int \fBmaxSlaves\fP (const  \fBQString\fP &protocol)"
.br
.ti -1c
.RI "bool \fBdetermineMimetypeFromExtension\fP (const  \fBQString\fP &protocol)"
.br
.ti -1c
.RI "Type \fBinputType\fP (const  \fBQString\fP &protocol)"
.br
.ti -1c
.RI "Type \fBoutputType\fP (const  \fBQString\fP &protocol)"
.br
.ti -1c
.RI "\fBQStringList\fP \fBlisting\fP (const  \fBQString\fP &protocol)"
.br
.ti -1c
.RI "bool \fBisSourceProtocol\fP (const  \fBQString\fP &protocol)"
.br
.ti -1c
.RI "bool \fBisHelperProtocol\fP (const  \fBQString\fP &protocol)"
.br
.ti -1c
.RI "bool \fBisFilterProtocol\fP (const  \fBQString\fP &protocol)"
.br
.ti -1c
.RI "bool \fBisKnownProtocol\fP (const  \fBQString\fP &protocol)"
.br
.ti -1c
.RI "bool \fBsupportsListing\fP (const  \fBQString\fP &protocol)"
.br
.ti -1c
.RI "bool \fBsupportsReading\fP (const  \fBQString\fP &protocol)"
.br
.ti -1c
.RI "bool \fBsupportsWriting\fP (const  \fBQString\fP &protocol)"
.br
.ti -1c
.RI "bool \fBsupportsMakeDir\fP (const  \fBQString\fP &protocol)"
.br
.ti -1c
.RI "bool \fBsupportsDeleting\fP (const  \fBQString\fP &protocol)"
.br
.ti -1c
.RI "bool \fBsupportsLinking\fP (const  \fBQString\fP &protocol)"
.br
.ti -1c
.RI "bool \fBsupportsMoving\fP (const  \fBQString\fP &protocol)"
.br
.ti -1c
.RI "bool \fBcanCopyFromFile\fP (const  \fBQString\fP &protocol)"
.br
.ti -1c
.RI "bool \fBcanCopyToFile\fP (const  \fBQString\fP &protocol)"
.br
.ti -1c
.RI "\fBQString\fP \fBdefaultMimetype\fP (const  \fBQString\fP &protocol)"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "\fBQString\fP \fBm_name\fP"
.br
.ti -1c
.RI "\fBQString\fP \fBm_exec\fP"
.br
.ti -1c
.RI "Type \fBm_inputType\fP"
.br
.ti -1c
.RI "Type \fBm_outputType\fP"
.br
.ti -1c
.RI "\fBQStringList\fP \fBm_listing\fP"
.br
.ti -1c
.RI "bool \fBm_isSourceProtocol\fP"
.br
.ti -1c
.RI "bool \fBm_isHelperProtocol\fP"
.br
.ti -1c
.RI "bool \fBm_supportsListing\fP"
.br
.ti -1c
.RI "bool \fBm_supportsReading\fP"
.br
.ti -1c
.RI "bool \fBm_supportsWriting\fP"
.br
.ti -1c
.RI "bool \fBm_supportsMakeDir\fP"
.br
.ti -1c
.RI "bool \fBm_supportsDeleting\fP"
.br
.ti -1c
.RI "bool \fBm_supportsLinking\fP"
.br
.ti -1c
.RI "bool \fBm_supportsMoving\fP"
.br
.ti -1c
.RI "\fBQString\fP \fBm_defaultMimetype\fP"
.br
.ti -1c
.RI "bool \fBm_determineMimetypeFromExtension\fP"
.br
.ti -1c
.RI "\fBQString\fP \fBm_icon\fP"
.br
.ti -1c
.RI "bool \fBm_canCopyFromFile\fP"
.br
.ti -1c
.RI "bool \fBm_canCopyToFile\fP"
.br
.ti -1c
.RI "\fBQString\fP \fBm_config\fP"
.br
.ti -1c
.RI "int \fBm_maxSlaves\fP"
.br
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "class \fBKProtocolInfoFactory\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
Information about I/O (Internet, etc.) protocols supported by \fBKDE\fP. 

This class is useful if you want to know which protocols \fBKDE\fP 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.
.PP
*.protocol files are installed in the 'services' resource.
.PP
\fBAuthor:\fP
.RS 4
Torben Weis <weis@kde.org> 
.RE
.PP

.PP
Definition at line 40 of file kprotocolinfo.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KProtocolInfo::KProtocolInfo (const \fBQString\fP & path)"
.PP
Read a protocol description file. Definition at line 35 of file kprotocolinfo.cpp.
.PP
References config(), locate(), KConfigBase::readBoolEntry(), KConfigBase::readEntry(), KConfigBase::readListEntry(), KConfigBase::readNumEntry(), KConfigBase::readPathEntry(), and KConfigBase::setGroup().
.SH "Member Function Documentation"
.PP 
.SS "virtual bool KProtocolInfo::isValid () const\fC [inline, virtual]\fP"
.PP
\fBReturns:\fP
.RS 4
whether the protocol description file is valid. 
.RE
.PP
Implements \fBKSycocaEntry\fP.
.PP
Definition at line 57 of file kprotocolinfo.h.
.PP
References QString::isEmpty().
.SS "virtual \fBQString\fP KProtocolInfo::name () const\fC [inline, virtual]\fP"
.PP
\fBReturns:\fP
.RS 4
the name of the protocol.
.RE
.PP
This corresponds to the 'protocol=' field in the protocol description file.
.PP
\fBSee also:\fP
.RS 4
\fBKURL::protocol()\fP 
.RE
.PP
Implements \fBKSycocaEntry\fP.
.PP
Definition at line 66 of file kprotocolinfo.h.
.SS "\fBQStringList\fP KProtocolInfo::protocols ()\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
list of all known protocols 
.RE
.PP
Definition at line 177 of file kprotocolinfo.cpp.
.SS "bool KProtocolInfo::isKnownProtocol (const \fBKURL\fP & url)\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
whether a protocol is installed that is able to handle \fCurl\fP.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBname()\fP 
.RE
.PP
Definition at line 427 of file kprotocolinfo.cpp.
.PP
References KURL::protocol().
.PP
Referenced by KURLBar::readItem().
.SS "\fBQString\fP KProtocolInfo::exec (const \fBQString\fP & protocol)\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
the library / executable to open for the protocol \fCprotocol\fP Example : 'kio_ftp', meaning either the executable 'kio_ftp' or the library 'kio_ftp.la' (recommended), whichever is available.
.RE
.PP
This corresponds to the 'exec=' field in the protocol description file. Definition at line 351 of file kprotocolinfo.cpp.
.SS "KProtocolInfo::Type KProtocolInfo::inputType (const \fBKURL\fP & url)\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
whether the protocol should be treated as a filesystem or as a stream when reading from it.
.RE
.PP
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.
.SS "KProtocolInfo::Type KProtocolInfo::outputType (const \fBKURL\fP & url)\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
whether the protocol should be treated as a filesystem or as a stream when writing to it.
.RE
.PP
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.
.SS "\fBQStringList\fP KProtocolInfo::listing (const \fBKURL\fP & url)\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
the list of fields this protocol returns when listing The current possibilities are Name, Type, Size, Date, AccessDate, Access, Owner, Group, Link, URL, MimeType
.RE
.PP
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.
.SS "bool KProtocolInfo::isSourceProtocol (const \fBKURL\fP & url)\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
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.
.RE
.PP
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.
.SS "bool KProtocolInfo::isHelperProtocol (const \fBKURL\fP & url)\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
whether the protocol can act as a helper protocol. TODO: What does that mean?
.RE
.PP
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.
.PP
References KURL::protocol().
.SS "bool KProtocolInfo::isFilterProtocol (const \fBKURL\fP & url)\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
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.
.RE
.PP
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.
.PP
References KURL::protocol().
.SS "bool KProtocolInfo::supportsListing (const \fBKURL\fP & url)\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
whether the protocol can list files/objects. If a protocol supports listing it can be browsed in e.g. file-dialogs and konqueror.
.RE
.PP
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.) 
.PP
\fBSee also:\fP
.RS 4
\fBlisting()\fP 
.RE
.PP
Definition at line 434 of file kprotocolinfo.cpp.
.PP
Referenced by KFileDialog::getStartURL(), KFileDialog::setSelection(), and KURLRequester::slotOpenDialog().
.SS "bool KProtocolInfo::supportsReading (const \fBKURL\fP & url)\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
whether the protocol can retrieve data from URLs.
.RE
.PP
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.
.SS "bool KProtocolInfo::supportsWriting (const \fBKURL\fP & url)\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
whether the protocol can store data to URLs.
.RE
.PP
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.
.SS "bool KProtocolInfo::supportsMakeDir (const \fBKURL\fP & url)\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
whether the protocol can create directories/folders.
.RE
.PP
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.
.SS "bool KProtocolInfo::supportsDeleting (const \fBKURL\fP & url)\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
whether the protocol can delete files/objects.
.RE
.PP
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.
.SS "bool KProtocolInfo::supportsLinking (const \fBKURL\fP & url)\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
whether the protocol can create links between files/objects.
.RE
.PP
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.
.SS "bool KProtocolInfo::supportsMoving (const \fBKURL\fP & url)\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
whether the protocol can move files/objects between different locations.
.RE
.PP
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.
.SS "bool KProtocolInfo::canCopyFromFile (const \fBKURL\fP & url)\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
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.
.RE
.PP
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.
.SS "bool KProtocolInfo::canCopyToFile (const \fBKURL\fP & url)\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
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.
.RE
.PP
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.
.SS "\fBQString\fP KProtocolInfo::defaultMimetype (const \fBKURL\fP & url)\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
default mimetype for this URL based on the protocol
.RE
.PP
This corresponds to the 'defaultMimetype=' field in the protocol description file. Definition at line 525 of file kprotocolinfo.cpp.
.PP
Referenced by KMimeType::findByURL().
.SS "\fBQString\fP KProtocolInfo::icon (const \fBQString\fP & protocol)\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
the name of the icon, associated with the specified protocol
.RE
.PP
This corresponds to the 'Icon=' field in the protocol description file. Definition at line 306 of file kprotocolinfo.cpp.
.PP
References QString::fromLatin1().
.PP
Referenced by KMimeType::iconForURL().
.SS "\fBQString\fP KProtocolInfo::config (const \fBQString\fP & protocol)\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
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.
.RE
.PP
This corresponds to the 'config=' field in the protocol description file. The default is the protocol name, see \fBname\fP() Definition at line 315 of file kprotocolinfo.cpp.
.PP
Referenced by KProtocolInfo().
.SS "int KProtocolInfo::maxSlaves (const \fBQString\fP & protocol)\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
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.
.RE
.PP
This corresponds to the 'maxInstances=' field in the protocol description file. The default is 1. Definition at line 324 of file kprotocolinfo.cpp.
.SS "bool KProtocolInfo::determineMimetypeFromExtension (const \fBQString\fP & protocol)\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
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.
.RE
.PP
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.
.PP
Referenced by KMimeType::findByURL().
.SS "\fBQStringList\fP KProtocolInfo::listing (const \fBQString\fP & protocol)\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
the list of fields this protocol returns when listing The current possibilities are Name, Type, Size, Date, AccessDate, Access, Owner, Group, Link, URL, MimeType 
.RE
.PP
Definition at line 224 of file kprotocolinfo.cpp.

.SH "Author"
.PP 
Generated automatically by Doxygen for kio Library from the source code.
