aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/remotelinux/tarpackagecreationstep.h
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@nokia.com>2011-07-15 16:57:25 +0200
committerChristian Kandeler <christian.kandeler@nokia.com>2011-07-15 17:06:29 +0200
commit076064ce306a91879eaeac2420c4ec7b19fa7b5e (patch)
tree473071f3ffe9678ac3646f43234446809bc3b226 /src/plugins/remotelinux/tarpackagecreationstep.h
parent89ac110ab066f3183725f574a237f9ef4c92192f (diff)
RemoteLinux: Introduce abstract packaging step.
This removes the dependency of the tar packaging step on Maemo-specific code. Change-Id: I863b13e643a5028edaf2f571f63b1a52d229812b Reviewed-on: http://codereview.qt.nokia.com/1709 Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
Diffstat (limited to 'src/plugins/remotelinux/tarpackagecreationstep.h')
-rw-r--r--src/plugins/remotelinux/tarpackagecreationstep.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/src/plugins/remotelinux/tarpackagecreationstep.h b/src/plugins/remotelinux/tarpackagecreationstep.h
new file mode 100644
index 0000000000..cf468423d6
--- /dev/null
+++ b/src/plugins/remotelinux/tarpackagecreationstep.h
@@ -0,0 +1,70 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (info@qt.nokia.com)
+**
+** GNU Lesser General Public License Usage
+**
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this file.
+** Please review the following information to ensure the GNU Lesser General
+** Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** Other Usage
+**
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at info@qt.nokia.com.
+**
+**************************************************************************/
+#ifndef TARPACKAGECREATIONSTEP_H
+#define TARPACKAGECREATIONSTEP_H
+
+#include "abstractpackagingstep.h"
+#include "remotelinux_export.h"
+
+QT_BEGIN_NAMESPACE
+class QFile;
+class QFileInfo;
+QT_END_NAMESPACE
+
+namespace RemoteLinux {
+
+class REMOTELINUX_EXPORT TarPackageCreationStep : public AbstractPackagingStep
+{
+ Q_OBJECT
+public:
+ TarPackageCreationStep(ProjectExplorer::BuildStepList *bsl);
+ TarPackageCreationStep(ProjectExplorer::BuildStepList *bsl, TarPackageCreationStep *other);
+
+ static QString stepId();
+ static QString displayName();
+
+ void run(QFutureInterface<bool> &fi);
+private:
+ ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
+
+ QString packageFileName() const;
+
+ void ctor();
+ bool doPackage(QFutureInterface<bool> &fi);
+ bool appendFile(QFile &tarFile, const QFileInfo &fileInfo,
+ const QString &remoteFilePath, const QFutureInterface<bool> &fi);
+ bool writeHeader(QFile &tarFile, const QFileInfo &fileInfo,
+ const QString &remoteFilePath);
+};
+
+} // namespace RemoteLinux
+
+#endif // TARPACKAGECREATIONSTEP_H