Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement source management in the COM API #4170

Closed
denelon opened this issue Feb 14, 2024 · 0 comments
Closed

Implement source management in the COM API #4170

denelon opened this issue Feb 14, 2024 · 0 comments
Assignees
Labels
Area-COM-API Issue related to COM API Command-Source Issue related to WinGet Source Issue-Feature This is a feature request for the Windows Package Manager client.
Milestone

Comments

@denelon
Copy link
Contributor

denelon commented Feb 14, 2024

Description of the new feature / enhancement

I'd like to be able to manage WinGet sources via the COM API.

This request will likely be associated with WinGet source management in Dev Home.

I'll add the link to the issue when it's created

Proposed technical implementation details

No response

@denelon denelon added Issue-Feature This is a feature request for the Windows Package Manager client. Area-COM-API Issue related to COM API Command-Source Issue related to WinGet Source labels Feb 14, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Feb 14, 2024
@denelon denelon removed the Needs-Triage Issue need to be triaged label Feb 14, 2024
@denelon denelon added this to the 1.8 Client milestone Mar 6, 2024
@denelon denelon modified the milestones: 1.8 Client, 1.9 Client May 16, 2024
@denelon denelon modified the milestones: 1.9 Client, 1.10 Client Oct 8, 2024
@denelon denelon added this to WinGet Oct 22, 2024
@denelon denelon moved this to In Progress in WinGet Oct 22, 2024
Madhusudhan-MSFT added a commit that referenced this issue Oct 28, 2024
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)
@microsoft-github-policy-service microsoft-github-policy-service bot added the In-PR Issue related to a PR label Nov 11, 2024
@Madhusudhan-MSFT Madhusudhan-MSFT removed the In-PR Issue related to a PR label Nov 11, 2024
@Madhusudhan-MSFT Madhusudhan-MSFT moved this from In Progress to Done in WinGet Nov 11, 2024
@denelon denelon closed this as completed Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-COM-API Issue related to COM API Command-Source Issue related to WinGet Source Issue-Feature This is a feature request for the Windows Package Manager client.
Projects
Status: Done
Development

No branches or pull requests

2 participants