aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/boot2qt/qdbdevice.h
blob: ffdd04172c333f66f448d869fb546a5f2b14e6e7 (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
// Copyright (C) 2019 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 "qdbconstants.h"
#include <projectexplorer/kit.h>
#include <remotelinux/linuxdevice.h>

namespace Qdb {
namespace Internal {

class QdbDevice final : public RemoteLinux::LinuxDevice
{
    Q_DECLARE_TR_FUNCTIONS(Qdb::Internal::QdbDevice)

public:
    typedef QSharedPointer<QdbDevice> Ptr;
    typedef QSharedPointer<const QdbDevice> ConstPtr;

    static Ptr create() { return Ptr(new QdbDevice); }

    ProjectExplorer::IDeviceWidget *createWidget() final;

    Utils::ProcessInterface *createProcessInterface() const override;

    void setSerialNumber(const QString &serial);
    QString serialNumber() const;

    void setupDefaultNetworkSettings(const QString &host);

protected:
    void fromMap(const QVariantMap &map) final;
    QVariantMap toMap() const final;

private:
    QdbDevice();

    QString m_serialNumber;
};

class QdbLinuxDeviceFactory final : public ProjectExplorer::IDeviceFactory
{
public:
    QdbLinuxDeviceFactory();
};

} // namespace Internal
} // namespace Qdb