-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Expand file tree
/
Copy pathSessionModel.h
More file actions
58 lines (41 loc) · 1016 Bytes
/
SessionModel.h
File metadata and controls
58 lines (41 loc) · 1016 Bytes
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) Microsoft. All rights reserved.
Module Name:
SessionModel.h
Abstract:
This file contains the SessionModel definition
--*/
#pragma once
#include <wslc.h>
namespace wsl::windows::wslc::models {
struct Session
{
explicit Session(wil::com_ptr<IWSLCSession> session) : m_session(std::move(session))
{
}
IWSLCSession* Get() const noexcept
{
return m_session.get();
}
private:
wil::com_ptr<IWSLCSession> m_session;
};
class SessionOptions
{
public:
SessionOptions();
static const std::filesystem::path& GetStoragePath();
const WSLCSessionSettings* Get() const
{
return &m_sessionSettings;
}
WSLCSessionSettings* Get()
{
return &m_sessionSettings;
}
private:
static constexpr const wchar_t s_defaultStorageSubPath[] = L"wslc\\sessions";
static constexpr uint32_t s_defaultBootTimeoutMs = 30 * 1000;
WSLCSessionSettings m_sessionSettings{};
};
} // namespace wsl::windows::wslc::models