Nuclide
Software Development Kit for id Tech
|
Game and content update handler functions. More...
Go to the source code of this file.
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.
enum updateState_t |
Return values from passing UPDATE_STATE to Updates_GetInfo()
enum updateType_t |
Different types you can pass to Updates_GetInfo(...)
to learn details about a given Update entry.
Apply all pending changes to packages.
May return true/false if it succeeded in doing so.
Returns if our current game has updates available for any installed packages.
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 fields.
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.
Mark an update as pending installion.
May return true/false if it succeeded in marking the package.
Mark an update as pending deletion.
May return true/false if it succeeded in marking the package.