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