kprotocolinfofactory.h
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 #ifndef __kprotocolinfofactory_h__
00021 #define __kprotocolinfofactory_h__
00022 
00023 #include "../kio/kio/kprotocolinfo.h"
00024 
00025 #include <qmap.h>
00026 #include <qstring.h>
00027 #include <qstringlist.h>
00028 #include <kurl.h>
00029 #include <ksycocafactory.h>
00030 
00031 class KProtocolInfoPrivate;
00032 
00040 class KProtocolInfoFactory : public KSycocaFactory
00041 { 
00042   K_SYCOCAFACTORY( KST_KProtocolInfoFactory )
00043 public:
00048   static KProtocolInfoFactory* self() 
00049   { if ( !_self) new KProtocolInfoFactory(); return _self; }
00051   KProtocolInfoFactory();
00052   virtual ~KProtocolInfoFactory();
00053 
00054   
00055 
00056 
00057 
00058 
00059 
00060 
00061   KProtocolInfo *findProtocol(const QString &protocol);
00062 
00067   QStringList protocols();
00068 protected:
00069 
00073   virtual KSycocaEntry *createEntry(const QString &, const char *)
00074     { return 0; }                                                    
00075 
00079   virtual KProtocolInfo *createEntry(int offset);
00080 
00081 protected:
00082   static KProtocolInfoFactory *_self;
00083   
00084   QMap<QString,KProtocolInfo::Ptr> m_cache;
00085 protected:
00086   virtual void virtual_hook( int id, void* data );
00087 private:
00088   class KProtocolInfoFactoryPrivate* d;
00089 };
00090 
00091 #endif
 
This file is part of the documentation for kdecore Library Version 3.2.0.