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

KDED

  • kded
kbuildservicefactory.h
Go to the documentation of this file.
1 /* This file is part of the KDE project
2  Copyright (C) 1999, 2007 David Faure <faure@kde.org>
3  1999 Waldo Bastian <bastian@kde.org>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
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 
21 #ifndef KDED_KBUILD_SERVICE_FACTORY_H
22 #define KDED_KBUILD_SERVICE_FACTORY_H
23 
24 #include <QtCore/QStringList>
25 
26 #include "kmimeassociations.h"
27 #include <kmimetype.h>
28 #include <kservicefactory.h>
29 // We export the services to the service group factory!
30 class KBuildServiceGroupFactory;
31 class KBuildMimeTypeFactory;
32 
37 class KBuildServiceFactory : public KServiceFactory
38 {
39 public:
43  KBuildServiceFactory( KSycocaFactory *serviceTypeFactory,
44  KBuildMimeTypeFactory *mimeTypeFactory,
45  KBuildServiceGroupFactory *serviceGroupFactory );
46 
47  virtual ~KBuildServiceFactory();
48 
50  virtual KService::Ptr findServiceByDesktopName(const QString &name);
52  virtual KService::Ptr findServiceByDesktopPath(const QString &name);
54  virtual KService::Ptr findServiceByMenuId(const QString &menuId);
55 
59  virtual KSycocaEntry * createEntry(const QString &file, const char *resource) const;
60 
61  virtual KService * createEntry( int ) const { assert(0); return 0; }
62 
66  virtual void addEntry(const KSycocaEntry::Ptr& newEntry);
67 
71  virtual void save(QDataStream &str);
72 
79  virtual void saveHeader(QDataStream &str);
80 
84  static QStringList resourceTypes();
85 
86  void postProcessServices();
87 
88 private:
89  void populateServiceTypes();
90  void saveOfferList(QDataStream &str);
91  void collectInheritedServices();
92  void collectInheritedServices(const QString& mime, QSet<QString>& visitedMimes);
93 
94  QHash<QString, KService::Ptr> m_nameMemoryHash; // m_nameDict is not useable while building ksycoca
95  QHash<QString, KService::Ptr> m_relNameMemoryHash; // m_relNameDict is not useable while building ksycoca
96  QHash<QString, KService::Ptr> m_menuIdMemoryHash; // m_menuIdDict is not useable while building ksycoca
97  QSet<KSycocaEntry::Ptr> m_dupeDict;
98 
99  KOfferHash m_offerHash;
100 
101  KSycocaFactory *m_serviceTypeFactory;
102  KBuildMimeTypeFactory *m_mimeTypeFactory;
103  KBuildServiceGroupFactory *m_serviceGroupFactory;
104 };
105 
106 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jun 1 2013 20:22:15 by doxygen 1.8.3.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDED

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

kdelibs-4.10.4 API Reference

Skip menu "kdelibs-4.10.4 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
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