v1.1.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Modules Pages
Public Member Functions | List of all members
Sifteo::Metadata Class Reference

Metadata objects are special compile-time mechanisms for annotating your game's ELF binary with additional data. More...

#include <sifteo/metadata.h>

Public Member Functions

MetadatacubeRange (unsigned minCubes, unsigned maxCubes)
 Set the minimum and maximum number of supported cubes for this game. More...
 
MetadatacubeRange (unsigned count)
 The one-argument version of cubeRange sets up identical minimum and maximum cube counts. More...
 
Metadataicon (const _SYSAssetImage &i)
 Add an icon image to this game's metadata. More...
 
Metadataimage (uint16_t key, const _SYSAssetImage &i)
 Add an arbitrary image, as a _SYSMetadataImage item, with a user-specified key.
 
MetadataisDemoOf (const char *fullAppPkgID)
 Indicate that this app is a demo, providing the package ID of the "full" version of this app. More...
 
 Metadata ()
 Initialize all required system metadata. More...
 
MetadataminimumOSVersion (uint32_t version)
 Specify the minimum OS version required to run your application. More...
 
Metadatapackage (const char *pkg, const char *version)
 Add a unique machine-readable identity string to this game's metadata. More...
 
Metadatatitle (const char *str)
 Add a human-readable title string to this game's metadata.
 

Detailed Description

Metadata objects are special compile-time mechanisms for annotating your game's ELF binary with additional data.

Metadata can be added inside a function, as follows:

Metadata().title("My game");

You can chain multiple kinds of metadata into one statement:

.title("My game")
.icon(MyIconAsset);

You can also declare metadata as a global variable:

static Metadata M = Metadata()
.title("My game")
.icon(MyIconAsset);

All metadata parameters must be known at compile-time to be constant.

Constructor & Destructor Documentation

Sifteo::Metadata::Metadata ( )
inline

Initialize all required system metadata.

Other optional metadata can be added using individual methods on the Metadata class.

Member Function Documentation

Metadata& Sifteo::Metadata::cubeRange ( unsigned  minCubes,
unsigned  maxCubes 
)
inline

Set the minimum and maximum number of supported cubes for this game.

The game will be prevented from running or paused until the number of connected cubes in the system satisfies the given range.

Metadata& Sifteo::Metadata::cubeRange ( unsigned  count)
inline

The one-argument version of cubeRange sets up identical minimum and maximum cube counts.

The game will be prevented from running or paused until at least the specific count of cubes are connected to the system.

See also
System::setCubeRange()
Metadata& Sifteo::Metadata::icon ( const _SYSAssetImage &  i)
inline

Add an icon image to this game's metadata.

The image needs to be 96x96 pixels, and it should reside in a separate AssetGroup.

Metadata& Sifteo::Metadata::isDemoOf ( const char *  fullAppPkgID)
inline

Indicate that this app is a demo, providing the package ID of the "full" version of this app.

This may result in the launcher or Sifteo Sync representing this app differently than a full app. They might encourage the user to upgrade to the full app, for instance.

See also
package() specifies the format of the String to be used.
Metadata& Sifteo::Metadata::minimumOSVersion ( uint32_t  version)
inline

Specify the minimum OS version required to run your application.

If the version installed on a user's base is earlier than this version, the user will be prompted to update their unit's firmware before the application can be installed.

See also
System::osVersion()
Metadata& Sifteo::Metadata::package ( const char *  pkg,
const char *  version 
)
inline

Add a unique machine-readable identity string to this game's metadata.

Packages must be reverse DNS style strings. For example, a game named "Master Widget Crafter" by Sifteo may have the package string "com.sifteo.masterwidget".

Version strings may be in a game-specific format. The game installer will compare version strings by splitting them on any period, and comparing numeric segments numerically and non-numeric segments lexicographically.


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