forked from microsoft/winget-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSourceFactory.h
More file actions
29 lines (22 loc) · 1.05 KB
/
Copy pathSourceFactory.h
File metadata and controls
29 lines (22 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#pragma once
#include <AppInstallerRepositorySource.h>
#include <AppInstallerProgress.h>
#include <memory>
namespace AppInstaller::Repository
{
// Interface for manipulating a source based on its details.
struct ISourceFactory
{
virtual ~ISourceFactory() = default;
// Creates a source object from the given details.
virtual std::shared_ptr<ISource> Create(const SourceDetails& details, IProgressCallback& progress) = 0;
// Adds the source from the given details, writing back to the details any changes.
virtual void Add(SourceDetails& details, IProgressCallback& progress) = 0;
// Updates the source from the given details (may not change the details).
virtual void Update(const SourceDetails& details, IProgressCallback& progress) = 0;
// Removes the source from the given details.
virtual void Remove(const SourceDetails& details, IProgressCallback& progress) = 0;
};
}