RemotePackage
RemotePackage
#include <icy/pacm/package.h>Inherits:
Package
Package metadata loaded from the remote package index.
Public Methods
| Return | Name | Description |
|---|---|---|
RemotePackage | Constructs an empty remote package. | |
RemotePackage | Constructs a remote package from an existing JSON value. | |
json::Value & | assets virtual | Returns a reference to the "assets" JSON array node. |
Asset | latestAsset virtual | 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. |
Asset | assetVersion virtual | Returns the latest asset for the given package version. Throws an exception if no asset exists. |
Asset | latestSDKAsset virtual | 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. |
RemotePackage
RemotePackage()Constructs an empty remote package.
RemotePackage
RemotePackage(const json::Value & src)Constructs a remote package from an existing JSON value.
Parameters
srcJSON object containing remote package fields.
assets
virtual
virtual json::Value & assets()Returns a reference to the "assets" JSON array node.
latestAsset
virtual
virtual Asset latestAsset()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)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)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.
