@girs/appstreambuilder-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/appstreambuilder-1.0.cjs +9 -0
- package/appstreambuilder-1.0.d.cts +877 -0
- package/appstreambuilder-1.0.d.ts +882 -0
- package/appstreambuilder-1.0.js +8 -0
- package/package.json +57 -0
- package/tsconfig.doc.json +19 -0
|
@@ -0,0 +1,877 @@
|
|
|
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
|
+
* AppStreamBuilder-1.0
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import type Gio from '@girs/gio-2.0';
|
|
13
|
+
import type GObject from '@girs/gobject-2.0';
|
|
14
|
+
import type GLib from '@girs/glib-2.0';
|
|
15
|
+
import type GdkPixbuf from '@girs/gdkpixbuf-2.0';
|
|
16
|
+
import type GModule from '@girs/gmodule-2.0';
|
|
17
|
+
import type AppStreamGlib from '@girs/appstreamglib-1.0';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The flags to use when saving resources.
|
|
21
|
+
*/
|
|
22
|
+
export enum AppSaveFlags {
|
|
23
|
+
/**
|
|
24
|
+
* Nothing to do
|
|
25
|
+
*/
|
|
26
|
+
NONE,
|
|
27
|
+
/**
|
|
28
|
+
* Save icons to disk
|
|
29
|
+
*/
|
|
30
|
+
ICONS,
|
|
31
|
+
/**
|
|
32
|
+
* Save screenshots to disk
|
|
33
|
+
*/
|
|
34
|
+
SCREENSHOTS,
|
|
35
|
+
}
|
|
36
|
+
export enum PackageKind {
|
|
37
|
+
DEFAULT,
|
|
38
|
+
BUNDLE,
|
|
39
|
+
FIRMWARE,
|
|
40
|
+
LAST,
|
|
41
|
+
}
|
|
42
|
+
export enum PackageLogLevel {
|
|
43
|
+
NONE,
|
|
44
|
+
DEBUG,
|
|
45
|
+
INFO,
|
|
46
|
+
WARNING,
|
|
47
|
+
LAST,
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The flags to use when processing the context.
|
|
51
|
+
* @bitfield
|
|
52
|
+
*/
|
|
53
|
+
export enum ContextFlags {
|
|
54
|
+
/**
|
|
55
|
+
* No special actions to use
|
|
56
|
+
*/
|
|
57
|
+
NONE,
|
|
58
|
+
/**
|
|
59
|
+
* Ignore missing information
|
|
60
|
+
*/
|
|
61
|
+
IGNORE_MISSING_INFO,
|
|
62
|
+
/**
|
|
63
|
+
* Ignore missing parents
|
|
64
|
+
*/
|
|
65
|
+
IGNORE_MISSING_PARENTS,
|
|
66
|
+
/**
|
|
67
|
+
* Unused
|
|
68
|
+
*/
|
|
69
|
+
ADD_CACHE_ID,
|
|
70
|
+
/**
|
|
71
|
+
* Include HiDPI icons
|
|
72
|
+
*/
|
|
73
|
+
HIDPI_ICONS,
|
|
74
|
+
/**
|
|
75
|
+
* Embed the icons in the XML
|
|
76
|
+
*/
|
|
77
|
+
EMBEDDED_ICONS,
|
|
78
|
+
/**
|
|
79
|
+
* Do not download files
|
|
80
|
+
*/
|
|
81
|
+
NO_NETWORK,
|
|
82
|
+
/**
|
|
83
|
+
* Write the origin-ignore.xml file
|
|
84
|
+
*/
|
|
85
|
+
INCLUDE_FAILED,
|
|
86
|
+
/**
|
|
87
|
+
* Do not pack icons into a tarball
|
|
88
|
+
*/
|
|
89
|
+
UNCOMPRESSED_ICONS,
|
|
90
|
+
/**
|
|
91
|
+
* Include apps that are dead upstream
|
|
92
|
+
*/
|
|
93
|
+
IGNORE_DEAD_UPSTREAM,
|
|
94
|
+
/**
|
|
95
|
+
* Include apps that use obsolete toolkits
|
|
96
|
+
*/
|
|
97
|
+
IGNORE_OBSOLETE_DEPS,
|
|
98
|
+
/**
|
|
99
|
+
* Include apps that use legacy icon formats
|
|
100
|
+
*/
|
|
101
|
+
IGNORE_LEGACY_ICONS,
|
|
102
|
+
/**
|
|
103
|
+
* Include apps that are marked as settings
|
|
104
|
+
*/
|
|
105
|
+
IGNORE_SETTINGS,
|
|
106
|
+
/**
|
|
107
|
+
* Fall back to suboptimal data where required
|
|
108
|
+
*/
|
|
109
|
+
USE_FALLBACKS,
|
|
110
|
+
/**
|
|
111
|
+
* Add artificial icons and categories where required
|
|
112
|
+
*/
|
|
113
|
+
ADD_DEFAULT_ICONS,
|
|
114
|
+
}
|
|
115
|
+
export const PACKAGE_ENSURE_DEPS: number
|
|
116
|
+
export const PACKAGE_ENSURE_FILES: number
|
|
117
|
+
export const PACKAGE_ENSURE_LICENSE: number
|
|
118
|
+
export const PACKAGE_ENSURE_NEVRA: number
|
|
119
|
+
export const PACKAGE_ENSURE_NONE: number
|
|
120
|
+
export const PACKAGE_ENSURE_RELEASES: number
|
|
121
|
+
export const PACKAGE_ENSURE_SOURCE: number
|
|
122
|
+
export const PACKAGE_ENSURE_URL: number
|
|
123
|
+
export const PACKAGE_ENSURE_VCS: number
|
|
124
|
+
export module App {
|
|
125
|
+
|
|
126
|
+
// Constructor properties interface
|
|
127
|
+
|
|
128
|
+
export interface ConstructorProperties extends AppStreamGlib.App.ConstructorProperties {
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export interface App {
|
|
134
|
+
|
|
135
|
+
// Own fields of AppStreamBuilder-1.0.AppStreamBuilder.App
|
|
136
|
+
|
|
137
|
+
parent_instance: GObject.Object
|
|
138
|
+
|
|
139
|
+
// Owm methods of AppStreamBuilder-1.0.AppStreamBuilder.App
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Gets the package that backs the application.
|
|
143
|
+
* @returns package
|
|
144
|
+
*/
|
|
145
|
+
get_package(): Package
|
|
146
|
+
/**
|
|
147
|
+
* Saves to disk any resources set for the application.
|
|
148
|
+
* @param save_flags #AsbAppSaveFlags, e.g. %ASB_APP_SAVE_FLAG_SCREENSHOTS
|
|
149
|
+
* @returns %TRUE for success, %FALSE otherwise
|
|
150
|
+
*/
|
|
151
|
+
save_resources(save_flags: AppSaveFlags): boolean
|
|
152
|
+
/**
|
|
153
|
+
* Sets the HiDPI mode for the application.
|
|
154
|
+
* @param hidpi_enabled if HiDPI mode should be enabled
|
|
155
|
+
*/
|
|
156
|
+
set_hidpi_enabled(hidpi_enabled: boolean): void
|
|
157
|
+
/**
|
|
158
|
+
* Sets the package that backs the application.
|
|
159
|
+
* @param pkg A #AsbPackage
|
|
160
|
+
*/
|
|
161
|
+
set_package(pkg: Package): void
|
|
162
|
+
|
|
163
|
+
// Class property signals of AppStreamBuilder-1.0.AppStreamBuilder.App
|
|
164
|
+
|
|
165
|
+
connect(sigName: string, callback: (...args: any[]) => void): number
|
|
166
|
+
connect_after(sigName: string, callback: (...args: any[]) => void): number
|
|
167
|
+
emit(sigName: string, ...args: any[]): void
|
|
168
|
+
disconnect(id: number): void
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export class App extends AppStreamGlib.App {
|
|
172
|
+
|
|
173
|
+
// Own properties of AppStreamBuilder-1.0.AppStreamBuilder.App
|
|
174
|
+
|
|
175
|
+
static name: string
|
|
176
|
+
static $gtype: GObject.GType<App>
|
|
177
|
+
|
|
178
|
+
// Constructors of AppStreamBuilder-1.0.AppStreamBuilder.App
|
|
179
|
+
|
|
180
|
+
constructor(config?: App.ConstructorProperties)
|
|
181
|
+
/**
|
|
182
|
+
* Creates a new application object.
|
|
183
|
+
* @constructor
|
|
184
|
+
* @param pkg A #AsbPackage, or %NULL
|
|
185
|
+
* @param id The ID for the package, or %NULL
|
|
186
|
+
* @returns a #AsbApp
|
|
187
|
+
*/
|
|
188
|
+
constructor(pkg: Package, id: string | null)
|
|
189
|
+
/**
|
|
190
|
+
* Creates a new application object.
|
|
191
|
+
* @constructor
|
|
192
|
+
* @param pkg A #AsbPackage, or %NULL
|
|
193
|
+
* @param id The ID for the package, or %NULL
|
|
194
|
+
* @returns a #AsbApp
|
|
195
|
+
*/
|
|
196
|
+
static new(pkg: Package, id: string | null): App
|
|
197
|
+
|
|
198
|
+
// Overloads of new
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Creates a new #AsApp.
|
|
202
|
+
* @constructor
|
|
203
|
+
* @returns a #AsApp
|
|
204
|
+
*/
|
|
205
|
+
static new(): AppStreamGlib.App
|
|
206
|
+
_init(config?: App.ConstructorProperties): void
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export module Context {
|
|
210
|
+
|
|
211
|
+
// Constructor properties interface
|
|
212
|
+
|
|
213
|
+
export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export interface Context {
|
|
219
|
+
|
|
220
|
+
// Own fields of AppStreamBuilder-1.0.AppStreamBuilder.Context
|
|
221
|
+
|
|
222
|
+
parent_instance: GObject.Object
|
|
223
|
+
|
|
224
|
+
// Owm methods of AppStreamBuilder-1.0.AppStreamBuilder.Context
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Adds an application to the context.
|
|
228
|
+
* @param app A #AsbApp
|
|
229
|
+
*/
|
|
230
|
+
add_app(app: App): void
|
|
231
|
+
add_app_ignore(pkg: Package): void
|
|
232
|
+
/**
|
|
233
|
+
* Adds a filename to the list of packages to be processed
|
|
234
|
+
* @param filename package filename
|
|
235
|
+
* @returns %TRUE for success, %FALSE otherwise
|
|
236
|
+
*/
|
|
237
|
+
add_filename(filename: string | null): boolean
|
|
238
|
+
/**
|
|
239
|
+
* Adds a package to the list of packages to be processed
|
|
240
|
+
* @param pkg A #AsbPackage
|
|
241
|
+
*/
|
|
242
|
+
add_package(pkg: Package): void
|
|
243
|
+
/**
|
|
244
|
+
* Find a package from its name.
|
|
245
|
+
* @param pkgname a package name
|
|
246
|
+
* @returns a #AsbPackage, or %NULL for not found.
|
|
247
|
+
*/
|
|
248
|
+
find_by_pkgname(pkgname: string | null): Package
|
|
249
|
+
/**
|
|
250
|
+
* This function used to find an application in the cache, and now does nothing.
|
|
251
|
+
* @param filename cache-id
|
|
252
|
+
* @returns always %FALSE
|
|
253
|
+
*/
|
|
254
|
+
find_in_cache(filename: string | null): boolean
|
|
255
|
+
/**
|
|
256
|
+
* Gets the target metadata API version.
|
|
257
|
+
* @returns floating point
|
|
258
|
+
*/
|
|
259
|
+
get_api_version(): number
|
|
260
|
+
/**
|
|
261
|
+
* Gets the screenshot directory to use
|
|
262
|
+
* @returns directory
|
|
263
|
+
*/
|
|
264
|
+
get_cache_dir(): string | null
|
|
265
|
+
/**
|
|
266
|
+
* Gets one specific build flag.
|
|
267
|
+
* @param flag A #AsbContextFlags
|
|
268
|
+
* @returns %TRUE if the flag was set
|
|
269
|
+
*/
|
|
270
|
+
get_flag(flag: ContextFlags): boolean
|
|
271
|
+
/**
|
|
272
|
+
* Gets the build flags.
|
|
273
|
+
* @returns #AsbContextFlags
|
|
274
|
+
*/
|
|
275
|
+
get_flags(): ContextFlags
|
|
276
|
+
/**
|
|
277
|
+
* Gets the minimum icon size in pixels.
|
|
278
|
+
* @returns size
|
|
279
|
+
*/
|
|
280
|
+
get_min_icon_size(): number
|
|
281
|
+
/**
|
|
282
|
+
* Returns the packages already added to the context.
|
|
283
|
+
* @returns array of packages
|
|
284
|
+
*/
|
|
285
|
+
get_packages(): Package[]
|
|
286
|
+
/**
|
|
287
|
+
* Gets the temporary directory to use
|
|
288
|
+
* @returns directory
|
|
289
|
+
*/
|
|
290
|
+
get_temp_dir(): string | null
|
|
291
|
+
/**
|
|
292
|
+
* Processes all the packages that have been added to the context.
|
|
293
|
+
* @returns %TRUE for success, %FALSE otherwise
|
|
294
|
+
*/
|
|
295
|
+
process(): boolean
|
|
296
|
+
/**
|
|
297
|
+
* Sets the version of the metadata to write.
|
|
298
|
+
* @param api_version the AppStream API version
|
|
299
|
+
*/
|
|
300
|
+
set_api_version(api_version: number): void
|
|
301
|
+
/**
|
|
302
|
+
* Sets the basename for the two metadata files.
|
|
303
|
+
* @param basename AppStream file basename, e.g. "appstream"
|
|
304
|
+
*/
|
|
305
|
+
set_basename(basename: string | null): void
|
|
306
|
+
/**
|
|
307
|
+
* Sets the cache directory to use when building metadata.
|
|
308
|
+
* @param cache_dir directory
|
|
309
|
+
*/
|
|
310
|
+
set_cache_dir(cache_dir: string | null): void
|
|
311
|
+
/**
|
|
312
|
+
* Sets flags to be used when building the metadata.
|
|
313
|
+
* @param flags #AsbContextFlags, e.g. %ASB_CONTEXT_FLAG_NO_NETWORK
|
|
314
|
+
*/
|
|
315
|
+
set_flags(flags: ContextFlags): void
|
|
316
|
+
/**
|
|
317
|
+
* Sets the icons directory to use when building metadata.
|
|
318
|
+
* @param icons_dir directory
|
|
319
|
+
*/
|
|
320
|
+
set_icons_dir(icons_dir: string | null): void
|
|
321
|
+
/**
|
|
322
|
+
* Sets the log directory to use when building metadata.
|
|
323
|
+
* @param log_dir directory
|
|
324
|
+
*/
|
|
325
|
+
set_log_dir(log_dir: string | null): void
|
|
326
|
+
/**
|
|
327
|
+
* Sets the maximum number of threads to use when processing packages.
|
|
328
|
+
* This function now has no affect as only one thread is ever used.
|
|
329
|
+
* @param max_threads integer
|
|
330
|
+
*/
|
|
331
|
+
set_max_threads(max_threads: number): void
|
|
332
|
+
/**
|
|
333
|
+
* Sets the smallest icon size in pixels supported.
|
|
334
|
+
* @param min_icon_size integer
|
|
335
|
+
*/
|
|
336
|
+
set_min_icon_size(min_icon_size: number): void
|
|
337
|
+
/**
|
|
338
|
+
* Sets the filename location of the old metadata file.
|
|
339
|
+
* This function now has no affect as no cache ID is available.
|
|
340
|
+
* @param old_metadata filename, or %NULL
|
|
341
|
+
*/
|
|
342
|
+
set_old_metadata(old_metadata: string | null): void
|
|
343
|
+
/**
|
|
344
|
+
* Sets the origin for the two metadata files.
|
|
345
|
+
* @param origin AppStream origin, e.g. "fedora-21"
|
|
346
|
+
*/
|
|
347
|
+
set_origin(origin: string | null): void
|
|
348
|
+
/**
|
|
349
|
+
* Sets the output directory to use when building metadata.
|
|
350
|
+
* @param output_dir directory
|
|
351
|
+
*/
|
|
352
|
+
set_output_dir(output_dir: string | null): void
|
|
353
|
+
set_screenshot_dir(screenshot_dir: string | null): void
|
|
354
|
+
/**
|
|
355
|
+
* Sets the temporary directory to use when building metadata.
|
|
356
|
+
* @param temp_dir directory
|
|
357
|
+
*/
|
|
358
|
+
set_temp_dir(temp_dir: string | null): void
|
|
359
|
+
/**
|
|
360
|
+
* Sets up the context ready for use.
|
|
361
|
+
* @returns %TRUE for success, %FALSE otherwise
|
|
362
|
+
*/
|
|
363
|
+
setup(): boolean
|
|
364
|
+
|
|
365
|
+
// Class property signals of AppStreamBuilder-1.0.AppStreamBuilder.Context
|
|
366
|
+
|
|
367
|
+
connect(sigName: string, callback: (...args: any[]) => void): number
|
|
368
|
+
connect_after(sigName: string, callback: (...args: any[]) => void): number
|
|
369
|
+
emit(sigName: string, ...args: any[]): void
|
|
370
|
+
disconnect(id: number): void
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
export class Context extends GObject.Object {
|
|
374
|
+
|
|
375
|
+
// Own properties of AppStreamBuilder-1.0.AppStreamBuilder.Context
|
|
376
|
+
|
|
377
|
+
static name: string
|
|
378
|
+
static $gtype: GObject.GType<Context>
|
|
379
|
+
|
|
380
|
+
// Constructors of AppStreamBuilder-1.0.AppStreamBuilder.Context
|
|
381
|
+
|
|
382
|
+
constructor(config?: Context.ConstructorProperties)
|
|
383
|
+
/**
|
|
384
|
+
* Creates a new high-level instance.
|
|
385
|
+
* @constructor
|
|
386
|
+
* @returns a #AsbContext
|
|
387
|
+
*/
|
|
388
|
+
constructor()
|
|
389
|
+
/**
|
|
390
|
+
* Creates a new high-level instance.
|
|
391
|
+
* @constructor
|
|
392
|
+
* @returns a #AsbContext
|
|
393
|
+
*/
|
|
394
|
+
static new(): Context
|
|
395
|
+
_init(config?: Context.ConstructorProperties): void
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
export module Package {
|
|
399
|
+
|
|
400
|
+
// Constructor properties interface
|
|
401
|
+
|
|
402
|
+
export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
export interface Package {
|
|
408
|
+
|
|
409
|
+
// Own fields of AppStreamBuilder-1.0.AppStreamBuilder.Package
|
|
410
|
+
|
|
411
|
+
parent_instance: GObject.Object
|
|
412
|
+
|
|
413
|
+
// Owm methods of AppStreamBuilder-1.0.AppStreamBuilder.Package
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* Add a package dependancy.
|
|
417
|
+
* @param dep package dep
|
|
418
|
+
*/
|
|
419
|
+
add_dep(dep: string | null): void
|
|
420
|
+
/**
|
|
421
|
+
* Adds a (downstream) release to a package.
|
|
422
|
+
* @param version a package version
|
|
423
|
+
* @param release a package release
|
|
424
|
+
*/
|
|
425
|
+
add_release(version: string | null, release: AppStreamGlib.Release): void
|
|
426
|
+
/**
|
|
427
|
+
* Deallocates previously ensured data.
|
|
428
|
+
* @param flags #AsbPackageEnsureFlags
|
|
429
|
+
*/
|
|
430
|
+
clear(flags: PackageEnsureFlags): void
|
|
431
|
+
/**
|
|
432
|
+
* Closes a package, which can be re-opened if required.
|
|
433
|
+
* @returns %TRUE for success, %FALSE otherwise
|
|
434
|
+
*/
|
|
435
|
+
close(): boolean
|
|
436
|
+
/**
|
|
437
|
+
* Compares one package with another.
|
|
438
|
+
* @param pkg2 A #AsbPackage
|
|
439
|
+
* @returns +1 for @pkg1 newer, 0 for the same and -1 if @pkg2 is newer
|
|
440
|
+
*/
|
|
441
|
+
compare(pkg2: Package): number
|
|
442
|
+
/**
|
|
443
|
+
* Ensures data exists.
|
|
444
|
+
* @param flags #AsbPackageEnsureFlags
|
|
445
|
+
* @returns %TRUE for success, %FALSE otherwise
|
|
446
|
+
*/
|
|
447
|
+
ensure(flags: PackageEnsureFlags): boolean
|
|
448
|
+
/**
|
|
449
|
+
* Decompresses a package into a directory, optionally using a glob list.
|
|
450
|
+
* @param dir directory to explode into
|
|
451
|
+
* @param glob the glob list, or %NULL
|
|
452
|
+
* @returns %TRUE for success, %FALSE otherwise
|
|
453
|
+
*/
|
|
454
|
+
explode(dir: string | null, glob: string[]): boolean
|
|
455
|
+
/**
|
|
456
|
+
* Gets the package architecture
|
|
457
|
+
* @returns utf8 string
|
|
458
|
+
*/
|
|
459
|
+
get_arch(): string | null
|
|
460
|
+
/**
|
|
461
|
+
* Gets the package basename.
|
|
462
|
+
* @returns utf8 string
|
|
463
|
+
*/
|
|
464
|
+
get_basename(): string | null
|
|
465
|
+
/**
|
|
466
|
+
* Gets a config attribute from a package.
|
|
467
|
+
* @param key utf8 string
|
|
468
|
+
* @returns utf8 string
|
|
469
|
+
*/
|
|
470
|
+
get_config(key: string | null): string | null
|
|
471
|
+
/**
|
|
472
|
+
* Get the package dependancy list.
|
|
473
|
+
* @returns deplist
|
|
474
|
+
*/
|
|
475
|
+
get_deps(): string[]
|
|
476
|
+
/**
|
|
477
|
+
* Gets if the package is enabled.
|
|
478
|
+
* @returns enabled status
|
|
479
|
+
*/
|
|
480
|
+
get_enabled(): boolean
|
|
481
|
+
/**
|
|
482
|
+
* Gets the epoch of the package.
|
|
483
|
+
* @returns a #AsbPackageKind
|
|
484
|
+
*/
|
|
485
|
+
get_epoch(): number
|
|
486
|
+
/**
|
|
487
|
+
* Gets the package EVR.
|
|
488
|
+
* @returns utf8 string
|
|
489
|
+
*/
|
|
490
|
+
get_evr(): string | null
|
|
491
|
+
/**
|
|
492
|
+
* Gets the package filelist.
|
|
493
|
+
* @returns filelist
|
|
494
|
+
*/
|
|
495
|
+
get_filelist(): string[]
|
|
496
|
+
/**
|
|
497
|
+
* Gets the filename of the package.
|
|
498
|
+
* @returns utf8 filename
|
|
499
|
+
*/
|
|
500
|
+
get_filename(): string | null
|
|
501
|
+
/**
|
|
502
|
+
* Gets the kind of the package.
|
|
503
|
+
* @returns a #AsbPackageKind
|
|
504
|
+
*/
|
|
505
|
+
get_kind(): PackageKind
|
|
506
|
+
/**
|
|
507
|
+
* Gets the package license.
|
|
508
|
+
* @returns utf8 string
|
|
509
|
+
*/
|
|
510
|
+
get_license(): string | null
|
|
511
|
+
/**
|
|
512
|
+
* Gets the package name
|
|
513
|
+
* @returns utf8 string
|
|
514
|
+
*/
|
|
515
|
+
get_name(): string | null
|
|
516
|
+
/**
|
|
517
|
+
* Gets the package NEVR.
|
|
518
|
+
* @returns utf8 string
|
|
519
|
+
*/
|
|
520
|
+
get_nevr(): string | null
|
|
521
|
+
/**
|
|
522
|
+
* Gets the package NEVRA.
|
|
523
|
+
* @returns utf8 string
|
|
524
|
+
*/
|
|
525
|
+
get_nevra(): string | null
|
|
526
|
+
/**
|
|
527
|
+
* Gets the release for a specific version.
|
|
528
|
+
* @param version package version
|
|
529
|
+
* @returns an #AsRelease, or %NULL for not found
|
|
530
|
+
*/
|
|
531
|
+
get_release(version: string | null): AppStreamGlib.Release
|
|
532
|
+
/**
|
|
533
|
+
* Gets the package release string
|
|
534
|
+
* @returns utf8 string
|
|
535
|
+
*/
|
|
536
|
+
get_release_str(): string | null
|
|
537
|
+
/**
|
|
538
|
+
* Gets the releases of the package.
|
|
539
|
+
* @returns the release data
|
|
540
|
+
*/
|
|
541
|
+
get_releases(): AppStreamGlib.Release[]
|
|
542
|
+
/**
|
|
543
|
+
* Gets the package source nevra.
|
|
544
|
+
* @returns utf8 string
|
|
545
|
+
*/
|
|
546
|
+
get_source(): string | null
|
|
547
|
+
/**
|
|
548
|
+
* Gets the package source name.
|
|
549
|
+
* @returns utf8 string
|
|
550
|
+
*/
|
|
551
|
+
get_source_pkgname(): string | null
|
|
552
|
+
/**
|
|
553
|
+
* Gets the package homepage URL
|
|
554
|
+
* @returns utf8 string
|
|
555
|
+
*/
|
|
556
|
+
get_url(): string | null
|
|
557
|
+
/**
|
|
558
|
+
* Gets the package version control system.
|
|
559
|
+
* @returns utf8 string
|
|
560
|
+
*/
|
|
561
|
+
get_vcs(): string | null
|
|
562
|
+
/**
|
|
563
|
+
* Gets the package version
|
|
564
|
+
* @returns utf8 string
|
|
565
|
+
*/
|
|
566
|
+
get_version(): string | null
|
|
567
|
+
/**
|
|
568
|
+
* Flushes the log queue.
|
|
569
|
+
* @returns %TRUE for success, %FALSE otherwise
|
|
570
|
+
*/
|
|
571
|
+
log_flush(): boolean
|
|
572
|
+
/**
|
|
573
|
+
* Starts the log timer.
|
|
574
|
+
*/
|
|
575
|
+
log_start(): void
|
|
576
|
+
/**
|
|
577
|
+
* Opens a package and parses the contents.
|
|
578
|
+
* As little i/o should be done at this point, and implementations
|
|
579
|
+
* should rely on asb_package_ensure() to set data.
|
|
580
|
+
* @param filename package filename
|
|
581
|
+
* @returns %TRUE for success, %FALSE otherwise
|
|
582
|
+
*/
|
|
583
|
+
open(filename: string | null): boolean
|
|
584
|
+
/**
|
|
585
|
+
* Sets the package architecture.
|
|
586
|
+
* @param arch package architecture
|
|
587
|
+
*/
|
|
588
|
+
set_arch(arch: string | null): void
|
|
589
|
+
/**
|
|
590
|
+
* Sets a config attribute on a package.
|
|
591
|
+
* @param key utf8 string
|
|
592
|
+
* @param value utf8 string
|
|
593
|
+
*/
|
|
594
|
+
set_config(key: string | null, value: string | null): void
|
|
595
|
+
/**
|
|
596
|
+
* Enables or disables the package.
|
|
597
|
+
* @param enabled boolean
|
|
598
|
+
*/
|
|
599
|
+
set_enabled(enabled: boolean): void
|
|
600
|
+
/**
|
|
601
|
+
* Sets the package epoch
|
|
602
|
+
* @param epoch epoch, or 0 for unset
|
|
603
|
+
*/
|
|
604
|
+
set_epoch(epoch: number): void
|
|
605
|
+
/**
|
|
606
|
+
* Sets the package filelist.
|
|
607
|
+
* @param filelist package filelist
|
|
608
|
+
*/
|
|
609
|
+
set_filelist(filelist: string | null): void
|
|
610
|
+
/**
|
|
611
|
+
* Sets the package filename.
|
|
612
|
+
* @param filename package filename
|
|
613
|
+
*/
|
|
614
|
+
set_filename(filename: string | null): void
|
|
615
|
+
/**
|
|
616
|
+
* Sets the package kind.
|
|
617
|
+
* @param kind A #AsbPackageKind
|
|
618
|
+
*/
|
|
619
|
+
set_kind(kind: PackageKind): void
|
|
620
|
+
/**
|
|
621
|
+
* Sets the package license.
|
|
622
|
+
* @param license license string
|
|
623
|
+
*/
|
|
624
|
+
set_license(license: string | null): void
|
|
625
|
+
/**
|
|
626
|
+
* Sets the package name.
|
|
627
|
+
* @param name package name
|
|
628
|
+
*/
|
|
629
|
+
set_name(name: string | null): void
|
|
630
|
+
/**
|
|
631
|
+
* Sets the package release.
|
|
632
|
+
* @param release package release
|
|
633
|
+
*/
|
|
634
|
+
set_release(release: string | null): void
|
|
635
|
+
/**
|
|
636
|
+
* Sets the package source name, which is usually the parent of a set of
|
|
637
|
+
* subpackages.
|
|
638
|
+
* @param source source string, e.g. the srpm nevra
|
|
639
|
+
*/
|
|
640
|
+
set_source(source: string | null): void
|
|
641
|
+
/**
|
|
642
|
+
* Sets the package source name, which is usually the parent of a set of
|
|
643
|
+
* subpackages.
|
|
644
|
+
* @param source_pkgname source string, e.g. the srpm name
|
|
645
|
+
*/
|
|
646
|
+
set_source_pkgname(source_pkgname: string | null): void
|
|
647
|
+
/**
|
|
648
|
+
* Sets the package URL.
|
|
649
|
+
* @param url homepage URL
|
|
650
|
+
*/
|
|
651
|
+
set_url(url: string | null): void
|
|
652
|
+
/**
|
|
653
|
+
* Sets the package version control system.
|
|
654
|
+
* @param vcs vcs string
|
|
655
|
+
*/
|
|
656
|
+
set_vcs(vcs: string | null): void
|
|
657
|
+
/**
|
|
658
|
+
* Sets the package version.
|
|
659
|
+
* @param version package version
|
|
660
|
+
*/
|
|
661
|
+
set_version(version: string | null): void
|
|
662
|
+
|
|
663
|
+
// Own virtual methods of AppStreamBuilder-1.0.AppStreamBuilder.Package
|
|
664
|
+
|
|
665
|
+
/**
|
|
666
|
+
* Closes a package, which can be re-opened if required.
|
|
667
|
+
* @virtual
|
|
668
|
+
* @returns %TRUE for success, %FALSE otherwise
|
|
669
|
+
*/
|
|
670
|
+
vfunc_close(): boolean
|
|
671
|
+
/**
|
|
672
|
+
* Compares one package with another.
|
|
673
|
+
* @virtual
|
|
674
|
+
* @param pkg2 A #AsbPackage
|
|
675
|
+
* @returns +1 for @pkg1 newer, 0 for the same and -1 if @pkg2 is newer
|
|
676
|
+
*/
|
|
677
|
+
vfunc_compare(pkg2: Package): number
|
|
678
|
+
/**
|
|
679
|
+
* Ensures data exists.
|
|
680
|
+
* @virtual
|
|
681
|
+
* @param flags #AsbPackageEnsureFlags
|
|
682
|
+
* @returns %TRUE for success, %FALSE otherwise
|
|
683
|
+
*/
|
|
684
|
+
vfunc_ensure(flags: PackageEnsureFlags): boolean
|
|
685
|
+
/**
|
|
686
|
+
* Decompresses a package into a directory, optionally using a glob list.
|
|
687
|
+
* @virtual
|
|
688
|
+
* @param dir directory to explode into
|
|
689
|
+
* @param glob the glob list, or %NULL
|
|
690
|
+
* @returns %TRUE for success, %FALSE otherwise
|
|
691
|
+
*/
|
|
692
|
+
vfunc_explode(dir: string | null, glob: string[]): boolean
|
|
693
|
+
/**
|
|
694
|
+
* Opens a package and parses the contents.
|
|
695
|
+
* As little i/o should be done at this point, and implementations
|
|
696
|
+
* should rely on asb_package_ensure() to set data.
|
|
697
|
+
* @virtual
|
|
698
|
+
* @param filename package filename
|
|
699
|
+
* @returns %TRUE for success, %FALSE otherwise
|
|
700
|
+
*/
|
|
701
|
+
vfunc_open(filename: string | null): boolean
|
|
702
|
+
|
|
703
|
+
// Class property signals of AppStreamBuilder-1.0.AppStreamBuilder.Package
|
|
704
|
+
|
|
705
|
+
connect(sigName: string, callback: (...args: any[]) => void): number
|
|
706
|
+
connect_after(sigName: string, callback: (...args: any[]) => void): number
|
|
707
|
+
emit(sigName: string, ...args: any[]): void
|
|
708
|
+
disconnect(id: number): void
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
export class Package extends GObject.Object {
|
|
712
|
+
|
|
713
|
+
// Own properties of AppStreamBuilder-1.0.AppStreamBuilder.Package
|
|
714
|
+
|
|
715
|
+
static name: string
|
|
716
|
+
static $gtype: GObject.GType<Package>
|
|
717
|
+
|
|
718
|
+
// Constructors of AppStreamBuilder-1.0.AppStreamBuilder.Package
|
|
719
|
+
|
|
720
|
+
constructor(config?: Package.ConstructorProperties)
|
|
721
|
+
/**
|
|
722
|
+
* Creates a new %AsbPackage.
|
|
723
|
+
*
|
|
724
|
+
* You don't need to use this function unless you want a memory-backed package
|
|
725
|
+
* for testing purposes.
|
|
726
|
+
* @constructor
|
|
727
|
+
* @returns a package
|
|
728
|
+
*/
|
|
729
|
+
constructor()
|
|
730
|
+
/**
|
|
731
|
+
* Creates a new %AsbPackage.
|
|
732
|
+
*
|
|
733
|
+
* You don't need to use this function unless you want a memory-backed package
|
|
734
|
+
* for testing purposes.
|
|
735
|
+
* @constructor
|
|
736
|
+
* @returns a package
|
|
737
|
+
*/
|
|
738
|
+
static new(): Package
|
|
739
|
+
_init(config?: Package.ConstructorProperties): void
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
export module Task {
|
|
743
|
+
|
|
744
|
+
// Constructor properties interface
|
|
745
|
+
|
|
746
|
+
export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
export interface Task {
|
|
752
|
+
|
|
753
|
+
// Own fields of AppStreamBuilder-1.0.AppStreamBuilder.Task
|
|
754
|
+
|
|
755
|
+
parent_instance: GObject.Object
|
|
756
|
+
|
|
757
|
+
// Owm methods of AppStreamBuilder-1.0.AppStreamBuilder.Task
|
|
758
|
+
|
|
759
|
+
/**
|
|
760
|
+
* Processes the task.
|
|
761
|
+
* @returns %TRUE for success, %FALSE otherwise
|
|
762
|
+
*/
|
|
763
|
+
process(): boolean
|
|
764
|
+
/**
|
|
765
|
+
* Sets the package used for the task.
|
|
766
|
+
* @param pkg A #AsbPackage
|
|
767
|
+
*/
|
|
768
|
+
set_package(pkg: Package): void
|
|
769
|
+
|
|
770
|
+
// Class property signals of AppStreamBuilder-1.0.AppStreamBuilder.Task
|
|
771
|
+
|
|
772
|
+
connect(sigName: string, callback: (...args: any[]) => void): number
|
|
773
|
+
connect_after(sigName: string, callback: (...args: any[]) => void): number
|
|
774
|
+
emit(sigName: string, ...args: any[]): void
|
|
775
|
+
disconnect(id: number): void
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
export class Task extends GObject.Object {
|
|
779
|
+
|
|
780
|
+
// Own properties of AppStreamBuilder-1.0.AppStreamBuilder.Task
|
|
781
|
+
|
|
782
|
+
static name: string
|
|
783
|
+
static $gtype: GObject.GType<Task>
|
|
784
|
+
|
|
785
|
+
// Constructors of AppStreamBuilder-1.0.AppStreamBuilder.Task
|
|
786
|
+
|
|
787
|
+
constructor(config?: Task.ConstructorProperties)
|
|
788
|
+
/**
|
|
789
|
+
* Creates a new task.
|
|
790
|
+
* @constructor
|
|
791
|
+
* @param ctx A #AsbContext
|
|
792
|
+
* @returns A #AsbTask
|
|
793
|
+
*/
|
|
794
|
+
constructor(ctx: Context)
|
|
795
|
+
/**
|
|
796
|
+
* Creates a new task.
|
|
797
|
+
* @constructor
|
|
798
|
+
* @param ctx A #AsbContext
|
|
799
|
+
* @returns A #AsbTask
|
|
800
|
+
*/
|
|
801
|
+
static new(ctx: Context): Task
|
|
802
|
+
_init(config?: Task.ConstructorProperties): void
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
export interface AppClass {
|
|
806
|
+
|
|
807
|
+
// Own fields of AppStreamBuilder-1.0.AppStreamBuilder.AppClass
|
|
808
|
+
|
|
809
|
+
parent_class: AppStreamGlib.AppClass
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
export abstract class AppClass {
|
|
813
|
+
|
|
814
|
+
// Own properties of AppStreamBuilder-1.0.AppStreamBuilder.AppClass
|
|
815
|
+
|
|
816
|
+
static name: string
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
export interface ContextClass {
|
|
820
|
+
|
|
821
|
+
// Own fields of AppStreamBuilder-1.0.AppStreamBuilder.ContextClass
|
|
822
|
+
|
|
823
|
+
parent_class: GObject.ObjectClass
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
export abstract class ContextClass {
|
|
827
|
+
|
|
828
|
+
// Own properties of AppStreamBuilder-1.0.AppStreamBuilder.ContextClass
|
|
829
|
+
|
|
830
|
+
static name: string
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
export interface PackageClass {
|
|
834
|
+
|
|
835
|
+
// Own fields of AppStreamBuilder-1.0.AppStreamBuilder.PackageClass
|
|
836
|
+
|
|
837
|
+
parent_class: GObject.ObjectClass
|
|
838
|
+
open: (pkg: Package, filename: string | null) => boolean
|
|
839
|
+
ensure: (pkg: Package, flags: PackageEnsureFlags) => boolean
|
|
840
|
+
explode: (pkg: Package, dir: string | null, glob: string[]) => boolean
|
|
841
|
+
compare: (pkg1: Package, pkg2: Package) => number
|
|
842
|
+
close: (pkg: Package) => boolean
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
export abstract class PackageClass {
|
|
846
|
+
|
|
847
|
+
// Own properties of AppStreamBuilder-1.0.AppStreamBuilder.PackageClass
|
|
848
|
+
|
|
849
|
+
static name: string
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
export interface TaskClass {
|
|
853
|
+
|
|
854
|
+
// Own fields of AppStreamBuilder-1.0.AppStreamBuilder.TaskClass
|
|
855
|
+
|
|
856
|
+
parent_class: GObject.ObjectClass
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
export abstract class TaskClass {
|
|
860
|
+
|
|
861
|
+
// Own properties of AppStreamBuilder-1.0.AppStreamBuilder.TaskClass
|
|
862
|
+
|
|
863
|
+
static name: string
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
export type PackageEnsureFlags = number
|
|
867
|
+
/**
|
|
868
|
+
* Name of the imported GIR library
|
|
869
|
+
* @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
|
|
870
|
+
*/
|
|
871
|
+
export const __name__: string
|
|
872
|
+
/**
|
|
873
|
+
* Version of the imported GIR library
|
|
874
|
+
* @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
|
|
875
|
+
*/
|
|
876
|
+
export const __version__: string
|
|
877
|
+
// END
|