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

# kprotocolinfofactory.h

    00001 /* This file is part of the KDE libraries
    00002    Copyright (C) 1999 Torben Weis <weis@kde.org>
    00003    Copyright (C) 2000 Waldo Bastian <bastian@kde.org>
    00004
    00005
    00006    This library is free software; you can redistribute it and/or
    00007    modify it under the terms of the GNU Library General Public
    00008    License version 2 as published by the Free Software Foundation.
    00009
    00010    This library is distributed in the hope that it will be useful,
    00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
    00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00013    Library General Public License for more details.
    00014
    00015    You should have received a copy of the GNU Library General Public License
    00016    along with this library; see the file COPYING.LIB.  If not, write to
    00017    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00018    Boston, MA 02111-1307, USA.
    00019 */
    00020 #ifndef __kprotocolinfofactory_h__
    00021 #define __kprotocolinfofactory_h__
    00022
    00023 #include "kprotocolinfo.h"
    00024 #include "ksycocafactory.h"
    00025
    00026 #include <qstring.h>
    00027 #include <qstringlist.h>
    00028 #include <kurl.h>
    00029
    00030 class KProtocolInfoPrivate;
    00031
    00032 class KProtocolInfoFactory : public KSycocaFactory
    00033 {
    00034   K_SYCOCAFACTORY( KST_KProtocolInfoFactory )
    00035 public:
    00036   static KProtocolInfoFactory* self()
    00037   { if ( !_self) new KProtocolInfoFactory(); return _self; }
    00038   KProtocolInfoFactory();
    00039   virtual ~KProtocolInfoFactory();
    00040
    00041   /*
    00042    * Returns protocol info for @p protocol
    00043    *
    00044    * Does not take proxy settings into account
    00045    */
    00046   KProtocolInfo *findProtocol(const QString &protocol);
    00047
    00048   /*
    00049    * Returns protocol info for @p url
    00050    *
    00051    * Does take proxy setings into account. If @p url is
    00052    * handled by a proxy, the protocol used for the proxy is
    00053    * returned.
    00054    */
    00055   KProtocolInfo *findProtocol(const KURL &url);
    00056
    00060   QStringList protocols();
    00061 protected:
    00062
    00066   virtual KSycocaEntry *createEntry(const QString &, const char *)
    00067     { return 0; }
    00068
    00072   virtual KProtocolInfo *createEntry(int offset);
    00073
    00074 protected:
    00075 //  void scanConfig( const QString& _dir );
    00076
    00077   static KProtocolInfoFactory *_self;
    00078
    00079   QString m_lastProtocol;
    00080   KProtocolInfo::Ptr m_lastInfo;
    00081 protected:
    00082   virtual void virtual_hook( int id, void* data );
    00083 private:
    00084   class KProtocolInfoFactoryPrivate* d;
    00085 };
    00086
    00087 #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:11 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001