KNewStuff
installation.h
Go to the documentation of this file.
00001 /* 00002 This file is part of KNewStuff2. 00003 Copyright (c) 2007 Josef Spillner <spillner@kde.org> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Lesser General Public 00007 License as published by the Free Software Foundation; either 00008 version 2.1 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 Lesser General Public License for more details. 00014 00015 You should have received a copy of the GNU Lesser General Public 00016 License along with this library. If not, see <http://www.gnu.org/licenses/>. 00017 */ 00018 #ifndef KNEWSTUFF2_INSTALLATION_H 00019 #define KNEWSTUFF2_INSTALLATION_H 00020 00021 #include <knewstuff2/knewstuff_export.h> 00022 00023 #include <QtCore/QString> 00024 00025 namespace KNS 00026 { 00027 00028 struct InstallationPrivate; 00029 00030 // FIXME: maybe it's smarter to let this class perform the installation 00031 // so we can reduce the size of KNS::CoreEngine a bit? 00032 00044 class KNEWSTUFF_EXPORT Installation 00045 { 00046 public: 00050 Installation(); 00051 00055 ~Installation(); 00056 00057 enum Policy { 00058 CheckNever, 00059 CheckIfPossible, 00060 CheckAlways 00061 }; 00062 00063 enum Scope { 00064 ScopeUser, 00065 ScopeSystem 00066 }; 00067 00068 void setUncompression(const QString& uncompression); 00069 void setCommand(const QString& command); 00070 void setUninstallCommand(const QString& command); 00071 00072 void setStandardResourceDir(const QString& dir); 00073 void setTargetDir(const QString& dir); 00074 void setInstallPath(const QString& dir); 00075 void setAbsoluteInstallPath(const QString& dir); 00076 00077 void setScope(Scope scope); 00078 void setChecksumPolicy(Policy policy); 00079 void setSignaturePolicy(Policy policy); 00080 00081 void setCustomName(bool customname); 00082 00083 QString uncompression() const; 00084 QString command() const; 00085 QString uninstallCommand() const; 00086 00087 QString standardResourceDir() const; 00088 QString targetDir() const; 00089 QString installPath() const; 00090 QString absoluteInstallPath() const; 00091 bool isRemote() const; 00092 00093 Policy checksumPolicy() const; 00094 Policy signaturePolicy() const; 00095 Scope scope() const; 00096 00097 bool customName() const; 00098 00099 private: 00100 Q_DISABLE_COPY(Installation) 00101 InstallationPrivate * const d; 00102 }; 00103 00104 } 00105 00106 #endif
KDE 4.6 API Reference