| 1 | /*++ |
| 2 | |
| 3 | Copyright (c) Microsoft. All rights reserved. |
| 4 | |
| 5 | Module Name: |
| 6 | |
| 7 | ContainerNamedVolume.h |
| 8 | |
| 9 | Abstract: |
| 10 | |
| 11 | This file contains the definition of the WinRT wrapper for the WSLC SDK ContainerNamedVolume class. |
| 12 | |
| 13 | --*/ |
| 14 | |
| 15 | #pragma once |
| 16 | #include "Microsoft.WSL.Containers.ContainerNamedVolume.g.h" |
| 17 | #include "Helpers.h" |
| 18 | |
| 19 | namespace winrt::Microsoft::WSL::Containers::implementation { |
| 20 | struct ContainerNamedVolume : ContainerNamedVolumeT<ContainerNamedVolume> |
| 21 | { |
| 22 | ContainerNamedVolume() = default; |
| 23 | |
| 24 | ContainerNamedVolume(hstring const& name, hstring const& containerPath, bool readOnly); |
| 25 | hstring Name(); |
| 26 | void Name(hstring const& value); |
| 27 | hstring ContainerPath(); |
| 28 | void ContainerPath(hstring const& value); |
| 29 | bool ReadOnly(); |
| 30 | void ReadOnly(bool value); |
| 31 | |
| 32 | WslcContainerNamedVolume ToStruct(); |
| 33 | |
| 34 | private: |
| 35 | std::string m_name; |
| 36 | std::string m_containerPath; |
| 37 | bool m_readOnly{}; |
| 38 | |
| 39 | std::unique_ptr<WslcContainerNamedVolume> m_containerNamedVolume; |
| 40 | }; |
| 41 | } // namespace winrt::Microsoft::WSL::Containers::implementation |
| 42 | |
| 43 | namespace winrt::Microsoft::WSL::Containers::factory_implementation { |
| 44 | struct ContainerNamedVolume : ContainerNamedVolumeT<ContainerNamedVolume, implementation::ContainerNamedVolume> |
| 45 | { |
| 46 | }; |
| 47 | } // namespace winrt::Microsoft::WSL::Containers::factory_implementation |
| 48 | |
| 49 | DEFINE_TYPE_HELPERS(ContainerNamedVolume); |