| 1 | /*++ |
| 2 | |
| 3 | Copyright (c) Microsoft. All rights reserved. |
| 4 | |
| 5 | Module Name: |
| 6 | |
| 7 | VhdOptions.h |
| 8 | |
| 9 | Abstract: |
| 10 | |
| 11 | This file contains the definition of the WinRT wrapper for the WSLC SDK VhdOptions class. |
| 12 | |
| 13 | --*/ |
| 14 | |
| 15 | #pragma once |
| 16 | #include "Microsoft.WSL.Containers.VhdOptions.g.h" |
| 17 | #include "Helpers.h" |
| 18 | #include "Defaults.h" |
| 19 | |
| 20 | namespace winrt::Microsoft::WSL::Containers::implementation { |
| 21 | struct VhdOptions : VhdOptionsT<VhdOptions> |
| 22 | { |
| 23 | VhdOptions() = default; |
| 24 | |
| 25 | VhdOptions(hstring const& name, uint64_t size, winrt::Microsoft::WSL::Containers::VhdType const& type); |
| 26 | hstring Name(); |
| 27 | void Name(hstring const& value); |
| 28 | uint64_t Size(); |
| 29 | void Size(uint64_t value); |
| 30 | winrt::Microsoft::WSL::Containers::VhdType Type(); |
| 31 | void Type(winrt::Microsoft::WSL::Containers::VhdType const& value); |
| 32 | |
| 33 | winrt::Windows::Foundation::IReference<winrt::Microsoft::WSL::Containers::VhdOwner> Owner(); |
| 34 | void Owner(winrt::Windows::Foundation::IReference<winrt::Microsoft::WSL::Containers::VhdOwner> const& value); |
| 35 | |
| 36 | WslcVhdRequirements* ToStructPointer(); |
| 37 | |
| 38 | private: |
| 39 | std::string m_name{}; |
| 40 | uint64_t m_size{s_DefaultStorageSize}; |
| 41 | winrt::Microsoft::WSL::Containers::VhdType m_type{winrt::Microsoft::WSL::Containers::VhdType::Dynamic}; |
| 42 | winrt::Windows::Foundation::IReference<winrt::Microsoft::WSL::Containers::VhdOwner> m_owner{nullptr}; |
| 43 | |
| 44 | std::unique_ptr<WslcVhdRequirements> m_vhdOptions{nullptr}; |
| 45 | }; |
| 46 | } // namespace winrt::Microsoft::WSL::Containers::implementation |
| 47 | |
| 48 | namespace winrt::Microsoft::WSL::Containers::factory_implementation { |
| 49 | struct VhdOptions : VhdOptionsT<VhdOptions, implementation::VhdOptions> |
| 50 | { |
| 51 | }; |
| 52 | } // namespace winrt::Microsoft::WSL::Containers::factory_implementation |
| 53 | |
| 54 | DEFINE_TYPE_HELPERS(VhdOptions); |