20 #ifndef __k_service_type_factory_h__
21 #define __k_service_type_factory_h__
25 #include <tqstringlist.h>
26 #include <tqvaluevector.h>
28 #include "tdesycocafactory.h"
29 #include "kmimetype.h"
45 class TDEIO_EXPORT KServiceTypeFactory :
public KSycocaFactory
47 K_SYCOCAFACTORY( KST_KServiceTypeFactory )
52 KServiceTypeFactory();
54 virtual ~KServiceTypeFactory();
59 virtual KSycocaEntry *createEntry(
const TQString &,
const char *)
60 { assert(0);
return 0; }
66 virtual KServiceType * findServiceTypeByName(
const TQString &_name);
71 TQVariant::Type findPropertyTypeByName(
const TQString &_name);
78 KMimeType * findFromPattern(
const TQString &_filename, TQString *match = 0);
84 KMimeType::List allMimeTypes();
90 KServiceType::List allServiceTypes();
96 bool checkMimeTypes();
101 static KServiceTypeFactory *
self();
107 static KServiceTypeFactory *_self;
110 int m_fastPatternOffset;
111 int m_otherPatternOffset;
112 TQMap<TQString,int> m_propertyTypeDict;
115 TQStringList m_patterns;
116 TQValueVector<TQ_INT32> m_pattern_offsets;
118 virtual void virtual_hook(
int id,
void* data );
120 class KServiceTypeFactoryPrivate* d;
Mime type for desktop files.
The mime type for executable files.
Represent a mime type, like "text/plain", and the data that is associated with it.
A service type is the generic notion for a mimetype, a type of service instead of a type of file.