@girs/packagekitplugin-1.0 1.0.0-3.2.6 → 1.0.0-3.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +15 -9
- package/packagekitplugin-1.0-ambient.js +2 -0
- package/packagekitplugin-1.0-import.js +3 -0
- package/packagekitplugin-1.0.d.cts +47 -47
- package/packagekitplugin-1.0.d.ts +47 -47
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|

|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
GJS TypeScript type definitions for PackageKitPlugin-1.0, generated from library version 1.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.
|
|
8
|
+
GJS TypeScript type definitions for PackageKitPlugin-1.0, generated from library version 1.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.8.
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
## Install
|
package/package.json
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/packagekitplugin-1.0",
|
|
3
|
-
"version": "1.0.0-3.2.
|
|
3
|
+
"version": "1.0.0-3.2.8",
|
|
4
4
|
"description": "GJS TypeScript type definitions for PackageKitPlugin-1.0, generated from library version 1.0.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "packagekitplugin-1.0.js",
|
|
7
7
|
"main": "packagekitplugin-1.0.js",
|
|
8
8
|
"exports": {
|
|
9
|
-
"./ambient":
|
|
10
|
-
|
|
9
|
+
"./ambient": {
|
|
10
|
+
"types": "./packagekitplugin-1.0-ambient.d.ts",
|
|
11
|
+
"default": "./packagekitplugin-1.0-ambient.js"
|
|
12
|
+
},
|
|
13
|
+
"./import": {
|
|
14
|
+
"types": "./packagekitplugin-1.0-import.d.ts",
|
|
15
|
+
"default": "./packagekitplugin-1.0-import.js"
|
|
16
|
+
},
|
|
11
17
|
".": {
|
|
12
18
|
"import": {
|
|
13
19
|
"types": "./packagekitplugin-1.0.d.ts",
|
|
@@ -25,11 +31,11 @@
|
|
|
25
31
|
"test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit packagekitplugin-1.0.d.cts"
|
|
26
32
|
},
|
|
27
33
|
"dependencies": {
|
|
28
|
-
"@girs/gio-2.0": "^2.
|
|
29
|
-
"@girs/gjs": "^3.2.
|
|
30
|
-
"@girs/glib-2.0": "^2.
|
|
31
|
-
"@girs/gobject-2.0": "^2.
|
|
32
|
-
"@girs/packagekitglib-1.0": "^1.2.7-3.2.
|
|
34
|
+
"@girs/gio-2.0": "^2.77.0-3.2.8",
|
|
35
|
+
"@girs/gjs": "^3.2.8",
|
|
36
|
+
"@girs/glib-2.0": "^2.77.0-3.2.8",
|
|
37
|
+
"@girs/gobject-2.0": "^2.77.0-3.2.8",
|
|
38
|
+
"@girs/packagekitglib-1.0": "^1.2.7-3.2.8"
|
|
33
39
|
},
|
|
34
40
|
"devDependencies": {
|
|
35
41
|
"typescript": "*"
|
|
@@ -46,7 +52,7 @@
|
|
|
46
52
|
"license": "MIT",
|
|
47
53
|
"repository": {
|
|
48
54
|
"type": "git",
|
|
49
|
-
"url": "git+https://github.com/gjsify/
|
|
55
|
+
"url": "git+https://github.com/gjsify/ts-for-gir.git"
|
|
50
56
|
},
|
|
51
57
|
"bugs": {
|
|
52
58
|
"url": "https://github.com/gjsify/ts-for-gir/issues"
|
|
@@ -78,12 +78,12 @@ export const TRANSACTION_NO_BACKEND_SIGNALS: number
|
|
|
78
78
|
* Does not remove the directory itself, only the contents.
|
|
79
79
|
* @param directory
|
|
80
80
|
*/
|
|
81
|
-
export function directory_remove_contents(directory: string
|
|
81
|
+
export function directory_remove_contents(directory: string): boolean
|
|
82
82
|
export function get_resource(): Gio.Resource
|
|
83
|
-
export function hint_enum_from_string(hint: string
|
|
84
|
-
export function hint_enum_to_string(hint: HintEnum): string
|
|
85
|
-
export function load_introspection(filename: string
|
|
86
|
-
export function plugin_get_description(): string
|
|
83
|
+
export function hint_enum_from_string(hint: string): HintEnum
|
|
84
|
+
export function hint_enum_to_string(hint: HintEnum): string
|
|
85
|
+
export function load_introspection(filename: string): Gio.DBusNodeInfo
|
|
86
|
+
export function plugin_get_description(): string
|
|
87
87
|
/**
|
|
88
88
|
* This function is a much safer way of doing strlen as it checks for NULL and
|
|
89
89
|
* a stupidly long string.
|
|
@@ -91,28 +91,28 @@ export function plugin_get_description(): string | null
|
|
|
91
91
|
* @param len The maximum length of the string
|
|
92
92
|
* @returns the length of the string, or len if the string is too long.
|
|
93
93
|
*/
|
|
94
|
-
export function strlen(text: string
|
|
94
|
+
export function strlen(text: string, len: number): number
|
|
95
95
|
/**
|
|
96
96
|
* Converts a string into a signed integer value in a safe way.
|
|
97
97
|
* @param text The text the convert
|
|
98
98
|
* @param value The return numeric return value
|
|
99
99
|
* @returns %TRUE if the string was converted correctly
|
|
100
100
|
*/
|
|
101
|
-
export function strtoint(text: string
|
|
101
|
+
export function strtoint(text: string, value: number): boolean
|
|
102
102
|
/**
|
|
103
103
|
* Converts a string into a unsigned integer value in a safe way.
|
|
104
104
|
* @param text The text the convert
|
|
105
105
|
* @param value The return numeric return value
|
|
106
106
|
* @returns %TRUE if the string was converted correctly
|
|
107
107
|
*/
|
|
108
|
-
export function strtouint(text: string
|
|
108
|
+
export function strtouint(text: string, value: number): boolean
|
|
109
109
|
/**
|
|
110
110
|
* Converts a string into a unsigned integer value in a safe way.
|
|
111
111
|
* @param text The text the convert
|
|
112
112
|
* @param value The return numeric return value
|
|
113
113
|
* @returns %TRUE if the string was converted correctly
|
|
114
114
|
*/
|
|
115
|
-
export function strtouint64(text: string
|
|
115
|
+
export function strtouint64(text: string, value: number): boolean
|
|
116
116
|
/**
|
|
117
117
|
* This function is a much safer way of doing "if (strlen (text) == 0))"
|
|
118
118
|
* as it does not rely on text being NULL terminated. It's also much
|
|
@@ -121,7 +121,7 @@ export function strtouint64(text: string | null, value: number): boolean
|
|
|
121
121
|
* @param text The text to check
|
|
122
122
|
* @returns %TRUE if the string was converted correctly
|
|
123
123
|
*/
|
|
124
|
-
export function strzero(text: string
|
|
124
|
+
export function strzero(text: string): boolean
|
|
125
125
|
export interface BackendFileChanged {
|
|
126
126
|
(backend: Backend, data: any): void
|
|
127
127
|
}
|
|
@@ -135,10 +135,10 @@ export interface PluginFunc {
|
|
|
135
135
|
(plugin: Plugin): void
|
|
136
136
|
}
|
|
137
137
|
export interface PluginGetActionFunc {
|
|
138
|
-
(plugin: Plugin, transaction: Transaction, action_id: string
|
|
138
|
+
(plugin: Plugin, transaction: Transaction, action_id: string): string
|
|
139
139
|
}
|
|
140
140
|
export interface PluginGetDescFunc {
|
|
141
|
-
(): string
|
|
141
|
+
(): string
|
|
142
142
|
}
|
|
143
143
|
export interface PluginTransactionFunc {
|
|
144
144
|
(plugin: Plugin, transaction: Transaction): void
|
|
@@ -161,15 +161,15 @@ export interface Backend {
|
|
|
161
161
|
|
|
162
162
|
// Owm methods of PackageKitPlugin-1.0.PackageKitPlugin.Backend
|
|
163
163
|
|
|
164
|
-
accept_eula(eula_id: string
|
|
164
|
+
accept_eula(eula_id: string): void
|
|
165
165
|
cancel(job: BackendJob): void
|
|
166
166
|
depends_on(job: BackendJob, filters: PackageKitGlib.Bitfield, package_ids: string | null, recursive: boolean): void
|
|
167
167
|
destroy(): void
|
|
168
|
-
download_packages(job: BackendJob, package_ids: string | null, directory: string
|
|
168
|
+
download_packages(job: BackendJob, package_ids: string | null, directory: string): void
|
|
169
169
|
get_accepted_eula_string(): string | null
|
|
170
|
-
get_author(): string
|
|
170
|
+
get_author(): string
|
|
171
171
|
get_categories(job: BackendJob): void
|
|
172
|
-
get_description(): string
|
|
172
|
+
get_description(): string
|
|
173
173
|
get_details(job: BackendJob, package_ids: string | null): void
|
|
174
174
|
get_details_local(job: BackendJob, files: string | null): void
|
|
175
175
|
get_distro_upgrades(job: BackendJob): void
|
|
@@ -178,7 +178,7 @@ export interface Backend {
|
|
|
178
178
|
get_filters(): PackageKitGlib.Bitfield
|
|
179
179
|
get_groups(): PackageKitGlib.Bitfield
|
|
180
180
|
get_mime_types(): string[]
|
|
181
|
-
get_name(): string
|
|
181
|
+
get_name(): string
|
|
182
182
|
get_packages(job: BackendJob, filters: PackageKitGlib.Bitfield): void
|
|
183
183
|
get_repo_list(job: BackendJob, filters: PackageKitGlib.Bitfield): void
|
|
184
184
|
get_roles(): PackageKitGlib.Bitfield
|
|
@@ -187,8 +187,8 @@ export interface Backend {
|
|
|
187
187
|
implement(role: PackageKitGlib.RoleEnum): void
|
|
188
188
|
install_files(job: BackendJob, transaction_flags: PackageKitGlib.Bitfield, full_paths: string | null): void
|
|
189
189
|
install_packages(job: BackendJob, transaction_flags: PackageKitGlib.Bitfield, package_ids: string | null): void
|
|
190
|
-
install_signature(job: BackendJob, type: PackageKitGlib.SigTypeEnum, key_id: string
|
|
191
|
-
is_eula_valid(eula_id: string
|
|
190
|
+
install_signature(job: BackendJob, type: PackageKitGlib.SigTypeEnum, key_id: string, package_id: string): void
|
|
191
|
+
is_eula_valid(eula_id: string): boolean
|
|
192
192
|
is_implemented(role: PackageKitGlib.RoleEnum): boolean
|
|
193
193
|
is_online(): boolean
|
|
194
194
|
/**
|
|
@@ -203,10 +203,10 @@ export interface Backend {
|
|
|
203
203
|
refresh_cache(job: BackendJob, force: boolean): void
|
|
204
204
|
remove_packages(job: BackendJob, transaction_flags: PackageKitGlib.Bitfield, package_ids: string | null, allow_deps: boolean, autoremove: boolean): void
|
|
205
205
|
repair_system(job: BackendJob, transaction_flags: PackageKitGlib.Bitfield): void
|
|
206
|
-
repo_enable(job: BackendJob, repo_id: string
|
|
206
|
+
repo_enable(job: BackendJob, repo_id: string, enabled: boolean): void
|
|
207
207
|
repo_list_changed(): boolean
|
|
208
|
-
repo_remove(job: BackendJob, transaction_flags: PackageKitGlib.Bitfield, repo_id: string
|
|
209
|
-
repo_set_data(job: BackendJob, repo_id: string
|
|
208
|
+
repo_remove(job: BackendJob, transaction_flags: PackageKitGlib.Bitfield, repo_id: string, autoremove: boolean): void
|
|
209
|
+
repo_set_data(job: BackendJob, repo_id: string, parameter: string, value: string): void
|
|
210
210
|
required_by(job: BackendJob, filters: PackageKitGlib.Bitfield, package_ids: string | null, recursive: boolean): void
|
|
211
211
|
reset_job(job: BackendJob): void
|
|
212
212
|
resolve(job: BackendJob, filters: PackageKitGlib.Bitfield, packages: string | null): void
|
|
@@ -268,7 +268,7 @@ export interface Backend {
|
|
|
268
268
|
*/
|
|
269
269
|
unload(): boolean
|
|
270
270
|
update_packages(job: BackendJob, transaction_flags: PackageKitGlib.Bitfield, package_ids: string | null): void
|
|
271
|
-
watch_file(filename: string
|
|
271
|
+
watch_file(filename: string, func: BackendFileChanged): boolean
|
|
272
272
|
what_provides(job: BackendJob, filters: PackageKitGlib.Bitfield, search: string | null): void
|
|
273
273
|
|
|
274
274
|
// Class property signals of PackageKitPlugin-1.0.PackageKitPlugin.Backend
|
|
@@ -292,7 +292,7 @@ export class Backend extends GObject.Object {
|
|
|
292
292
|
constructor(conf: GLib.KeyFile)
|
|
293
293
|
static new(conf: GLib.KeyFile): Backend
|
|
294
294
|
_init(config?: Backend.ConstructorProperties): void
|
|
295
|
-
static bool_to_string(value: boolean): string
|
|
295
|
+
static bool_to_string(value: boolean): string
|
|
296
296
|
static initialize(conf: GLib.KeyFile, backend: Backend): void
|
|
297
297
|
}
|
|
298
298
|
|
|
@@ -314,16 +314,16 @@ export interface BackendJob {
|
|
|
314
314
|
|
|
315
315
|
// Owm methods of PackageKitPlugin-1.0.PackageKitPlugin.BackendJob
|
|
316
316
|
|
|
317
|
-
category(parent_id: string
|
|
318
|
-
details(package_id: string
|
|
319
|
-
distro_upgrade(type: PackageKitGlib.DistroUpgradeEnum, name: string
|
|
320
|
-
eula_required(eula_id: string
|
|
317
|
+
category(parent_id: string, cat_id: string, name: string, summary: string, icon: string): void
|
|
318
|
+
details(package_id: string, summary: string, license: string, group: PackageKitGlib.GroupEnum, description: string, url: string, size: number): void
|
|
319
|
+
distro_upgrade(type: PackageKitGlib.DistroUpgradeEnum, name: string, summary: string): void
|
|
320
|
+
eula_required(eula_id: string, package_id: string, vendor_name: string, license_agreement: string): void
|
|
321
321
|
/**
|
|
322
322
|
* package_id is NULL when we are using this as a calback from DownloadPackages
|
|
323
323
|
* @param package_id
|
|
324
324
|
* @param files
|
|
325
325
|
*/
|
|
326
|
-
files(package_id: string
|
|
326
|
+
files(package_id: string, files: string | null): void
|
|
327
327
|
finished(): void
|
|
328
328
|
get_allow_cancel(): boolean
|
|
329
329
|
get_backend(): any
|
|
@@ -333,7 +333,7 @@ export interface BackendJob {
|
|
|
333
333
|
* @returns the cache age in seconds, or 0 for unset or %G_MAXUINT for 'infinity'
|
|
334
334
|
*/
|
|
335
335
|
get_cache_age(): number
|
|
336
|
-
get_cmdline(): string
|
|
336
|
+
get_cmdline(): string
|
|
337
337
|
get_exit_code(): PackageKitGlib.ExitEnum
|
|
338
338
|
get_frontend_socket(): string | null
|
|
339
339
|
get_interactive(): HintEnum
|
|
@@ -356,28 +356,28 @@ export interface BackendJob {
|
|
|
356
356
|
get_user_data(): any
|
|
357
357
|
get_vfunc_enabled(signal_kind: BackendJobSignal): boolean
|
|
358
358
|
has_set_error_code(): boolean
|
|
359
|
-
media_change_required(media_type: PackageKitGlib.MediaTypeEnum, media_id: string
|
|
360
|
-
not_implemented_yet(method: string
|
|
361
|
-
package(info: PackageKitGlib.InfoEnum, package_id: string
|
|
362
|
-
repo_detail(repo_id: string
|
|
363
|
-
repo_signature_required(package_id: string
|
|
364
|
-
require_restart(restart: PackageKitGlib.RestartEnum, package_id: string
|
|
359
|
+
media_change_required(media_type: PackageKitGlib.MediaTypeEnum, media_id: string, media_text: string): void
|
|
360
|
+
not_implemented_yet(method: string): void
|
|
361
|
+
package(info: PackageKitGlib.InfoEnum, package_id: string, summary: string): void
|
|
362
|
+
repo_detail(repo_id: string, description: string, enabled: boolean): void
|
|
363
|
+
repo_signature_required(package_id: string, repository_name: string, key_url: string, key_userid: string, key_id: string, key_fingerprint: string, key_timestamp: string, type: PackageKitGlib.SigTypeEnum): void
|
|
364
|
+
require_restart(restart: PackageKitGlib.RestartEnum, package_id: string): void
|
|
365
365
|
reset(): void
|
|
366
366
|
set_allow_cancel(allow_cancel: boolean): void
|
|
367
367
|
set_backend(backend: any): void
|
|
368
368
|
set_background(background: HintEnum): void
|
|
369
369
|
set_cache_age(cache_age: number): void
|
|
370
|
-
set_cmdline(cmdline: string
|
|
370
|
+
set_cmdline(cmdline: string): void
|
|
371
371
|
set_download_size_remaining(download_size_remaining: number): void
|
|
372
372
|
/**
|
|
373
373
|
* Should only be used internally, or from PkRunner when setting CANCELLED.
|
|
374
374
|
* @param exit
|
|
375
375
|
*/
|
|
376
376
|
set_exit_code(exit: PackageKitGlib.ExitEnum): void
|
|
377
|
-
set_frontend_socket(frontend_socket: string
|
|
377
|
+
set_frontend_socket(frontend_socket: string): void
|
|
378
378
|
set_interactive(interactive: HintEnum): void
|
|
379
|
-
set_item_progress(package_id: string
|
|
380
|
-
set_locale(code: string
|
|
379
|
+
set_item_progress(package_id: string, status: PackageKitGlib.StatusEnum, percentage: number): void
|
|
380
|
+
set_locale(code: string): void
|
|
381
381
|
/**
|
|
382
382
|
* Set if your backend job currently locks the cache, so no other tool will
|
|
383
383
|
* have write access on it. (read-only transactions will still be permitted)
|
|
@@ -386,7 +386,7 @@ export interface BackendJob {
|
|
|
386
386
|
set_locked(locked: boolean): void
|
|
387
387
|
set_parameters(params: GLib.Variant): void
|
|
388
388
|
set_percentage(percentage: number): void
|
|
389
|
-
set_proxy(proxy_http: string
|
|
389
|
+
set_proxy(proxy_http: string, proxy_https: string, proxy_ftp: string, proxy_socks: string, no_proxy: string, pac: string): void
|
|
390
390
|
set_role(role: PackageKitGlib.RoleEnum): void
|
|
391
391
|
set_speed(speed: number): void
|
|
392
392
|
set_started(started: boolean): void
|
|
@@ -401,7 +401,7 @@ export interface BackendJob {
|
|
|
401
401
|
*/
|
|
402
402
|
set_vfunc(signal_kind: BackendJobSignal, vfunc: BackendJobVFunc): void
|
|
403
403
|
thread_create(func: BackendJobThreadFunc): boolean
|
|
404
|
-
update_detail(package_id: string
|
|
404
|
+
update_detail(package_id: string, updates: string | null, obsoletes: string | null, vendor_urls: string | null, bugzilla_urls: string | null, cve_urls: string | null, restart: PackageKitGlib.RestartEnum, update_text: string, changelog: string, state: PackageKitGlib.UpdateStateEnum, issued: string, updated: string): void
|
|
405
405
|
use_background(): boolean
|
|
406
406
|
|
|
407
407
|
// Class property signals of PackageKitPlugin-1.0.PackageKitPlugin.BackendJob
|
|
@@ -459,7 +459,7 @@ export interface Transaction {
|
|
|
459
459
|
* Designed to be used by plugins.
|
|
460
460
|
* @param mime_type
|
|
461
461
|
*/
|
|
462
|
-
add_supported_content_type(mime_type: string
|
|
462
|
+
add_supported_content_type(mime_type: string): void
|
|
463
463
|
cancel_bg(): void
|
|
464
464
|
get_backend_job(): BackendJob
|
|
465
465
|
get_conf(): GLib.KeyFile
|
|
@@ -468,7 +468,7 @@ export interface Transaction {
|
|
|
468
468
|
get_results(): PackageKitGlib.Results
|
|
469
469
|
get_role(): PackageKitGlib.RoleEnum
|
|
470
470
|
get_state(): TransactionState
|
|
471
|
-
get_tid(): string
|
|
471
|
+
get_tid(): string
|
|
472
472
|
get_transaction_flags(): PackageKitGlib.Bitfield
|
|
473
473
|
get_uid(): number
|
|
474
474
|
get_values(): string[]
|
|
@@ -537,7 +537,7 @@ export class Transaction extends GObject.Object {
|
|
|
537
537
|
static new(conf: GLib.KeyFile, introspection: Gio.DBusNodeInfo): Transaction
|
|
538
538
|
_init(config?: Transaction.ConstructorProperties): void
|
|
539
539
|
static error_quark(): GLib.Quark
|
|
540
|
-
static state_to_string(state: TransactionState): string
|
|
540
|
+
static state_to_string(state: TransactionState): string
|
|
541
541
|
}
|
|
542
542
|
|
|
543
543
|
export interface BackendClass {
|
|
@@ -604,7 +604,7 @@ export interface Plugin {
|
|
|
604
604
|
transaction_content_types(transaction: Transaction): void
|
|
605
605
|
transaction_finished_end(transaction: Transaction): void
|
|
606
606
|
transaction_finished_results(transaction: Transaction): void
|
|
607
|
-
transaction_get_action(transaction: Transaction, action_id: string
|
|
607
|
+
transaction_get_action(transaction: Transaction, action_id: string): string
|
|
608
608
|
transaction_run(transaction: Transaction): void
|
|
609
609
|
transaction_started(transaction: Transaction): void
|
|
610
610
|
}
|
|
@@ -617,7 +617,7 @@ export class Plugin {
|
|
|
617
617
|
|
|
618
618
|
// Constructors of PackageKitPlugin-1.0.PackageKitPlugin.Plugin
|
|
619
619
|
|
|
620
|
-
static get_description(): string
|
|
620
|
+
static get_description(): string
|
|
621
621
|
}
|
|
622
622
|
|
|
623
623
|
export interface PluginPrivate {
|
|
@@ -80,12 +80,12 @@ const TRANSACTION_NO_BACKEND_SIGNALS: number
|
|
|
80
80
|
* Does not remove the directory itself, only the contents.
|
|
81
81
|
* @param directory
|
|
82
82
|
*/
|
|
83
|
-
function directory_remove_contents(directory: string
|
|
83
|
+
function directory_remove_contents(directory: string): boolean
|
|
84
84
|
function get_resource(): Gio.Resource
|
|
85
|
-
function hint_enum_from_string(hint: string
|
|
86
|
-
function hint_enum_to_string(hint: HintEnum): string
|
|
87
|
-
function load_introspection(filename: string
|
|
88
|
-
function plugin_get_description(): string
|
|
85
|
+
function hint_enum_from_string(hint: string): HintEnum
|
|
86
|
+
function hint_enum_to_string(hint: HintEnum): string
|
|
87
|
+
function load_introspection(filename: string): Gio.DBusNodeInfo
|
|
88
|
+
function plugin_get_description(): string
|
|
89
89
|
/**
|
|
90
90
|
* This function is a much safer way of doing strlen as it checks for NULL and
|
|
91
91
|
* a stupidly long string.
|
|
@@ -93,28 +93,28 @@ function plugin_get_description(): string | null
|
|
|
93
93
|
* @param len The maximum length of the string
|
|
94
94
|
* @returns the length of the string, or len if the string is too long.
|
|
95
95
|
*/
|
|
96
|
-
function strlen(text: string
|
|
96
|
+
function strlen(text: string, len: number): number
|
|
97
97
|
/**
|
|
98
98
|
* Converts a string into a signed integer value in a safe way.
|
|
99
99
|
* @param text The text the convert
|
|
100
100
|
* @param value The return numeric return value
|
|
101
101
|
* @returns %TRUE if the string was converted correctly
|
|
102
102
|
*/
|
|
103
|
-
function strtoint(text: string
|
|
103
|
+
function strtoint(text: string, value: number): boolean
|
|
104
104
|
/**
|
|
105
105
|
* Converts a string into a unsigned integer value in a safe way.
|
|
106
106
|
* @param text The text the convert
|
|
107
107
|
* @param value The return numeric return value
|
|
108
108
|
* @returns %TRUE if the string was converted correctly
|
|
109
109
|
*/
|
|
110
|
-
function strtouint(text: string
|
|
110
|
+
function strtouint(text: string, value: number): boolean
|
|
111
111
|
/**
|
|
112
112
|
* Converts a string into a unsigned integer value in a safe way.
|
|
113
113
|
* @param text The text the convert
|
|
114
114
|
* @param value The return numeric return value
|
|
115
115
|
* @returns %TRUE if the string was converted correctly
|
|
116
116
|
*/
|
|
117
|
-
function strtouint64(text: string
|
|
117
|
+
function strtouint64(text: string, value: number): boolean
|
|
118
118
|
/**
|
|
119
119
|
* This function is a much safer way of doing "if (strlen (text) == 0))"
|
|
120
120
|
* as it does not rely on text being NULL terminated. It's also much
|
|
@@ -123,7 +123,7 @@ function strtouint64(text: string | null, value: number): boolean
|
|
|
123
123
|
* @param text The text to check
|
|
124
124
|
* @returns %TRUE if the string was converted correctly
|
|
125
125
|
*/
|
|
126
|
-
function strzero(text: string
|
|
126
|
+
function strzero(text: string): boolean
|
|
127
127
|
interface BackendFileChanged {
|
|
128
128
|
(backend: Backend, data: any): void
|
|
129
129
|
}
|
|
@@ -137,10 +137,10 @@ interface PluginFunc {
|
|
|
137
137
|
(plugin: Plugin): void
|
|
138
138
|
}
|
|
139
139
|
interface PluginGetActionFunc {
|
|
140
|
-
(plugin: Plugin, transaction: Transaction, action_id: string
|
|
140
|
+
(plugin: Plugin, transaction: Transaction, action_id: string): string
|
|
141
141
|
}
|
|
142
142
|
interface PluginGetDescFunc {
|
|
143
|
-
(): string
|
|
143
|
+
(): string
|
|
144
144
|
}
|
|
145
145
|
interface PluginTransactionFunc {
|
|
146
146
|
(plugin: Plugin, transaction: Transaction): void
|
|
@@ -163,15 +163,15 @@ interface Backend {
|
|
|
163
163
|
|
|
164
164
|
// Owm methods of PackageKitPlugin-1.0.PackageKitPlugin.Backend
|
|
165
165
|
|
|
166
|
-
accept_eula(eula_id: string
|
|
166
|
+
accept_eula(eula_id: string): void
|
|
167
167
|
cancel(job: BackendJob): void
|
|
168
168
|
depends_on(job: BackendJob, filters: PackageKitGlib.Bitfield, package_ids: string | null, recursive: boolean): void
|
|
169
169
|
destroy(): void
|
|
170
|
-
download_packages(job: BackendJob, package_ids: string | null, directory: string
|
|
170
|
+
download_packages(job: BackendJob, package_ids: string | null, directory: string): void
|
|
171
171
|
get_accepted_eula_string(): string | null
|
|
172
|
-
get_author(): string
|
|
172
|
+
get_author(): string
|
|
173
173
|
get_categories(job: BackendJob): void
|
|
174
|
-
get_description(): string
|
|
174
|
+
get_description(): string
|
|
175
175
|
get_details(job: BackendJob, package_ids: string | null): void
|
|
176
176
|
get_details_local(job: BackendJob, files: string | null): void
|
|
177
177
|
get_distro_upgrades(job: BackendJob): void
|
|
@@ -180,7 +180,7 @@ interface Backend {
|
|
|
180
180
|
get_filters(): PackageKitGlib.Bitfield
|
|
181
181
|
get_groups(): PackageKitGlib.Bitfield
|
|
182
182
|
get_mime_types(): string[]
|
|
183
|
-
get_name(): string
|
|
183
|
+
get_name(): string
|
|
184
184
|
get_packages(job: BackendJob, filters: PackageKitGlib.Bitfield): void
|
|
185
185
|
get_repo_list(job: BackendJob, filters: PackageKitGlib.Bitfield): void
|
|
186
186
|
get_roles(): PackageKitGlib.Bitfield
|
|
@@ -189,8 +189,8 @@ interface Backend {
|
|
|
189
189
|
implement(role: PackageKitGlib.RoleEnum): void
|
|
190
190
|
install_files(job: BackendJob, transaction_flags: PackageKitGlib.Bitfield, full_paths: string | null): void
|
|
191
191
|
install_packages(job: BackendJob, transaction_flags: PackageKitGlib.Bitfield, package_ids: string | null): void
|
|
192
|
-
install_signature(job: BackendJob, type: PackageKitGlib.SigTypeEnum, key_id: string
|
|
193
|
-
is_eula_valid(eula_id: string
|
|
192
|
+
install_signature(job: BackendJob, type: PackageKitGlib.SigTypeEnum, key_id: string, package_id: string): void
|
|
193
|
+
is_eula_valid(eula_id: string): boolean
|
|
194
194
|
is_implemented(role: PackageKitGlib.RoleEnum): boolean
|
|
195
195
|
is_online(): boolean
|
|
196
196
|
/**
|
|
@@ -205,10 +205,10 @@ interface Backend {
|
|
|
205
205
|
refresh_cache(job: BackendJob, force: boolean): void
|
|
206
206
|
remove_packages(job: BackendJob, transaction_flags: PackageKitGlib.Bitfield, package_ids: string | null, allow_deps: boolean, autoremove: boolean): void
|
|
207
207
|
repair_system(job: BackendJob, transaction_flags: PackageKitGlib.Bitfield): void
|
|
208
|
-
repo_enable(job: BackendJob, repo_id: string
|
|
208
|
+
repo_enable(job: BackendJob, repo_id: string, enabled: boolean): void
|
|
209
209
|
repo_list_changed(): boolean
|
|
210
|
-
repo_remove(job: BackendJob, transaction_flags: PackageKitGlib.Bitfield, repo_id: string
|
|
211
|
-
repo_set_data(job: BackendJob, repo_id: string
|
|
210
|
+
repo_remove(job: BackendJob, transaction_flags: PackageKitGlib.Bitfield, repo_id: string, autoremove: boolean): void
|
|
211
|
+
repo_set_data(job: BackendJob, repo_id: string, parameter: string, value: string): void
|
|
212
212
|
required_by(job: BackendJob, filters: PackageKitGlib.Bitfield, package_ids: string | null, recursive: boolean): void
|
|
213
213
|
reset_job(job: BackendJob): void
|
|
214
214
|
resolve(job: BackendJob, filters: PackageKitGlib.Bitfield, packages: string | null): void
|
|
@@ -270,7 +270,7 @@ interface Backend {
|
|
|
270
270
|
*/
|
|
271
271
|
unload(): boolean
|
|
272
272
|
update_packages(job: BackendJob, transaction_flags: PackageKitGlib.Bitfield, package_ids: string | null): void
|
|
273
|
-
watch_file(filename: string
|
|
273
|
+
watch_file(filename: string, func: BackendFileChanged): boolean
|
|
274
274
|
what_provides(job: BackendJob, filters: PackageKitGlib.Bitfield, search: string | null): void
|
|
275
275
|
|
|
276
276
|
// Class property signals of PackageKitPlugin-1.0.PackageKitPlugin.Backend
|
|
@@ -294,7 +294,7 @@ class Backend extends GObject.Object {
|
|
|
294
294
|
constructor(conf: GLib.KeyFile)
|
|
295
295
|
static new(conf: GLib.KeyFile): Backend
|
|
296
296
|
_init(config?: Backend.ConstructorProperties): void
|
|
297
|
-
static bool_to_string(value: boolean): string
|
|
297
|
+
static bool_to_string(value: boolean): string
|
|
298
298
|
static initialize(conf: GLib.KeyFile, backend: Backend): void
|
|
299
299
|
}
|
|
300
300
|
|
|
@@ -316,16 +316,16 @@ interface BackendJob {
|
|
|
316
316
|
|
|
317
317
|
// Owm methods of PackageKitPlugin-1.0.PackageKitPlugin.BackendJob
|
|
318
318
|
|
|
319
|
-
category(parent_id: string
|
|
320
|
-
details(package_id: string
|
|
321
|
-
distro_upgrade(type: PackageKitGlib.DistroUpgradeEnum, name: string
|
|
322
|
-
eula_required(eula_id: string
|
|
319
|
+
category(parent_id: string, cat_id: string, name: string, summary: string, icon: string): void
|
|
320
|
+
details(package_id: string, summary: string, license: string, group: PackageKitGlib.GroupEnum, description: string, url: string, size: number): void
|
|
321
|
+
distro_upgrade(type: PackageKitGlib.DistroUpgradeEnum, name: string, summary: string): void
|
|
322
|
+
eula_required(eula_id: string, package_id: string, vendor_name: string, license_agreement: string): void
|
|
323
323
|
/**
|
|
324
324
|
* package_id is NULL when we are using this as a calback from DownloadPackages
|
|
325
325
|
* @param package_id
|
|
326
326
|
* @param files
|
|
327
327
|
*/
|
|
328
|
-
files(package_id: string
|
|
328
|
+
files(package_id: string, files: string | null): void
|
|
329
329
|
finished(): void
|
|
330
330
|
get_allow_cancel(): boolean
|
|
331
331
|
get_backend(): any
|
|
@@ -335,7 +335,7 @@ interface BackendJob {
|
|
|
335
335
|
* @returns the cache age in seconds, or 0 for unset or %G_MAXUINT for 'infinity'
|
|
336
336
|
*/
|
|
337
337
|
get_cache_age(): number
|
|
338
|
-
get_cmdline(): string
|
|
338
|
+
get_cmdline(): string
|
|
339
339
|
get_exit_code(): PackageKitGlib.ExitEnum
|
|
340
340
|
get_frontend_socket(): string | null
|
|
341
341
|
get_interactive(): HintEnum
|
|
@@ -358,28 +358,28 @@ interface BackendJob {
|
|
|
358
358
|
get_user_data(): any
|
|
359
359
|
get_vfunc_enabled(signal_kind: BackendJobSignal): boolean
|
|
360
360
|
has_set_error_code(): boolean
|
|
361
|
-
media_change_required(media_type: PackageKitGlib.MediaTypeEnum, media_id: string
|
|
362
|
-
not_implemented_yet(method: string
|
|
363
|
-
package(info: PackageKitGlib.InfoEnum, package_id: string
|
|
364
|
-
repo_detail(repo_id: string
|
|
365
|
-
repo_signature_required(package_id: string
|
|
366
|
-
require_restart(restart: PackageKitGlib.RestartEnum, package_id: string
|
|
361
|
+
media_change_required(media_type: PackageKitGlib.MediaTypeEnum, media_id: string, media_text: string): void
|
|
362
|
+
not_implemented_yet(method: string): void
|
|
363
|
+
package(info: PackageKitGlib.InfoEnum, package_id: string, summary: string): void
|
|
364
|
+
repo_detail(repo_id: string, description: string, enabled: boolean): void
|
|
365
|
+
repo_signature_required(package_id: string, repository_name: string, key_url: string, key_userid: string, key_id: string, key_fingerprint: string, key_timestamp: string, type: PackageKitGlib.SigTypeEnum): void
|
|
366
|
+
require_restart(restart: PackageKitGlib.RestartEnum, package_id: string): void
|
|
367
367
|
reset(): void
|
|
368
368
|
set_allow_cancel(allow_cancel: boolean): void
|
|
369
369
|
set_backend(backend: any): void
|
|
370
370
|
set_background(background: HintEnum): void
|
|
371
371
|
set_cache_age(cache_age: number): void
|
|
372
|
-
set_cmdline(cmdline: string
|
|
372
|
+
set_cmdline(cmdline: string): void
|
|
373
373
|
set_download_size_remaining(download_size_remaining: number): void
|
|
374
374
|
/**
|
|
375
375
|
* Should only be used internally, or from PkRunner when setting CANCELLED.
|
|
376
376
|
* @param exit
|
|
377
377
|
*/
|
|
378
378
|
set_exit_code(exit: PackageKitGlib.ExitEnum): void
|
|
379
|
-
set_frontend_socket(frontend_socket: string
|
|
379
|
+
set_frontend_socket(frontend_socket: string): void
|
|
380
380
|
set_interactive(interactive: HintEnum): void
|
|
381
|
-
set_item_progress(package_id: string
|
|
382
|
-
set_locale(code: string
|
|
381
|
+
set_item_progress(package_id: string, status: PackageKitGlib.StatusEnum, percentage: number): void
|
|
382
|
+
set_locale(code: string): void
|
|
383
383
|
/**
|
|
384
384
|
* Set if your backend job currently locks the cache, so no other tool will
|
|
385
385
|
* have write access on it. (read-only transactions will still be permitted)
|
|
@@ -388,7 +388,7 @@ interface BackendJob {
|
|
|
388
388
|
set_locked(locked: boolean): void
|
|
389
389
|
set_parameters(params: GLib.Variant): void
|
|
390
390
|
set_percentage(percentage: number): void
|
|
391
|
-
set_proxy(proxy_http: string
|
|
391
|
+
set_proxy(proxy_http: string, proxy_https: string, proxy_ftp: string, proxy_socks: string, no_proxy: string, pac: string): void
|
|
392
392
|
set_role(role: PackageKitGlib.RoleEnum): void
|
|
393
393
|
set_speed(speed: number): void
|
|
394
394
|
set_started(started: boolean): void
|
|
@@ -403,7 +403,7 @@ interface BackendJob {
|
|
|
403
403
|
*/
|
|
404
404
|
set_vfunc(signal_kind: BackendJobSignal, vfunc: BackendJobVFunc): void
|
|
405
405
|
thread_create(func: BackendJobThreadFunc): boolean
|
|
406
|
-
update_detail(package_id: string
|
|
406
|
+
update_detail(package_id: string, updates: string | null, obsoletes: string | null, vendor_urls: string | null, bugzilla_urls: string | null, cve_urls: string | null, restart: PackageKitGlib.RestartEnum, update_text: string, changelog: string, state: PackageKitGlib.UpdateStateEnum, issued: string, updated: string): void
|
|
407
407
|
use_background(): boolean
|
|
408
408
|
|
|
409
409
|
// Class property signals of PackageKitPlugin-1.0.PackageKitPlugin.BackendJob
|
|
@@ -461,7 +461,7 @@ interface Transaction {
|
|
|
461
461
|
* Designed to be used by plugins.
|
|
462
462
|
* @param mime_type
|
|
463
463
|
*/
|
|
464
|
-
add_supported_content_type(mime_type: string
|
|
464
|
+
add_supported_content_type(mime_type: string): void
|
|
465
465
|
cancel_bg(): void
|
|
466
466
|
get_backend_job(): BackendJob
|
|
467
467
|
get_conf(): GLib.KeyFile
|
|
@@ -470,7 +470,7 @@ interface Transaction {
|
|
|
470
470
|
get_results(): PackageKitGlib.Results
|
|
471
471
|
get_role(): PackageKitGlib.RoleEnum
|
|
472
472
|
get_state(): TransactionState
|
|
473
|
-
get_tid(): string
|
|
473
|
+
get_tid(): string
|
|
474
474
|
get_transaction_flags(): PackageKitGlib.Bitfield
|
|
475
475
|
get_uid(): number
|
|
476
476
|
get_values(): string[]
|
|
@@ -539,7 +539,7 @@ class Transaction extends GObject.Object {
|
|
|
539
539
|
static new(conf: GLib.KeyFile, introspection: Gio.DBusNodeInfo): Transaction
|
|
540
540
|
_init(config?: Transaction.ConstructorProperties): void
|
|
541
541
|
static error_quark(): GLib.Quark
|
|
542
|
-
static state_to_string(state: TransactionState): string
|
|
542
|
+
static state_to_string(state: TransactionState): string
|
|
543
543
|
}
|
|
544
544
|
|
|
545
545
|
interface BackendClass {
|
|
@@ -606,7 +606,7 @@ interface Plugin {
|
|
|
606
606
|
transaction_content_types(transaction: Transaction): void
|
|
607
607
|
transaction_finished_end(transaction: Transaction): void
|
|
608
608
|
transaction_finished_results(transaction: Transaction): void
|
|
609
|
-
transaction_get_action(transaction: Transaction, action_id: string
|
|
609
|
+
transaction_get_action(transaction: Transaction, action_id: string): string
|
|
610
610
|
transaction_run(transaction: Transaction): void
|
|
611
611
|
transaction_started(transaction: Transaction): void
|
|
612
612
|
}
|
|
@@ -619,7 +619,7 @@ class Plugin {
|
|
|
619
619
|
|
|
620
620
|
// Constructors of PackageKitPlugin-1.0.PackageKitPlugin.Plugin
|
|
621
621
|
|
|
622
|
-
static get_description(): string
|
|
622
|
+
static get_description(): string
|
|
623
623
|
}
|
|
624
624
|
|
|
625
625
|
interface PluginPrivate {
|