kservicetypefactory.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
#ifndef __k_service_type_factory_h__
00021
#define __k_service_type_factory_h__ "$Id: kservicetypefactory.h,v 1.21 2003/09/21 19:30:51 waba Exp $"
00022
00023
#include <assert.h>
00024
00025
#include <qstringlist.h>
00026
#include <qvaluevector.h>
00027
00028
#include "ksycocafactory.h"
00029
#include "kmimetype.h"
00030
00031
class KSycoca;
00032
class KSycocaDict;
00033
00034
class KServiceType;
00035
class KFolderType;
00036
class KDEDesktopMimeType;
00037
class KExecMimeType;
00038
00045
class KServiceTypeFactory :
public KSycocaFactory
00046 {
00047 K_SYCOCAFACTORY( KST_KServiceTypeFactory )
00048 public:
00052 KServiceTypeFactory();
00053
00054 virtual ~KServiceTypeFactory();
00055
00059 virtual
KSycocaEntry *createEntry(const
QString &, const
char *)
00060 { assert(0);
return 0; }
00061
00066
virtual KServiceType * findServiceTypeByName(
const QString &_name);
00067
00071 QVariant::Type findPropertyTypeByName(
const QString &_name);
00072
00077
KMimeType * findFromPattern(
const QString &_filename,
QString *match = 0);
00078
00083 KMimeType::List allMimeTypes();
00084
00089 KServiceType::List allServiceTypes();
00090
00095
bool checkMimeTypes();
00096
00100
static KServiceTypeFactory *
self();
00101
00102
protected:
00103
virtual KServiceType *createEntry(
int offset);
00104
00105
private:
00106
static KServiceTypeFactory *_self;
00107
00108
protected:
00109
int m_fastPatternOffset;
00110
int m_otherPatternOffset;
00111
QMap<QString,int> m_propertyTypeDict;
00112
00113
private:
00114
QStringList m_patterns;
00115
QValueVector<Q_INT32> m_pattern_offsets;
00116
protected:
00117
virtual void virtual_hook(
int id,
void* data );
00118
private:
00119
class KServiceTypeFactoryPrivate* d;
00120 };
00121
00122
#endif
This file is part of the documentation for kio Library Version 3.3.1.