aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/utils/fsengine/fsengine.h
blob: 52c03e9cee5fc1e55ebf24748afd47e3a095a4a1 (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
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#pragma once

#include "../filepath.h"
#include "../utils_global.h"

#include <memory>

namespace Utils {

namespace Internal {
class FSEngineHandler;
}

class QTCREATOR_UTILS_EXPORT FSEngine
{
    friend class Internal::FSEngineHandler;

public:
    FSEngine();
    ~FSEngine();

public:
    static bool isAvailable();

    static Utils::FilePaths registeredDeviceRoots();
    static void addDevice(const Utils::FilePath &deviceRoot);
    static void removeDevice(const Utils::FilePath &deviceRoot);

    static void registerDeviceScheme(const QStringView scheme);
    static void unregisterDeviceScheme(const QStringView scheme);
    static QStringList registeredDeviceSchemes();

private:
    static Utils::FilePaths &deviceRoots();
    static QStringList &deviceSchemes();

private:
    std::unique_ptr<Internal::FSEngineHandler> m_engineHandler;
};

} // namespace Utils