KService

ksycocaentry.h
1 /*
2  This file is part of the KDE libraries
3  SPDX-FileCopyrightText: 1999 Waldo Bastian <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-only
6 */
7 
8 #ifndef KSYCOCAENTRY_H
9 #define KSYCOCAENTRY_H
10 
11 #include <ksycocatype.h>
12 #include <kservice_export.h>
13 
14 #include <QDataStream>
15 #include <QStringList>
16 #include <QVariant>
17 #include <QExplicitlySharedDataPointer>
18 
19 class KSycocaEntryPrivate;
20 
30 class KSERVICE_EXPORT KSycocaEntry : public QSharedData
31 {
32 
33 public:
34  /*
35  * constructs a invalid KSycocaEntry object
36  */
37  KSycocaEntry();
38 
39  virtual ~KSycocaEntry();
40 
44  bool isType(KSycocaType t) const;
48  KSycocaType sycocaType() const;
49 
57  typedef QList<Ptr> List;
58 
62  QString name() const;
63 
69  QString entryPath() const;
70 
76  QString storageId() const;
77 
81  bool isValid() const;
82 
86  bool isDeleted() const;
87 
96  QVariant property(const QString &name) const;
97 
103  QStringList propertyNames() const;
104 
108  void setDeleted(bool deleted);
109 
113  bool isSeparator() const;
114 
115 protected:
116  KSycocaEntry(KSycocaEntryPrivate &d);
117  KSycocaEntryPrivate *d_ptr;
118 
119 private:
120  // All these need access to offset()
121  friend class KSycocaFactory;
122  friend class KBuildServiceFactory;
123  friend class KServiceFactory;
124  friend class KMimeTypeTrader;
125  friend class KServiceTypeTrader;
126  friend class KService;
127  friend class KSycocaDict;
128  friend class KSycocaDictTest;
129 
134  int offset() const;
135 
136  Q_DISABLE_COPY(KSycocaEntry)
137 
138  Q_DECLARE_PRIVATE(KSycocaEntry)
139 };
140 
141 #endif
Represent a service, like an application or plugin bound to one or several mimetypes (or servicetypes...
Definition: kservice.h:45
QList< Ptr > List
A list of shared data pointers for KSycocaEntry.
Definition: ksycocaentry.h:57
KDE&#39;s trader for services associated to a given mimetype.
Base class for all Sycoca entries.
Definition: ksycocaentry.h:30
KDE&#39;s trader interface (similar to the CORBA Trader), which provides a way to query the KDE infrastru...
QExplicitlySharedDataPointer< KSycocaEntry > Ptr
A shared data pointer for KSycocaEntry.
Definition: ksycocaentry.h:53
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue Aug 11 2020 22:49:23 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.