2
* Copyright 2014 Canonical Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License as published by
6
* the Free Software Foundation; version 2.1.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
* Author: Benjamin Zeller <benjamin.zeller@canonical.com>
19
#ifndef UBUNTU_INTERNAL_UBUNTUDEPLOYCONFIGURATION_H
20
#define UBUNTU_INTERNAL_UBUNTUDEPLOYCONFIGURATION_H
22
#include <projectexplorer/deployconfiguration.h>
23
#include <remotelinux/abstractremotelinuxdeploystep.h>
25
namespace RemoteLinux {
26
class GenericDirectUploadService;
32
class UbuntuDirectUploadStep : public RemoteLinux::AbstractRemoteLinuxDeployStep
37
UbuntuDirectUploadStep(ProjectExplorer::BuildStepList *bsl);
38
UbuntuDirectUploadStep(ProjectExplorer::BuildStepList *bsl, UbuntuDirectUploadStep *other);
39
~UbuntuDirectUploadStep();
41
// BuildStep interface
42
virtual void run(QFutureInterface<bool> &fi);
44
ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
45
bool initInternal(QString *error = 0);
47
RemoteLinux::AbstractRemoteLinuxDeployService *deployService() const;
48
bool fromMap(const QVariantMap &map);
49
QVariantMap toMap() const;
51
static Core::Id stepId();
52
static QString displayName();
55
void projectNameChanged();
58
RemoteLinux::GenericDirectUploadService *m_deployService;
61
class UbuntuDeployStepFactory : public ProjectExplorer::IBuildStepFactory
66
// IBuildStepFactory interface
67
virtual QList<Core::Id> availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
68
virtual QString displayNameForId(const Core::Id id) const;
69
virtual bool canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const;
70
virtual ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const Core::Id id);
71
virtual bool canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const;
72
virtual ProjectExplorer::BuildStep *restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map);
73
virtual bool canClone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *product) const;
74
virtual ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *product);
77
bool canHandle(const ProjectExplorer::Target *t) const;
80
class UbuntuRemoteDeployConfigurationFactory : public ProjectExplorer::DeployConfigurationFactory
85
explicit UbuntuRemoteDeployConfigurationFactory(QObject *parent = 0);
87
QList<Core::Id> availableCreationIds(ProjectExplorer::Target *parent) const;
88
QString displayNameForId(const Core::Id id) const;
89
bool canCreate(ProjectExplorer::Target *parent, const Core::Id id) const;
90
ProjectExplorer::DeployConfiguration *create(ProjectExplorer::Target *parent, const Core::Id id);
91
bool canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const;
92
ProjectExplorer::DeployConfiguration *restore(ProjectExplorer::Target *parent, const QVariantMap &map);
93
ProjectExplorer::DeployConfiguration *clone(ProjectExplorer::Target *parent,
94
ProjectExplorer::DeployConfiguration *product);
96
} // namespace Internal
99
#endif // UBUNTU_INTERNAL_UBUNTUDEPLOYCONFIGURATION_H