6 #include <plugify_export.h>
16 using LocalPackageOpt = std::optional<LocalPackage>;
22 using RemotePackageOpt = std::optional<RemotePackage>;
60 virtual void InstallPackage(std::string_view packageName, std::optional<int32_t> requiredVersion = {}) = 0;
73 virtual void InstallAllPackages(
const std::filesystem::path& manifestFilePath,
bool reinstall) = 0;
87 virtual void UpdatePackage(std::string_view packageName, std::optional<int32_t> requiredVersion = {}) = 0;
122 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 LocalPackageOpt FindLocalPackage(std::string_view packageName) const =0
Find a local package by name.
virtual std::vector< LocalPackage > GetLocalPackages() const =0
Get a vector of all local packages.
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 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 void UpdatePackage(std::string_view packageName, std::optional< int32_t > requiredVersion={})=0
Update a specific package.
virtual std::vector< RemotePackage > GetRemotePackages() const =0
Get a vector of all remote packages.
virtual RemotePackageOpt FindRemotePackage(std::string_view packageName) const =0
Find a remote package by name.