winget-cli

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

FindPackagesResult.h (1569B)


      1 // Copyright (c) Microsoft Corporation.
      2 // Licensed under the MIT License.
      3 #pragma once
      4 #include "FindPackagesResult.g.h"
      5 #include <winrt/Windows.Foundation.Collections.h>
      6 
      7 namespace winrt::Microsoft::Management::Deployment::implementation
      8 {
      9     struct FindPackagesResult : FindPackagesResultT<FindPackagesResult>
     10     {
     11         FindPackagesResult() = default;
     12         
     13 #if !defined(INCLUDE_ONLY_INTERFACE_METHODS)
     14         void Initialize(
     15             winrt::Microsoft::Management::Deployment::FindPackagesResultStatus status,
     16             bool wasLimitExceeded, 
     17             Windows::Foundation::Collections::IVector<winrt::Microsoft::Management::Deployment::MatchResult> matches,
     18             winrt::hresult extendedErrorCode);
     19 #endif
     20 
     21         winrt::Microsoft::Management::Deployment::FindPackagesResultStatus Status();
     22         winrt::Windows::Foundation::Collections::IVectorView<winrt::Microsoft::Management::Deployment::MatchResult> Matches();
     23         bool WasLimitExceeded();
     24         winrt::hresult ExtendedErrorCode();
     25 
     26 #if !defined(INCLUDE_ONLY_INTERFACE_METHODS)
     27     private:
     28         winrt::Microsoft::Management::Deployment::FindPackagesResultStatus m_status = winrt::Microsoft::Management::Deployment::FindPackagesResultStatus::Ok;
     29         Windows::Foundation::Collections::IVector<winrt::Microsoft::Management::Deployment::MatchResult> m_matches{ 
     30             winrt::single_threaded_vector<winrt::Microsoft::Management::Deployment::MatchResult>() };
     31         bool m_wasLimitExceeded = false;
     32         winrt::hresult m_extendedErrorCode = S_OK;
     33 #endif
     34     };
     35 }