aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/android/androidruncontrol.cpp
blob: 16a20b627ad871b97081e1ba61805562c70f1be3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// Copyright (C) 2016 BogDan Vatra <bog_dan_ro@yahoo.com>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#include "androidruncontrol.h"

#include "androidconstants.h"
#include "androidglobal.h"
#include "androidrunconfiguration.h"
#include "androidrunner.h"

#include <utils/utilsicons.h>

#include <projectexplorer/projectexplorerconstants.h>

using namespace ProjectExplorer;

namespace Android::Internal {

class AndroidRunSupport final : public AndroidRunner
{
public:
    explicit AndroidRunSupport(ProjectExplorer::RunControl *runControl,
                               const QString &intentName = QString());
    ~AndroidRunSupport() override;

    void start() override;
    void stop() override;
};

AndroidRunSupport::AndroidRunSupport(RunControl *runControl, const QString &intentName)
    : AndroidRunner(runControl, intentName)
{
    runControl->setIcon(Utils::Icons::RUN_SMALL_TOOLBAR);
}

AndroidRunSupport::~AndroidRunSupport()
{
    stop();
}

void AndroidRunSupport::start()
{
    AndroidRunner::start();
}

void AndroidRunSupport::stop()
{
    AndroidRunner::stop();
}

AndroidRunWorkerFactory::AndroidRunWorkerFactory()
{
    setProduct<AndroidRunSupport>();
    addSupportedRunMode(ProjectExplorer::Constants::NORMAL_RUN_MODE);
    addSupportedRunConfig(Constants::ANDROID_RUNCONFIG_ID);
}

} // Android::Internal