Nuclide
Software Development Kit for id Tech
|
Game and content update handler functions. More...
Classes | |
struct | updaterPackage_t |
Data holding Updater Package entries. More... | |
Functions | |
void | Updates_Init (void) |
Call this in order to contact the update server and fill the list of updates. More... | |
updaterStatus_t | Updates_GetUpdaterStatus (void) |
Retrieve the status of the updater. More... | |
int | Updates_GetPackageCount (void) |
Returns the total amount of updates available for the currently running game. More... | |
__variant | Updates_GetInfo (int, updateType_t) |
Query a package (by ID) for its various info fields. More... | |
bool | Updates_Available (void) |
Returns if our current game has updates available for any installed packages. More... | |
bool | Updates_Toggle (int) |
Toggle the installation/disabling of an update. More... | |
bool | Updates_Install (int) |
Mark an update as pending installion. More... | |
bool | Updates_Remove (int) |
Mark an update as pending deletion. More... | |
bool | Updates_Destroy (int) |
Mark an update as pending uninstallation. More... | |
bool | Updates_ApplyPendingChanges (void) |
Apply all pending changes to packages. More... | |
Game and content update handler functions.
The updater is an abstraction of the engine its own package manager. Not all packages the engine offers are related to the game you're currently running. Therefore we offer our own API within Nuclide to deal with game updates.
You want to call Updates_Init() once, after which Updates_GetUpdaterStatus() should be queried to determine when the Updater is ready. That is not necessary, but it might be helpful to throw up a loading screen while that is returning UPDATER_PENDING.
Once Updates_GetUpdaterStatus() reports UPDATER_INITIALIZED, you can expect the loading to be fully done.
The function Updates_GetPackageCount() will report the total amount of update packages available for the game. These are not 'new' updates, they contain every package associated with the game that can and should be installed and kept updated.
Use Updates_GetInfo() to retrieve metadata about individual packages.
enum updateAction_t |
Return values from passing UPDATE_ACTION to Updates_GetInfo()
enum updaterStatus_t |
These are the possible return values from Updates_GetUpdaterStatus().
That way you can put up a loading screen for when the updater is still initiliazing, or be notified of when an updater is not available at all.
Enumerator | |
---|---|
UPDATER_NONE | Nuclide's updater has not been initialized. You need to call Updates_Init(). |
UPDATER_UNAVAILABLE | Nuclide's updater is unavailable. This may be due to the update server being offline. |
UPDATER_PENDING | Nuclide's updater is pending. May change to UNAVAILABLE or INITIALIZED. |
UPDATER_INITIALIZED | Nuclide's updater is initialized and may have entries. Use Updates_GetPackageCount() to query how many. |
enum updateState_t |
Return values from passing UPDATE_STATE to Updates_GetInfo()
enum updateType_t |
Different options you can pass to Updates_GetInfo() to retrieve details about a given Update entry.
bool Updates_ApplyPendingChanges | ( | void | ) |
Apply all pending changes to packages.
May return true/false if it succeeded in doing so.
bool Updates_Available | ( | void | ) |
Returns if our current game has updates available for any installed packages.
bool Updates_Destroy | ( | int | packageID | ) |
Mark an update as pending uninstallation.
May return true/false if it succeeded in marking the package.
__variant Updates_GetInfo | ( | int | packageID, |
updateType_t | fieldType | ||
) |
Query a package (by ID) for its various info fields.
See updateType_t for available options.
int Updates_GetPackageCount | ( | void | ) |
Returns the total amount of updates available for the currently running game.
updaterStatus_t Updates_GetUpdaterStatus | ( | void | ) |
Retrieve the status of the updater.
See updaterStatus_t for valid return values.
Call this in order to contact the update server and fill the list of updates.
bool Updates_Install | ( | int | packageID | ) |
Mark an update as pending installion.
May return true/false if it succeeded in marking the package.
bool Updates_Remove | ( | int | packageID | ) |
Mark an update as pending deletion.
May return true/false if it succeeded in marking the package.
bool Updates_Toggle | ( | int | packageID | ) |
Toggle the installation/disabling of an update.
May return true/false if it succeeded in marking the package.