@girs/packagekitplugin-1.0 1.0.0-3.0.0-beta.12
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 +31 -0
- package/package.json +55 -0
- package/packagekitplugin-1.0.cjs +9 -0
- package/packagekitplugin-1.0.d.cts +664 -0
- package/packagekitplugin-1.0.d.ts +669 -0
- package/packagekitplugin-1.0.js +8 -0
- package/tsconfig.doc.json +19 -0
|
@@ -0,0 +1,669 @@
|
|
|
1
|
+
|
|
2
|
+
/*
|
|
3
|
+
* Type Definitions for Gjs (https://gjs.guide/)
|
|
4
|
+
*
|
|
5
|
+
* These type definitions are automatically generated, do not edit them by hand.
|
|
6
|
+
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gjs
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* PackageKitPlugin-1.0
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import type PackageKitGlib from '@girs/packagekitglib-1.0';
|
|
13
|
+
import type Gio from '@girs/gio-2.0';
|
|
14
|
+
import type GObject from '@girs/gobject-2.0';
|
|
15
|
+
import type GLib from '@girs/glib-2.0';
|
|
16
|
+
|
|
17
|
+
export namespace PackageKitPlugin {
|
|
18
|
+
|
|
19
|
+
enum BackendJobSignal {
|
|
20
|
+
ALLOW_CANCEL,
|
|
21
|
+
DETAILS,
|
|
22
|
+
ERROR_CODE,
|
|
23
|
+
DISTRO_UPGRADE,
|
|
24
|
+
FINISHED,
|
|
25
|
+
PACKAGE,
|
|
26
|
+
ITEM_PROGRESS,
|
|
27
|
+
FILES,
|
|
28
|
+
PERCENTAGE,
|
|
29
|
+
REMAINING,
|
|
30
|
+
SPEED,
|
|
31
|
+
DOWNLOAD_SIZE_REMAINING,
|
|
32
|
+
REPO_DETAIL,
|
|
33
|
+
REPO_SIGNATURE_REQUIRED,
|
|
34
|
+
EULA_REQUIRED,
|
|
35
|
+
MEDIA_CHANGE_REQUIRED,
|
|
36
|
+
REQUIRE_RESTART,
|
|
37
|
+
STATUS_CHANGED,
|
|
38
|
+
LOCKED_CHANGED,
|
|
39
|
+
UPDATE_DETAIL,
|
|
40
|
+
CATEGORY,
|
|
41
|
+
LAST,
|
|
42
|
+
}
|
|
43
|
+
enum HintEnum {
|
|
44
|
+
FALSE,
|
|
45
|
+
TRUE,
|
|
46
|
+
UNSET,
|
|
47
|
+
INVALID,
|
|
48
|
+
LAST,
|
|
49
|
+
}
|
|
50
|
+
enum PluginPhase {
|
|
51
|
+
INIT,
|
|
52
|
+
TRANSACTION_CONTENT_TYPES,
|
|
53
|
+
TRANSACTION_RUN,
|
|
54
|
+
TRANSACTION_STARTED,
|
|
55
|
+
TRANSACTION_FINISHED_RESULTS,
|
|
56
|
+
TRANSACTION_FINISHED_END,
|
|
57
|
+
DESTROY,
|
|
58
|
+
STATE_CHANGED,
|
|
59
|
+
UNKNOWN,
|
|
60
|
+
}
|
|
61
|
+
enum TransactionState {
|
|
62
|
+
NEW,
|
|
63
|
+
WAITING_FOR_AUTH,
|
|
64
|
+
COMMITTED,
|
|
65
|
+
READY,
|
|
66
|
+
RUNNING,
|
|
67
|
+
FINISHED,
|
|
68
|
+
UNKNOWN,
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* The unknown percentage value
|
|
72
|
+
*/
|
|
73
|
+
const BACKEND_PERCENTAGE_INVALID: number
|
|
74
|
+
const TRANSACTION_ALL_BACKEND_SIGNALS: number
|
|
75
|
+
const TRANSACTION_NO_BACKEND_SIGNALS: number
|
|
76
|
+
/**
|
|
77
|
+
* Does not remove the directory itself, only the contents.
|
|
78
|
+
* @param directory
|
|
79
|
+
*/
|
|
80
|
+
function directory_remove_contents(directory: string | null): boolean
|
|
81
|
+
function get_resource(): Gio.Resource
|
|
82
|
+
function hint_enum_from_string(hint: string | null): HintEnum
|
|
83
|
+
function hint_enum_to_string(hint: HintEnum): string | null
|
|
84
|
+
function load_introspection(filename: string | null): Gio.DBusNodeInfo
|
|
85
|
+
function plugin_get_description(): string | null
|
|
86
|
+
/**
|
|
87
|
+
* This function is a much safer way of doing strlen as it checks for NULL and
|
|
88
|
+
* a stupidly long string.
|
|
89
|
+
* @param text The text to check
|
|
90
|
+
* @param len The maximum length of the string
|
|
91
|
+
* @returns the length of the string, or len if the string is too long.
|
|
92
|
+
*/
|
|
93
|
+
function strlen(text: string | null, len: number): number
|
|
94
|
+
/**
|
|
95
|
+
* Converts a string into a signed integer value in a safe way.
|
|
96
|
+
* @param text The text the convert
|
|
97
|
+
* @param value The return numeric return value
|
|
98
|
+
* @returns %TRUE if the string was converted correctly
|
|
99
|
+
*/
|
|
100
|
+
function strtoint(text: string | null, value: number): boolean
|
|
101
|
+
/**
|
|
102
|
+
* Converts a string into a unsigned integer value in a safe way.
|
|
103
|
+
* @param text The text the convert
|
|
104
|
+
* @param value The return numeric return value
|
|
105
|
+
* @returns %TRUE if the string was converted correctly
|
|
106
|
+
*/
|
|
107
|
+
function strtouint(text: string | null, value: number): boolean
|
|
108
|
+
/**
|
|
109
|
+
* Converts a string into a unsigned integer value in a safe way.
|
|
110
|
+
* @param text The text the convert
|
|
111
|
+
* @param value The return numeric return value
|
|
112
|
+
* @returns %TRUE if the string was converted correctly
|
|
113
|
+
*/
|
|
114
|
+
function strtouint64(text: string | null, value: number): boolean
|
|
115
|
+
/**
|
|
116
|
+
* This function is a much safer way of doing "if (strlen (text) == 0))"
|
|
117
|
+
* as it does not rely on text being NULL terminated. It's also much
|
|
118
|
+
* quicker as it only checks the first byte rather than scanning the whole
|
|
119
|
+
* string just to verify it's not zero length.
|
|
120
|
+
* @param text The text to check
|
|
121
|
+
* @returns %TRUE if the string was converted correctly
|
|
122
|
+
*/
|
|
123
|
+
function strzero(text: string | null): boolean
|
|
124
|
+
interface BackendFileChanged {
|
|
125
|
+
(backend: Backend, data: any): void
|
|
126
|
+
}
|
|
127
|
+
interface BackendJobThreadFunc {
|
|
128
|
+
(job: BackendJob, params: GLib.Variant): void
|
|
129
|
+
}
|
|
130
|
+
interface BackendJobVFunc {
|
|
131
|
+
(job: BackendJob, object: any): void
|
|
132
|
+
}
|
|
133
|
+
interface PluginFunc {
|
|
134
|
+
(plugin: Plugin): void
|
|
135
|
+
}
|
|
136
|
+
interface PluginGetActionFunc {
|
|
137
|
+
(plugin: Plugin, transaction: Transaction, action_id: string | null): string | null
|
|
138
|
+
}
|
|
139
|
+
interface PluginGetDescFunc {
|
|
140
|
+
(): string | null
|
|
141
|
+
}
|
|
142
|
+
interface PluginTransactionFunc {
|
|
143
|
+
(plugin: Plugin, transaction: Transaction): void
|
|
144
|
+
}
|
|
145
|
+
module Backend {
|
|
146
|
+
|
|
147
|
+
// Constructor properties interface
|
|
148
|
+
|
|
149
|
+
interface ConstructorProperties extends GObject.Object.ConstructorProperties {
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
interface Backend {
|
|
155
|
+
|
|
156
|
+
// Own fields of PackageKitPlugin-1.0.PackageKitPlugin.Backend
|
|
157
|
+
|
|
158
|
+
parent: GObject.Object
|
|
159
|
+
priv: BackendPrivate
|
|
160
|
+
|
|
161
|
+
// Owm methods of PackageKitPlugin-1.0.PackageKitPlugin.Backend
|
|
162
|
+
|
|
163
|
+
accept_eula(eula_id: string | null): void
|
|
164
|
+
cancel(job: BackendJob): void
|
|
165
|
+
depends_on(job: BackendJob, filters: PackageKitGlib.Bitfield, package_ids: string | null, recursive: boolean): void
|
|
166
|
+
destroy(): void
|
|
167
|
+
download_packages(job: BackendJob, package_ids: string | null, directory: string | null): void
|
|
168
|
+
get_accepted_eula_string(): string | null
|
|
169
|
+
get_author(): string | null
|
|
170
|
+
get_categories(job: BackendJob): void
|
|
171
|
+
get_description(): string | null
|
|
172
|
+
get_details(job: BackendJob, package_ids: string | null): void
|
|
173
|
+
get_details_local(job: BackendJob, files: string | null): void
|
|
174
|
+
get_distro_upgrades(job: BackendJob): void
|
|
175
|
+
get_files(job: BackendJob, package_ids: string | null): void
|
|
176
|
+
get_files_local(job: BackendJob, files: string | null): void
|
|
177
|
+
get_filters(): PackageKitGlib.Bitfield
|
|
178
|
+
get_groups(): PackageKitGlib.Bitfield
|
|
179
|
+
get_mime_types(): string[]
|
|
180
|
+
get_name(): string | null
|
|
181
|
+
get_packages(job: BackendJob, filters: PackageKitGlib.Bitfield): void
|
|
182
|
+
get_repo_list(job: BackendJob, filters: PackageKitGlib.Bitfield): void
|
|
183
|
+
get_roles(): PackageKitGlib.Bitfield
|
|
184
|
+
get_update_detail(job: BackendJob, package_ids: string | null): void
|
|
185
|
+
get_updates(job: BackendJob, filters: PackageKitGlib.Bitfield): void
|
|
186
|
+
implement(role: PackageKitGlib.RoleEnum): void
|
|
187
|
+
install_files(job: BackendJob, transaction_flags: PackageKitGlib.Bitfield, full_paths: string | null): void
|
|
188
|
+
install_packages(job: BackendJob, transaction_flags: PackageKitGlib.Bitfield, package_ids: string | null): void
|
|
189
|
+
install_signature(job: BackendJob, type: PackageKitGlib.SigTypeEnum, key_id: string | null, package_id: string | null): void
|
|
190
|
+
is_eula_valid(eula_id: string | null): boolean
|
|
191
|
+
is_implemented(role: PackageKitGlib.RoleEnum): boolean
|
|
192
|
+
is_online(): boolean
|
|
193
|
+
/**
|
|
194
|
+
* Responsible for initialising the external backend object.
|
|
195
|
+
*
|
|
196
|
+
* Typically this will involve taking database locks for exclusive package access.
|
|
197
|
+
* This method should only be called from the engine, unless the backend object
|
|
198
|
+
* is used in self-check code, in which case the lock and unlock will have to
|
|
199
|
+
* be done manually.
|
|
200
|
+
*/
|
|
201
|
+
load(): boolean
|
|
202
|
+
refresh_cache(job: BackendJob, force: boolean): void
|
|
203
|
+
remove_packages(job: BackendJob, transaction_flags: PackageKitGlib.Bitfield, package_ids: string | null, allow_deps: boolean, autoremove: boolean): void
|
|
204
|
+
repair_system(job: BackendJob, transaction_flags: PackageKitGlib.Bitfield): void
|
|
205
|
+
repo_enable(job: BackendJob, repo_id: string | null, enabled: boolean): void
|
|
206
|
+
repo_list_changed(): boolean
|
|
207
|
+
repo_remove(job: BackendJob, transaction_flags: PackageKitGlib.Bitfield, repo_id: string | null, autoremove: boolean): void
|
|
208
|
+
repo_set_data(job: BackendJob, repo_id: string | null, parameter: string | null, value: string | null): void
|
|
209
|
+
required_by(job: BackendJob, filters: PackageKitGlib.Bitfield, package_ids: string | null, recursive: boolean): void
|
|
210
|
+
reset_job(job: BackendJob): void
|
|
211
|
+
resolve(job: BackendJob, filters: PackageKitGlib.Bitfield, packages: string | null): void
|
|
212
|
+
search_details(job: BackendJob, filters: PackageKitGlib.Bitfield, search: string | null): void
|
|
213
|
+
search_files(job: BackendJob, filters: PackageKitGlib.Bitfield, search: string | null): void
|
|
214
|
+
search_groups(job: BackendJob, filters: PackageKitGlib.Bitfield, search: string | null): void
|
|
215
|
+
search_names(job: BackendJob, filters: PackageKitGlib.Bitfield, search: string | null): void
|
|
216
|
+
/**
|
|
217
|
+
* This is called just before the threaded transaction method, and in
|
|
218
|
+
* the newly created thread context. e.g.
|
|
219
|
+
*
|
|
220
|
+
* >>> desc->job_start(backend)
|
|
221
|
+
* (locked backend)
|
|
222
|
+
* >>> desc->backend_method_we_want_to_run(backend)
|
|
223
|
+
* <<< ::Package(PK_INFO_ENUM_INSTALLING,"hal;0.1.1;i386;fedora","Hardware Stuff")
|
|
224
|
+
* >>> desc->job_stop(backend)
|
|
225
|
+
* (unlocked backend)
|
|
226
|
+
* <<< ::Finished()
|
|
227
|
+
*
|
|
228
|
+
* or in the case of backend_method_we_want_to_run() failure:
|
|
229
|
+
* >>> desc->job_start(backend)
|
|
230
|
+
* (locked backend)
|
|
231
|
+
* >>> desc->backend_method_we_want_to_run(backend)
|
|
232
|
+
* <<< ::ErrorCode(PK_ERROR_ENUM_FAILED_TO_FIND,"no package")
|
|
233
|
+
* >>> desc->job_stop(backend)
|
|
234
|
+
* (unlocked backend)
|
|
235
|
+
* <<< ::Finished()
|
|
236
|
+
*
|
|
237
|
+
* or in the case of job_start() failure:
|
|
238
|
+
* >>> desc->job_start(backend)
|
|
239
|
+
* (failed to lock backend)
|
|
240
|
+
* <<< ::ErrorCode(PK_ERROR_ENUM_FAILED_TO_LOCK,"no pid file")
|
|
241
|
+
* >>> desc->job_stop(backend)
|
|
242
|
+
* <<< ::Finished()
|
|
243
|
+
*
|
|
244
|
+
* It is *not* called for non-threaded backends, as multiple processes
|
|
245
|
+
* would be inherently racy.
|
|
246
|
+
* @param job
|
|
247
|
+
*/
|
|
248
|
+
start_job(job: BackendJob): void
|
|
249
|
+
/**
|
|
250
|
+
* Always run for each transaction, *even* when the job_start()
|
|
251
|
+
* vfunc fails.
|
|
252
|
+
*
|
|
253
|
+
* This method has no return value as the ErrorCode should have already
|
|
254
|
+
* been set.
|
|
255
|
+
* @param job
|
|
256
|
+
*/
|
|
257
|
+
stop_job(job: BackendJob): void
|
|
258
|
+
supports_parallelization(): boolean
|
|
259
|
+
thread_start(job: BackendJob, func: any): void
|
|
260
|
+
thread_stop(job: BackendJob, func: any): void
|
|
261
|
+
/**
|
|
262
|
+
* Responsible for finalising the external backend object.
|
|
263
|
+
*
|
|
264
|
+
* Typically this will involve releasing database locks for any other access.
|
|
265
|
+
* This method should only be called from the engine, unless the backend object
|
|
266
|
+
* is used in self-check code, in which case it will have to be done manually.
|
|
267
|
+
*/
|
|
268
|
+
unload(): boolean
|
|
269
|
+
update_packages(job: BackendJob, transaction_flags: PackageKitGlib.Bitfield, package_ids: string | null): void
|
|
270
|
+
watch_file(filename: string | null, func: BackendFileChanged): boolean
|
|
271
|
+
what_provides(job: BackendJob, filters: PackageKitGlib.Bitfield, search: string | null): void
|
|
272
|
+
|
|
273
|
+
// Class property signals of PackageKitPlugin-1.0.PackageKitPlugin.Backend
|
|
274
|
+
|
|
275
|
+
connect(sigName: string, callback: (...args: any[]) => void): number
|
|
276
|
+
connect_after(sigName: string, callback: (...args: any[]) => void): number
|
|
277
|
+
emit(sigName: string, ...args: any[]): void
|
|
278
|
+
disconnect(id: number): void
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
class Backend extends GObject.Object {
|
|
282
|
+
|
|
283
|
+
// Own properties of PackageKitPlugin-1.0.PackageKitPlugin.Backend
|
|
284
|
+
|
|
285
|
+
static name: string
|
|
286
|
+
static $gtype: GObject.GType<Backend>
|
|
287
|
+
|
|
288
|
+
// Constructors of PackageKitPlugin-1.0.PackageKitPlugin.Backend
|
|
289
|
+
|
|
290
|
+
constructor(config?: Backend.ConstructorProperties)
|
|
291
|
+
constructor(conf: GLib.KeyFile)
|
|
292
|
+
static new(conf: GLib.KeyFile): Backend
|
|
293
|
+
_init(config?: Backend.ConstructorProperties): void
|
|
294
|
+
static bool_to_string(value: boolean): string | null
|
|
295
|
+
static initialize(conf: GLib.KeyFile, backend: Backend): void
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
module BackendJob {
|
|
299
|
+
|
|
300
|
+
// Constructor properties interface
|
|
301
|
+
|
|
302
|
+
interface ConstructorProperties extends GObject.Object.ConstructorProperties {
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
interface BackendJob {
|
|
308
|
+
|
|
309
|
+
// Own fields of PackageKitPlugin-1.0.PackageKitPlugin.BackendJob
|
|
310
|
+
|
|
311
|
+
parent: GObject.Object
|
|
312
|
+
priv: BackendJobPrivate
|
|
313
|
+
|
|
314
|
+
// Owm methods of PackageKitPlugin-1.0.PackageKitPlugin.BackendJob
|
|
315
|
+
|
|
316
|
+
category(parent_id: string | null, cat_id: string | null, name: string | null, summary: string | null, icon: string | null): void
|
|
317
|
+
details(package_id: string | null, summary: string | null, license: string | null, group: PackageKitGlib.GroupEnum, description: string | null, url: string | null, size: number): void
|
|
318
|
+
distro_upgrade(type: PackageKitGlib.DistroUpgradeEnum, name: string | null, summary: string | null): void
|
|
319
|
+
eula_required(eula_id: string | null, package_id: string | null, vendor_name: string | null, license_agreement: string | null): void
|
|
320
|
+
/**
|
|
321
|
+
* package_id is NULL when we are using this as a calback from DownloadPackages
|
|
322
|
+
* @param package_id
|
|
323
|
+
* @param files
|
|
324
|
+
*/
|
|
325
|
+
files(package_id: string | null, files: string | null): void
|
|
326
|
+
finished(): void
|
|
327
|
+
get_allow_cancel(): boolean
|
|
328
|
+
get_backend(): any
|
|
329
|
+
get_background(): HintEnum
|
|
330
|
+
/**
|
|
331
|
+
* Gets the maximum cache age in seconds.
|
|
332
|
+
* @returns the cache age in seconds, or 0 for unset or %G_MAXUINT for 'infinity'
|
|
333
|
+
*/
|
|
334
|
+
get_cache_age(): number
|
|
335
|
+
get_cmdline(): string | null
|
|
336
|
+
get_exit_code(): PackageKitGlib.ExitEnum
|
|
337
|
+
get_frontend_socket(): string | null
|
|
338
|
+
get_interactive(): HintEnum
|
|
339
|
+
get_is_error_set(): boolean
|
|
340
|
+
get_is_finished(): boolean
|
|
341
|
+
get_locale(): string | null
|
|
342
|
+
get_locked(): boolean
|
|
343
|
+
get_no_proxy(): string | null
|
|
344
|
+
get_pac(): string | null
|
|
345
|
+
get_parameters(): GLib.Variant
|
|
346
|
+
get_proxy_ftp(): string | null
|
|
347
|
+
get_proxy_http(): string | null
|
|
348
|
+
get_proxy_https(): string | null
|
|
349
|
+
get_proxy_socks(): string | null
|
|
350
|
+
get_role(): PackageKitGlib.RoleEnum
|
|
351
|
+
get_runtime(): number
|
|
352
|
+
get_started(): boolean
|
|
353
|
+
get_transaction_flags(): PackageKitGlib.Bitfield
|
|
354
|
+
get_uid(): number
|
|
355
|
+
get_user_data(): any
|
|
356
|
+
get_vfunc_enabled(signal_kind: BackendJobSignal): boolean
|
|
357
|
+
has_set_error_code(): boolean
|
|
358
|
+
media_change_required(media_type: PackageKitGlib.MediaTypeEnum, media_id: string | null, media_text: string | null): void
|
|
359
|
+
not_implemented_yet(method: string | null): void
|
|
360
|
+
package(info: PackageKitGlib.InfoEnum, package_id: string | null, summary: string | null): void
|
|
361
|
+
repo_detail(repo_id: string | null, description: string | null, enabled: boolean): void
|
|
362
|
+
repo_signature_required(package_id: string | null, repository_name: string | null, key_url: string | null, key_userid: string | null, key_id: string | null, key_fingerprint: string | null, key_timestamp: string | null, type: PackageKitGlib.SigTypeEnum): void
|
|
363
|
+
require_restart(restart: PackageKitGlib.RestartEnum, package_id: string | null): void
|
|
364
|
+
reset(): void
|
|
365
|
+
set_allow_cancel(allow_cancel: boolean): void
|
|
366
|
+
set_backend(backend: any): void
|
|
367
|
+
set_background(background: HintEnum): void
|
|
368
|
+
set_cache_age(cache_age: number): void
|
|
369
|
+
set_cmdline(cmdline: string | null): void
|
|
370
|
+
set_download_size_remaining(download_size_remaining: number): void
|
|
371
|
+
/**
|
|
372
|
+
* Should only be used internally, or from PkRunner when setting CANCELLED.
|
|
373
|
+
* @param exit
|
|
374
|
+
*/
|
|
375
|
+
set_exit_code(exit: PackageKitGlib.ExitEnum): void
|
|
376
|
+
set_frontend_socket(frontend_socket: string | null): void
|
|
377
|
+
set_interactive(interactive: HintEnum): void
|
|
378
|
+
set_item_progress(package_id: string | null, status: PackageKitGlib.StatusEnum, percentage: number): void
|
|
379
|
+
set_locale(code: string | null): void
|
|
380
|
+
/**
|
|
381
|
+
* Set if your backend job currently locks the cache, so no other tool will
|
|
382
|
+
* have write access on it. (read-only transactions will still be permitted)
|
|
383
|
+
* @param locked
|
|
384
|
+
*/
|
|
385
|
+
set_locked(locked: boolean): void
|
|
386
|
+
set_parameters(params: GLib.Variant): void
|
|
387
|
+
set_percentage(percentage: number): void
|
|
388
|
+
set_proxy(proxy_http: string | null, proxy_https: string | null, proxy_ftp: string | null, proxy_socks: string | null, no_proxy: string | null, pac: string | null): void
|
|
389
|
+
set_role(role: PackageKitGlib.RoleEnum): void
|
|
390
|
+
set_speed(speed: number): void
|
|
391
|
+
set_started(started: boolean): void
|
|
392
|
+
set_status(status: PackageKitGlib.StatusEnum): void
|
|
393
|
+
set_transaction_flags(transaction_flags: PackageKitGlib.Bitfield): void
|
|
394
|
+
set_uid(uid: number): void
|
|
395
|
+
set_user_data(user_data: any): void
|
|
396
|
+
/**
|
|
397
|
+
* Connect backend
|
|
398
|
+
* @param signal_kind Kind of the backend signal we want to connect
|
|
399
|
+
* @param vfunc The function we want to call
|
|
400
|
+
*/
|
|
401
|
+
set_vfunc(signal_kind: BackendJobSignal, vfunc: BackendJobVFunc): void
|
|
402
|
+
thread_create(func: BackendJobThreadFunc): boolean
|
|
403
|
+
update_detail(package_id: string | null, updates: string | null, obsoletes: string | null, vendor_urls: string | null, bugzilla_urls: string | null, cve_urls: string | null, restart: PackageKitGlib.RestartEnum, update_text: string | null, changelog: string | null, state: PackageKitGlib.UpdateStateEnum, issued: string | null, updated: string | null): void
|
|
404
|
+
use_background(): boolean
|
|
405
|
+
|
|
406
|
+
// Class property signals of PackageKitPlugin-1.0.PackageKitPlugin.BackendJob
|
|
407
|
+
|
|
408
|
+
connect(sigName: string, callback: (...args: any[]) => void): number
|
|
409
|
+
connect_after(sigName: string, callback: (...args: any[]) => void): number
|
|
410
|
+
emit(sigName: string, ...args: any[]): void
|
|
411
|
+
disconnect(id: number): void
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
class BackendJob extends GObject.Object {
|
|
415
|
+
|
|
416
|
+
// Own properties of PackageKitPlugin-1.0.PackageKitPlugin.BackendJob
|
|
417
|
+
|
|
418
|
+
static name: string
|
|
419
|
+
static $gtype: GObject.GType<BackendJob>
|
|
420
|
+
|
|
421
|
+
// Constructors of PackageKitPlugin-1.0.PackageKitPlugin.BackendJob
|
|
422
|
+
|
|
423
|
+
constructor(config?: BackendJob.ConstructorProperties)
|
|
424
|
+
constructor(conf: GLib.KeyFile)
|
|
425
|
+
static new(conf: GLib.KeyFile): BackendJob
|
|
426
|
+
_init(config?: BackendJob.ConstructorProperties): void
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
module Transaction {
|
|
430
|
+
|
|
431
|
+
// Signal callback interfaces
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Signal callback interface for `finished`
|
|
435
|
+
*/
|
|
436
|
+
interface FinishedSignalCallback {
|
|
437
|
+
($obj: Transaction): void
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
// Constructor properties interface
|
|
442
|
+
|
|
443
|
+
interface ConstructorProperties extends GObject.Object.ConstructorProperties {
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
interface Transaction {
|
|
449
|
+
|
|
450
|
+
// Own fields of PackageKitPlugin-1.0.PackageKitPlugin.Transaction
|
|
451
|
+
|
|
452
|
+
parent: GObject.Object
|
|
453
|
+
priv: TransactionPrivate
|
|
454
|
+
|
|
455
|
+
// Owm methods of PackageKitPlugin-1.0.PackageKitPlugin.Transaction
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* Designed to be used by plugins.
|
|
459
|
+
* @param mime_type
|
|
460
|
+
*/
|
|
461
|
+
add_supported_content_type(mime_type: string | null): void
|
|
462
|
+
cancel_bg(): void
|
|
463
|
+
get_backend_job(): BackendJob
|
|
464
|
+
get_conf(): GLib.KeyFile
|
|
465
|
+
get_full_paths(): string[]
|
|
466
|
+
get_package_ids(): string[]
|
|
467
|
+
get_results(): PackageKitGlib.Results
|
|
468
|
+
get_role(): PackageKitGlib.RoleEnum
|
|
469
|
+
get_state(): TransactionState
|
|
470
|
+
get_tid(): string | null
|
|
471
|
+
get_transaction_flags(): PackageKitGlib.Bitfield
|
|
472
|
+
get_uid(): number
|
|
473
|
+
get_values(): string[]
|
|
474
|
+
is_exclusive(): boolean
|
|
475
|
+
is_finished_with_lock_required(): boolean
|
|
476
|
+
/**
|
|
477
|
+
* Make this transaction exclusive.
|
|
478
|
+
*/
|
|
479
|
+
make_exclusive(): void
|
|
480
|
+
reset_after_lock_error(): void
|
|
481
|
+
run(): boolean
|
|
482
|
+
set_backend(backend: Backend): void
|
|
483
|
+
set_full_paths(full_paths: string | null): void
|
|
484
|
+
set_package_ids(package_ids: string | null): void
|
|
485
|
+
/**
|
|
486
|
+
* A transaction can have only one state at any time as it is processed.
|
|
487
|
+
* Typically, these states will be:
|
|
488
|
+
*
|
|
489
|
+
* 1. 'new'
|
|
490
|
+
* 2. 'waiting for auth' <--- waiting for PolicyKit (optional)
|
|
491
|
+
* 3. 'committed' <--- when the client sets the role
|
|
492
|
+
* 4. 'ready' <--- when the transaction is ready to be run
|
|
493
|
+
* 5. 'running' <--- where PkBackend gets used
|
|
494
|
+
* 6. 'finished'
|
|
495
|
+
* @param state
|
|
496
|
+
*/
|
|
497
|
+
set_state(state: TransactionState): boolean
|
|
498
|
+
/**
|
|
499
|
+
* Connect all backend_signals to the PkTransaction.
|
|
500
|
+
* @param job
|
|
501
|
+
*/
|
|
502
|
+
signals_reset(job: BackendJob): void
|
|
503
|
+
/**
|
|
504
|
+
* Skip authorization checks.
|
|
505
|
+
* NOTE: This is *only* for testing, do never
|
|
506
|
+
* use it somewhere else!
|
|
507
|
+
* @param skip_checks
|
|
508
|
+
*/
|
|
509
|
+
skip_auth_checks(skip_checks: boolean): void
|
|
510
|
+
|
|
511
|
+
// Own signals of PackageKitPlugin-1.0.PackageKitPlugin.Transaction
|
|
512
|
+
|
|
513
|
+
connect(sigName: "finished", callback: Transaction.FinishedSignalCallback): number
|
|
514
|
+
connect_after(sigName: "finished", callback: Transaction.FinishedSignalCallback): number
|
|
515
|
+
emit(sigName: "finished", ...args: any[]): void
|
|
516
|
+
|
|
517
|
+
// Class property signals of PackageKitPlugin-1.0.PackageKitPlugin.Transaction
|
|
518
|
+
|
|
519
|
+
connect(sigName: string, callback: (...args: any[]) => void): number
|
|
520
|
+
connect_after(sigName: string, callback: (...args: any[]) => void): number
|
|
521
|
+
emit(sigName: string, ...args: any[]): void
|
|
522
|
+
disconnect(id: number): void
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
class Transaction extends GObject.Object {
|
|
526
|
+
|
|
527
|
+
// Own properties of PackageKitPlugin-1.0.PackageKitPlugin.Transaction
|
|
528
|
+
|
|
529
|
+
static name: string
|
|
530
|
+
static $gtype: GObject.GType<Transaction>
|
|
531
|
+
|
|
532
|
+
// Constructors of PackageKitPlugin-1.0.PackageKitPlugin.Transaction
|
|
533
|
+
|
|
534
|
+
constructor(config?: Transaction.ConstructorProperties)
|
|
535
|
+
constructor(conf: GLib.KeyFile, introspection: Gio.DBusNodeInfo)
|
|
536
|
+
static new(conf: GLib.KeyFile, introspection: Gio.DBusNodeInfo): Transaction
|
|
537
|
+
_init(config?: Transaction.ConstructorProperties): void
|
|
538
|
+
static error_quark(): GLib.Quark
|
|
539
|
+
static state_to_string(state: TransactionState): string | null
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
interface BackendClass {
|
|
543
|
+
|
|
544
|
+
// Own fields of PackageKitPlugin-1.0.PackageKitPlugin.BackendClass
|
|
545
|
+
|
|
546
|
+
parent_class: GObject.ObjectClass
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
abstract class BackendClass {
|
|
550
|
+
|
|
551
|
+
// Own properties of PackageKitPlugin-1.0.PackageKitPlugin.BackendClass
|
|
552
|
+
|
|
553
|
+
static name: string
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
interface BackendJobClass {
|
|
557
|
+
|
|
558
|
+
// Own fields of PackageKitPlugin-1.0.PackageKitPlugin.BackendJobClass
|
|
559
|
+
|
|
560
|
+
parent_class: GObject.ObjectClass
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
abstract class BackendJobClass {
|
|
564
|
+
|
|
565
|
+
// Own properties of PackageKitPlugin-1.0.PackageKitPlugin.BackendJobClass
|
|
566
|
+
|
|
567
|
+
static name: string
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
interface BackendJobPrivate {
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
class BackendJobPrivate {
|
|
574
|
+
|
|
575
|
+
// Own properties of PackageKitPlugin-1.0.PackageKitPlugin.BackendJobPrivate
|
|
576
|
+
|
|
577
|
+
static name: string
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
interface BackendPrivate {
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
class BackendPrivate {
|
|
584
|
+
|
|
585
|
+
// Own properties of PackageKitPlugin-1.0.PackageKitPlugin.BackendPrivate
|
|
586
|
+
|
|
587
|
+
static name: string
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
interface Plugin {
|
|
591
|
+
|
|
592
|
+
// Own fields of PackageKitPlugin-1.0.PackageKitPlugin.Plugin
|
|
593
|
+
|
|
594
|
+
backend: Backend
|
|
595
|
+
job: BackendJob
|
|
596
|
+
priv: PluginPrivate
|
|
597
|
+
|
|
598
|
+
// Owm methods of PackageKitPlugin-1.0.PackageKitPlugin.Plugin
|
|
599
|
+
|
|
600
|
+
destroy(): void
|
|
601
|
+
initialize(): void
|
|
602
|
+
state_changed(): void
|
|
603
|
+
transaction_content_types(transaction: Transaction): void
|
|
604
|
+
transaction_finished_end(transaction: Transaction): void
|
|
605
|
+
transaction_finished_results(transaction: Transaction): void
|
|
606
|
+
transaction_get_action(transaction: Transaction, action_id: string | null): string | null
|
|
607
|
+
transaction_run(transaction: Transaction): void
|
|
608
|
+
transaction_started(transaction: Transaction): void
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
class Plugin {
|
|
612
|
+
|
|
613
|
+
// Own properties of PackageKitPlugin-1.0.PackageKitPlugin.Plugin
|
|
614
|
+
|
|
615
|
+
static name: string
|
|
616
|
+
|
|
617
|
+
// Constructors of PackageKitPlugin-1.0.PackageKitPlugin.Plugin
|
|
618
|
+
|
|
619
|
+
static get_description(): string | null
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
interface PluginPrivate {
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
class PluginPrivate {
|
|
626
|
+
|
|
627
|
+
// Own properties of PackageKitPlugin-1.0.PackageKitPlugin.PluginPrivate
|
|
628
|
+
|
|
629
|
+
static name: string
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
interface TransactionClass {
|
|
633
|
+
|
|
634
|
+
// Own fields of PackageKitPlugin-1.0.PackageKitPlugin.TransactionClass
|
|
635
|
+
|
|
636
|
+
parent_class: GObject.ObjectClass
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
abstract class TransactionClass {
|
|
640
|
+
|
|
641
|
+
// Own properties of PackageKitPlugin-1.0.PackageKitPlugin.TransactionClass
|
|
642
|
+
|
|
643
|
+
static name: string
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
interface TransactionPrivate {
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
class TransactionPrivate {
|
|
650
|
+
|
|
651
|
+
// Own properties of PackageKitPlugin-1.0.PackageKitPlugin.TransactionPrivate
|
|
652
|
+
|
|
653
|
+
static name: string
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
/**
|
|
657
|
+
* Name of the imported GIR library
|
|
658
|
+
* @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
|
|
659
|
+
*/
|
|
660
|
+
const __name__: string
|
|
661
|
+
/**
|
|
662
|
+
* Version of the imported GIR library
|
|
663
|
+
* @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
|
|
664
|
+
*/
|
|
665
|
+
const __version__: string
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
export default PackageKitPlugin;
|
|
669
|
+
// END
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
// General settings for code interpretation
|
|
4
|
+
"target": "ESNext",
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"experimentalDecorators": true,
|
|
7
|
+
"moduleResolution": "node",
|
|
8
|
+
"noEmit": true,
|
|
9
|
+
"noEmitOnError": false,
|
|
10
|
+
"baseUrl": "./",
|
|
11
|
+
"rootDir": ".",
|
|
12
|
+
// General settings for code generation
|
|
13
|
+
"removeComments": false,
|
|
14
|
+
"inlineSourceMap": false,
|
|
15
|
+
"inlineSources": false,
|
|
16
|
+
"newLine": "LF"
|
|
17
|
+
},
|
|
18
|
+
"include": ["./packagekitplugin-1.0.d.ts"]
|
|
19
|
+
}
|