aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/devicesupport/sshdeviceprocesslist.h
blob: 882b1b60fe465f506b2162c40638676734294696 (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
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0

#pragma once

#include "deviceprocesslist.h"

#include <memory>

namespace ProjectExplorer {

class SshDeviceProcessListPrivate;

class PROJECTEXPLORER_EXPORT SshDeviceProcessList : public DeviceProcessList
{
    Q_OBJECT
public:
    explicit SshDeviceProcessList(const IDeviceConstPtr &device, QObject *parent = nullptr);
    ~SshDeviceProcessList() override;

private:
    void handleProcessDone();
    void handleKillProcessFinished(const QString &errorString);

    virtual QString listProcessesCommandLine() const = 0;
    virtual QList<Utils::ProcessInfo> buildProcessList(const QString &listProcessesReply) const = 0;

    void doUpdate() override;
    void doKillProcess(const Utils::ProcessInfo &process) override;

    void setFinished();

    const std::unique_ptr<SshDeviceProcessListPrivate> d;
};

} // namespace ProjectExplorer