Home
Pacm module

RemotePackage

Package metadata loaded from the remote package index.

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
~RemotePackagefunctionDeclared here
assetsfunctionDeclared here
latestAssetfunctionDeclared here
assetVersionfunctionDeclared here
latestSDKAssetfunctionDeclared here
PackagefunctionInherited from Package
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.
function~Package virtual noexcept
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 constReturns 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

RemotePackage()

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

Constructs an empty remote package.


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

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

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

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

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.