7#include <plugify_export.h>
18 using PackagePtr = std::shared_ptr<Package>;
24 using LocalPackagePtr = std::shared_ptr<LocalPackage>;
30 using RemotePackagePtr = std::shared_ptr<RemotePackage>;
68 virtual void InstallPackage(std::string_view packageName, std::optional<int32_t> requiredVersion = {}) = 0;
81 virtual void InstallAllPackages(
const std::filesystem::path& manifestFilePath,
bool reinstall) = 0;
95 virtual void UpdatePackage(std::string_view packageName, std::optional<int32_t> requiredVersion = {}) = 0;
130 virtual void SnapshotPackages(
const std::filesystem::path& manifestFilePath,
bool prettify) = 0;
Interface for the package manager provided to the user, implemented in the core.
virtual void UpdateAllPackages()=0
Update all installed packages.
virtual void UninstallPackages(std::span< const std::string > packageNames)=0
Uninstall multiple packages.
virtual void UninstallConflictedPackages()=0
Uninstall conflicted packages.
virtual bool IsInitialized() const =0
Check if the package manager is initialized.
virtual void UpdatePackages(std::span< const std::string > packageNames)=0
Update multiple packages.
virtual bool HasMissedPackages() const =0
Check if there are missed packages (not installed but required by other packages).
virtual void Terminate()=0
Terminate the package manager.
virtual void UninstallPackage(std::string_view packageName)=0
Uninstall a specific package.
virtual void InstallMissedPackages()=0
Install missed packages.
virtual bool Initialize()=0
Initialize the package manager.
virtual void InstallAllPackages(const std::filesystem::path &manifestFilePath, bool reinstall)=0
Install all packages listed in a manifest file.
virtual bool Reload()=0
Reload the package manager.
virtual void UninstallAllPackages()=0
Uninstall all installed packages.
virtual void InstallPackages(std::span< const std::string > packageNames)=0
Install multiple packages.
virtual bool HasConflictedPackages() const =0
Check if there are conflicted packages (installed with conflicting versions).
virtual std::vector< RemotePackagePtr > GetRemotePackages() const =0
Get a vector of all remote packages.
virtual std::vector< LocalPackagePtr > GetLocalPackages() const =0
Get a vector of all local packages.
virtual void InstallAllPackages(const std::string &manifestUrl, bool reinstall)=0
Install all packages listed in a manifest file from a remote location.
virtual void InstallPackage(std::string_view packageName, std::optional< int32_t > requiredVersion={})=0
Install a package.
virtual void SnapshotPackages(const std::filesystem::path &manifestFilePath, bool prettify)=0
Snapshot the list of installed packages to a manifest file.
virtual RemotePackagePtr FindRemotePackage(std::string_view packageName) const =0
Find a remote package by name.
virtual void UpdatePackage(std::string_view packageName, std::optional< int32_t > requiredVersion={})=0
Update a specific package.
virtual LocalPackagePtr FindLocalPackage(std::string_view packageName) const =0
Find a local package by name.