| # kio Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# kservicefactory.h

    00001 /* This file is part of the KDE project
    00002    Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
    00003
    00004    This library is free software; you can redistribute it and/or
    00005    modify it under the terms of the GNU Library General Public
    00006    License as published by the Free Software Foundation; either
    00007    version 2 of the License, or (at your option) any later version.
    00008
    00009    This library is distributed in the hope that it will be useful,
    00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
    00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00012    Library General Public License for more details.
    00013
    00014    You should have received a copy of the GNU Library General Public License
    00015    along with this library; see the file COPYING.LIB.  If not, write to
    00016    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00017    Boston, MA 02111-1307, USA.
    00018 */
    00019
    00020 #ifndef __kservicefactory_h__
    00021 #define __kservicefactory_h__
    00022
    00023 #include <qstringlist.h>
    00024
    00025 #include "kservice.h"
    00026 #include "ksycocafactory.h"
    00027 #include <assert.h>
    00028
    00029 class KSycoca;
    00030 class KSycocaDict;
    00031
    00038 class KServiceFactory : public KSycocaFactory
    00039 {
    00040   K_SYCOCAFACTORY( KST_KServiceFactory )
    00041 public:
    00045   KServiceFactory();
    00046   virtual ~KServiceFactory();
    00047
    00051   virtual KSycocaEntry *createEntry(const QString &, const char *)
    00052     { assert(0); return 0; }
    00053
    00057   KService * findServiceByName( const QString &_name );
    00058
    00062   KService * findServiceByDesktopName( const QString &_name );
    00063
    00067   KService * findServiceByDesktopPath( const QString &_name );
    00068
    00072   KService::List offers( int serviceTypeOffset );
    00073
    00077   KService::List allServices();
    00078
    00082   KService::List allInitServices();
    00083
    00087   static KServiceFactory * self();
    00088
    00089 protected:
    00090   virtual KService * createEntry(int offset);
    00091   int m_offerListOffset;
    00092   int m_initListOffset;
    00093   KSycocaDict *m_nameDict;
    00094   int m_nameDictOffset;
    00095   KSycocaDict *m_relNameDict;
    00096   int m_relNameDictOffset;
    00097
    00098 private:
    00099   static KServiceFactory *_self;
    00100 protected:
    00101   virtual void virtual_hook( int id, void* data );
    00102 private:
    00103   class KServiceFactoryPrivate* d;
    00104 };
    00105
    00106 #endif

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:14:18 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001