aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/remotelinux/abstractuploadandinstallpackageservice.h
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@nokia.com>2011-07-07 10:43:59 +0200
committerChristian Kandeler <christian.kandeler@nokia.com>2011-07-13 11:19:38 +0200
commitc986374f32ec6624ff0bf9e76975058b71966ed2 (patch)
treea79651315c343e2784f6df9bff8f697490618b2a /src/plugins/remotelinux/abstractuploadandinstallpackageservice.h
parent492652e8ee725f9f5510cea7d1e465840a12f721 (diff)
RemoteLinux: Separate generic deploy steps from Maemo-specific ones.
Change-Id: I804e3778114ba09b9d47fd113eb2a56f4233f3e2 Reviewed-on: http://codereview.qt.nokia.com/1048 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Diffstat (limited to 'src/plugins/remotelinux/abstractuploadandinstallpackageservice.h')
-rw-r--r--src/plugins/remotelinux/abstractuploadandinstallpackageservice.h79
1 files changed, 79 insertions, 0 deletions
diff --git a/src/plugins/remotelinux/abstractuploadandinstallpackageservice.h b/src/plugins/remotelinux/abstractuploadandinstallpackageservice.h
new file mode 100644
index 0000000000..1d0a47bad5
--- /dev/null
+++ b/src/plugins/remotelinux/abstractuploadandinstallpackageservice.h
@@ -0,0 +1,79 @@
+/**************************************************************************
+**
+** 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 ABSTRACTUPLOADANDINSTALLACTION_H
+#define ABSTRACTUPLOADANDINSTALLACTION_H
+
+#include "abstractremotelinuxdeployservice.h"
+#include "remotelinux_export.h"
+
+namespace RemoteLinux {
+namespace Internal {
+class AbstractMaemoPackageCreationStep;
+class AbstractMaemoPackageInstaller;
+class AbstractUploadAndInstallPackageServicePrivate;
+}
+
+class REMOTELINUX_EXPORT AbstractUploadAndInstallPackageService : public AbstractRemoteLinuxDeployService
+{
+ Q_OBJECT
+
+public:
+ void setPackageFilePath(const QString &filePath);
+
+protected:
+ explicit AbstractUploadAndInstallPackageService(QObject *parent);
+ ~AbstractUploadAndInstallPackageService();
+
+ QString packageFilePath() const;
+
+private slots:
+ void handleUploadFinished(const QString &errorMsg);
+ void handleInstallationFinished(const QString &errorMsg);
+
+private:
+ virtual Internal::AbstractMaemoPackageInstaller *packageInstaller() const=0;
+ virtual QString uploadDir() const; // Defaults to remote user's home directory.
+
+ bool isDeploymentNecessary() const;
+ void doDeviceSetup();
+ void stopDeviceSetup();
+ void doDeploy();
+ void stopDeployment();
+
+ void setFinished();
+
+ Internal::AbstractUploadAndInstallPackageServicePrivate * const m_d;
+};
+
+} // namespace RemoteLinux
+
+#endif // ABSTRACTUPLOADANDINSTALLACTION_H