winget-cli

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

ConfigurationParameter.h (3227B)


      1 // Copyright (c) Microsoft Corporation.
      2 // Licensed under the MIT License.
      3 #pragma once
      4 #include "ConfigurationParameter.g.h"
      5 #include <winget/ILifetimeWatcher.h>
      6 #include <winrt/Windows.Foundation.h>
      7 #include <winrt/Windows.Foundation.Collections.h>
      8 #include <limits>
      9 
     10 namespace winrt::Microsoft::Management::Configuration::implementation
     11 {
     12     struct ConfigurationParameter : ConfigurationParameterT<ConfigurationParameter, winrt::cloaked<AppInstaller::WinRT::ILifetimeWatcher>>, AppInstaller::WinRT::LifetimeWatcherBase
     13     {
     14         ConfigurationParameter() = default;
     15 
     16         hstring Name() const;
     17         void Name(hstring const& value);
     18 
     19         hstring Description() const;
     20         void Description(hstring const& value);
     21 
     22         Windows::Foundation::Collections::ValueSet Metadata() const;
     23         void Metadata(const Windows::Foundation::Collections::ValueSet& value);
     24 
     25         bool IsSecure() const;
     26         void IsSecure(bool value);
     27 
     28         Windows::Foundation::PropertyType Type() const;
     29         void Type(Windows::Foundation::PropertyType value);
     30 
     31         Windows::Foundation::IInspectable DefaultValue() const;
     32         void DefaultValue(Windows::Foundation::IInspectable const& value);
     33 
     34         Windows::Foundation::Collections::IVector<Windows::Foundation::IInspectable> AllowedValues() const;
     35         void AllowedValues(Windows::Foundation::Collections::IVector<Windows::Foundation::IInspectable> const& value);
     36 
     37         uint32_t MinimumLength() const;
     38         void MinimumLength(uint32_t value);
     39 
     40         uint32_t MaximumLength() const;
     41         void MaximumLength(uint32_t value);
     42 
     43         Windows::Foundation::IInspectable MinimumValue() const;
     44         void MinimumValue(Windows::Foundation::IInspectable const& value);
     45 
     46         Windows::Foundation::IInspectable MaximumValue() const;
     47         void MaximumValue(Windows::Foundation::IInspectable const& value);
     48 
     49         Windows::Foundation::IInspectable ProvidedValue() const;
     50         void ProvidedValue(Windows::Foundation::IInspectable const& value);
     51 
     52         HRESULT STDMETHODCALLTYPE SetLifetimeWatcher(IUnknown* watcher);
     53 
     54 #if !defined(INCLUDE_ONLY_INTERFACE_METHODS)
     55         void AllowedValues(std::vector<Windows::Foundation::IInspectable>&& value);
     56 
     57     private:
     58         hstring m_name;
     59         hstring m_description;
     60         Windows::Foundation::Collections::ValueSet m_metadata;
     61         bool m_isSecure = false;
     62         Windows::Foundation::PropertyType m_type = Windows::Foundation::PropertyType::Inspectable;
     63         Windows::Foundation::IInspectable m_defaultValue;
     64         Windows::Foundation::Collections::IVector<Windows::Foundation::IInspectable> m_allowedValues;
     65         uint32_t m_minimumLength = 0;
     66         uint32_t m_maximumLength = std::numeric_limits<uint32_t>::max();
     67         Windows::Foundation::IInspectable m_minimumValue;
     68         Windows::Foundation::IInspectable m_maximumValue;
     69         Windows::Foundation::IInspectable m_providedValue;
     70 #endif
     71     };
     72 }
     73 
     74 #if !defined(INCLUDE_ONLY_INTERFACE_METHODS)
     75 namespace winrt::Microsoft::Management::Configuration::factory_implementation
     76 {
     77     struct ConfigurationParameter : ConfigurationParameterT<ConfigurationParameter, implementation::ConfigurationParameter>
     78     {
     79     };
     80 }
     81 #endif