winget-cli

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

ApplyConfigurationUnitResult.h (1813B)


      1 // Copyright (c) Microsoft Corporation.
      2 // Licensed under the MIT License.
      3 #pragma once
      4 #include "ApplyConfigurationUnitResult.g.h"
      5 #include "ConfigurationUnitResultInformation.h"
      6 #include <atomic>
      7 
      8 namespace winrt::Microsoft::Management::Configuration::implementation
      9 {
     10     struct ApplyConfigurationUnitResult : ApplyConfigurationUnitResultT<ApplyConfigurationUnitResult, IApplyGroupMemberSettingsResult>
     11     {
     12         using ConfigurationUnit = Configuration::ConfigurationUnit;
     13         using ResultInformationT = decltype(make_self<wil::details::module_count_wrapper<implementation::ConfigurationUnitResultInformation>>());
     14 
     15         ApplyConfigurationUnitResult();
     16 
     17 #if !defined(INCLUDE_ONLY_INTERFACE_METHODS)
     18         void Initialize(const IApplySettingsResult& result);
     19         void Initialize(const IApplyGroupMemberSettingsResult& unitResult);
     20 
     21         void Unit(ConfigurationUnit value);
     22         void State(ConfigurationUnitState value);
     23         void PreviouslyInDesiredState(bool value);
     24         void RebootRequired(bool value);
     25         void ResultInformation(const Configuration::IConfigurationUnitResultInformation& value);
     26         ResultInformationT ResultInformationInternal();
     27 #endif
     28 
     29         ConfigurationUnit Unit();
     30         ConfigurationUnitState State() const;
     31         bool PreviouslyInDesiredState() const;
     32         bool RebootRequired() const;
     33         IConfigurationUnitResultInformation ResultInformation();
     34 
     35 #if !defined(INCLUDE_ONLY_INTERFACE_METHODS)
     36     private:
     37         ConfigurationUnit m_unit = nullptr;
     38         std::atomic<ConfigurationUnitState> m_state = ConfigurationUnitState::Pending;
     39         bool m_previouslyInDesiredState = false;
     40         bool m_rebootRequired = false;
     41         ResultInformationT m_resultInformation;
     42 #endif
     43     };
     44 }