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
37typedef enum
38{
54
56typedef enum
57{
64
66typedef enum
67{
76
80typedef enum
81{
87
89typedef struct
90{
91 string name;
92 string category;
93 string title;
94 string version;
96 string license;
97 string author;
98 string website;
99 string installed;
102 int size;
103 int uid;
107
109void Updates_Init(void);
115__variant Updates_GetInfo(int, updateType_t);
117bool Updates_Available(void);
119bool Updates_Toggle(int);
121bool Updates_Install(int);
123bool Updates_Remove(int);
125bool Updates_Destroy(int);
128 // 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:67
updateState_t
Return values from passing UPDATE_STATE to Updates_GetInfo()
Definition: updates.h:57
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:38
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:81
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:68
@ UPDATEACTION_UNINSTALL
Update marked for removal.
Definition: updates.h:71
@ UPDATEACTION_RETAIN
Update has been marked as being retained.
Definition: updates.h:74
@ UPDATEACTION_DISABLE
Update has been marked for disabling.
Definition: updates.h:73
@ UPDATEACTION_REINSTALL
Update marked as needing re-installation.
Definition: updates.h:70
@ UPDATEACTION_INSTALL
Update marked for installation.
Definition: updates.h:69
@ UPDATEACTION_AUTOINSTALL
Update marked as needing to be installed, due to a dependency.
Definition: updates.h:72
@ UPDATESTATE_NONE
Update is not installed, or unavailable.
Definition: updates.h:58
@ UPDATESTATE_ENABLED
Update is installed and enabled.
Definition: updates.h:60
@ UPDATESTATE_DISABLED
Update is installed, but disabled.
Definition: updates.h:59
@ UPDATESTATE_PENDING
Update is pending a change.
Definition: updates.h:62
@ UPDATESTATE_CORRUPT
Update on disk is corrupted.
Definition: updates.h:61
@ UPDATE_TITLE
(string) name of the package, for showing the user.
Definition: updates.h:41
@ UPDATE_FILESIZE
(int) size to download in bytes.
Definition: updates.h:49
@ UPDATE_DLPERCENTAGE
(float) Download progress in percent (0-100).
Definition: updates.h:52
@ UPDATE_LICENSE
(string) what license its distributed under
Definition: updates.h:44
@ UPDATE_STATE
(updateState_t) The current state of the update.
Definition: updates.h:47
@ UPDATE_AUTHOR
(string) name of the person(s) who created it
Definition: updates.h:45
@ UPDATE_VERSION
(string) version info (may have multiple with the same name but different versions)
Definition: updates.h:42
@ UPDATE_WEBSITE
(string) where to contribute/find out more info/etc
Definition: updates.h:46
@ UPDATE_DESCRIPTION
(string) some blurb
Definition: updates.h:43
@ UPDATE_NAME
(string) name of the package, for use with the pkg command.
Definition: updates.h:39
@ UPDATE_ACTION
(updateAction_t) Pending action of the update.
Definition: updates.h:48
@ UPDATE_CATEGORY
(string) category text
Definition: updates.h:40
@ UPDATE_PREVIEWIMAGE
(string) Path to a preview image in 4:3 aspect ratio.
Definition: updates.h:50
@ UPDATE_STATUSSTRING
(string) Localizable string that gives you the update status.
Definition: updates.h:51
@ UPDATER_INITIALIZED
Nuclide's updater is initialized and may have entries.
Definition: updates.h:85
@ UPDATER_NONE
Nuclide's updater has not been initialized.
Definition: updates.h:82
@ UPDATER_UNAVAILABLE
Nuclide's updater is unavailable.
Definition: updates.h:83
@ UPDATER_PENDING
Nuclide's updater is pending.
Definition: updates.h:84
Data holding Updater Package entries.
Definition: updates.h:90
int uid
Definition: updates.h:103
string title
Definition: updates.h:93
string name
Definition: updates.h:91
float dlpercentage
Definition: updates.h:105
int size
Definition: updates.h:102
string installed
Definition: updates.h:99
string preview_image
Definition: updates.h:104
string license
Definition: updates.h:96
string website
Definition: updates.h:98
updateAction_t pending_action
Definition: updates.h:101
string description
Definition: updates.h:95
string author
Definition: updates.h:97
string category
Definition: updates.h:92
updateState_t state
Definition: updates.h:100
string version
Definition: updates.h:94