#include <icy/pacm/package.h>Archive asset metadata for a specific package build.
| Return | Name | Description |
|---|---|---|
json::Value & | root |
json::Value & root| Return | Name | Description |
|---|---|---|
Asset | #### Parameters | |
Asset | Defaulted constructor. | |
std::string | fileName virtual const | Returns the archive file name (e.g. "my-plugin-1.0.0.zip"). |
std::string | version virtual const | Returns the package version string (e.g. "1.0.0"). |
std::string | sdkVersion virtual const | Returns the SDK version this asset was built against (e.g. "2.0.0"). |
std::string | checksum virtual const | Returns the asset checksum string, or empty if none is set. |
std::string | url virtual const | Returns the download URL from the mirror list at index. |
int | fileSize virtual const | Returns the uncompressed file size in bytes, or 0 if not set. |
bool | valid virtual const | Returns true if the asset has the minimum required fields (file-name, version, mirrors). |
void | print virtual const | Writes the raw JSON of this asset to ost. |
Asset & | operator= virtual | Copies the backing JSON node from r. |
bool | operator== virtual const | Returns true if file name, version and checksum all match r. |
Asset(json::Value & src)src JSON object node that backs this asset.Asset(const Asset &) = defaultDefaulted constructor.
virtual const
virtual std::string fileName() constReturns the archive file name (e.g. "my-plugin-1.0.0.zip").
virtual const
virtual std::string version() constReturns the package version string (e.g. "1.0.0").
virtual const
virtual std::string sdkVersion() constReturns the SDK version this asset was built against (e.g. "2.0.0").
virtual const
virtual std::string checksum() constReturns the asset checksum string, or empty if none is set.
virtual const
virtual std::string url(int index) constReturns the download URL from the mirror list at index.
index Zero-based index into the mirrors array.virtual const
virtual int fileSize() constReturns the uncompressed file size in bytes, or 0 if not set.
virtual const
virtual bool valid() constReturns true if the asset has the minimum required fields (file-name, version, mirrors).
virtual const
virtual void print(std::ostream & ost) constWrites the raw JSON of this asset to ost.
ost Output stream.virtual
virtual Asset & operator=(const Asset & r)Copies the backing JSON node from r.
r Source asset to copy from.virtual const
virtual bool operator==(const Asset & r) constReturns true if file name, version and checksum all match r.