Nuclide
Software Development Kit for id Tech
updates.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2016-2023 Vera Visions LLC.
3 *
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
13 * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
14 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15*/
16
34typedef enum
35{
51
53typedef enum
54{
61
63typedef enum
64{
73
77typedef enum
78{
84
86void Updates_Init(void);
94bool Updates_Available(void);
96bool Updates_Toggle(int);
98bool Updates_Install(int);
100bool Updates_Remove(int);
102bool Updates_Destroy(int);
__variant(float table, string name, optional __variant deflt, optional float requiretype, optional float index) hash_get
bool Updates_Destroy(int)
Mark an update as pending uninstallation.
Definition: updates.qc:376
void Updates_Init(void)
Call this in order to contact the update server and fill the list of updates.
Definition: updates.qc:46
__variant Updates_GetInfo(int, updateType_t)
Query a package (by ID) for its various info fields.
Definition: updates.qc:215
updateAction_t
Return values from passing UPDATE_ACTION to Updates_GetInfo()
Definition: updates.h:64
@ UPDATEACTION_NONE
Update is not marked for any change.
Definition: updates.h:65
@ UPDATEACTION_UNINSTALL
Update marked for removal.
Definition: updates.h:68
@ UPDATEACTION_RETAIN
Update has been marked as being retained.
Definition: updates.h:71
@ UPDATEACTION_DISABLE
Update has been marked for disabling.
Definition: updates.h:70
@ UPDATEACTION_REINSTALL
Update marked as needing re-installation.
Definition: updates.h:67
@ UPDATEACTION_INSTALL
Update marked for installation.
Definition: updates.h:66
@ UPDATEACTION_AUTOINSTALL
Update marked as needing to be installed, due to a dependency.
Definition: updates.h:69
updateState_t
Return values from passing UPDATE_STATE to Updates_GetInfo()
Definition: updates.h:54
@ UPDATESTATE_NONE
Update is not installed, or unavailable.
Definition: updates.h:55
@ UPDATESTATE_ENABLED
Update is installed and enabled.
Definition: updates.h:57
@ UPDATESTATE_DISABLED
Update is installed, but disabled.
Definition: updates.h:56
@ UPDATESTATE_PENDING
Update is pending a change.
Definition: updates.h:59
@ UPDATESTATE_CORRUPT
Update on disk is corrupted.
Definition: updates.h:58
bool Updates_Remove(int)
Mark an update as pending deletion.
Definition: updates.qc:362
bool Updates_Install(int)
Mark an update as pending installion.
Definition: updates.qc:348
updaterStatus_t Updates_GetUpdaterStatus(void)
Retrieve the status of the updater.
Definition: updates.qc:65
updateType_t
Different types you can pass to Updates_GetInfo(...) to learn details about a given Update entry.
Definition: updates.h:35
@ UPDATE_TITLE
(string) name of the package, for showing the user.
Definition: updates.h:38
@ UPDATE_FILESIZE
(int) size to download in bytes.
Definition: updates.h:46
@ UPDATE_DLPERCENTAGE
(float) Download progress in percent (0-100).
Definition: updates.h:49
@ UPDATE_LICENSE
(string) what license its distributed under
Definition: updates.h:41
@ UPDATE_STATE
(updateState_t) The current state of the update.
Definition: updates.h:44
@ UPDATE_AUTHOR
(string) name of the person(s) who created it
Definition: updates.h:42
@ UPDATE_VERSION
(string) version info (may have multiple with the same name but different versions)
Definition: updates.h:39
@ UPDATE_WEBSITE
(string) where to contribute/find out more info/etc
Definition: updates.h:43
@ UPDATE_DESCRIPTION
(string) some blurb
Definition: updates.h:40
@ UPDATE_NAME
(string) name of the package, for use with the pkg command.
Definition: updates.h:36
@ UPDATE_ACTION
(updateAction_t) Pending action of the update.
Definition: updates.h:45
@ UPDATE_CATEGORY
(string) category text
Definition: updates.h:37
@ UPDATE_PREVIEWIMAGE
(string) Path to a preview image in 4:3 aspect ratio.
Definition: updates.h:47
@ UPDATE_STATUSSTRING
(string) Localizable string that gives you the update status.
Definition: updates.h:48
bool Updates_ApplyPendingChanges(void)
Apply all pending changes to packages.
Definition: updates.qc:390
bool Updates_Toggle(int)
Toggle the installation/disabling of an update.
Definition: updates.qc:318
updaterStatus_t
These are the possible return values from Updates_GetUpdaterStatus().
Definition: updates.h:78
@ UPDATER_INITIALIZED
Nuclide's updater is initialized and may have entries.
Definition: updates.h:82
@ UPDATER_NONE
Nuclide's updater has not been initialized.
Definition: updates.h:79
@ UPDATER_UNAVAILABLE
Nuclide's updater is unavailable.
Definition: updates.h:80
@ UPDATER_PENDING
Nuclide's updater is pending.
Definition: updates.h:81
bool Updates_Available(void)
Returns if our current game has updates available for any installed packages.
Definition: updates.qc:312
int Updates_GetPackageCount(void)
Returns the total amount of updates available for the currently running game.
Definition: updates.qc:71