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

Plasma

  • plasma
package.h
Go to the documentation of this file.
1/******************************************************************************
2* Copyright 2007 by Aaron Seigo <aseigo@kde.org> *
3* Copyright 2007 by Riccardo Iaconelli <riccardo@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 PLASMA_PACKAGE_H
22#define PLASMA_PACKAGE_H
23
24#include <QtCore/QStringList>
25
26#include <plasma/plasma.h>
27#include <plasma/packagestructure.h>
28#include <plasma/plasma_export.h>
29
30namespace Plasma
31{
32
39class PackageMetadata;
40class PackagePrivate;
41
42class PLASMA_EXPORT Package
43{
44 public:
49 explicit Package();
50
58 Package(const QString &packageRoot, const QString &package,
59 PackageStructure::Ptr structure);
60
67 Package(const QString &packagePath, PackageStructure::Ptr structure);
68
73 Package(const Package &other);
74
75 ~Package();
76
81 Package &operator=(const Package &rhs);
82
87 bool isValid() const;
88
97 QString filePath(const char *fileType, const QString &filename) const;
98
107 QString filePath(const char *fileType) const;
108
116 QStringList entryList(const char *fileType) const;
117
121 PackageMetadata metadata() const;
122
128 void setPath(const QString &path);
129
134 void publish(AnnouncementMethods methods, const QString &name);
135
139 void unpublish(const QString &name = QString());
140
144 bool isPublished() const;
145
149 const QString path() const;
150
154 const PackageStructure::Ptr structure() const;
155
160 QString contentsHash() const;
161
169 static QStringList listInstalled(const QString &packageRoot);
170
178 static QStringList listInstalledPaths(const QString &packageRoot);
179
192 static bool installPackage(const QString &package,
193 const QString &packageRoot,
194 const QString &servicePrefix);
195
206 static bool uninstallPackage(const QString &package,
207 const QString &packageRoot,
208 const QString &servicePrefix);
209
216 static bool registerPackage(const PackageMetadata &data, const QString &iconPath);
217
228 static bool createPackage(const PackageMetadata &metadata,
229 const QString &source,
230 const QString &destination,
231 const QString &icon = QString());
232
233 private:
234 PackagePrivate * const d;
235
236 friend class Applet;
237 friend class AppletPrivate;
238};
239
240} // Namespace
241
242Q_DECLARE_METATYPE(Plasma::Package)
243#endif
244
Plasma::Applet
The base Applet class.
Definition: applet.h:78
Plasma::PackageMetadata
Provides metadata for a Package.
Definition: packagemetadata.h:40
Plasma::PackageStructure::Ptr
KSharedPtr< PackageStructure > Ptr
Definition: packagestructure.h:77
Plasma::Package
object representing an installed Plasmagik package
Definition: package.h:43
Plasma::Package::unpublish
void unpublish(const QString &name=QString())
Remove this package from the network.
Plasma::Package::publish
void publish(AnnouncementMethods methods, const QString &name)
Publish this package on the network.
Plasma::Package::isPublished
bool isPublished() const
Plasma
Namespace for everything in libplasma.
Definition: abstractdialogmanager.cpp:25
packagestructure.h
plasma.h
plasma_export.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Plasma

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

kdelibs-4.14.38 API Reference

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