Source: kprotocolinfofactory.h
|
|
|
|
/* This file is part of the KDE libraries
Copyright (C) 1999 Torben Weis
Copyright (C) 2000 Waldo Bastian
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License version 2 as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#ifndef __kprotocolinfofactory_h__
#define __kprotocolinfofactory_h__
#include "kprotocolinfo.h"
#include "ksycocafactory.h"
#include
#include
#include
class KProtocolInfoPrivate;
class KProtocolInfoFactory : public KSycocaFactory
{
K_SYCOCAFACTORY( KST_KProtocolInfoFactory )
public:
static KProtocolInfoFactory* self()
{ if ( !_self) new KProtocolInfoFactory(); return _self; }
KProtocolInfoFactory();
virtual ~KProtocolInfoFactory();
/*
* Returns protocol info for @p protocol
*
* Does not take proxy settings into account
*/
KProtocolInfo *findProtocol(const QString &protocol);
/*
* Returns protocol info for @p url
*
* Does take proxy setings into account. If @p url is
* handled by a proxy, the protocol used for the proxy is
* returned.
*/
KProtocolInfo *findProtocol(const KURL &url);
/**
* @returns list of all known protocols
*/
QStringList protocols();
protected:
/**
* @internal Not used.
*/
virtual KSycocaEntry *createEntry(const QString &, const char *)
{ return 0; }
/**
* @internal
*/
virtual KProtocolInfo *createEntry(int offset);
protected:
// void scanConfig( const QString& _dir );
static KProtocolInfoFactory *_self;
QString m_lastProtocol;
KProtocolInfo::Ptr m_lastInfo;
};
#endif
Generated by: dfaure on kde.faure.org on Thu Jan 17 22:16:53 2002, using kdoc 2.0a53. |