winget-cli

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

Interface.h (1129B)


      1 // Copyright (c) Microsoft Corporation.
      2 // Licensed under the MIT License.
      3 #pragma once
      4 #include "Database/Schema/IConfigurationDatabase.h"
      5 #include "Database/Schema/0_1/Interface.h"
      6 
      7 namespace winrt::Microsoft::Management::Configuration::implementation::Database::Schema::V0_2
      8 {
      9     struct Interface : public V0_1::Interface
     10     {
     11         using V0_1::Interface::Interface;
     12 
     13         const AppInstaller::SQLite::Version& GetSchemaVersion() override;
     14 
     15         // Version 0.1
     16         void InitializeDatabase() override;
     17 
     18         // Version 0.2
     19         bool MigrateFrom(IConfigurationDatabase* current) override;
     20         void AddQueueItem(const GUID& instanceIdentifier, const std::string& objectName) override;
     21         void SetActiveQueueItem(const std::string& objectName) override;
     22         std::vector<std::tuple<GUID, std::string, std::chrono::system_clock::time_point, DWORD, bool>> GetQueueItems() override;
     23         void RemoveQueueItem(const std::string& objectName) override;
     24 
     25     private:
     26         // Unconditionally attempts to migrate from the 0.1 base.
     27         void MigrateFrom0_1();
     28     };
     29 }