aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/docker/dockercontainerthread.h
blob: 215dd58c79035f88a6fa0b3404e1606f2241176e (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
// Copyright (C) 2025 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#pragma once

#include <utils/commandline.h>

#include <QThread>

namespace Docker::Internal {

class Internal;

class DockerContainerThread
{
public:
    struct Init
    {
        Utils::CommandLine createContainerCmd;
        Utils::FilePath dockerBinaryPath;
    };

public:
    ~DockerContainerThread();

    QString containerId() const;

    static Utils::expected_str<std::unique_ptr<DockerContainerThread>> create(const Init &init);

private:
    DockerContainerThread(Init init);
    Utils::Result start();

private:
    QThread m_thread;
    Internal *m_internal;
    QString m_containerId;
};

} // namespace Docker::Internal