21 #ifndef __kservicetype_h__
22 #define __kservicetype_h__
24 #include "tdesycocaentry.h"
28 #include <tqstringlist.h>
29 #include <tqptrlist.h>
32 #include <tqdatastream.h>
33 #include <tqvariant.h>
35 #include <ksimpleconfig.h>
47 K_SYCOCATYPE( KST_KServiceType, KSycocaEntry )
50 typedef TDESharedPtr<KServiceType> Ptr;
51 typedef TQValueList<Ptr> List;
62 KServiceType(
const TQString & _fullpath,
const TQString& _name,
63 const TQString& _icon,
const TQString& _comment);
94 TQString
icon()
const {
return m_strIcon; }
100 TQString
comment()
const {
return m_strComment; }
106 TQString
name()
const {
return m_strName; }
129 TQString parentServiceType()
const;
136 bool inherits(
const TQString& servTypeName )
const;
146 virtual TQVariant property(
const TQString& _name )
const;
152 virtual TQStringList propertyNames()
const;
166 virtual TQVariant::Type propertyDef(
const TQString& _name )
const;
168 virtual TQStringList propertyDefNames()
const;
169 virtual const TQMap<TQString,TQVariant::Type>& propertyDefs()
const {
return m_mapPropDefs; }
175 virtual void save( TQDataStream& );
181 virtual void load( TQDataStream& );
193 void addService(KService::Ptr service);
198 KService::List services();
207 static Ptr serviceType(
const TQString& _name );
217 static KService::List offers(
const TQString& _servicetype );
227 static List allServiceTypes();
230 void init( KDesktopFile *config );
235 TQString m_strComment;
236 TQMap<TQString,TQVariant> m_mapProps;
237 TQMap<TQString,TQVariant::Type> m_mapPropDefs;
242 virtual void virtual_hook(
int id,
void* data );
244 class KServiceTypePrivate;
245 KServiceTypePrivate* d;