Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WinGet Source COM API Support ### This update includes the following changes: 1. Implementation of WinGet COM Package Catalog Management APIs: - PackageManager.AddPackageCatalogAsync: Allows adding a new Package Catalog repository to the Windows Package Manager access list. Administrative rights are required to execute this API.. - PackageManager.RemovePackageCatalogAsync: Enables the removal of an existing Package Catalog from the Windows Package Manager access list. Administrative rights are required to execute this API. - By default, the 'PreserveData' field is set to false, removing both the PackageCatalog registration data and system artifacts. - When 'PreserveData' is set to true, only the PackageCatalog registration data is removed, while system artifacts remain. - PackageCatalogReference.RefreshPackageCatalogAsync: Allows updating an existing Package Catalog repository. 2. Necessary C# WinRT Projection to invoke the above API calls from the test classes. 3. PackageCatalogInterop E2E Inproc and OutOfproc Test Cases to validate: - AddPackageCatalogAsync - RemovePackageCatalogAsync - RefreshPackageCatalogAsync 4. Added a CallbackDispatcherSink struct that handles and dispatches progress callbacks for the scenario described above, ensuring progress is reported to the caller. 5. Updated Package.appxmanifest and Microsoft.Management.Deployment.InProc.dll.manifest to include the necessary COM RuntimeClass CLSIDs related to the aforementioned APIs ### How Validated: 1. Compiled AppInstaller.sln 2. Deployed AppInstallerCLIPackage 3. Copied Microsoft.Management.Deployment.winmd next to dot.exe process that runs test cases 4. Executed InProc tests locally and verified all tests pass. ![image](https://github.com/user-attachments/assets/1c677b85-6610-4b52-bf34-d784ba86d9db) related: #4170 - [x] I have signed the [Contributor License Agreement](https://cla.opensource.microsoft.com/microsoft/winget-pkgs). - [x] This pull request is related to an issue. ----- ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/winget-cli/pull/4813)
- Loading branch information