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

Plasma

package.h

Go to the documentation of this file.
00001 /******************************************************************************
00002 *   Copyright 2007 by Aaron Seigo <aseigo@kde.org>                        *
00003 *   Copyright 2007 by Riccardo Iaconelli <riccardo@kde.org>               *
00004 *                                                                             *
00005 *   This library is free software; you can redistribute it and/or             *
00006 *   modify it under the terms of the GNU Library General Public               *
00007 *   License as published by the Free Software Foundation; either              *
00008 *   version 2 of the License, or (at your option) any later version.          *
00009 *                                                                             *
00010 *   This library is distributed in the hope that it will be useful,           *
00011 *   but WITHOUT ANY WARRANTY; without even the implied warranty of            *
00012 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU          *
00013 *   Library General Public License for more details.                          *
00014 *                                                                             *
00015 *   You should have received a copy of the GNU Library General Public License *
00016 *   along with this library; see the file COPYING.LIB.  If not, write to      *
00017 *   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,      *
00018 *   Boston, MA 02110-1301, USA.                                               *
00019 *******************************************************************************/
00020 
00021 #ifndef PLASMA_PACKAGE_H
00022 #define PLASMA_PACKAGE_H
00023 
00024 #include <QtCore/QStringList>
00025 
00026 #include <plasma/plasma_export.h>
00027 #include <plasma/packagestructure.h>
00028 
00029 namespace Plasma
00030 {
00031 
00038 class PackageMetadata;
00039 class PackagePrivate;
00040 
00041 class PLASMA_EXPORT Package
00042 {
00043     public:
00051         Package(const QString &packageRoot, const QString &package,
00052                 PackageStructure::Ptr structure);
00053 
00060         Package(const QString &packagePath, PackageStructure::Ptr structure);
00061 
00062         //TODO for 4.1: be able to load an uninstalled/uncompressed file.
00063 
00064         ~Package();
00065 
00070         bool isValid() const;
00071 
00080         QString filePath(const char *fileType, const QString &filename) const;
00081 
00090         QString filePath(const char *fileType) const;
00091 
00099         QStringList entryList(const char *fileType) const;
00100 
00104         PackageMetadata metadata() const;
00105 
00109         const QString path() const;
00110 
00114         const PackageStructure::Ptr structure() const;
00115 
00123         static QStringList listInstalled(const QString &packageRoot);
00124 
00132         static QStringList listInstalledPaths(const QString &packageRoot);
00133 
00144         static bool installPackage(const QString &package,
00145                                    const QString &packageRoot,
00146                                    const QString &servicePrefix);
00147 
00158         static bool uninstallPackage(const QString &package,
00159                                      const QString &packageRoot,
00160                                      const QString &servicePrefix);
00161 
00168         static bool registerPackage(const PackageMetadata &data, const QString &iconPath);
00169 
00180         static bool createPackage(const PackageMetadata &metadata,
00181                                   const QString &source,
00182                                   const QString &destination,
00183                                   const QString &icon = QString());
00184 
00185     private:
00186         Q_DISABLE_COPY(Package)
00187         PackagePrivate * const d;
00188 };
00189 
00190 } // Namespace
00191 
00192 #endif
00193 

Plasma

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal