.TH "KServiceTypeProfile" 3 "28 Jan 2004" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KServiceTypeProfile \- This class holds the offers for a service type (e.g.  

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

.in +1c
.ti -1c
.RI "typedef \fBQValueList\fP< \fBKServiceOffer\fP > \fBOfferList\fP"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "int \fBpreference\fP (const  \fBQString\fP &_service) const "
.br
.ti -1c
.RI "bool \fBallowAsDefault\fP (const  \fBQString\fP &_service) const "
.br
.ti -1c
.RI "\fBOfferList\fP \fBoffers\fP () const "
.br
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKService::Ptr\fP \fBpreferredService\fP (const  \fBQString\fP &serviceType, const  \fBQString\fP &genericServiceType)"
.br
.ti -1c
.RI "\fBKServiceTypeProfile\fP * \fBserviceTypeProfile\fP (const  \fBQString\fP &servicetype, const  \fBQString\fP &genericServiceType=QString::null)"
.br
.ti -1c
.RI "\fBOfferList\fP \fBoffers\fP (const  \fBQString\fP &servicetype, const  \fBQString\fP &genericServiceType=QString::null)"
.br
.ti -1c
.RI "const  \fBQPtrList\fP< \fBKServiceTypeProfile\fP > & \fBserviceTypeProfiles\fP ()"
.br
.ti -1c
.RI "void \fBclear\fP ()"
.br
.RI "\fIClear all cached information. \fP"
.ti -1c
.RI "void \fBsetConfigurationMode\fP ()"
.br
.RI "\fIThis method activates a special mode of KServiceTypeProfile, in which all/all and all/allfiles are excluded from the results of the queries. \fP"
.ti -1c
.RI "bool \fBconfigurationMode\fP ()"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "\fBKServiceTypeProfile\fP (const  \fBQString\fP &_servicetype, const  \fBQString\fP &_genericServiceType=QString::null)"
.br
.RI "\fIConstructor is called when the user profile is read for the first time. \fP"
.ti -1c
.RI "void \fBaddService\fP (const  \fBQString\fP &_service, int _preference=1, bool _allow_as_default=TRUE)"
.br
.RI "\fIAdd a service to this profile. \fP"
.in -1c
.SH "Detailed Description"
.PP 
This class holds the offers for a service type (e.g. 

in old terms 'the bindings for a mimetype') 
.PP
Definition at line 76 of file kuserprofile.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KServiceTypeProfile::KServiceTypeProfile (const \fBQString\fP & _servicetype, const \fBQString\fP & _genericServiceType = QString::null)\fC [protected]\fP"
.PP
Constructor is called when the user profile is read for the first time. Definition at line 177 of file kuserprofile.cpp.
.PP
References QPtrList< KServiceTypeProfile >::append().
.SH "Member Function Documentation"
.PP 
.SS "int KServiceTypeProfile::preference (const \fBQString\fP & _service) const"
.PP
\fBReturns:\fP
.RS 4
the users preference of this special service or 0 if the service is unknown. 
.RE
.PP
Definition at line 201 of file kuserprofile.cpp.
.PP
References QMap< QString, Service >::end(), and QMap< QString, Service >::find().
.SS "\fBKService::Ptr\fP KServiceTypeProfile::preferredService (const \fBQString\fP & serviceType, const \fBQString\fP & genericServiceType)\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
the preferred service (convenience method) for _serviceType and _genericServiceType (Application, type of component, or empty).
.RE
.PP
preferredService(m,true) is equivalent to preferredService(m,'Application') preferredService(m,false) is equivalent to preferredService(m,QString::null) This call allows e.g. preferredService(m,'KParts/ReadOnlyPart'). Definition at line 284 of file kuserprofile.cpp.
.PP
References QValueList::begin(), QValueList::end(), and offers().
.PP
Referenced by KRun::runURL().
.SS "\fBKServiceTypeProfile\fP * KServiceTypeProfile::serviceTypeProfile (const \fBQString\fP & servicetype, const \fBQString\fP & genericServiceType = QString::null)\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
the profile for the requested service type. 
.RE
.PP
Definition at line 225 of file kuserprofile.cpp.
.PP
References QPtrListIterator::current(), QString::isEmpty(), and KGlobal::staticQString().
.PP
Referenced by offers().
.SS "\fBKServiceTypeProfile::OfferList\fP KServiceTypeProfile::offers (const \fBQString\fP & servicetype, const \fBQString\fP & genericServiceType = QString::null)\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
the offers associated with a given servicetype, sorted by preference This is what \fBKTrader\fP uses to get the list of offers, before applying the constraints and preferences.
.RE
.PP
If \fCgenericServiceType\fP is specified a list is returned with the offers associated with the combination of the two service types. This is almost like an 'foo in ServiceTypes' constraint in the Trader, but the difference is that to order the offers, we will look at entries specifically for those two service types. Typically, this is used for getting the list of embeddable components that can handle a given mimetype. In that case, \fCservicetype\fP is the mimetype and \fCgenericServiceType\fP is 'KParts/ReadOnlyPart'. Definition at line 93 of file kuserprofile.cpp.
.PP
References QValueList::append(), QValueList::begin(), QValueList::count(), QPtrListIterator::current(), QValueList::end(), QString::isEmpty(), KServiceType::offers(), offers(), and serviceTypeProfile().
.PP
Referenced by preferredService(), and KTrader::query().
.SS "void KServiceTypeProfile::clear ()\fC [inline, static]\fP"
.PP
Clear all cached information. Definition at line 127 of file kuserprofile.h.
.SS "void KServiceTypeProfile::setConfigurationMode ()\fC [inline, static]\fP"
.PP
This method activates a special mode of KServiceTypeProfile, in which all/all and all/allfiles are excluded from the results of the queries. It is meant for the configuration module _only_. Definition at line 134 of file kuserprofile.h.
.SS "void KServiceTypeProfile::addService (const \fBQString\fP & _service, int _preference = 1, bool _allow_as_default = TRUE)\fC [protected]\fP"
.PP
Add a service to this profile. Definition at line 194 of file kuserprofile.cpp.

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