plugify  1.0.0.0
Public Member Functions | List of all members
plugify::IPackageManager Class Referenceabstract

Interface for the package manager provided to the user, implemented in the core. More...

#include <package_manager.hpp>

Public Member Functions

virtual bool Initialize ()=0
 Initialize the package manager. More...
 
virtual void Terminate ()=0
 Terminate the package manager.
 
virtual bool IsInitialized () const =0
 Check if the package manager is initialized. More...
 
virtual bool Reload ()=0
 Reload the package manager. More...
 
virtual void InstallPackage (std::string_view packageName, std::optional< int32_t > requiredVersion={})=0
 Install a package. More...
 
virtual void InstallPackages (std::span< const std::string > packageNames)=0
 Install multiple packages. More...
 
virtual void InstallAllPackages (const std::filesystem::path &manifestFilePath, bool reinstall)=0
 Install all packages listed in a manifest file. More...
 
virtual void InstallAllPackages (const std::string &manifestUrl, bool reinstall)=0
 Install all packages listed in a manifest file from a remote location. More...
 
virtual void UpdatePackage (std::string_view packageName, std::optional< int32_t > requiredVersion={})=0
 Update a specific package. More...
 
virtual void UpdatePackages (std::span< const std::string > packageNames)=0
 Update multiple packages. More...
 
virtual void UpdateAllPackages ()=0
 Update all installed packages.
 
virtual void UninstallPackage (std::string_view packageName)=0
 Uninstall a specific package. More...
 
virtual void UninstallPackages (std::span< const std::string > packageNames)=0
 Uninstall multiple packages. More...
 
virtual void UninstallAllPackages ()=0
 Uninstall all installed packages.
 
virtual void SnapshotPackages (const std::filesystem::path &manifestFilePath, bool prettify)=0
 Snapshot the list of installed packages to a manifest file. More...
 
virtual bool HasMissedPackages () const =0
 Check if there are missed packages (not installed but required by other packages). More...
 
virtual bool HasConflictedPackages () const =0
 Check if there are conflicted packages (installed with conflicting versions). More...
 
virtual void InstallMissedPackages ()=0
 Install missed packages.
 
virtual void UninstallConflictedPackages ()=0
 Uninstall conflicted packages.
 
virtual LocalPackageOpt FindLocalPackage (std::string_view packageName) const =0
 Find a local package by name. More...
 
virtual RemotePackageOpt FindRemotePackage (std::string_view packageName) const =0
 Find a remote package by name. More...
 
virtual std::vector< LocalPackageGetLocalPackages () const =0
 Get a vector of all local packages. More...
 
virtual std::vector< RemotePackageGetRemotePackages () const =0
 Get a vector of all remote packages. More...
 

Detailed Description

Interface for the package manager provided to the user, implemented in the core.

Definition at line 28 of file package_manager.hpp.

Member Function Documentation

◆ FindLocalPackage()

virtual LocalPackageOpt plugify::IPackageManager::FindLocalPackage ( std::string_view  packageName) const
pure virtual

Find a local package by name.

Parameters
packageNameName of the package to find.
Returns
Optional reference to the found local package.

◆ FindRemotePackage()

virtual RemotePackageOpt plugify::IPackageManager::FindRemotePackage ( std::string_view  packageName) const
pure virtual

Find a remote package by name.

Parameters
packageNameName of the package to find.
Returns
Optional reference to the found remote package.

◆ GetLocalPackages()

virtual std::vector<LocalPackage> plugify::IPackageManager::GetLocalPackages ( ) const
pure virtual

Get a vector of all local packages.

Returns
Vector of local packages.

◆ GetRemotePackages()

virtual std::vector<RemotePackage> plugify::IPackageManager::GetRemotePackages ( ) const
pure virtual

Get a vector of all remote packages.

Returns
Vector of remote packages.

◆ HasConflictedPackages()

virtual bool plugify::IPackageManager::HasConflictedPackages ( ) const
pure virtual

Check if there are conflicted packages (installed with conflicting versions).

Returns
True if there are conflicted packages, false otherwise.

◆ HasMissedPackages()

virtual bool plugify::IPackageManager::HasMissedPackages ( ) const
pure virtual

Check if there are missed packages (not installed but required by other packages).

Returns
True if there are missed packages, false otherwise.

◆ Initialize()

virtual bool plugify::IPackageManager::Initialize ( )
pure virtual

Initialize the package manager.

Returns
True if initialization is successful, false otherwise.

◆ InstallAllPackages() [1/2]

virtual void plugify::IPackageManager::InstallAllPackages ( const std::filesystem::path &  manifestFilePath,
bool  reinstall 
)
pure virtual

Install all packages listed in a manifest file.

Parameters
manifestFilePathPath to the manifest file.
reinstallTrue to reinstall packages, false otherwise.

◆ InstallAllPackages() [2/2]

virtual void plugify::IPackageManager::InstallAllPackages ( const std::string &  manifestUrl,
bool  reinstall 
)
pure virtual

Install all packages listed in a manifest file from a remote location.

Parameters
manifestUrlURL of the manifest file.
reinstallTrue to reinstall packages, false otherwise.

◆ InstallPackage()

virtual void plugify::IPackageManager::InstallPackage ( std::string_view  packageName,
std::optional< int32_t >  requiredVersion = {} 
)
pure virtual

Install a package.

Parameters
packageNameName of the package to install.
requiredVersionOptional required version of the package.

◆ InstallPackages()

virtual void plugify::IPackageManager::InstallPackages ( std::span< const std::string >  packageNames)
pure virtual

Install multiple packages.

Parameters
packageNamesSpan of package names to install.

◆ IsInitialized()

virtual bool plugify::IPackageManager::IsInitialized ( ) const
pure virtual

Check if the package manager is initialized.

Returns
True if the package manager is initialized, false otherwise.

◆ Reload()

virtual bool plugify::IPackageManager::Reload ( )
pure virtual

Reload the package manager.

Returns
True if was initializated, false otherwise.

◆ SnapshotPackages()

virtual void plugify::IPackageManager::SnapshotPackages ( const std::filesystem::path &  manifestFilePath,
bool  prettify 
)
pure virtual

Snapshot the list of installed packages to a manifest file.

Parameters
manifestFilePathPath to the manifest file.
prettifyTrue to prettify the output, false for compact format.

◆ UninstallPackage()

virtual void plugify::IPackageManager::UninstallPackage ( std::string_view  packageName)
pure virtual

Uninstall a specific package.

Parameters
packageNameName of the package to uninstall.

◆ UninstallPackages()

virtual void plugify::IPackageManager::UninstallPackages ( std::span< const std::string >  packageNames)
pure virtual

Uninstall multiple packages.

Parameters
packageNamesSpan of package names to uninstall.

◆ UpdatePackage()

virtual void plugify::IPackageManager::UpdatePackage ( std::string_view  packageName,
std::optional< int32_t >  requiredVersion = {} 
)
pure virtual

Update a specific package.

Parameters
packageNameName of the package to update.
requiredVersionOptional required version of the package.

◆ UpdatePackages()

virtual void plugify::IPackageManager::UpdatePackages ( std::span< const std::string >  packageNames)
pure virtual

Update multiple packages.

Parameters
packageNamesSpan of package names to update.

The documentation for this class was generated from the following file: