Nuclide
Software Development Kit for id Technology (BETA)
updates.h
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
36typedef enum
37{
53
55typedef enum
56{
63
65typedef enum
66{
75
79typedef enum
80{
86
88typedef struct
89{
90 string name;
91 string category;
92 string title;
93 string version;
95 string license;
96 string author;
97 string website;
98 string installed;
101 int size;
102 int uid;
106
108void Updates_Init(void);
114__variant Updates_GetInfo(int, updateType_t);
116bool Updates_Available(void);
118bool Updates_Toggle(int);
120bool Updates_Install(int);
122bool Updates_Remove(int);
124bool Updates_Destroy(int);
127 // end of updates
bool Updates_Destroy(int)
Mark an update as pending uninstallation.
Definition: updates.qc:386
void Updates_Init(void)
Call this in order to contact the update server and fill the list of updates.
Definition: updates.qc:28
__variant Updates_GetInfo(int, updateType_t)
Query a package (by ID) for its various info fields.
Definition: updates.qc:225
updateAction_t
Return values from passing UPDATE_ACTION to Updates_GetInfo()
Definition: updates.h:66
updateState_t
Return values from passing UPDATE_STATE to Updates_GetInfo()
Definition: updates.h:56
bool Updates_Remove(int)
Mark an update as pending deletion.
Definition: updates.qc:372
bool Updates_Install(int)
Mark an update as pending installion.
Definition: updates.qc:358
updaterStatus_t Updates_GetUpdaterStatus(void)
Retrieve the status of the updater.
Definition: updates.qc:53
updateType_t
Different options you can pass to Updates_GetInfo() to retrieve details about a given Update entry.
Definition: updates.h:37
bool Updates_ApplyPendingChanges(void)
Apply all pending changes to packages.
Definition: updates.qc:400
bool Updates_Toggle(int)
Toggle the installation/disabling of an update.
Definition: updates.qc:328
updaterStatus_t
These are the possible return values from Updates_GetUpdaterStatus().
Definition: updates.h:80
bool Updates_Available(void)
Returns if our current game has updates available for any installed packages.
Definition: updates.qc:322
int Updates_GetPackageCount(void)
Returns the total amount of updates available for the currently running game.
Definition: updates.qc:59
@ UPDATEACTION_NONE
Update is not marked for any change.
Definition: updates.h:67
@ UPDATEACTION_UNINSTALL
Update marked for removal.
Definition: updates.h:70
@ UPDATEACTION_RETAIN
Update has been marked as being retained.
Definition: updates.h:73
@ UPDATEACTION_DISABLE
Update has been marked for disabling.
Definition: updates.h:72
@ UPDATEACTION_REINSTALL
Update marked as needing re-installation.
Definition: updates.h:69
@ UPDATEACTION_INSTALL
Update marked for installation.
Definition: updates.h:68
@ UPDATEACTION_AUTOINSTALL
Update marked as needing to be installed, due to a dependency.
Definition: updates.h:71
@ UPDATESTATE_NONE
Update is not installed, or unavailable.
Definition: updates.h:57
@ UPDATESTATE_ENABLED
Update is installed and enabled.
Definition: updates.h:59
@ UPDATESTATE_DISABLED
Update is installed, but disabled.
Definition: updates.h:58
@ UPDATESTATE_PENDING
Update is pending a change.
Definition: updates.h:61
@ UPDATESTATE_CORRUPT
Update on disk is corrupted.
Definition: updates.h:60
@ UPDATE_TITLE
(string) name of the package, for showing the user.
Definition: updates.h:40
@ UPDATE_FILESIZE
(int) size to download in bytes.
Definition: updates.h:48
@ UPDATE_DLPERCENTAGE
(float) Download progress in percent (0-100).
Definition: updates.h:51
@ UPDATE_LICENSE
(string) what license its distributed under
Definition: updates.h:43
@ UPDATE_STATE
(updateState_t) The current state of the update.
Definition: updates.h:46
@ UPDATE_AUTHOR
(string) name of the person(s) who created it
Definition: updates.h:44
@ UPDATE_VERSION
(string) version info (may have multiple with the same name but different versions)
Definition: updates.h:41
@ UPDATE_WEBSITE
(string) where to contribute/find out more info/etc
Definition: updates.h:45
@ UPDATE_DESCRIPTION
(string) some blurb
Definition: updates.h:42
@ UPDATE_NAME
(string) name of the package, for use with the pkg command.
Definition: updates.h:38
@ UPDATE_ACTION
(updateAction_t) Pending action of the update.
Definition: updates.h:47
@ UPDATE_CATEGORY
(string) category text
Definition: updates.h:39
@ UPDATE_PREVIEWIMAGE
(string) Path to a preview image in 4:3 aspect ratio.
Definition: updates.h:49
@ UPDATE_STATUSSTRING
(string) Localizable string that gives you the update status.
Definition: updates.h:50
@ UPDATER_INITIALIZED
Nuclide's updater is initialized and may have entries.
Definition: updates.h:84
@ UPDATER_NONE
Nuclide's updater has not been initialized.
Definition: updates.h:81
@ UPDATER_UNAVAILABLE
Nuclide's updater is unavailable.
Definition: updates.h:82
@ UPDATER_PENDING
Nuclide's updater is pending.
Definition: updates.h:83
Data holding Updater Package entries.
Definition: updates.h:89
int uid
Definition: updates.h:102
string title
Definition: updates.h:92
string name
Definition: updates.h:90
float dlpercentage
Definition: updates.h:104
int size
Definition: updates.h:101
string installed
Definition: updates.h:98
string preview_image
Definition: updates.h:103
string license
Definition: updates.h:95
string website
Definition: updates.h:97
updateAction_t pending_action
Definition: updates.h:100
string description
Definition: updates.h:94
string author
Definition: updates.h:96
string category
Definition: updates.h:91
updateState_t state
Definition: updates.h:99
string version
Definition: updates.h:93