winget-cli

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

DefaultSetGroupProcessor.h (1437B)


      1 // Copyright (c) Microsoft Corporation.
      2 // Licensed under the MIT License.
      3 #pragma once
      4 #include "winrt/Microsoft.Management.Configuration.h"
      5 #include "ConfigThreadGlobals.h"
      6 
      7 namespace winrt::Microsoft::Management::Configuration::implementation
      8 {
      9     // Implements the default group processing for configuration sets when the set processor doesn't handle it.
     10     struct DefaultSetGroupProcessor : winrt::implements<DefaultSetGroupProcessor, IConfigurationGroupProcessor>
     11     {
     12         using ConfigurationSet = Configuration::ConfigurationSet;
     13 
     14         DefaultSetGroupProcessor() = default;
     15 
     16         void Initialize(const ConfigurationSet& set, const IConfigurationSetProcessor& setProcessor, ConfigThreadGlobals& threadGlobals, bool consistencyCheckOnly = false);
     17 
     18         IInspectable Group();
     19 
     20         Windows::Foundation::IAsyncOperation<ITestGroupSettingsResult> TestGroupSettingsAsync(Windows::Foundation::EventHandler<ITestSettingsResult> progressHandler);
     21 
     22         Windows::Foundation::IAsyncOperation<IApplyGroupSettingsResult> ApplyGroupSettingsAsync(Windows::Foundation::EventHandler<IApplyGroupMemberSettingsResult> progressHandler);
     23 
     24     private:
     25         void ThrowIf(bool cancellation);
     26 
     27         ConfigurationSet m_set = nullptr;
     28         IConfigurationSetProcessor m_setProcessor;
     29         ConfigThreadGlobals* m_threadGlobals = nullptr;
     30         bool m_consistencyCheckOnly = false;
     31     };
     32 }