20 #ifndef __kuserprofile_h__
21 #define __kuserprofile_h__
25 #include <tqptrlist.h>
26 #include <tqvaluelist.h>
63 int _pref,
bool _default );
87 KService::Ptr
service()
const {
return m_pService; }
93 bool isValid()
const {
return m_iPreference >= 0; }
97 bool m_bAllowAsDefault;
98 KService::Ptr m_pService;
100 class KServiceOfferPrivate;
120 typedef TQValueList<KServiceOffer> OfferList;
131 int preference(
const TQString& _service )
const;
139 bool allowAsDefault(
const TQString& _service )
const;
146 OfferList offers()
const;
157 static KService::Ptr preferredService(
const TQString & serviceType,
const TQString & genericServiceType );
167 static KServiceTypeProfile* serviceTypeProfile(
const TQString& servicetype,
const TQString & genericServiceType = TQString::null );
188 static OfferList offers(
const TQString& servicetype,
const TQString& genericServiceType = TQString::null );
220 static bool configurationMode() {
return s_configurationMode; }
232 const TQString& genericServiceType = TQString::null );
242 void addService(
const TQString& _service,
int _preference = 1,
bool _allow_as_default =
true );
257 bool m_bAllowAsDefault;
263 TQMap<TQString,Service> m_mapServices;
268 TQString m_strServiceType;
273 TQString m_strGenericServiceType;
275 static void initStatic();
276 static TQPtrList<KServiceTypeProfile>* s_lstProfiles;
277 static bool s_configurationMode;
279 class KServiceTypeProfilePrivate* d;