pacm

May 15, 2026 ยท View on GitHub

{#pacmmodule}

pacm

Package manager for distributing and installing packaged extensions and assets.

Namespaces

NameDescription
pacmPackage manifests, install tasks, and repository management helpers.

{#pacm}

pacm

Package manifests, install tasks, and repository management helpers.

Classes

NameDescription
InstallMonitorAggregates multiple install tasks and reports overall progress.
InstallTaskDownloads, extracts, and finalizes a single package installation.
PackageManagerLoads package manifests and coordinates install, update, and uninstall workflows.
InstallationStateState machine states for package installation.
InstallOptionsPackage installation options.
LocalPackagePackage metadata for an installed package on the local filesystem.
PackageJSON-backed package metadata shared by local and remote package records.
PackagePairPairing of the installed and remote metadata for the same package ID.
RemotePackagePackage metadata loaded from the remote package index.

Typedefs

ReturnNameDescription
std::vector< LocalPackage * >LocalPackageVecVector of local package pointers used by install monitor progress snapshots.
std::vector< InstallTask * >InstallTaskVecVector of raw install task pointers used for transient iteration.
std::vector< InstallTask::Ptr >InstallTaskPtrVecVector of shared install task handles retained across async workflows.
std::vector< PackagePair >PackagePairVecVector of local/remote package pairs used for reconciliation and update checks.
KeyedStore< std::string, LocalPackage >LocalPackageStoreKeyed store of installed packages indexed by package ID.
KeyedStore< std::string, RemotePackage >RemotePackageStoreKeyed store of remote package metadata indexed by package ID.

{#localpackagevec}

LocalPackageVec

using LocalPackageVec = std::vector< LocalPackage * >

Vector of local package pointers used by install monitor progress snapshots.


{#installtaskvec}

InstallTaskVec

using InstallTaskVec = std::vector< InstallTask * >

Vector of raw install task pointers used for transient iteration.


{#installtaskptrvec}

InstallTaskPtrVec

using InstallTaskPtrVec = std::vector< InstallTask::Ptr >

Vector of shared install task handles retained across async workflows.


{#packagepairvec}

PackagePairVec

using PackagePairVec = std::vector< PackagePair >

Vector of local/remote package pairs used for reconciliation and update checks.


{#localpackagestore}

LocalPackageStore

using LocalPackageStore = KeyedStore< std::string, LocalPackage >

Keyed store of installed packages indexed by package ID.


{#remotepackagestore}

RemotePackageStore

using RemotePackageStore = KeyedStore< std::string, RemotePackage >

Keyed store of remote package metadata indexed by package ID.

Functions

ReturnNameDescription
std::stringgetInstallTaskNamesString inlineReturns a comma-delimited string of display names from packages.
voidvalidatePathComponent inlineValidates that a string is safe to use as a path component. Rejects path traversal sequences (..), directory separators (/ and ), null bytes, and empty strings.

{#getinstalltasknamesstring}

getInstallTaskNamesString

inline

inline std::string getInstallTaskNamesString(LocalPackageVec & packages)

Returns a comma-delimited string of display names from packages.

Parameters

Returns

Comma-separated name string, e.g. "PluginA, PluginB".


{#validatepathcomponent}

validatePathComponent

inline

inline void validatePathComponent(std::string_view name, std::string_view context)

Validates that a string is safe to use as a path component. Rejects path traversal sequences (..), directory separators (/ and ), null bytes, and empty strings.

Parameters

  • name The path component to validate.

  • context Caller description included in the exception message.

Exceptions

  • std::invalid_argument if name fails any validation check.

{#installmonitor}

InstallMonitor

#include <icy/pacm/installmonitor.h>
class InstallMonitor

Defined in src/pacm/include/icy/pacm/installmonitor.h:27

Aggregates multiple install tasks and reports overall progress.

List of all members

NameKindOwner
InstallStateChangevariableDeclared here
InstallCompletevariableDeclared here
ProgressvariableDeclared here
CompletevariableDeclared here
InstallMonitorfunctionDeclared here
InstallMonitorfunctionDeclared here
InstallMonitorfunctionDeclared here
addTaskfunctionDeclared here
startAllfunctionDeclared here
cancelAllfunctionDeclared here
isCompletefunctionDeclared here
tasksfunctionDeclared here
packagesfunctionDeclared here
_mutexvariableDeclared here
_tasksvariableDeclared here
_packagesvariableDeclared here
_progressvariableDeclared here
onInstallStateChangefunctionDeclared here
onInstallCompletefunctionDeclared here
setProgressfunctionDeclared here

Public Attributes

ReturnNameDescription
ThreadSignal< void(InstallTask &, const InstallationState &, const InstallationState &)>InstallStateChangeProxies state change events from managed packages.
ThreadSignal< void(LocalPackage &)>InstallCompleteSignals when a managed install task completes.
ThreadSignal< void(int &)>ProgressSignals on overall progress update [0-100].
ThreadSignal< void(LocalPackageVec &)>CompleteSignals on all tasks complete.

{#installstatechange}

InstallStateChange

ThreadSignal< void(InstallTask &, const InstallationState &, const InstallationState &)> InstallStateChange

Defined in src/pacm/include/icy/pacm/installmonitor.h:60

Proxies state change events from managed packages.


{#installcomplete}

InstallComplete

ThreadSignal< void(LocalPackage &)> InstallComplete

Defined in src/pacm/include/icy/pacm/installmonitor.h:63

Signals when a managed install task completes.


{#progress-1}

Progress

ThreadSignal< void(int &)> Progress

Defined in src/pacm/include/icy/pacm/installmonitor.h:66

Signals on overall progress update [0-100].


{#complete-3}

Complete

ThreadSignal< void(LocalPackageVec &)> Complete

Defined in src/pacm/include/icy/pacm/installmonitor.h:69

Signals on all tasks complete.

Public Methods

ReturnNameDescription
InstallMonitor
InstallMonitorDeleted constructor.
InstallMonitorDeleted constructor.
voidaddTask virtualAdds a task to monitor.
voidstartAll virtualStarts all monitored tasks.
voidcancelAll virtualCancels all monitored tasks.
boolisComplete virtual constReturns true if all install tasks have completed, either successfully or unsuccessfully.
InstallTaskPtrVectasks virtual constReturns the list of monitored package tasks.
LocalPackageVecpackages virtual constReturns the list of monitored packages.

{#installmonitor-1}

InstallMonitor

InstallMonitor()

Defined in src/pacm/include/icy/pacm/installmonitor.h:30


{#installmonitor-2}

InstallMonitor

InstallMonitor(const InstallMonitor &) = delete

Defined in src/pacm/include/icy/pacm/installmonitor.h:33

Deleted constructor.


{#installmonitor-3}

InstallMonitor

InstallMonitor(InstallMonitor &&) = delete

Defined in src/pacm/include/icy/pacm/installmonitor.h:35

Deleted constructor.


{#addtask}

addTask

virtual

virtual void addTask(InstallTask::Ptr task)

Defined in src/pacm/include/icy/pacm/installmonitor.h:39

Adds a task to monitor.


{#startall}

startAll

virtual

virtual void startAll()

Defined in src/pacm/include/icy/pacm/installmonitor.h:42

Starts all monitored tasks.


{#cancelall}

cancelAll

virtual

virtual void cancelAll()

Defined in src/pacm/include/icy/pacm/installmonitor.h:45

Cancels all monitored tasks.


{#iscomplete}

isComplete

virtual const

virtual bool isComplete() const

Defined in src/pacm/include/icy/pacm/installmonitor.h:49

Returns true if all install tasks have completed, either successfully or unsuccessfully.


{#tasks}

tasks

virtual const

virtual InstallTaskPtrVec tasks() const

Defined in src/pacm/include/icy/pacm/installmonitor.h:52

Returns the list of monitored package tasks.


{#packages}

packages

virtual const

virtual LocalPackageVec packages() const

Defined in src/pacm/include/icy/pacm/installmonitor.h:55

Returns the list of monitored packages.

Protected Attributes

ReturnNameDescription
std::mutex_mutex
InstallTaskPtrVec_tasks
LocalPackageVec_packages
int_progress

{#_mutex-10}

_mutex

std::mutex _mutex

Defined in src/pacm/include/icy/pacm/installmonitor.h:81


{#_tasks}

_tasks

InstallTaskPtrVec _tasks

Defined in src/pacm/include/icy/pacm/installmonitor.h:82


{#_packages}

_packages

LocalPackageVec _packages

Defined in src/pacm/include/icy/pacm/installmonitor.h:83


{#_progress}

_progress

int _progress

Defined in src/pacm/include/icy/pacm/installmonitor.h:84

Protected Methods

ReturnNameDescription
voidonInstallStateChange virtual
voidonInstallComplete virtual
voidsetProgress virtual

{#oninstallstatechange}

onInstallStateChange

virtual

virtual void onInstallStateChange(void * sender, InstallationState & state, const InstallationState & oldState)

Defined in src/pacm/include/icy/pacm/installmonitor.h:72


{#oninstallcomplete}

onInstallComplete

virtual

virtual void onInstallComplete(InstallTask & task)

Defined in src/pacm/include/icy/pacm/installmonitor.h:76


{#setprogress}

setProgress

virtual

virtual void setProgress(int value)

Defined in src/pacm/include/icy/pacm/installmonitor.h:78

{#installtask}

InstallTask

#include <icy/pacm/installtask.h>
class InstallTask

Defined in src/pacm/include/icy/pacm/installtask.h:89

Inherits: Runnable, Stateful< InstallationState >

Downloads, extracts, and finalizes a single package installation.

List of all members

NameKindOwner
PackageManagerfriendDeclared here
InstallMonitorfriendDeclared here
ProgressvariableDeclared here
CompletevariableDeclared here
InstallTaskfunctionDeclared here
InstallTaskfunctionDeclared here
InstallTaskfunctionDeclared here
startfunctionDeclared here
cancelfunctionDeclared here
doDownloadfunctionDeclared here
doExtractfunctionDeclared here
doFinalizefunctionDeclared here
setCompletefunctionDeclared here
getRemoteAssetfunctionDeclared here
localfunctionDeclared here
remotefunctionDeclared here
optionsfunctionDeclared here
loopfunctionDeclared here
validfunctionDeclared here
cancelledfunctionDeclared here
failedfunctionDeclared here
successfunctionDeclared here
completefunctionDeclared here
progressfunctionDeclared here
_mutexvariableDeclared here
_runnervariableDeclared here
_errorvariableDeclared here
_managervariableDeclared here
_localvariableDeclared here
_remotevariableDeclared here
_optionsvariableDeclared here
_progressvariableDeclared here
_downloadingvariableDeclared here
_dlconnvariableDeclared here
_loopvariableDeclared here
runfunctionDeclared here
onStateChangefunctionDeclared here
onDownloadProgressfunctionDeclared here
onDownloadCompletefunctionDeclared here
setProgressfunctionDeclared here
PtrtypedefDeclared here
RunnablefunctionInherited from Runnable
runfunctionInherited from Runnable
cancelfunctionInherited from Runnable
cancelledfunctionInherited from Runnable
exitvariableInherited from Runnable
StateChangevariableInherited from Stateful
_statevariableInherited from Stateful
StatefulfunctionInherited from Stateful
~StatefulfunctionInherited from Stateful
stateEqualsfunctionInherited from Stateful
stateBetweenfunctionInherited from Stateful
statefunctionInherited from Stateful
statefunctionInherited from Stateful
beforeStateChangefunctionInherited from Stateful
onStateChangefunctionInherited from Stateful
setStatefunctionInherited from Stateful
setStatefunctionInherited from Stateful

Inherited from Runnable

KindNameDescription
functionRunnable inline
functionrun virtualThe run method will be called by the asynchronous context.
functioncancel virtual inlineCancel the current task. The run() method should return ASAP.
functioncancelled virtual const inlineReturns true when the task has been cancelled.
variableexit

Inherited from Stateful

KindNameDescription
variableStateChangeSignals when the state changes.
variable_state
functionStateful inline
function~Stateful virtual inline
functionstateEquals virtual const inlineReturns true if the current state ID equals the given ID.
functionstateBetween virtual const inlineReturns true if the current state ID is in the inclusive range [lid, rid].
functionstate virtual inlineReturns a mutable reference to the current state.
functionstate virtual const inlineReturns a copy of the current state.
functionbeforeStateChange virtual inlineOverride to handle pre state change logic. Return false to prevent state change.
functiononStateChange virtual inlineOverride to handle post state change logic.
functionsetState virtual inlineSets the state and sends the state signal if the state change was successful.
functionsetState virtual inlineSets the state and sends the state signal if the state change was successful.

Friends

NameDescription
PackageManager
InstallMonitor

{#packagemanager}

PackageManager

friend class PackageManager

Defined in src/pacm/include/icy/pacm/installtask.h:202


{#installmonitor-4}

InstallMonitor

friend class InstallMonitor

Defined in src/pacm/include/icy/pacm/installtask.h:203

Public Attributes

ReturnNameDescription
Signal< void(InstallTask &, int &)>ProgressSignals on progress update [0-100].
Signal< void(InstallTask &)>CompleteSignals on task completion for both success and failure cases.

{#progress-2}

Progress

Signal< void(InstallTask &, int &)> Progress

Defined in src/pacm/include/icy/pacm/installtask.h:171

Signals on progress update [0-100].


{#complete-4}

Complete

Signal< void(InstallTask &)> Complete

Defined in src/pacm/include/icy/pacm/installtask.h:175

Signals on task completion for both success and failure cases.

Public Methods

ReturnNameDescription
InstallTask
InstallTaskDeleted constructor.
InstallTaskDeleted constructor.
voidstart virtualValidates options, resolves the install directory, and launches the background runner.
voidcancel virtual overrideTransitions the task to the Cancelled state.
voiddoDownload virtualDownloads the package archive from the server.
voiddoExtract virtualExtracts the downloaded package files to the intermediate directory.
voiddoFinalize virtualMoves extracted files from the intermediate directory to the installation directory.
voidsetComplete virtualCalled when the task completes either successfully or in error. This will trigger destruction.
Package::AssetgetRemoteAsset virtual constReturns the remote asset selected by the current InstallOptions. Respects version and sdkVersion overrides; falls back to latestAsset().
LocalPackage *local virtual constReturns a pointer to the local package record.
RemotePackage *remote virtual constReturns a pointer to the remote package record.
const InstallOptions &options virtual const nodiscardReturns a read-only view of the installation options for this task.
uv::Loop *loop virtual constReturns the libuv event loop used for async operations.
boolvalid virtual constReturns true if the task is not in a Failed state and both local and remote (if set) packages are valid.
boolcancelled virtual const overrideReturns true if the task is in the Cancelled state.
boolfailed virtual constReturns true if the task is in the Failed state.
boolsuccess virtual constReturns true if the task is in the Installed (success) state.
boolcomplete virtual constReturns true if the task has reached a terminal state (Installed, Cancelled, or Failed).
intprogress virtual constReturns the current progress value in the range [0, 100].

{#installtask-1}

InstallTask

InstallTask(PackageManager & manager, LocalPackage * local, RemotePackage * remote, const InstallOptions & options = InstallOptions(), uv::Loop * loop = uv::defaultLoop())

Defined in src/pacm/include/icy/pacm/installtask.h:101

Parameters

  • manager Owning PackageManager instance.

  • local Local package record (must not be null).

  • remote Remote package record to install from (may be null for local-only ops).

  • options Version and path overrides for this installation.

  • loop libuv event loop to use for async HTTP downloads.

Exceptions

  • std::runtime_error if the task configuration is invalid.

{#installtask-2}

InstallTask

InstallTask(const InstallTask &) = delete

Defined in src/pacm/include/icy/pacm/installtask.h:106

Deleted constructor.


{#installtask-3}

InstallTask

InstallTask(InstallTask &&) = delete

Defined in src/pacm/include/icy/pacm/installtask.h:108

Deleted constructor.


{#start-12}

start

virtual

virtual void start()

Defined in src/pacm/include/icy/pacm/installtask.h:113

Validates options, resolves the install directory, and launches the background runner.

Exceptions

  • std::runtime_error if the requested version or SDK version asset is unavailable.

{#cancel-3}

cancel

virtual override

virtual void cancel(bool flag = true) override

Defined in src/pacm/include/icy/pacm/installtask.h:116

Transitions the task to the Cancelled state.

Reimplements

{#dodownload}

doDownload

virtual

virtual void doDownload()

Defined in src/pacm/include/icy/pacm/installtask.h:119

Downloads the package archive from the server.


{#doextract}

doExtract

virtual

virtual void doExtract()

Defined in src/pacm/include/icy/pacm/installtask.h:123

Extracts the downloaded package files to the intermediate directory.


{#dofinalize}

doFinalize

virtual

virtual void doFinalize()

Defined in src/pacm/include/icy/pacm/installtask.h:127

Moves extracted files from the intermediate directory to the installation directory.


{#setcomplete}

setComplete

virtual

virtual void setComplete()

Defined in src/pacm/include/icy/pacm/installtask.h:132

Called when the task completes either successfully or in error. This will trigger destruction.


{#getremoteasset}

getRemoteAsset

virtual const

virtual Package::Asset getRemoteAsset() const

Defined in src/pacm/include/icy/pacm/installtask.h:136

Returns the remote asset selected by the current InstallOptions. Respects version and sdkVersion overrides; falls back to latestAsset().


{#local}

local

virtual const

virtual LocalPackage * local() const

Defined in src/pacm/include/icy/pacm/installtask.h:139

Returns a pointer to the local package record.


{#remote}

remote

virtual const

virtual RemotePackage * remote() const

Defined in src/pacm/include/icy/pacm/installtask.h:142

Returns a pointer to the remote package record.


{#options-4}

options

virtual const nodiscard

[[nodiscard]] virtual const InstallOptions & options() const

Defined in src/pacm/include/icy/pacm/installtask.h:145

Returns a read-only view of the installation options for this task.


{#loop-7}

loop

virtual const

virtual uv::Loop * loop() const

Defined in src/pacm/include/icy/pacm/installtask.h:148

Returns the libuv event loop used for async operations.


{#valid-2}

valid

virtual const

virtual bool valid() const

Defined in src/pacm/include/icy/pacm/installtask.h:152

Returns true if the task is not in a Failed state and both local and remote (if set) packages are valid.


{#cancelled-2}

cancelled

virtual const override

virtual bool cancelled() const override

Defined in src/pacm/include/icy/pacm/installtask.h:155

Returns true if the task is in the Cancelled state.

Reimplements

{#failed}

failed

virtual const

virtual bool failed() const

Defined in src/pacm/include/icy/pacm/installtask.h:158

Returns true if the task is in the Failed state.


{#success-1}

success

virtual const

virtual bool success() const

Defined in src/pacm/include/icy/pacm/installtask.h:161

Returns true if the task is in the Installed (success) state.


{#complete-5}

complete

virtual const

virtual bool complete() const

Defined in src/pacm/include/icy/pacm/installtask.h:165

Returns true if the task has reached a terminal state (Installed, Cancelled, or Failed).


{#progress-3}

progress

virtual const

virtual int progress() const

Defined in src/pacm/include/icy/pacm/installtask.h:168

Returns the current progress value in the range [0, 100].

Protected Attributes

ReturnNameDescription
std::mutex_mutex
Idler_runner
icy::Error_error
PackageManager &_manager
LocalPackage *_local
RemotePackage *_remote
InstallOptions_options
int_progress
bool_downloading
http::ClientConnection::Ptr_dlconn
uv::Loop *_loop

{#_mutex-11}

_mutex

std::mutex _mutex

Defined in src/pacm/include/icy/pacm/installtask.h:189


{#_runner-1}

_runner

Idler _runner

Defined in src/pacm/include/icy/pacm/installtask.h:191


{#_error-4}

_error

icy::Error _error

Defined in src/pacm/include/icy/pacm/installtask.h:192


{#_manager-3}

_manager

PackageManager & _manager

Defined in src/pacm/include/icy/pacm/installtask.h:193


{#_local}

_local

LocalPackage * _local

Defined in src/pacm/include/icy/pacm/installtask.h:194


{#_remote}

_remote

RemotePackage * _remote

Defined in src/pacm/include/icy/pacm/installtask.h:195


{#_options-1}

_options

InstallOptions _options

Defined in src/pacm/include/icy/pacm/installtask.h:196


{#_progress-1}

_progress

int _progress

Defined in src/pacm/include/icy/pacm/installtask.h:197


{#_downloading}

_downloading

bool _downloading

Defined in src/pacm/include/icy/pacm/installtask.h:198


{#_dlconn}

_dlconn

http::ClientConnection::Ptr _dlconn

Defined in src/pacm/include/icy/pacm/installtask.h:199


{#_loop-2}

_loop

uv::Loop * _loop

Defined in src/pacm/include/icy/pacm/installtask.h:200

Protected Methods

ReturnNameDescription
voidrun virtual overrideCalled asynchronously by the thread to do the work.
voidonStateChange override
voidonDownloadProgress virtual
voidonDownloadComplete virtual
voidsetProgress virtual

{#run-5}

run

virtual override

virtual void run() override

Defined in src/pacm/include/icy/pacm/installtask.h:179

Called asynchronously by the thread to do the work.

Reimplements

{#onstatechange}

onStateChange

override

void onStateChange(InstallationState & state, const InstallationState & oldState) override

Defined in src/pacm/include/icy/pacm/installtask.h:181


{#ondownloadprogress}

onDownloadProgress

virtual

virtual void onDownloadProgress(const double & progress)

Defined in src/pacm/include/icy/pacm/installtask.h:183


{#ondownloadcomplete}

onDownloadComplete

virtual

virtual void onDownloadComplete(const http::Response & response)

Defined in src/pacm/include/icy/pacm/installtask.h:184


{#setprogress-1}

setProgress

virtual

virtual void setProgress(int value)

Defined in src/pacm/include/icy/pacm/installtask.h:186

Public Types

NameDescription
Ptr

{#ptr-14}

Ptr

using Ptr = std::shared_ptr< InstallTask >

Defined in src/pacm/include/icy/pacm/installtask.h:93

{#packagemanager-1}

PackageManager

#include <icy/pacm/packagemanager.h>
class PackageManager

Defined in src/pacm/include/icy/pacm/packagemanager.h:62

Loads package manifests and coordinates install, update, and uninstall workflows.

List of all members

NameKindOwner
RemotePackageResponsevariableDeclared here
PackageUninstalledvariableDeclared here
InstallTaskCreatedvariableDeclared here
InstallTaskCompletevariableDeclared here
PackageManagerfunctionDeclared here
PackageManagerfunctionDeclared here
PackageManagerfunctionDeclared here
initializefunctionDeclared here
uninitializefunctionDeclared here
initializedfunctionDeclared here
createDirectoriesfunctionDeclared here
queryRemotePackagesfunctionDeclared here
loadLocalPackagesfunctionDeclared here
loadLocalPackagesfunctionDeclared here
saveLocalPackagesfunctionDeclared here
saveLocalPackagefunctionDeclared here
parseRemotePackagesfunctionDeclared here
installPackagefunctionDeclared here
installPackagesfunctionDeclared here
updatePackagefunctionDeclared here
updatePackagesfunctionDeclared here
updateAllPackagesfunctionDeclared here
uninstallPackagesfunctionDeclared here
uninstallPackagefunctionDeclared here
hasUnfinalizedPackagesfunctionDeclared here
finalizeInstallationsfunctionDeclared here
getInstallTaskfunctionDeclared here
tasksfunctionDeclared here
cancelAllTasksfunctionDeclared here
getPackagePairsfunctionDeclared here
getUpdatablePackagePairsfunctionDeclared here
getPackagePairfunctionDeclared here
getOrCreatePackagePairfunctionDeclared here
createInstallTaskfunctionDeclared here
installedPackageVersionfunctionDeclared here
getLatestInstallableAssetfunctionDeclared here
hasAvailableUpdatesfunctionDeclared here
clearCachefunctionDeclared here
clearPackageCachefunctionDeclared here
clearCacheFilefunctionDeclared here
hasCachedFilefunctionDeclared here
isSupportedFileTypefunctionDeclared here
getCacheFilePathfunctionDeclared here
getPackageDataDirfunctionDeclared here
mutableOptionsfunctionDeclared here
optionsfunctionDeclared here
remotePackagesfunctionDeclared here
localPackagesfunctionDeclared here
_mutexvariableDeclared here
_localPackagesvariableDeclared here
_remotePackagesvariableDeclared here
_tasksvariableDeclared here
_optionsvariableDeclared here
onPackageInstallCompletefunctionDeclared here

Public Attributes

ReturnNameDescription
Signal< void(const http::Response &)>RemotePackageResponseEvents.
Signal< void(LocalPackage &)>PackageUninstalledSignals when a package is uninstalled.
Signal< void(InstallTask &)>InstallTaskCreatedSignals when an installation task is created, before it is started.
Signal< void(const InstallTask &)>InstallTaskCompleteSignals when a package installation tasks completes, either successfully or in error.

{#remotepackageresponse}

RemotePackageResponse

Signal< void(const http::Response &)> RemotePackageResponse

Defined in src/pacm/include/icy/pacm/packagemanager.h:311

Events.

Signals when the remote package list have been downloaded from the server.


{#packageuninstalled}

PackageUninstalled

Signal< void(LocalPackage &)> PackageUninstalled

Defined in src/pacm/include/icy/pacm/packagemanager.h:314

Signals when a package is uninstalled.


{#installtaskcreated}

InstallTaskCreated

Signal< void(InstallTask &)> InstallTaskCreated

Defined in src/pacm/include/icy/pacm/packagemanager.h:318

Signals when an installation task is created, before it is started.


{#installtaskcomplete}

InstallTaskComplete

Signal< void(const InstallTask &)> InstallTaskComplete

Defined in src/pacm/include/icy/pacm/packagemanager.h:322

Signals when a package installation tasks completes, either successfully or in error.

Public Methods

ReturnNameDescription
PackageManager
PackageManagerDeleted constructor.
PackageManagerDeleted constructor.
voidinitialize virtualInitialization Methods.
voiduninitialize virtualReleases resources and cancels any in-progress tasks.
boolinitialized virtual constReturns true if initialize() has been called successfully.
voidcreateDirectories virtualCreates the package manager directory structure if it does not already exist.
voidqueryRemotePackages virtualQueries the server for a list of available packages.
voidloadLocalPackages virtualLoads all local package manifests from file system. Clears all in memory package manifests.
voidloadLocalPackages virtualLoads all local package manifests residing the the given directory. This method may be called multiple times for different paths because it does not clear in memory package manifests.
boolsaveLocalPackages virtualSaves all local package manifests to the data directory.
boolsaveLocalPackage virtualSaves the local package manifest to the file system.
voidparseRemotePackages virtualParse the remote packages from the given JSON data string.
InstallTask::PtrinstallPackage virtualPackage Installation Methods.
boolinstallPackages virtualInstalls multiple packages. The same options will be passed to each task. If a InstallMonitor instance was passed in the tasks will need to be started, otherwise they will be auto-started. The PackageManager does not take ownership of the InstallMonitor.
InstallTask::PtrupdatePackage virtualUpdates a single package. Throws an exception if the package does not exist. The returned InstallTask must be started.
boolupdatePackages virtualUpdates multiple packages. Throws an exception if the package does not exist. If a InstallMonitor instance was passed in the tasks will need to be started, otherwise they will be auto-started. The PackageManager does not take ownership of the InstallMonitor.
boolupdateAllPackages virtualUpdates all installed packages.
booluninstallPackages virtualUninstalls multiple packages.
booluninstallPackage virtualUninstalls a single package.
boolhasUnfinalizedPackages virtualReturns true if there are updates available that have not yet been finalized. Packages may be unfinalized if there were files in use at the time of installation.
boolfinalizeInstallations virtualFinalizes active installations by moving all package files to their target destination. If files are to be overwritten they must not be in use or finalization will fail.
InstallTask::PtrgetInstallTask virtual constTask Helper Methods.
InstallTaskPtrVectasks virtual constReturns a list of all tasks.
voidcancelAllTasks virtualAborts all package installation tasks. All tasks must be aborted before clearing local or remote manifests.
PackagePairVecgetPackagePairs virtual constPackage Helper Methods.
PackagePairVecgetUpdatablePackagePairs virtual constReturns a list of package pairs which may be updated. All pairs will have both local and remote package pointers, and the remote version will be newer than the local version.
PackagePairgetPackagePair virtual constReturns a local and remote package pair. An exception will be thrown if either the local or remote packages aren't available or are invalid.
PackagePairgetOrCreatePackagePair virtualReturns a local and remote package pair. If the local package doesn't exist it will be created from the remote package. If the remote package doesn't exist a NotFoundException will be thrown.
InstallTask::PtrcreateInstallTask virtualCreates a package installation task for the given pair.
std::stringinstalledPackageVersion virtual constReturns the version number of an installed package. Exceptions will be thrown if the package does not exist, or is not fully installed.
Package::AssetgetLatestInstallableAsset virtual constReturns the best asset to install, or throws a descriptive exception if no updates are available, or if the package is already up-to-date. This method takes version and SDK locks into consideration.
boolhasAvailableUpdates virtual constReturns true if there are updates available for this package, false otherwise.
voidclearCacheFile Helper Methods.
boolclearPackageCacheClears a package archive from the local cache.
boolclearCacheFileClears a file from the local cache.
boolhasCachedFileChecks if a package archive exists in the local cache.
boolisSupportedFileTypeChecks if the file type is a supported package archive.
std::stringgetCacheFilePathReturns the full path of the cached file if it exists, or an empty path if the file doesn't exist.
std::stringgetPackageDataDirReturns the package data directory for the given package ID.
Options &mutableOptions virtualAccessors.
const Options &options virtual const nodiscardReturns a read-only view of the current options.
RemotePackageStore &remotePackages virtualReturns a reference to the in-memory remote package store.
LocalPackageStore &localPackages virtualReturns a reference to the in-memory local package store.

{#packagemanager-2}

PackageManager

PackageManager(const Options & options = Options())

Defined in src/pacm/include/icy/pacm/packagemanager.h:99

Parameters

  • options Configuration for directories, endpoints, and credentials.

{#packagemanager-3}

PackageManager

PackageManager(const PackageManager &) = delete

Defined in src/pacm/include/icy/pacm/packagemanager.h:102

Deleted constructor.


{#packagemanager-4}

PackageManager

PackageManager(PackageManager &&) = delete

Defined in src/pacm/include/icy/pacm/packagemanager.h:104

Deleted constructor.


{#initialize}

initialize

virtual

virtual void initialize()

Defined in src/pacm/include/icy/pacm/packagemanager.h:112

Initialization Methods.

Initializes the package manager: creates directories, loads local manifests, and queries the remote package index.


{#uninitialize}

uninitialize

virtual

virtual void uninitialize()

Defined in src/pacm/include/icy/pacm/packagemanager.h:115

Releases resources and cancels any in-progress tasks.


{#initialized-3}

initialized

virtual const

virtual bool initialized() const

Defined in src/pacm/include/icy/pacm/packagemanager.h:118

Returns true if initialize() has been called successfully.


{#createdirectories}

createDirectories

virtual

virtual void createDirectories()

Defined in src/pacm/include/icy/pacm/packagemanager.h:122

Creates the package manager directory structure if it does not already exist.


{#queryremotepackages}

queryRemotePackages

virtual

virtual void queryRemotePackages()

Defined in src/pacm/include/icy/pacm/packagemanager.h:125

Queries the server for a list of available packages.


{#loadlocalpackages}

loadLocalPackages

virtual

virtual void loadLocalPackages()

Defined in src/pacm/include/icy/pacm/packagemanager.h:129

Loads all local package manifests from file system. Clears all in memory package manifests.


{#loadlocalpackages-1}

loadLocalPackages

virtual

virtual void loadLocalPackages(const std::string & dir)

Defined in src/pacm/include/icy/pacm/packagemanager.h:135

Loads all local package manifests residing the the given directory. This method may be called multiple times for different paths because it does not clear in memory package manifests.


{#savelocalpackages}

saveLocalPackages

virtual

virtual bool saveLocalPackages(bool whiny = false)

Defined in src/pacm/include/icy/pacm/packagemanager.h:140

Saves all local package manifests to the data directory.

Parameters

  • whiny If true, re-throws on write error; otherwise returns false.

Returns

true on success.


{#savelocalpackage}

saveLocalPackage

virtual

virtual bool saveLocalPackage(LocalPackage & package, bool whiny = false)

Defined in src/pacm/include/icy/pacm/packagemanager.h:143

Saves the local package manifest to the file system.


{#parseremotepackages}

parseRemotePackages

virtual

virtual void parseRemotePackages(const std::string & data)

Defined in src/pacm/include/icy/pacm/packagemanager.h:146

Parse the remote packages from the given JSON data string.


{#installpackage}

installPackage

virtual

virtual InstallTask::Ptr installPackage(const std::string & name, const InstallOptions & options = InstallOptions())

Defined in src/pacm/include/icy/pacm/packagemanager.h:156

Package Installation Methods.

Installs a single package. The returned InstallTask must be started. If the package is already up-to-date, a nullptr will be returned. Any other error will throw a std::runtime_error.


{#installpackages}

installPackages

virtual

virtual bool installPackages(const StringVec & ids, const InstallOptions & options = InstallOptions(), InstallMonitor * monitor = nullptr, bool whiny = false)

Defined in src/pacm/include/icy/pacm/packagemanager.h:165

Installs multiple packages. The same options will be passed to each task. If a InstallMonitor instance was passed in the tasks will need to be started, otherwise they will be auto-started. The PackageManager does not take ownership of the InstallMonitor.


{#updatepackage}

updatePackage

virtual

virtual InstallTask::Ptr updatePackage(const std::string & name, const InstallOptions & options = InstallOptions())

Defined in src/pacm/include/icy/pacm/packagemanager.h:173

Updates a single package. Throws an exception if the package does not exist. The returned InstallTask must be started.


{#updatepackages}

updatePackages

virtual

virtual bool updatePackages(const StringVec & ids, const InstallOptions & options = InstallOptions(), InstallMonitor * monitor = nullptr, bool whiny = false)

Defined in src/pacm/include/icy/pacm/packagemanager.h:182

Updates multiple packages. Throws an exception if the package does not exist. If a InstallMonitor instance was passed in the tasks will need to be started, otherwise they will be auto-started. The PackageManager does not take ownership of the InstallMonitor.


{#updateallpackages}

updateAllPackages

virtual

virtual bool updateAllPackages(bool whiny = false)

Defined in src/pacm/include/icy/pacm/packagemanager.h:187

Updates all installed packages.


{#uninstallpackages}

uninstallPackages

virtual

virtual bool uninstallPackages(const StringVec & ids, bool whiny = false)

Defined in src/pacm/include/icy/pacm/packagemanager.h:190

Uninstalls multiple packages.


{#uninstallpackage}

uninstallPackage

virtual

virtual bool uninstallPackage(const std::string & id, bool whiny = false)

Defined in src/pacm/include/icy/pacm/packagemanager.h:193

Uninstalls a single package.


{#hasunfinalizedpackages}

hasUnfinalizedPackages

virtual

virtual bool hasUnfinalizedPackages()

Defined in src/pacm/include/icy/pacm/packagemanager.h:198

Returns true if there are updates available that have not yet been finalized. Packages may be unfinalized if there were files in use at the time of installation.


{#finalizeinstallations}

finalizeInstallations

virtual

virtual bool finalizeInstallations(bool whiny = false)

Defined in src/pacm/include/icy/pacm/packagemanager.h:204

Finalizes active installations by moving all package files to their target destination. If files are to be overwritten they must not be in use or finalization will fail.


{#getinstalltask}

getInstallTask

virtual const

virtual InstallTask::Ptr getInstallTask(const std::string & id) const

Defined in src/pacm/include/icy/pacm/packagemanager.h:210

Task Helper Methods.

Gets the install task for the given package ID.


{#tasks-1}

tasks

virtual const

virtual InstallTaskPtrVec tasks() const

Defined in src/pacm/include/icy/pacm/packagemanager.h:213

Returns a list of all tasks.


{#cancelalltasks}

cancelAllTasks

virtual

virtual void cancelAllTasks()

Defined in src/pacm/include/icy/pacm/packagemanager.h:217

Aborts all package installation tasks. All tasks must be aborted before clearing local or remote manifests.


{#getpackagepairs}

getPackagePairs

virtual const

virtual PackagePairVec getPackagePairs() const

Defined in src/pacm/include/icy/pacm/packagemanager.h:224

Package Helper Methods.

Returns all package pairs, valid or invalid. Some pairs may not have both local and remote package pointers.


{#getupdatablepackagepairs}

getUpdatablePackagePairs

virtual const

virtual PackagePairVec getUpdatablePackagePairs() const

Defined in src/pacm/include/icy/pacm/packagemanager.h:229

Returns a list of package pairs which may be updated. All pairs will have both local and remote package pointers, and the remote version will be newer than the local version.


{#getpackagepair}

getPackagePair

virtual const

virtual PackagePair getPackagePair(const std::string & id, bool whiny = false) const

Defined in src/pacm/include/icy/pacm/packagemanager.h:234

Returns a local and remote package pair. An exception will be thrown if either the local or remote packages aren't available or are invalid.


{#getorcreatepackagepair}

getOrCreatePackagePair

virtual

virtual PackagePair getOrCreatePackagePair(const std::string & id)

Defined in src/pacm/include/icy/pacm/packagemanager.h:242

Returns a local and remote package pair. If the local package doesn't exist it will be created from the remote package. If the remote package doesn't exist a NotFoundException will be thrown.


{#createinstalltask}

createInstallTask

virtual

virtual InstallTask::Ptr createInstallTask(PackagePair & pair, const InstallOptions & options = InstallOptions())

Defined in src/pacm/include/icy/pacm/packagemanager.h:245

Creates a package installation task for the given pair.


{#installedpackageversion}

installedPackageVersion

virtual const

virtual std::string installedPackageVersion(const std::string & id) const

Defined in src/pacm/include/icy/pacm/packagemanager.h:251

Returns the version number of an installed package. Exceptions will be thrown if the package does not exist, or is not fully installed.


{#getlatestinstallableasset}

getLatestInstallableAsset

virtual const

virtual Package::Asset getLatestInstallableAsset(const PackagePair & pair, const InstallOptions & options = InstallOptions()) const

Defined in src/pacm/include/icy/pacm/packagemanager.h:256

Returns the best asset to install, or throws a descriptive exception if no updates are available, or if the package is already up-to-date. This method takes version and SDK locks into consideration.


{#hasavailableupdates}

hasAvailableUpdates

virtual const

virtual bool hasAvailableUpdates(const PackagePair & pair) const

Defined in src/pacm/include/icy/pacm/packagemanager.h:262

Returns true if there are updates available for this package, false otherwise.


{#clearcache}

clearCache

void clearCache()

Defined in src/pacm/include/icy/pacm/packagemanager.h:268

File Helper Methods.

Clears all files in the cache directory.


{#clearpackagecache}

clearPackageCache

bool clearPackageCache(LocalPackage & package)

Defined in src/pacm/include/icy/pacm/packagemanager.h:271

Clears a package archive from the local cache.


{#clearcachefile}

clearCacheFile

bool clearCacheFile(std::string_view fileName, bool whiny = false)

Defined in src/pacm/include/icy/pacm/packagemanager.h:274

Clears a file from the local cache.


{#hascachedfile}

hasCachedFile

bool hasCachedFile(Package::Asset & asset)

Defined in src/pacm/include/icy/pacm/packagemanager.h:277

Checks if a package archive exists in the local cache.


{#issupportedfiletype}

isSupportedFileType

bool isSupportedFileType(std::string_view fileName)

Defined in src/pacm/include/icy/pacm/packagemanager.h:280

Checks if the file type is a supported package archive.


{#getcachefilepath}

getCacheFilePath

std::string getCacheFilePath(std::string_view fileName)

Defined in src/pacm/include/icy/pacm/packagemanager.h:284

Returns the full path of the cached file if it exists, or an empty path if the file doesn't exist.


{#getpackagedatadir}

getPackageDataDir

std::string getPackageDataDir(std::string_view id)

Defined in src/pacm/include/icy/pacm/packagemanager.h:288

Returns the package data directory for the given package ID.


{#mutableoptions}

mutableOptions

virtual

virtual Options & mutableOptions()

Defined in src/pacm/include/icy/pacm/packagemanager.h:295

Accessors.

Returns the mutable startup configuration for this manager. Callers should finish edits before initialize().


{#options-5}

options

virtual const nodiscard

[[nodiscard]] virtual const Options & options() const

Defined in src/pacm/include/icy/pacm/packagemanager.h:298

Returns a read-only view of the current options.


{#remotepackages}

remotePackages

virtual

virtual RemotePackageStore & remotePackages()

Defined in src/pacm/include/icy/pacm/packagemanager.h:301

Returns a reference to the in-memory remote package store.


{#localpackages}

localPackages

virtual

virtual LocalPackageStore & localPackages()

Defined in src/pacm/include/icy/pacm/packagemanager.h:304

Returns a reference to the in-memory local package store.

Protected Attributes

ReturnNameDescription
std::mutex_mutex
LocalPackageStore_localPackages
RemotePackageStore_remotePackages
InstallTaskPtrVec_tasks
Options_options

{#_mutex-12}

_mutex

std::mutex _mutex

Defined in src/pacm/include/icy/pacm/packagemanager.h:331


{#_localpackages}

_localPackages

LocalPackageStore _localPackages

Defined in src/pacm/include/icy/pacm/packagemanager.h:332


{#_remotepackages}

_remotePackages

RemotePackageStore _remotePackages

Defined in src/pacm/include/icy/pacm/packagemanager.h:333


{#_tasks-1}

_tasks

InstallTaskPtrVec _tasks

Defined in src/pacm/include/icy/pacm/packagemanager.h:334


{#_options-2}

_options

Options _options

Defined in src/pacm/include/icy/pacm/packagemanager.h:335

Protected Methods

ReturnNameDescription
voidonPackageInstallCompleteCallbacks.

{#onpackageinstallcomplete}

onPackageInstallComplete

void onPackageInstallComplete(InstallTask & task)

Defined in src/pacm/include/icy/pacm/packagemanager.h:328

Callbacks.

{#options-6}

Options

#include <icy/pacm/packagemanager.h>
struct Options

Defined in src/pacm/include/icy/pacm/packagemanager.h:66

Startup configuration for repository endpoints, credentials, and directories.

List of all members

NameKindOwner
endpointvariableDeclared here
indexURIvariableDeclared here
httpUsernamevariableDeclared here
httpPasswordvariableDeclared here
httpOAuthTokenvariableDeclared here
tempDirvariableDeclared here
dataDirvariableDeclared here
installDirvariableDeclared here
platformvariableDeclared here
checksumAlgorithmvariableDeclared here
clearFailedCachevariableDeclared here
OptionsfunctionDeclared here

Public Attributes

ReturnNameDescription
std::stringendpointThe HTTP server endpoint.
std::stringindexURIThe HTTP server URI for querying packages JSON.
std::stringhttpUsernameUsername for HTTP basic auth.
std::stringhttpPasswordPAssword for HTTP basic auth.
std::stringhttpOAuthTokenWill be used instead of HTTP basic if provided.
std::stringtempDirDirectory where package files will be downloaded and extracted.
std::stringdataDirDirectory where package manifests will be kept.
std::stringinstallDirDirectory where packages will be installed.
std::stringplatformPlatform (win32, linux, mac).
std::stringchecksumAlgorithmChecksum algorithm (MDS/SHA1).
boolclearFailedCacheThis flag tells the package manager weather or not to clear the package cache if installation fails.

{#endpoint}

endpoint

std::string endpoint

Defined in src/pacm/include/icy/pacm/packagemanager.h:68

The HTTP server endpoint.


{#indexuri}

indexURI

std::string indexURI

Defined in src/pacm/include/icy/pacm/packagemanager.h:69

The HTTP server URI for querying packages JSON.


{#httpusername}

httpUsername

std::string httpUsername

Defined in src/pacm/include/icy/pacm/packagemanager.h:70

Username for HTTP basic auth.


{#httppassword}

httpPassword

std::string httpPassword

Defined in src/pacm/include/icy/pacm/packagemanager.h:71

PAssword for HTTP basic auth.


{#httpoauthtoken}

httpOAuthToken

std::string httpOAuthToken

Defined in src/pacm/include/icy/pacm/packagemanager.h:72

Will be used instead of HTTP basic if provided.


{#tempdir}

tempDir

std::string tempDir

Defined in src/pacm/include/icy/pacm/packagemanager.h:74

Directory where package files will be downloaded and extracted.


{#datadir}

dataDir

std::string dataDir

Defined in src/pacm/include/icy/pacm/packagemanager.h:75

Directory where package manifests will be kept.


{#installdir-2}

installDir

std::string installDir

Defined in src/pacm/include/icy/pacm/packagemanager.h:76

Directory where packages will be installed.


{#platform}

platform

std::string platform

Defined in src/pacm/include/icy/pacm/packagemanager.h:78

Platform (win32, linux, mac).


{#checksumalgorithm}

checksumAlgorithm

std::string checksumAlgorithm

Defined in src/pacm/include/icy/pacm/packagemanager.h:79

Checksum algorithm (MDS/SHA1).


{#clearfailedcache}

clearFailedCache

bool clearFailedCache

Defined in src/pacm/include/icy/pacm/packagemanager.h:81

This flag tells the package manager weather or not to clear the package cache if installation fails.

Public Methods

ReturnNameDescription
Options inline

{#options-7}

Options

inline

inline Options(const std::string & root = getCwd())

Defined in src/pacm/include/icy/pacm/packagemanager.h:84

{#installationstate}

InstallationState

#include <icy/pacm/installtask.h>
struct InstallationState

Defined in src/pacm/include/icy/pacm/installtask.h:31

Inherits: State

State machine states for package installation.

List of all members

NameKindOwner
strfunctionDeclared here
TypeenumDeclared here
IDtypedefInherited from State
_idvariableInherited from State
StatefunctionInherited from State
StatefunctionInherited from State
operator=functionInherited from State
~StatefunctionInherited from State
idfunctionInherited from State
setfunctionInherited from State
strfunctionInherited from State
toStringfunctionInherited from State
equalsfunctionInherited from State
betweenfunctionInherited from State
operator==functionInherited from State
operator==functionInherited from State
operator<<friendInherited from State

Inherited from State

KindNameDescription
typedefID
variable_id
functionState
functionStateCopy constructor.
functionoperator=Copy assignment.
function~State virtualDefaulted destructor.
functionid constReturns the current state ID.
functionsetSets the state ID.
functionstr virtual constReturns a human-readable string for the given state ID. Override in derived classes to provide meaningful names.
functiontoString virtual constReturns a human-readable string for the current state ID.
functionequals constReturns true if the current state ID equals the given ID.
functionbetween constReturns true if the current state ID is in the inclusive range [lid, rid].
functionoperator== const inline
functionoperator== const inline
friendoperator<< inline

Public Methods

ReturnNameDescription
std::stringstr const inlineConverts a state ID to its string representation.

{#str-2}

str

const inline

inline std::string str(unsigned int id) const

Defined in src/pacm/include/icy/pacm/installtask.h:47

Converts a state ID to its string representation.

Parameters

  • id One of the Type enum values.

Returns

Human-readable state name, or "undefined" for unknown values.

Public Types

NameDescription
Type

{#type-10}

Type

enum Type

Defined in src/pacm/include/icy/pacm/installtask.h:33

ValueDescription
None
Downloading
Extracting
Finalizing
Installed
Cancelled
Failed

{#installoptions}

InstallOptions

#include <icy/pacm/installtask.h>
struct InstallOptions

Defined in src/pacm/include/icy/pacm/installtask.h:71

Package installation options.

List of all members

NameKindOwner
versionvariableDeclared here
sdkVersionvariableDeclared here
installDirvariableDeclared here
InstallOptionsfunctionDeclared here

Public Attributes

ReturnNameDescription
std::stringversionIf set then the given package version will be installed.
std::stringsdkVersionIf set then the latest package version for given SDK version will be installed.
std::stringinstallDirInstall to the given location, otherwise the manager default [installDir](#installdir) will be used.

{#version-3}

version

std::string version

Defined in src/pacm/include/icy/pacm/installtask.h:73

If set then the given package version will be installed.


{#sdkversion}

sdkVersion

std::string sdkVersion

Defined in src/pacm/include/icy/pacm/installtask.h:74

If set then the latest package version for given SDK version will be installed.


{#installdir}

installDir

std::string installDir

Defined in src/pacm/include/icy/pacm/installtask.h:76

Install to the given location, otherwise the manager default [installDir](#installdir) will be used.

Public Methods

ReturnNameDescription
InstallOptions inline

{#installoptions-1}

InstallOptions

inline

inline InstallOptions()

Defined in src/pacm/include/icy/pacm/installtask.h:79

{#localpackage}

LocalPackage

#include <icy/pacm/package.h>
struct LocalPackage

Defined in src/pacm/include/icy/pacm/package.h:189

Inherits: Package

Package metadata for an installed package on the local filesystem.

List of all members

NameKindOwner
LocalPackagefunctionDeclared here
LocalPackagefunctionDeclared here
LocalPackagefunctionDeclared here
setStatefunctionDeclared here
setInstallStatefunctionDeclared here
setInstallDirfunctionDeclared here
setInstalledAssetfunctionDeclared here
setVersionfunctionDeclared here
setVersionLockfunctionDeclared here
setSDKVersionLockfunctionDeclared here
versionfunctionDeclared here
statefunctionDeclared here
installStatefunctionDeclared here
installDirfunctionDeclared here
versionLockfunctionDeclared here
sdkLockedVersionfunctionDeclared here
assetfunctionDeclared here
isInstalledfunctionDeclared here
isFailedfunctionDeclared here
manifestfunctionDeclared here
verifyInstallManifestfunctionDeclared here
getInstalledFilePathfunctionDeclared here
extensionEntryPointPathfunctionDeclared here
errorsfunctionDeclared here
addErrorfunctionDeclared here
lastErrorfunctionDeclared here
clearErrorsfunctionDeclared here
validfunctionDeclared here
PackagefunctionInherited from Package
PackagefunctionInherited from Package
idfunctionInherited from Package
namefunctionInherited from Package
typefunctionInherited from Package
authorfunctionInherited from Package
descriptionfunctionInherited from Package
hasExtensionfunctionInherited from Package
extensionfunctionInherited from Package
validfunctionInherited from Package
toJsonfunctionInherited from Package
printfunctionInherited from Package

Inherited from Package

KindNameDescription
functionPackageConstructs an empty package.
functionPackageConstructs a package from an existing JSON value.
functionid virtual constReturns the package unique identifier.
functionname virtual constReturns the package display name.
functiontype virtual constReturns the package type (e.g. "plugin", "asset").
functionauthor virtual constReturns the package author string.
functiondescription virtual constReturns the package description string.
functionhasExtension virtual constReturns true when the package has an "extension" object.
functionextension virtual constReturns a read-only view of the extension metadata. Throws if no extension object is present.
functionvalid virtual constReturns true if id, name and type are all non-empty.
functiontoJson virtual const nodiscardReturns a plain JSON copy of this package object.
functionprint virtual constDumps the JSON representation of this package to ost.

Public Methods

ReturnNameDescription
LocalPackageConstructs an empty local package.
LocalPackageConstructs a local package from an existing JSON value.
LocalPackageCreate the local package from the remote package reference with the following manipulations. 1) Add a local manifest element. 2) Remove asset mirror elements.
voidsetState virtualSet's the overall package state. Possible values are: Installing, Installed, Failed, Uninstalled. If the packages completes while still Installing, this means the package has yet to be finalized.
voidsetInstallState virtualSet's the package installation state. See InstallationState for possible values.
voidsetInstallDir virtualSet's the installation directory for this package.
voidsetInstalledAsset virtualSets the installed asset, once installed. This method also sets the version.
voidsetVersion virtualSets the current version of the local package. Installation must be complete.
voidsetVersionLock virtualLocks the package at the given version. Once set this package will not be updated past the given version. Pass an empty string to remove the lock.
voidsetSDKVersionLock virtualLocks the package at the given SDK version. Once set this package will only update to the most recent version with given SDK version. Pass an empty string to remove the lock.
std::stringversion virtual constReturns the installed package version.
std::stringstate virtual constReturns the current state of this package.
std::stringinstallState virtual constReturns the installation state of this package.
std::stringinstallDir virtual constReturns the installation directory for this package.
std::stringversionLock virtual constReturns the pinned version string, or empty if no lock is set.
std::stringsdkLockedVersion virtual constReturns the pinned SDK version string, or empty if no lock is set.
Assetasset virtualReturns the currently installed asset, if any. If none, the returned asset will be empty().
boolisInstalled virtual constReturns true or false depending on weather or not the package is installed successfully. False if package is in Failed state.
boolisFailed virtual constReturns true if the package state is "Failed".
Manifestmanifest virtualReturns the installation manifest.
boolverifyInstallManifest virtual
std::stringgetInstalledFilePath virtualReturns the full full path of the installed file. Thrown an exception if the install directory is unset.
std::stringextensionEntryPointPath virtual constReturns the install-relative extension entrypoint resolved against installDir(). Returns an empty string when no extension metadata is present.
json::Value &errors virtualReturns a reference to the JSON array of accumulated error messages.
voidaddError virtualAppends message to the errors array.
std::stringlastError virtual constReturns the most recently added error message, or empty if none.
voidclearErrors virtualClears all recorded error messages.
boolvalid virtual constReturns true if id, name and type are all non-empty.

{#localpackage-1}

LocalPackage

LocalPackage()

Defined in src/pacm/include/icy/pacm/package.h:213

Constructs an empty local package.


{#localpackage-2}

LocalPackage

LocalPackage(const json::Value & src)

Defined in src/pacm/include/icy/pacm/package.h:217

Constructs a local package from an existing JSON value.

Parameters

  • src JSON object containing local package fields.

{#localpackage-3}

LocalPackage

LocalPackage(const RemotePackage & src)

Defined in src/pacm/include/icy/pacm/package.h:223

Create the local package from the remote package reference with the following manipulations. 1) Add a local manifest element. 2) Remove asset mirror elements.


{#setstate-1}

setState

virtual

virtual void setState(const std::string & state)

Defined in src/pacm/include/icy/pacm/package.h:232

Set's the overall package state. Possible values are: Installing, Installed, Failed, Uninstalled. If the packages completes while still Installing, this means the package has yet to be finalized.


{#setinstallstate}

setInstallState

virtual

virtual void setInstallState(const std::string & state)

Defined in src/pacm/include/icy/pacm/package.h:236

Set's the package installation state. See InstallationState for possible values.


{#setinstalldir}

setInstallDir

virtual

virtual void setInstallDir(const std::string & dir)

Defined in src/pacm/include/icy/pacm/package.h:239

Set's the installation directory for this package.


{#setinstalledasset}

setInstalledAsset

virtual

virtual void setInstalledAsset(const Package::Asset & installedRemoteAsset)

Defined in src/pacm/include/icy/pacm/package.h:243

Sets the installed asset, once installed. This method also sets the version.


{#setversion-2}

setVersion

virtual

virtual void setVersion(const std::string & version)

Defined in src/pacm/include/icy/pacm/package.h:247

Sets the current version of the local package. Installation must be complete.


{#setversionlock}

setVersionLock

virtual

virtual void setVersionLock(const std::string & version)

Defined in src/pacm/include/icy/pacm/package.h:253

Locks the package at the given version. Once set this package will not be updated past the given version. Pass an empty string to remove the lock.


{#setsdkversionlock}

setSDKVersionLock

virtual

virtual void setSDKVersionLock(const std::string & version)

Defined in src/pacm/include/icy/pacm/package.h:259

Locks the package at the given SDK version. Once set this package will only update to the most recent version with given SDK version. Pass an empty string to remove the lock.


{#version-4}

version

virtual const

virtual std::string version() const

Defined in src/pacm/include/icy/pacm/package.h:262

Returns the installed package version.


{#state-2}

state

virtual const

virtual std::string state() const

Defined in src/pacm/include/icy/pacm/package.h:265

Returns the current state of this package.


{#installstate}

installState

virtual const

virtual std::string installState() const

Defined in src/pacm/include/icy/pacm/package.h:268

Returns the installation state of this package.


{#installdir-1}

installDir

virtual const

virtual std::string installDir() const

Defined in src/pacm/include/icy/pacm/package.h:271

Returns the installation directory for this package.


{#versionlock}

versionLock

virtual const

virtual std::string versionLock() const

Defined in src/pacm/include/icy/pacm/package.h:275

Returns the pinned version string, or empty if no lock is set.


{#sdklockedversion}

sdkLockedVersion

virtual const

virtual std::string sdkLockedVersion() const

Defined in src/pacm/include/icy/pacm/package.h:278

Returns the pinned SDK version string, or empty if no lock is set.


{#asset}

asset

virtual

virtual Asset asset()

Defined in src/pacm/include/icy/pacm/package.h:282

Returns the currently installed asset, if any. If none, the returned asset will be empty().


{#isinstalled}

isInstalled

virtual const

virtual bool isInstalled() const

Defined in src/pacm/include/icy/pacm/package.h:287

Returns true or false depending on weather or not the package is installed successfully. False if package is in Failed state.


{#isfailed}

isFailed

virtual const

virtual bool isFailed() const

Defined in src/pacm/include/icy/pacm/package.h:290

Returns true if the package state is "Failed".


{#manifest}

manifest

virtual

virtual Manifest manifest()

Defined in src/pacm/include/icy/pacm/package.h:293

Returns the installation manifest.


{#verifyinstallmanifest}

verifyInstallManifest

virtual

virtual bool verifyInstallManifest(bool allowEmpty = false)

Defined in src/pacm/include/icy/pacm/package.h:295


{#getinstalledfilepath}

getInstalledFilePath

virtual

virtual std::string getInstalledFilePath(const std::string & fileName, bool whiny = false)

Defined in src/pacm/include/icy/pacm/package.h:299

Returns the full full path of the installed file. Thrown an exception if the install directory is unset.


{#extensionentrypointpath}

extensionEntryPointPath

virtual const

virtual std::string extensionEntryPointPath(bool whiny = false) const

Defined in src/pacm/include/icy/pacm/package.h:304

Returns the install-relative extension entrypoint resolved against installDir(). Returns an empty string when no extension metadata is present.


{#errors-2}

errors

virtual

virtual json::Value & errors()

Defined in src/pacm/include/icy/pacm/package.h:307

Returns a reference to the JSON array of accumulated error messages.


{#adderror}

addError

virtual

virtual void addError(const std::string & message)

Defined in src/pacm/include/icy/pacm/package.h:311

Appends message to the errors array.

Parameters

  • message Error description to record.

{#lasterror}

lastError

virtual const

virtual std::string lastError() const

Defined in src/pacm/include/icy/pacm/package.h:314

Returns the most recently added error message, or empty if none.


{#clearerrors}

clearErrors

virtual

virtual void clearErrors()

Defined in src/pacm/include/icy/pacm/package.h:317

Clears all recorded error messages.


{#valid-3}

valid

virtual const

virtual bool valid() const

Defined in src/pacm/include/icy/pacm/package.h:319

Returns true if id, name and type are all non-empty.

Reimplements

{#manifest-1}

Manifest

#include <icy/pacm/package.h>
struct Manifest

Defined in src/pacm/include/icy/pacm/package.h:192

Manifest of installed files recorded for a local package.

List of all members

NameKindOwner
rootvariableDeclared here
ManifestfunctionDeclared here
emptyfunctionDeclared here
addFilefunctionDeclared here

Public Attributes

ReturnNameDescription
json::Value &root

{#root-1}

root

json::Value & root

Defined in src/pacm/include/icy/pacm/package.h:206

Public Methods

ReturnNameDescription
Manifest
boolempty virtual constReturns true if the manifest contains no file entries.
voidaddFile virtualAppends path to the manifest file list.

{#manifest-2}

Manifest

Manifest(json::Value & src)

Defined in src/pacm/include/icy/pacm/package.h:195

Parameters

  • src JSON array node that backs this manifest.

{#empty-1}

empty

virtual const

virtual bool empty() const

Defined in src/pacm/include/icy/pacm/package.h:199

Returns true if the manifest contains no file entries.


{#addfile}

addFile

virtual

virtual void addFile(const std::string & path)

Defined in src/pacm/include/icy/pacm/package.h:204

Appends path to the manifest file list.

Parameters

  • path Relative path of an installed file.

{#package}

Package

#include <icy/pacm/package.h>
struct Package

Defined in src/pacm/include/icy/pacm/package.h:26

Inherits: Value Subclassed by: LocalPackage, RemotePackage

JSON-backed package metadata shared by local and remote package records.

List of all members

NameKindOwner
PackagefunctionDeclared here
PackagefunctionDeclared here
idfunctionDeclared here
namefunctionDeclared here
typefunctionDeclared here
authorfunctionDeclared here
descriptionfunctionDeclared here
hasExtensionfunctionDeclared here
extensionfunctionDeclared here
validfunctionDeclared here
toJsonfunctionDeclared here
printfunctionDeclared here

Public Methods

ReturnNameDescription
PackageConstructs an empty package.
PackageConstructs a package from an existing JSON value.
std::stringid virtual constReturns the package unique identifier.
std::stringname virtual constReturns the package display name.
std::stringtype virtual constReturns the package type (e.g. "plugin", "asset").
std::stringauthor virtual constReturns the package author string.
std::stringdescription virtual constReturns the package description string.
boolhasExtension virtual constReturns true when the package has an "extension" object.
Extensionextension virtual constReturns a read-only view of the extension metadata. Throws if no extension object is present.
boolvalid virtual constReturns true if id, name and type are all non-empty.
json::ValuetoJson virtual const nodiscardReturns a plain JSON copy of this package object.
voidprint virtual constDumps the JSON representation of this package to ost.

{#package-1}

Package

Package()

Defined in src/pacm/include/icy/pacm/package.h:105

Constructs an empty package.


{#package-2}

Package

Package(const json::Value & src)

Defined in src/pacm/include/icy/pacm/package.h:109

Constructs a package from an existing JSON value.

Parameters

  • src JSON object containing package fields.

{#id-2}

id

virtual const

virtual std::string id() const

Defined in src/pacm/include/icy/pacm/package.h:113

Returns the package unique identifier.


{#name-6}

name

virtual const

virtual std::string name() const

Defined in src/pacm/include/icy/pacm/package.h:116

Returns the package display name.


{#type-11}

type

virtual const

virtual std::string type() const

Defined in src/pacm/include/icy/pacm/package.h:119

Returns the package type (e.g. "plugin", "asset").


{#author}

author

virtual const

virtual std::string author() const

Defined in src/pacm/include/icy/pacm/package.h:122

Returns the package author string.


{#description}

description

virtual const

virtual std::string description() const

Defined in src/pacm/include/icy/pacm/package.h:125

Returns the package description string.


{#hasextension}

hasExtension

virtual const

virtual bool hasExtension() const

Defined in src/pacm/include/icy/pacm/package.h:128

Returns true when the package has an "extension" object.


{#extension}

extension

virtual const

virtual Extension extension() const

Defined in src/pacm/include/icy/pacm/package.h:132

Returns a read-only view of the extension metadata. Throws if no extension object is present.


{#valid-4}

valid

virtual const

virtual bool valid() const

Defined in src/pacm/include/icy/pacm/package.h:135

Returns true if id, name and type are all non-empty.

Reimplemented by

{#tojson}

toJson

virtual const nodiscard

[[nodiscard]] virtual json::Value toJson() const

Defined in src/pacm/include/icy/pacm/package.h:138

Returns a plain JSON copy of this package object.


{#print-9}

print

virtual const

virtual void print(std::ostream & ost) const

Defined in src/pacm/include/icy/pacm/package.h:142

Dumps the JSON representation of this package to ost.

Parameters

  • ost Output stream.

{#extension-1}

Extension

#include <icy/pacm/package.h>
struct Extension

Defined in src/pacm/include/icy/pacm/package.h:29

Optional extension metadata that describes how a packaged runtime unit is loaded.

List of all members

NameKindOwner
rootvariableDeclared here
ExtensionfunctionDeclared here
loaderfunctionDeclared here
runtimefunctionDeclared here
entryPointfunctionDeclared here
abiVersionfunctionDeclared here
capabilitiesfunctionDeclared here
validfunctionDeclared here
hasCapabilityfunctionDeclared here

Public Attributes

ReturnNameDescription
const json::Value &root

{#root-2}

root

const json::Value & root

Defined in src/pacm/include/icy/pacm/package.h:56

Public Methods

ReturnNameDescription
Extension
std::stringloader virtual constReturns the loader/runtime contract name (for example "graft").
std::stringruntime virtual constReturns the runtime kind (for example "native" or "worker").
std::stringentryPoint virtual constReturns the install-relative entrypoint path.
intabiVersion virtual constReturns the extension ABI version, or 0 if not specified.
std::vector< std::string >capabilities virtual constReturns the declared capabilities.
boolvalid virtual constReturns true when the metadata is internally consistent.
boolhasCapability virtual constReturns true when capability is declared.

{#extension-2}

Extension

Extension(const json::Value & src)

Defined in src/pacm/include/icy/pacm/package.h:32

Parameters

  • src JSON object node that backs this extension metadata.

{#loader}

loader

virtual const

virtual std::string loader() const

Defined in src/pacm/include/icy/pacm/package.h:36

Returns the loader/runtime contract name (for example "graft").


{#runtime}

runtime

virtual const

virtual std::string runtime() const

Defined in src/pacm/include/icy/pacm/package.h:39

Returns the runtime kind (for example "native" or "worker").


{#entrypoint}

entryPoint

virtual const

virtual std::string entryPoint() const

Defined in src/pacm/include/icy/pacm/package.h:42

Returns the install-relative entrypoint path.


{#abiversion}

abiVersion

virtual const

virtual int abiVersion() const

Defined in src/pacm/include/icy/pacm/package.h:45

Returns the extension ABI version, or 0 if not specified.


{#capabilities}

capabilities

virtual const

virtual std::vector< std::string > capabilities() const

Defined in src/pacm/include/icy/pacm/package.h:48

Returns the declared capabilities.


{#valid-5}

valid

virtual const

virtual bool valid() const

Defined in src/pacm/include/icy/pacm/package.h:51

Returns true when the metadata is internally consistent.


{#hascapability}

hasCapability

virtual const

virtual bool hasCapability(std::string_view capability) const

Defined in src/pacm/include/icy/pacm/package.h:54

Returns true when capability is declared.

{#asset-1}

Asset

#include <icy/pacm/package.h>
struct Asset

Defined in src/pacm/include/icy/pacm/package.h:60

Archive asset metadata for a specific package build.

List of all members

NameKindOwner
rootvariableDeclared here
AssetfunctionDeclared here
AssetfunctionDeclared here
fileNamefunctionDeclared here
versionfunctionDeclared here
sdkVersionfunctionDeclared here
checksumfunctionDeclared here
urlfunctionDeclared here
fileSizefunctionDeclared here
validfunctionDeclared here
printfunctionDeclared here
operator=functionDeclared here
operator==functionDeclared here

Public Attributes

ReturnNameDescription
json::Value &root

{#root-3}

root

json::Value & root

Defined in src/pacm/include/icy/pacm/package.h:101

Public Methods

ReturnNameDescription
Asset
AssetDefaulted constructor.
std::stringfileName virtual constReturns the archive file name (e.g. "my-plugin-1.0.0.zip").
std::stringversion virtual constReturns the package version string (e.g. "1.0.0").
std::stringsdkVersion virtual constReturns the SDK version this asset was built against (e.g. "2.0.0").
std::stringchecksum virtual constReturns the asset checksum string, or empty if none is set.
std::stringurl virtual constReturns the download URL from the mirror list at index.
intfileSize virtual constReturns the uncompressed file size in bytes, or 0 if not set.
boolvalid virtual constReturns true if the asset has the minimum required fields (file-name, version, mirrors).
voidprint virtual constWrites the raw JSON of this asset to ost.
Asset &operator= virtualCopies the backing JSON node from r.
booloperator== virtual constReturns true if file name, version and checksum all match r.

{#asset-2}

Asset

Asset(json::Value & src)

Defined in src/pacm/include/icy/pacm/package.h:63

Parameters

  • src JSON object node that backs this asset.

{#asset-3}

Asset

Asset(const Asset &) = default

Defined in src/pacm/include/icy/pacm/package.h:64

Defaulted constructor.


{#filename-2}

fileName

virtual const

virtual std::string fileName() const

Defined in src/pacm/include/icy/pacm/package.h:68

Returns the archive file name (e.g. "my-plugin-1.0.0.zip").


{#version-5}

version

virtual const

virtual std::string version() const

Defined in src/pacm/include/icy/pacm/package.h:71

Returns the package version string (e.g. "1.0.0").


{#sdkversion-1}

sdkVersion

virtual const

virtual std::string sdkVersion() const

Defined in src/pacm/include/icy/pacm/package.h:74

Returns the SDK version this asset was built against (e.g. "2.0.0").


{#checksum}

checksum

virtual const

virtual std::string checksum() const

Defined in src/pacm/include/icy/pacm/package.h:77

Returns the asset checksum string, or empty if none is set.


{#url-8}

url

virtual const

virtual std::string url(int index = 0) const

Defined in src/pacm/include/icy/pacm/package.h:81

Returns the download URL from the mirror list at index.

Parameters

  • index Zero-based index into the mirrors array.

{#filesize-1}

fileSize

virtual const

virtual int fileSize() const

Defined in src/pacm/include/icy/pacm/package.h:84

Returns the uncompressed file size in bytes, or 0 if not set.


{#valid-6}

valid

virtual const

virtual bool valid() const

Defined in src/pacm/include/icy/pacm/package.h:88

Returns true if the asset has the minimum required fields (file-name, version, mirrors).


{#print-10}

virtual const

virtual void print(std::ostream & ost) const

Defined in src/pacm/include/icy/pacm/package.h:92

Writes the raw JSON of this asset to ost.

Parameters

  • ost Output stream.

{#operator-23}

operator=

virtual

virtual Asset & operator=(const Asset & r)

Defined in src/pacm/include/icy/pacm/package.h:96

Copies the backing JSON node from r.

Parameters

  • r Source asset to copy from.

{#operator-24}

operator==

virtual const

virtual bool operator==(const Asset & r) const

Defined in src/pacm/include/icy/pacm/package.h:99

Returns true if file name, version and checksum all match r.

{#packagepair}

PackagePair

#include <icy/pacm/package.h>
struct PackagePair

Defined in src/pacm/include/icy/pacm/package.h:328

Pairing of the installed and remote metadata for the same package ID.

List of all members

NameKindOwner
localvariableDeclared here
remotevariableDeclared here
PackagePairfunctionDeclared here
validfunctionDeclared here
idfunctionDeclared here
namefunctionDeclared here
typefunctionDeclared here
authorfunctionDeclared here
hasExtensionfunctionDeclared here

Public Attributes

ReturnNameDescription
LocalPackage *localReturns true if there are no possible updates for this package, false otherwise.
RemotePackage *remote

{#local-1}

local

LocalPackage * local

Defined in src/pacm/include/icy/pacm/package.h:357

Returns true if there are no possible updates for this package, false otherwise.


{#remote-1}

remote

RemotePackage * remote

Defined in src/pacm/include/icy/pacm/package.h:358

Public Methods

ReturnNameDescription
PackagePair
boolvalid virtual constReturns true if at least one of local/remote is set and that pointer is itself valid().
std::stringid constReturns the package ID, preferring the local package if available.
std::stringname constReturns the package display name, preferring the local package if available.
std::stringtype constReturns the package type, preferring the local package if available.
std::stringauthor constReturns the package author, preferring the local package if available.
boolhasExtension constReturns true when either side carries extension metadata.

{#packagepair-1}

PackagePair

PackagePair(LocalPackage * local = nullptr, RemotePackage * remote = nullptr)

Defined in src/pacm/include/icy/pacm/package.h:332

Parameters

  • local Pointer to the locally installed package, or nullptr if not installed.

  • remote Pointer to the remote package record, or nullptr if not known.


{#valid-7}

valid

virtual const

virtual bool valid() const

Defined in src/pacm/include/icy/pacm/package.h:336

Returns true if at least one of local/remote is set and that pointer is itself valid().


{#id-3}

id

const

std::string id() const

Defined in src/pacm/include/icy/pacm/package.h:339

Returns the package ID, preferring the local package if available.


{#name-7}

name

const

std::string name() const

Defined in src/pacm/include/icy/pacm/package.h:342

Returns the package display name, preferring the local package if available.


{#type-12}

type

const

std::string type() const

Defined in src/pacm/include/icy/pacm/package.h:345

Returns the package type, preferring the local package if available.


{#author-1}

author

const

std::string author() const

Defined in src/pacm/include/icy/pacm/package.h:348

Returns the package author, preferring the local package if available.


{#hasextension-1}

hasExtension

const

bool hasExtension() const

Defined in src/pacm/include/icy/pacm/package.h:351

Returns true when either side carries extension metadata.

{#remotepackage}

RemotePackage

#include <icy/pacm/package.h>
struct RemotePackage

Defined in src/pacm/include/icy/pacm/package.h:151

Inherits: Package

Package metadata loaded from the remote package index.

List of all members

NameKindOwner
RemotePackagefunctionDeclared here
RemotePackagefunctionDeclared here
assetsfunctionDeclared here
latestAssetfunctionDeclared here
assetVersionfunctionDeclared here
latestSDKAssetfunctionDeclared here
PackagefunctionInherited from Package
PackagefunctionInherited from Package
idfunctionInherited from Package
namefunctionInherited from Package
typefunctionInherited from Package
authorfunctionInherited from Package
descriptionfunctionInherited from Package
hasExtensionfunctionInherited from Package
extensionfunctionInherited from Package
validfunctionInherited from Package
toJsonfunctionInherited from Package
printfunctionInherited from Package

Inherited from Package

KindNameDescription
functionPackageConstructs an empty package.
functionPackageConstructs a package from an existing JSON value.
functionid virtual constReturns the package unique identifier.
functionname virtual constReturns the package display name.
functiontype virtual constReturns the package type (e.g. "plugin", "asset").
functionauthor virtual constReturns the package author string.
functiondescription virtual constReturns the package description string.
functionhasExtension virtual constReturns true when the package has an "extension" object.
functionextension virtual constReturns a read-only view of the extension metadata. Throws if no extension object is present.
functionvalid virtual constReturns true if id, name and type are all non-empty.
functiontoJson virtual const nodiscardReturns a plain JSON copy of this package object.
functionprint virtual constDumps the JSON representation of this package to ost.

Public Methods

ReturnNameDescription
RemotePackageConstructs an empty remote package.
RemotePackageConstructs a remote package from an existing JSON value.
json::Value &assets virtualReturns a reference to the "assets" JSON array node.
AssetlatestAsset virtualReturns the latest asset for this package. For local packages this is the currently installed version. For remote packages this is the latest available version. Throws an exception if no asset exists.
AssetassetVersion virtualReturns the latest asset for the given package version. Throws an exception if no asset exists.
AssetlatestSDKAsset virtualReturns the latest asset for the given SDK version. This method is for safely installing plug-ins which must be compiled against a specific SDK version. The package JSON must have a "sdk-version" member for this function to work as intended. Throws an exception if no asset exists.

{#remotepackage-1}

RemotePackage

RemotePackage()

Defined in src/pacm/include/icy/pacm/package.h:154

Constructs an empty remote package.


{#remotepackage-2}

RemotePackage

RemotePackage(const json::Value & src)

Defined in src/pacm/include/icy/pacm/package.h:158

Constructs a remote package from an existing JSON value.

Parameters

  • src JSON object containing remote package fields.

{#assets}

assets

virtual

virtual json::Value & assets()

Defined in src/pacm/include/icy/pacm/package.h:162

Returns a reference to the "assets" JSON array node.


{#latestasset}

latestAsset

virtual

virtual Asset latestAsset()

Defined in src/pacm/include/icy/pacm/package.h:168

Returns the latest asset for this package. For local packages this is the currently installed version. For remote packages this is the latest available version. Throws an exception if no asset exists.


{#assetversion}

assetVersion

virtual

virtual Asset assetVersion(const std::string & version)

Defined in src/pacm/include/icy/pacm/package.h:172

Returns the latest asset for the given package version. Throws an exception if no asset exists.


{#latestsdkasset}

latestSDKAsset

virtual

virtual Asset latestSDKAsset(const std::string & version)

Defined in src/pacm/include/icy/pacm/package.h:180

Returns the latest asset for the given SDK version. This method is for safely installing plug-ins which must be compiled against a specific SDK version. The package JSON must have a "sdk-version" member for this function to work as intended. Throws an exception if no asset exists.