• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDECore

  • sources
  • kde-4.14
  • kdelibs
  • kdecore
  • sycoca
kprotocolinfofactory.h
Go to the documentation of this file.
1 /* This file is part of the KDE libraries
2  Copyright (C) 1999 Torben Weis <weis@kde.org>
3  Copyright (C) 2000,2003 Waldo Bastian <bastian@kde.org>
4 
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License version 2 as published by the Free Software Foundation.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 #ifndef kprotocolinfofactory_h
21 #define kprotocolinfofactory_h
22 
23 #include "kprotocolinfo.h"
24 
25 #include <QtCore/QMap>
26 #include <QtCore/QString>
27 #include <QtCore/QStringList>
28 #include <kurl.h>
29 #include <ksycocafactory.h>
30 
31 
43 class KDECORE_EXPORT KProtocolInfoFactory : public KSycocaFactory
44 {
45  K_SYCOCAFACTORY( KST_KProtocolInfoFactory )
46 public:
51  static KProtocolInfoFactory* self();
52 
54  KProtocolInfoFactory();
55  virtual ~KProtocolInfoFactory();
56 
57  /*
58  * Returns protocol info for @p protocol.
59  *
60  * Does not take proxy settings into account.
61  * @param protocol the protocol to search for
62  * @return the pointer to the KProtocolInfo, or 0 if not found
63  */
64  KProtocolInfo::Ptr findProtocol(const QString &protocol);
65 
69  KProtocolInfo::List allProtocols() const;
70 
75  QStringList protocols() const;
76 
77 protected:
81  virtual KSycocaEntry *createEntry(const QString &, const char *) const
82  { return 0; }
83 
87  virtual KProtocolInfo *createEntry(int offset) const;
88 
89 protected:
93  virtual void virtual_hook( int id, void* data );
94 private:
95  QMap<QString,KProtocolInfo::Ptr> m_cache;
96  class KProtocolInfoFactoryPrivate* d;
97 };
98 
99 #endif
KSharedPtr
Can be used to control the lifetime of an object that has derived QSharedData.
Definition: kconfiggroup.h:38
KProtocolInfo
Information about I/O (Internet, etc.) protocols supported by KDE.
Definition: kprotocolinfo.h:50
kurl.h
QMap< QString, KProtocolInfo::Ptr >
KSycocaFactory::createEntry
virtual KSycocaEntry * createEntry(const QString &file, const char *resource) const =0
Construct an entry from a config file.
KSycocaFactory
Definition: ksycocafactory.h:36
KSycocaEntry
Base class for all Sycoca entries.
Definition: ksycocaentry.h:41
KSycocaFactory::virtual_hook
virtual void virtual_hook(int id, void *data)
Virtual hook, used to add new "virtual" functions while maintaining binary compatibility.
Definition: ksycocafactory.cpp:246
QString
QList< Ptr >
KProtocolInfoFactory::createEntry
virtual KSycocaEntry * createEntry(const QString &, const char *) const
Definition: kprotocolinfofactory.h:81
KProtocolInfoFactory
Factory for KProtocolInfo.
Definition: kprotocolinfofactory.h:43
QStringList
kprotocolinfo.h
K_SYCOCAFACTORY
#define K_SYCOCAFACTORY(factory_id)
Definition: ksycocatype.h:52
ksycocafactory.h
KST_KProtocolInfoFactory
Definition: ksycocatype.h:48
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDECore

Skip menu "KDECore"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal