winget-cli

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

PackageVersionInfo.h (2092B)


      1 // Copyright (c) Microsoft Corporation.
      2 // Licensed under the MIT License.
      3 #pragma once
      4 #include "PackageVersionInfo.g.h"
      5 
      6 namespace winrt::Microsoft::Management::Deployment::implementation
      7 {
      8     struct PackageVersionInfo : PackageVersionInfoT<PackageVersionInfo>
      9     {
     10         PackageVersionInfo() = default;
     11 
     12 #if !defined(INCLUDE_ONLY_INTERFACE_METHODS)
     13         void Initialize(std::shared_ptr<::AppInstaller::Repository::IPackageVersion> packageVersion);
     14         std::shared_ptr<::AppInstaller::Repository::IPackageVersion> GetRepositoryPackageVersion();
     15 #endif
     16 
     17         hstring GetMetadata(winrt::Microsoft::Management::Deployment::PackageVersionMetadataField const& metadataField);
     18         hstring Id();
     19         hstring DisplayName();
     20         hstring Publisher();
     21         hstring Version();
     22         hstring Channel();
     23         winrt::Windows::Foundation::Collections::IVectorView<hstring> PackageFamilyNames();
     24         winrt::Windows::Foundation::Collections::IVectorView<hstring> ProductCodes();
     25         winrt::Microsoft::Management::Deployment::PackageCatalog PackageCatalog();
     26         winrt::Microsoft::Management::Deployment::CompareResult CompareToVersion(const hstring& versionString);
     27         // Contract 4.0
     28         bool HasApplicableInstaller(InstallOptions options);
     29         // Contract 6.0
     30         winrt::Microsoft::Management::Deployment::CatalogPackageMetadata GetCatalogPackageMetadata();
     31         winrt::Microsoft::Management::Deployment::CatalogPackageMetadata GetCatalogPackageMetadata(const hstring& preferredLocale);
     32         winrt::Microsoft::Management::Deployment::PackageInstallerInfo GetApplicableInstaller(InstallOptions options);
     33 
     34 #if !defined(INCLUDE_ONLY_INTERFACE_METHODS)
     35     private:
     36         winrt::Microsoft::Management::Deployment::PackageCatalog m_packageCatalog{ nullptr };
     37         std::shared_ptr<::AppInstaller::Repository::IPackageVersion> m_packageVersion;
     38         Windows::Foundation::Collections::IVector<hstring> m_packageFamilyNames{ nullptr };
     39         Windows::Foundation::Collections::IVector<hstring> m_productCodes{ nullptr };
     40 #endif
     41     };
     42 }