@girs/gcr-3 3.41.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/gcr-3.d.cts ADDED
@@ -0,0 +1,4505 @@
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
+ * Gcr-3
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 Gck from '@girs/gck-1';
16
+
17
+ /**
18
+ * The status of a built certificate chain. Will be set to
19
+ * %GCR_CERTIFICATE_CHAIN_UNKNOWN for certificate chains that have not been
20
+ * built.
21
+ */
22
+ export enum CertificateChainStatus {
23
+ /**
24
+ * The certificate chain's status is unknown.
25
+ * When a chain is not yet built it has this status. If a chain is modified after
26
+ * being built, it has this status.
27
+ */
28
+ UNKNOWN,
29
+ /**
30
+ * A full chain could not be loaded. The
31
+ * chain does not end with a self-signed certificate, a trusted anchor, or a
32
+ * pinned certificate.
33
+ */
34
+ INCOMPLETE,
35
+ /**
36
+ * The certificate chain contains a revoked
37
+ * or otherwise explicitly distrusted certificate. The entire chain should
38
+ * be distrusted.
39
+ */
40
+ DISTRUSTED,
41
+ /**
42
+ * The chain ends with a self-signed
43
+ * certificate. No trust anchor was found.
44
+ */
45
+ SELFSIGNED,
46
+ /**
47
+ * The chain represents a pinned certificate. A
48
+ * pinned certificate is an exception which trusts a given certificate
49
+ * explicitly for a purpose and communication with a certain peer.
50
+ */
51
+ PINNED,
52
+ /**
53
+ * The chain ends with an anchored
54
+ * certificate. The anchored certificate is not necessarily self-signed.
55
+ */
56
+ ANCHORED,
57
+ }
58
+ /**
59
+ * The format of a certificate request. Currently only PKCS#10 is supported.
60
+ */
61
+ export enum CertificateRequestFormat {
62
+ /**
63
+ * certificate request is in PKCS#10 format
64
+ */
65
+ CERTIFICATE_REQUEST_PKCS10,
66
+ }
67
+ /**
68
+ * Values responding to error codes for parsing and serializing data.
69
+ */
70
+ export enum DataError {
71
+ /**
72
+ * Failed to parse or serialize the data
73
+ */
74
+ FAILURE,
75
+ /**
76
+ * The data was unrecognized or unsupported
77
+ */
78
+ UNRECOGNIZED,
79
+ /**
80
+ * The operation was cancelled
81
+ */
82
+ CANCELLED,
83
+ /**
84
+ * The data was encrypted or locked and could not be unlocked.
85
+ */
86
+ LOCKED,
87
+ }
88
+ /**
89
+ * The various format identifiers.
90
+ */
91
+ export enum DataFormat {
92
+ /**
93
+ * Represents all the formats, when enabling or disabling
94
+ */
95
+ ALL,
96
+ /**
97
+ * Not a valid format
98
+ */
99
+ INVALID,
100
+ /**
101
+ * DER encoded private key
102
+ */
103
+ DER_PRIVATE_KEY,
104
+ /**
105
+ * DER encoded RSA private key
106
+ */
107
+ DER_PRIVATE_KEY_RSA,
108
+ /**
109
+ * DER encoded DSA private key
110
+ */
111
+ DER_PRIVATE_KEY_DSA,
112
+ /**
113
+ * DER encoded EC private key
114
+ */
115
+ DER_PRIVATE_KEY_EC,
116
+ /**
117
+ * DER encoded SubjectPublicKeyInfo
118
+ */
119
+ DER_SUBJECT_PUBLIC_KEY,
120
+ /**
121
+ * DER encoded X.509 certificate
122
+ */
123
+ DER_CERTIFICATE_X509,
124
+ /**
125
+ * DER encoded PKCS#7 container file which can contain certificates
126
+ */
127
+ DER_PKCS7,
128
+ /**
129
+ * DER encoded PKCS#8 file which can contain a key
130
+ */
131
+ DER_PKCS8,
132
+ /**
133
+ * Unencrypted DER encoded PKCS#8 file which can contain a key
134
+ */
135
+ DER_PKCS8_PLAIN,
136
+ /**
137
+ * Encrypted DER encoded PKCS#8 file which can contain a key
138
+ */
139
+ DER_PKCS8_ENCRYPTED,
140
+ /**
141
+ * DER encoded PKCS#10 certificate request file
142
+ */
143
+ DER_PKCS10,
144
+ /**
145
+ * DER encoded SPKAC as generated by HTML5 keygen element
146
+ */
147
+ DER_SPKAC,
148
+ /**
149
+ * OpenSSL style SPKAC data
150
+ */
151
+ BASE64_SPKAC,
152
+ /**
153
+ * DER encoded PKCS#12 file which can contain certificates and/or keys
154
+ */
155
+ DER_PKCS12,
156
+ /**
157
+ * OpenSSH v1 or v2 public key
158
+ */
159
+ OPENSSH_PUBLIC,
160
+ /**
161
+ * OpenPGP key packet(s)
162
+ */
163
+ OPENPGP_PACKET,
164
+ /**
165
+ * OpenPGP public or private key armor encoded data
166
+ */
167
+ OPENPGP_ARMOR,
168
+ /**
169
+ * An OpenSSL style PEM file with unspecified contents
170
+ */
171
+ PEM,
172
+ /**
173
+ * An OpenSSL style PEM file with a private RSA key
174
+ */
175
+ PEM_PRIVATE_KEY_RSA,
176
+ /**
177
+ * An OpenSSL style PEM file with a private DSA key
178
+ */
179
+ PEM_PRIVATE_KEY_DSA,
180
+ /**
181
+ * An OpenSSL style PEM file with an X.509 certificate
182
+ */
183
+ PEM_CERTIFICATE_X509,
184
+ /**
185
+ * An OpenSSL style PEM file containing PKCS#7
186
+ */
187
+ PEM_PKCS7,
188
+ /**
189
+ * Unencrypted OpenSSL style PEM file containing PKCS#8
190
+ */
191
+ PEM_PKCS8_PLAIN,
192
+ /**
193
+ * Encrypted OpenSSL style PEM file containing PKCS#8
194
+ */
195
+ PEM_PKCS8_ENCRYPTED,
196
+ /**
197
+ * An OpenSSL style PEM file containing PKCS#12
198
+ */
199
+ PEM_PKCS12,
200
+ /**
201
+ * An OpenSSL style PEM file with a private key
202
+ */
203
+ PEM_PRIVATE_KEY,
204
+ /**
205
+ * An OpenSSL style PEM file containing PKCS#10
206
+ */
207
+ PEM_PKCS10,
208
+ /**
209
+ * An OpenSSL style PEM file with a private EC key
210
+ */
211
+ PEM_PRIVATE_KEY_EC,
212
+ /**
213
+ * An OpenSSL style PEM file containing a SubjectPublicKeyInfo
214
+ */
215
+ PEM_PUBLIC_KEY,
216
+ }
217
+ /**
218
+ * Various replies returned by [method`Prompt`.confirm] and friends.
219
+ */
220
+ export enum PromptReply {
221
+ /**
222
+ * the prompt was cancelled
223
+ */
224
+ CANCEL,
225
+ /**
226
+ * the user replied with 'ok'
227
+ */
228
+ CONTINUE,
229
+ }
230
+ /**
231
+ * No error returned by the #GcrSystemPrompt is suitable for display or
232
+ * to the user.
233
+ *
234
+ * If the system prompter can only show one prompt at a time, and there is
235
+ * already a prompt being displayed, and the timeout waiting to open the
236
+ * prompt expires, then %GCR_SYSTEM_PROMPT_IN_PROGRESS is returned.
237
+ */
238
+ export enum SystemPromptError {
239
+ /**
240
+ * another prompt is already in progress
241
+ */
242
+ SYSTEM_PROMPT_IN_PROGRESS,
243
+ }
244
+ /**
245
+ * The mode for the system prompter. Most system prompters can only show
246
+ * one prompt at a time and would use the %GCR_SYSTEM_PROMPTER_SINGLE mode.
247
+ */
248
+ export enum SystemPrompterMode {
249
+ /**
250
+ * only one prompt shown at a time
251
+ */
252
+ SINGLE,
253
+ /**
254
+ * more than one prompt shown at a time
255
+ */
256
+ MULTIPLE,
257
+ }
258
+ /**
259
+ * Flags to be used with the gcr_certificate_chain_build() operation.
260
+ * @bitfield
261
+ */
262
+ export enum CertificateChainFlags {
263
+ /**
264
+ * no flags
265
+ */
266
+ NONE,
267
+ /**
268
+ * If this flag is specified then no
269
+ * lookups for anchors or pinned certificates are done, and the resulting chain
270
+ * will be neither anchored or pinned. Additionally no missing certificate
271
+ * authorities are looked up in PKCS#11.
272
+ */
273
+ NO_LOOKUPS,
274
+ }
275
+ export enum ColumnFlags {
276
+ NONE,
277
+ HIDDEN,
278
+ SORTABLE,
279
+ }
280
+ export const ICON_CERTIFICATE: string | null
281
+ export const ICON_GNUPG: string | null
282
+ export const ICON_HOME_DIRECTORY: string | null
283
+ export const ICON_KEY: string | null
284
+ export const ICON_KEY_PAIR: string | null
285
+ export const ICON_PASSWORD: string | null
286
+ export const ICON_SMART_CARD: string | null
287
+ /**
288
+ * The major version number of the Gcr library.
289
+ */
290
+ export const MAJOR_VERSION: number
291
+ /**
292
+ * The micro version number of the Gcr library.
293
+ */
294
+ export const MICRO_VERSION: number
295
+ /**
296
+ * The minor version number of the Gcr library.
297
+ */
298
+ export const MINOR_VERSION: number
299
+ /**
300
+ * The purpose used to verify the client certificate in a TLS connection.
301
+ */
302
+ export const PURPOSE_CLIENT_AUTH: string | null
303
+ /**
304
+ * The purpose used to verify certificate used for the signature on signed code.
305
+ */
306
+ export const PURPOSE_CODE_SIGNING: string | null
307
+ /**
308
+ * The purpose used to verify certificates that are used in email communication
309
+ * such as S/MIME.
310
+ */
311
+ export const PURPOSE_EMAIL: string | null
312
+ /**
313
+ * The purpose used to verify the server certificate in a TLS connection. This
314
+ * is the most common purpose in use.
315
+ */
316
+ export const PURPOSE_SERVER_AUTH: string | null
317
+ /**
318
+ * The current secret exchange protocol. Key agreement is done using DH with the
319
+ * 1536 bit IKE parameter group. Keys are derived using SHA256 with HKDF. The
320
+ * transport encryption is done with 128 bit AES.
321
+ */
322
+ export const SECRET_EXCHANGE_PROTOCOL_1: string | null
323
+ export const UNLOCK_OPTION_ALWAYS: string | null
324
+ export const UNLOCK_OPTION_IDLE: string | null
325
+ export const UNLOCK_OPTION_SESSION: string | null
326
+ export const UNLOCK_OPTION_TIMEOUT: string | null
327
+ /**
328
+ * Compare one certificate against another. If the certificates are equal
329
+ * then zero is returned. If one certificate is %NULL or not a certificate,
330
+ * then a non-zero value is returned.
331
+ *
332
+ * The return value is useful in a stable sort, but has no user logical
333
+ * meaning.
334
+ * @param first the certificate to compare
335
+ * @param other the certificate to compare against
336
+ * @returns zero if the certificates match, non-zero otherwise.
337
+ */
338
+ export function certificate_compare(first: Comparable | null, other: Comparable | null): number
339
+ export function data_error_get_domain(): GLib.Quark
340
+ /**
341
+ * Create a key fingerprint for a certificate, public key or private key.
342
+ * Note that this is not a fingerprint of certificate data, which you would
343
+ * use gcr_certificate_get_fingerprint() for.
344
+ * @param attrs attributes for key or certificate
345
+ * @param checksum_type the type of fingerprint to create
346
+ * @returns the fingerprint or %NULL if the input was invalid.
347
+ */
348
+ export function fingerprint_from_attributes(attrs: Gck.Attributes, checksum_type: GLib.ChecksumType): Uint8Array | null
349
+ /**
350
+ * Create a key fingerprint for a DER encoded subjectPublicKeyInfo. The
351
+ * fingerprint is created so that it will be identical for a key and its
352
+ * corresponding certificate.
353
+ *
354
+ * Note that in the case of certificates this is not a fingerprint of the
355
+ * actual certificate data, but rather of the public key contained in a
356
+ * certificate.
357
+ * @param key_info DER encoded subjectPublicKeyInfo structure
358
+ * @param checksum_type the type of fingerprint to create
359
+ * @returns the fingerprint or %NULL if the input was invalid.
360
+ */
361
+ export function fingerprint_from_subject_public_key_info(key_info: Uint8Array, checksum_type: GLib.ChecksumType): Uint8Array | null
362
+ /**
363
+ * Get an appropriate icon for the token
364
+ * @param token_info the token info
365
+ * @returns the icon
366
+ */
367
+ export function icon_for_token(token_info: Gck.TokenInfo): Gio.Icon
368
+ /**
369
+ * Create a set of importers which can import this parsed item.
370
+ * The parsed item is represented by the state of the GcrParser at the
371
+ * time of calling this method.
372
+ * @param parsed a parser with a parsed item to import
373
+ * @returns a list of importers which can import the parsed item, which should be freed with g_object_unref(), or %NULL if no types of importers can be created
374
+ */
375
+ export function importer_create_for_parsed(parsed: Parsed): Importer[]
376
+ /**
377
+ * Queues an additional item to be imported in all compattible importers
378
+ * in the set. The parsed item is represented by the state of the #GcrParser
379
+ * at the time of calling this method.
380
+ *
381
+ * If the parsed item is incompatible with an importer, then that the item
382
+ * will not be queued on that importer.
383
+ * @param importers a set of importers
384
+ * @param parsed a parsed item
385
+ * @returns a new set of importers that queued the item, which should be freed with gck_list_unref_free()
386
+ */
387
+ export function importer_queue_and_filter_for_parsed(importers: Importer[], parsed: Parsed): Importer[]
388
+ /**
389
+ * Register an importer to handle parsed items that match the given attributes.
390
+ *
391
+ * If `attrs` are a floating reference, then it is consumed.
392
+ * @param importer_type the GType of the importer being registered
393
+ * @param attrs the attributes that this importer is compatible with
394
+ */
395
+ export function importer_register(importer_type: GObject.GType, attrs: Gck.Attributes): void
396
+ /**
397
+ * Register built-in PKCS#11 and GnuPG importers.
398
+ */
399
+ export function importer_register_well_known(): void
400
+ /**
401
+ * Disconnect the mock prompter
402
+ */
403
+ export function mock_prompter_disconnect(): void
404
+ /**
405
+ * Queue an expected response on the mock prompter.
406
+ *
407
+ * Expects any prompt, and closes the prompt when it gets it.
408
+ */
409
+ export function mock_prompter_expect_close(): void
410
+ /**
411
+ * Queue an expected response on the mock prompter.
412
+ *
413
+ * Expects a confirmation prompt, and then cancels that prompt.
414
+ */
415
+ export function mock_prompter_expect_confirm_cancel(): void
416
+ /**
417
+ * Queue an expected response on the mock prompter.
418
+ *
419
+ * Expects a password prompt, and then cancels that prompt.
420
+ */
421
+ export function mock_prompter_expect_password_cancel(): void
422
+ /**
423
+ * Get the delay in milliseconds before the mock prompter completes
424
+ * an expected prompt.
425
+ * @returns the delay
426
+ */
427
+ export function mock_prompter_get_delay_msec(): number
428
+ /**
429
+ * Check if the mock prompter is expecting a response. This will be %TRUE
430
+ * when one of the <literal>gcr_mock_prompter_expect_xxx<!-- -->()</literal>
431
+ * functions have been used to queue an expected prompt, but that prompt
432
+ * response has not be 'used' yet.
433
+ * @returns whether expecting a prompt
434
+ */
435
+ export function mock_prompter_is_expecting(): boolean
436
+ /**
437
+ * Check if the mock prompter is showing any prompts.
438
+ * @returns whether prompting
439
+ */
440
+ export function mock_prompter_is_prompting(): boolean
441
+ /**
442
+ * Set the delay in milliseconds before the mock prompter completes
443
+ * an expected prompt.
444
+ * @param delay_msec prompt response delay in milliseconds
445
+ */
446
+ export function mock_prompter_set_delay_msec(delay_msec: number): void
447
+ /**
448
+ * Start the mock prompter. This is often used from the
449
+ * <literal>setup<!-- -->()</literal> function of tests.
450
+ *
451
+ * Starts the mock prompter in an additional thread. Use the returned DBus bus
452
+ * name with gcr_system_prompt_open_for_prompter() to connect to this prompter.
453
+ * @returns the bus name that the mock prompter is listening on
454
+ */
455
+ export function mock_prompter_start(): string | null
456
+ /**
457
+ * Stop the mock prompter. This is often used from the
458
+ * <literal>teardown<!-- -->()</literal> function of tests.
459
+ */
460
+ export function mock_prompter_stop(): void
461
+ /**
462
+ * Unreferences a parsed item which was referenced with gcr_parsed_ref()
463
+ * @param parsed a parsed item
464
+ */
465
+ export function parsed_unref(parsed: any | null): void
466
+ /**
467
+ * Add a #GckModule to the list of PKCS#11 modules that are used by the
468
+ * GCR library.
469
+ *
470
+ * It is not normally necessary to call this function. The available
471
+ * PKCS#11 modules installed on the system are automatically loaded
472
+ * by the GCR library.
473
+ * @param module a #GckModule
474
+ */
475
+ export function pkcs11_add_module(module: Gck.Module): void
476
+ /**
477
+ * Initialize a PKCS#11 module and add it to the modules that are
478
+ * used by the GCR library. Note that is an error to initialize the same
479
+ * PKCS#11 module twice.
480
+ *
481
+ * It is not normally necessary to call this function. The available
482
+ * PKCS#11 modules installed on the system are automatically loaded
483
+ * by the GCR library.
484
+ * @param module_path the full file path of the PKCS#11 module
485
+ * @param unused unused
486
+ * @returns whether the module was sucessfully added.
487
+ */
488
+ export function pkcs11_add_module_from_file(module_path: string | null, unused: any | null): boolean
489
+ /**
490
+ * List all the PKCS#11 modules that are used by the GCR library.
491
+ * Each module is a [class`Gck`.Module] object.
492
+ *
493
+ * An empty list of modules will be returned if [func`pkcs1`1_set_modules],
494
+ * or [func`pkcs1`1_initialize] has not yet run.
495
+ *
496
+ * When done with the list, free it with gck_list_unref_free().
497
+ * @returns a newly allocated list of #GckModule objects
498
+ */
499
+ export function pkcs11_get_modules(): Gck.Module[]
500
+ /**
501
+ * List all the PKCS#11 slots that are used by the GCR library for lookup
502
+ * of trust assertions. Each slot is a [class`Gck`.Slot] object.
503
+ *
504
+ * This will return an empty list if the [func`pkcs1`1_initialize] function has
505
+ * not yet been called.
506
+ * @returns a list of #GckSlot objects to use for lookup of trust, or the empty list if not initialized or no appropriate trust stores could be found.
507
+ */
508
+ export function pkcs11_get_trust_lookup_slots(): Gck.Slot[]
509
+ /**
510
+ * Get the PKCS#11 URIs that are used to identify which slots to use for
511
+ * lookup trust assertions.
512
+ * @returns the uri which identifies trust storage slot
513
+ */
514
+ export function pkcs11_get_trust_lookup_uris(): string[] | null
515
+ /**
516
+ * Selects an appropriate PKCS#11 slot to store trust assertions. The slot
517
+ * to use is normally configured automatically by the system.
518
+ *
519
+ * This will only return a valid result after the [func`pkcs1`1_initialize]
520
+ * method has been called.
521
+ *
522
+ * When done with the #GckSlot, use g_object_unref() to release it.
523
+ * @returns the #GckSlot to use for trust assertions, or null if not initialized or no appropriate trust store could be found.
524
+ */
525
+ export function pkcs11_get_trust_store_slot(): Gck.Slot | null
526
+ /**
527
+ * Get the PKCS#11 URI that is used to identify which slot to use for
528
+ * storing trust storage.
529
+ * @returns the uri which identifies trust storage slot
530
+ */
531
+ export function pkcs11_get_trust_store_uri(): string | null
532
+ /**
533
+ * Asynchronously initialize the registered PKCS#11 modules.
534
+ * @param cancellable optional cancellable used to cancel the operation
535
+ * @returns whether the operation was successful or not.
536
+ */
537
+ export function pkcs11_initialize(cancellable: Gio.Cancellable | null): boolean
538
+ /**
539
+ * Asynchronously initialize the registered PKCS#11 modules.
540
+ * @param cancellable optional cancellable used to cancel the operation
541
+ * @param callback callback which will be called when the operation completes
542
+ */
543
+ export function pkcs11_initialize_async<Z = unknown>(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<Z> | null): void
544
+ /**
545
+ * Complete the asynchronous operation to initialize the registered PKCS#11
546
+ * modules.
547
+ * @param result the asynchronous result
548
+ * @returns whether the operation was successful or not.
549
+ */
550
+ export function pkcs11_initialize_finish(result: Gio.AsyncResult): boolean
551
+ /**
552
+ * Set the list of PKCS#11 modules that are used by the GCR library.
553
+ * Each module in the list is a [class`Gck`.Module] object.
554
+ *
555
+ * It is not normally necessary to call this function. The available
556
+ * PKCS#11 modules installed on the system are automatically loaded
557
+ * by the GCR library.
558
+ * @param modules a list of PKCS#11 modules
559
+ */
560
+ export function pkcs11_set_modules(modules: Gck.Module[]): void
561
+ /**
562
+ * Set the PKCS#11 URIs that are used to identify which slots to use for
563
+ * lookup of trust assertions.
564
+ *
565
+ * It is not normally necessary to call this function. The relevant
566
+ * PKCS#11 slots are automatically configured by the GCR library.
567
+ * @param pkcs11_uris the uris which identifies trust lookup slots
568
+ */
569
+ export function pkcs11_set_trust_lookup_uris(pkcs11_uris: string | null): void
570
+ /**
571
+ * Set the PKCS#11 URI that is used to identify which slot to use for
572
+ * storing trust assertions.
573
+ *
574
+ * It is not normally necessary to call this function. The relevant
575
+ * PKCS#11 slot is automatically configured by the GCR library.
576
+ * @param pkcs11_uri the uri which identifies trust storage slot
577
+ */
578
+ export function pkcs11_set_trust_store_uri(pkcs11_uri: string | null): void
579
+ /**
580
+ * Add a pinned `certificate` for connections to `peer` for `purpose`. A pinned
581
+ * certificate overrides all other certificate verification and should be
582
+ * used with care.
583
+ *
584
+ * If the same pinned certificate already exists, then this operation
585
+ * does not add another, and succeeds without error.
586
+ *
587
+ * This call may block, see gcr_trust_add_pinned_certificate_async() for the
588
+ * non-blocking version.
589
+ * @param certificate a #GcrCertificate
590
+ * @param purpose the purpose string
591
+ * @param peer the peer for this pinned certificate
592
+ * @param cancellable a #GCancellable
593
+ * @returns %TRUE if the pinned certificate is recorded successfully
594
+ */
595
+ export function trust_add_pinned_certificate(certificate: Certificate, purpose: string | null, peer: string | null, cancellable: Gio.Cancellable | null): boolean
596
+ /**
597
+ * Add a pinned certificate for communication with `peer` for `purpose`. A pinned
598
+ * certificate overrides all other certificate verification and should be used
599
+ * with care.
600
+ *
601
+ * If the same pinned certificate already exists, then this operation
602
+ * does not add another, and succeeds without error.
603
+ *
604
+ * When the operation is finished, callback will be called. You can then call
605
+ * [func`Gcr`.trust_add_pinned_certificate_finish] to get the result of the
606
+ * operation.
607
+ * @param certificate a #GcrCertificate
608
+ * @param purpose the purpose string
609
+ * @param peer the peer for this pinned certificate
610
+ * @param cancellable a #GCancellable
611
+ * @param callback a #GAsyncReadyCallback to call when the operation completes
612
+ */
613
+ export function trust_add_pinned_certificate_async<Z = unknown>(certificate: Certificate, purpose: string | null, peer: string | null, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<Z> | null): void
614
+ /**
615
+ * Finishes an asynchronous operation started by
616
+ * gcr_trust_add_pinned_certificate_async().
617
+ * @param result the #GAsyncResult passed to the callback
618
+ * @returns %TRUE if the pinned certificate is recorded successfully
619
+ */
620
+ export function trust_add_pinned_certificate_finish(result: Gio.AsyncResult): boolean
621
+ /**
622
+ * Check if the `certificate` is a trust anchor for the given `purpose`. A trust
623
+ * anchor is used to verify the signatures on other certificates when verifying
624
+ * a certificate chain. Also known as a trusted certificate authority.
625
+ *
626
+ * This call may block, see [func`Gcr`.trust_is_certificate_anchored_async] for
627
+ * the non-blocking version.
628
+ *
629
+ * In the case of an error, %FALSE is also returned. Check `error` to detect
630
+ * if an error occurred.
631
+ * @param certificate a #GcrCertificate to check
632
+ * @param purpose the purpose string
633
+ * @param cancellable a #GCancellable
634
+ * @returns %TRUE if the certificate is a trust anchor
635
+ */
636
+ export function trust_is_certificate_anchored(certificate: Certificate, purpose: string | null, cancellable: Gio.Cancellable | null): boolean
637
+ /**
638
+ * Check if the `certificate` is a trust anchor for the given `purpose`. A trust
639
+ * anchor is used to verify the signatures on other certificates when verifying
640
+ * a certificate chain. Also known as a trusted certificate authority.
641
+ *
642
+ * When the operation is finished, callback will be called. You can then call
643
+ * gcr_trust_is_certificate_anchored_finish() to get the result of the operation.
644
+ * @param certificate a #GcrCertificate to check
645
+ * @param purpose the purpose string
646
+ * @param cancellable a #GCancellable
647
+ * @param callback a #GAsyncReadyCallback to call when the operation completes
648
+ */
649
+ export function trust_is_certificate_anchored_async<Z = unknown>(certificate: Certificate, purpose: string | null, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<Z> | null): void
650
+ /**
651
+ * Finishes an asynchronous operation started by
652
+ * gcr_trust_is_certificate_anchored_async().
653
+ *
654
+ * In the case of an error, %FALSE is also returned. Check `error` to detect
655
+ * if an error occurred.
656
+ * @param result the #GAsyncResult passed to the callback
657
+ * @returns %TRUE if the certificate is a trust anchor
658
+ */
659
+ export function trust_is_certificate_anchored_finish(result: Gio.AsyncResult): boolean
660
+ /**
661
+ * Check if `certificate` is pinned for `purpose` to communicate with `peer`.
662
+ * A pinned certificate overrides all other certificate verification.
663
+ *
664
+ * This call may block, see gcr_trust_is_certificate_pinned_async() for the
665
+ * non-blocking version.
666
+ *
667
+ * In the case of an error, %FALSE is also returned. Check `error` to detect
668
+ * if an error occurred.
669
+ * @param certificate a #GcrCertificate to check
670
+ * @param purpose the purpose string
671
+ * @param peer the peer for this pinned
672
+ * @param cancellable a #GCancellable
673
+ * @returns %TRUE if the certificate is pinned for the host and purpose
674
+ */
675
+ export function trust_is_certificate_pinned(certificate: Certificate, purpose: string | null, peer: string | null, cancellable: Gio.Cancellable | null): boolean
676
+ /**
677
+ * Check if `certificate` is pinned for `purpose` to communicate with `peer`. A
678
+ * pinned certificate overrides all other certificate verification.
679
+ *
680
+ * When the operation is finished, callback will be called. You can then call
681
+ * [func`Gcr`.trust_is_certificate_pinned_finish] to get the result of the
682
+ * operation.
683
+ * @param certificate a #GcrCertificate to check
684
+ * @param purpose the purpose string
685
+ * @param peer the peer for this pinned
686
+ * @param cancellable a #GCancellable
687
+ * @param callback a #GAsyncReadyCallback to call when the operation completes
688
+ */
689
+ export function trust_is_certificate_pinned_async<Z = unknown>(certificate: Certificate, purpose: string | null, peer: string | null, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<Z> | null): void
690
+ /**
691
+ * Finishes an asynchronous operation started by
692
+ * gcr_trust_is_certificate_pinned_async().
693
+ *
694
+ * In the case of an error, %FALSE is also returned. Check `error` to detect
695
+ * if an error occurred.
696
+ * @param result the #GAsyncResult passed to the callback
697
+ * @returns %TRUE if the certificate is pinned.
698
+ */
699
+ export function trust_is_certificate_pinned_finish(result: Gio.AsyncResult): boolean
700
+ /**
701
+ * Remove a pinned certificate for communication with `peer` for `purpose`.
702
+ *
703
+ * If the same pinned certificate does not exist, or was already removed,
704
+ * then this operation succeeds without error.
705
+ *
706
+ * This call may block, see gcr_trust_remove_pinned_certificate_async() for the
707
+ * non-blocking version.
708
+ * @param certificate a #GcrCertificate
709
+ * @param purpose the purpose string
710
+ * @param peer the peer for this pinned certificate
711
+ * @param cancellable a #GCancellable
712
+ * @returns %TRUE if the pinned certificate no longer exists
713
+ */
714
+ export function trust_remove_pinned_certificate(certificate: Certificate, purpose: string | null, peer: string | null, cancellable: Gio.Cancellable | null): boolean
715
+ /**
716
+ * Remove a pinned certificate for communication with `peer` for `purpose`.
717
+ *
718
+ * If the same pinned certificate does not exist, or was already removed,
719
+ * then this operation succeeds without error.
720
+ *
721
+ * When the operation is finished, callback will be called. You can then call
722
+ * gcr_trust_remove_pinned_certificate_finish() to get the result of the
723
+ * operation.
724
+ * @param certificate a #GcrCertificate
725
+ * @param purpose the purpose string
726
+ * @param peer the peer for this pinned certificate
727
+ * @param cancellable a #GCancellable
728
+ * @param callback a #GAsyncReadyCallback to call when the operation completes
729
+ */
730
+ export function trust_remove_pinned_certificate_async<Z = unknown>(certificate: Certificate, purpose: string | null, peer: string | null, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<Z> | null): void
731
+ /**
732
+ * Finishes an asynchronous operation started by
733
+ * gcr_trust_remove_pinned_certificate_async().
734
+ * @param result the #GAsyncResult passed to the callback
735
+ * @returns %TRUE if the pinned certificate no longer exists
736
+ */
737
+ export function trust_remove_pinned_certificate_finish(result: Gio.AsyncResult): boolean
738
+ /**
739
+ * A function which is called by [class`FilterCollection]` in order to determine
740
+ * whether an object should show through the filter or not.
741
+ * @callback
742
+ * @param object object to filter
743
+ * @returns %TRUE if an object should be included in the filtered collection
744
+ */
745
+ export interface FilterCollectionFunc {
746
+ (object: GObject.Object): boolean
747
+ }
748
+ export module Certificate {
749
+
750
+ // Constructor properties interface
751
+
752
+ export interface ConstructorProperties extends Comparable.ConstructorProperties, GObject.Object.ConstructorProperties {
753
+ }
754
+
755
+ }
756
+
757
+ export interface Certificate extends Comparable {
758
+
759
+ // Own properties of Gcr-3.Gcr.Certificate
760
+
761
+ /**
762
+ * A readable description for this certificate
763
+ */
764
+ readonly description: string | null
765
+ /**
766
+ * The expiry date of the certificate
767
+ */
768
+ readonly expiry: GLib.Date
769
+ /**
770
+ * An icon representing the certificate
771
+ */
772
+ readonly icon: Gio.Icon
773
+ /**
774
+ * Common name part of the certificate issuer
775
+ */
776
+ readonly issuer: string | null
777
+ /**
778
+ * A readable label for this certificate.
779
+ */
780
+ readonly label: string | null
781
+ /**
782
+ * GLib markup to describe the certificate
783
+ */
784
+ readonly markup: string | null
785
+ /**
786
+ * Common name part of the certificate subject
787
+ */
788
+ readonly subject: string | null
789
+
790
+ // Owm methods of Gcr-3.Gcr.Certificate
791
+
792
+ /**
793
+ * Get the basic constraints for the certificate if present. If %FALSE is
794
+ * returned then no basic constraints are present and the `is_ca` and
795
+ * `path_len` arguments are not changed.
796
+ * @returns whether basic constraints are present or not
797
+ */
798
+ get_basic_constraints(): [ /* returnType */ boolean, /* is_ca */ boolean, /* path_len */ number ]
799
+ /**
800
+ * Gets the raw DER data for an X.509 certificate.
801
+ * @returns raw DER data of the X.509 certificate
802
+ */
803
+ get_der_data(): Uint8Array
804
+ /**
805
+ * Get the expiry date of this certificate.
806
+ *
807
+ * The #GDate returned should be freed by the caller using
808
+ * g_date_free() when no longer required.
809
+ * @returns An allocated expiry date of this certificate.
810
+ */
811
+ get_expiry_date(): GLib.Date
812
+ /**
813
+ * Calculate the fingerprint for this certificate.
814
+ *
815
+ * The caller should free the returned data using g_free() when
816
+ * it is no longer required.
817
+ * @param type the type of algorithm for the fingerprint.
818
+ * @returns the raw binary fingerprint
819
+ */
820
+ get_fingerprint(type: GLib.ChecksumType): Uint8Array
821
+ /**
822
+ * Calculate the fingerprint for this certificate, and return it
823
+ * as a hex string.
824
+ *
825
+ * The caller should free the returned data using g_free() when
826
+ * it is no longer required.
827
+ * @param type the type of algorithm for the fingerprint.
828
+ * @returns an allocated hex string which contains the fingerprint.
829
+ */
830
+ get_fingerprint_hex(type: GLib.ChecksumType): string | null
831
+ /**
832
+ * Get the issued date of this certificate.
833
+ *
834
+ * The #GDate returned should be freed by the caller using
835
+ * g_date_free() when no longer required.
836
+ * @returns An allocated issued date of this certificate.
837
+ */
838
+ get_issued_date(): GLib.Date
839
+ /**
840
+ * Get the common name of the issuer of this certificate.
841
+ *
842
+ * The string returned should be freed by the caller when no longer
843
+ * required.
844
+ * @returns The allocated issuer CN, or %NULL if no issuer CN present.
845
+ */
846
+ get_issuer_cn(): string | null
847
+ /**
848
+ * Get the full issuer DN of the certificate as a (mostly)
849
+ * readable string.
850
+ *
851
+ * The string returned should be freed by the caller when no longer
852
+ * required.
853
+ * @returns The allocated issuer DN of the certificate.
854
+ */
855
+ get_issuer_dn(): string | null
856
+ /**
857
+ * Get a name to represent the issuer of this certificate.
858
+ *
859
+ * This will try to lookup the common name, orianizational unit,
860
+ * organization in that order.
861
+ * @returns the allocated issuer name, or %NULL if no issuer name
862
+ */
863
+ get_issuer_name(): string | null
864
+ /**
865
+ * Get a part of the DN of the issuer of this certificate.
866
+ *
867
+ * Examples of a `part` might be the 'OU' (organizational unit)
868
+ * or the 'CN' (common name). Only the value of that part
869
+ * of the DN is returned.
870
+ *
871
+ * The string returned should be freed by the caller when no longer
872
+ * required.
873
+ * @param part a DN type string or OID.
874
+ * @returns the allocated part of the issuer DN, or %NULL if no such part is present
875
+ */
876
+ get_issuer_part(part: string | null): string | null
877
+ /**
878
+ * Get the raw DER data for the issuer DN of the certificate.
879
+ *
880
+ * The data should be freed by using g_free() when no longer required.
881
+ * @returns allocated memory containing the raw issuer
882
+ */
883
+ get_issuer_raw(): Uint8Array
884
+ /**
885
+ * Get the key size in bits of the public key represented
886
+ * by this certificate.
887
+ * @returns The key size of the certificate.
888
+ */
889
+ get_key_size(): number
890
+ /**
891
+ * Calculate a GMarkup string for displaying this certificate.
892
+ * @returns the markup string
893
+ */
894
+ get_markup_text(): string | null
895
+ /**
896
+ * Get the raw binary serial number of the certificate.
897
+ *
898
+ * The caller should free the returned data using g_free() when
899
+ * it is no longer required.
900
+ * @returns the raw binary serial number.
901
+ */
902
+ get_serial_number(): Uint8Array
903
+ /**
904
+ * Get the serial number of the certificate as a hex string.
905
+ *
906
+ * The caller should free the returned data using g_free() when
907
+ * it is no longer required.
908
+ * @returns an allocated string containing the serial number as hex.
909
+ */
910
+ get_serial_number_hex(): string | null
911
+ /**
912
+ * Get the common name of the subject of this certificate.
913
+ *
914
+ * The string returned should be freed by the caller when no longer
915
+ * required.
916
+ * @returns The allocated subject CN, or %NULL if no subject CN present.
917
+ */
918
+ get_subject_cn(): string | null
919
+ /**
920
+ * Get the full subject DN of the certificate as a (mostly)
921
+ * readable string.
922
+ *
923
+ * The string returned should be freed by the caller when no longer
924
+ * required.
925
+ * @returns The allocated subject DN of the certificate.
926
+ */
927
+ get_subject_dn(): string | null
928
+ /**
929
+ * Get a name to represent the subject of this certificate.
930
+ *
931
+ * This will try to lookup the common name, orianizational unit,
932
+ * organization in that order.
933
+ * @returns the allocated subject name, or %NULL if no subject name
934
+ */
935
+ get_subject_name(): string | null
936
+ /**
937
+ * Get a part of the DN of the subject of this certificate.
938
+ *
939
+ * Examples of a `part` might be the 'OU' (organizational unit)
940
+ * or the 'CN' (common name). Only the value of that part
941
+ * of the DN is returned.
942
+ *
943
+ * The string returned should be freed by the caller when no longer
944
+ * required.
945
+ * @param part a DN type string or OID.
946
+ * @returns the allocated part of the subject DN, or %NULL if no such part is present.
947
+ */
948
+ get_subject_part(part: string | null): string | null
949
+ /**
950
+ * Get the raw DER data for the subject DN of the certificate.
951
+ *
952
+ * The data should be freed by using g_free() when no longer required.
953
+ * @returns allocated memory containing the raw subject
954
+ */
955
+ get_subject_raw(): Uint8Array
956
+ /**
957
+ * Check if `issuer` could be the issuer of this certificate. This is done by
958
+ * comparing the relevant subject and issuer fields. No signature check is
959
+ * done. Proper verification of certificates must be done via a crypto
960
+ * library.
961
+ * @param issuer a possible issuer #GcrCertificate
962
+ * @returns whether @issuer could be the issuer of the certificate.
963
+ */
964
+ is_issuer(issuer: Certificate): boolean
965
+ /**
966
+ * Implementers of the #GcrCertificate mixin should call this function to notify
967
+ * when the certificate has changed to emit notifications on the various
968
+ * properties.
969
+ */
970
+ mixin_emit_notify(): void
971
+
972
+ // Own virtual methods of Gcr-3.Gcr.Certificate
973
+
974
+ /**
975
+ * Gets the raw DER data for an X.509 certificate.
976
+ * @virtual
977
+ * @returns raw DER data of the X.509 certificate
978
+ */
979
+ vfunc_get_der_data(): Uint8Array
980
+
981
+ // Class property signals of Gcr-3.Gcr.Certificate
982
+
983
+ connect(sigName: "notify::description", callback: (($obj: Certificate, pspec: GObject.ParamSpec) => void)): number
984
+ connect_after(sigName: "notify::description", callback: (($obj: Certificate, pspec: GObject.ParamSpec) => void)): number
985
+ emit(sigName: "notify::description", ...args: any[]): void
986
+ connect(sigName: "notify::expiry", callback: (($obj: Certificate, pspec: GObject.ParamSpec) => void)): number
987
+ connect_after(sigName: "notify::expiry", callback: (($obj: Certificate, pspec: GObject.ParamSpec) => void)): number
988
+ emit(sigName: "notify::expiry", ...args: any[]): void
989
+ connect(sigName: "notify::icon", callback: (($obj: Certificate, pspec: GObject.ParamSpec) => void)): number
990
+ connect_after(sigName: "notify::icon", callback: (($obj: Certificate, pspec: GObject.ParamSpec) => void)): number
991
+ emit(sigName: "notify::icon", ...args: any[]): void
992
+ connect(sigName: "notify::issuer", callback: (($obj: Certificate, pspec: GObject.ParamSpec) => void)): number
993
+ connect_after(sigName: "notify::issuer", callback: (($obj: Certificate, pspec: GObject.ParamSpec) => void)): number
994
+ emit(sigName: "notify::issuer", ...args: any[]): void
995
+ connect(sigName: "notify::label", callback: (($obj: Certificate, pspec: GObject.ParamSpec) => void)): number
996
+ connect_after(sigName: "notify::label", callback: (($obj: Certificate, pspec: GObject.ParamSpec) => void)): number
997
+ emit(sigName: "notify::label", ...args: any[]): void
998
+ connect(sigName: "notify::markup", callback: (($obj: Certificate, pspec: GObject.ParamSpec) => void)): number
999
+ connect_after(sigName: "notify::markup", callback: (($obj: Certificate, pspec: GObject.ParamSpec) => void)): number
1000
+ emit(sigName: "notify::markup", ...args: any[]): void
1001
+ connect(sigName: "notify::subject", callback: (($obj: Certificate, pspec: GObject.ParamSpec) => void)): number
1002
+ connect_after(sigName: "notify::subject", callback: (($obj: Certificate, pspec: GObject.ParamSpec) => void)): number
1003
+ emit(sigName: "notify::subject", ...args: any[]): void
1004
+ connect(sigName: string, callback: (...args: any[]) => void): number
1005
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
1006
+ emit(sigName: string, ...args: any[]): void
1007
+ disconnect(id: number): void
1008
+ }
1009
+
1010
+ /**
1011
+ * An interface that represents an X.509 certificate.
1012
+ *
1013
+ * Objects can implement this interface to make a certificate usable with the
1014
+ * GCR library.
1015
+ *
1016
+ * Various methods are available to parse out relevant bits of the certificate.
1017
+ * However no verification of the validity of a certificate is done here. Use
1018
+ * your favorite crypto library to do this.
1019
+ *
1020
+ * You can use [class`SimpleCertificate]` to simply load a certificate for which
1021
+ * you already have the raw certificate data.
1022
+ *
1023
+ * The #GcrCertificate interface has several properties that must be implemented.
1024
+ * You can use a mixin to implement these properties if desired. See the
1025
+ * gcr_certificate_mixin_class_init() and gcr_certificate_mixin_get_property()
1026
+ * functions.
1027
+ *
1028
+ * All certificates are comparable. If implementing a #GcrCertificate, you can
1029
+ * use GCR_CERTIFICATE_MIXIN_IMPLEMENT_COMPARABLE() to implement the #GcrComparable
1030
+ * interface.
1031
+ * @interface
1032
+ */
1033
+ export class Certificate extends GObject.Object {
1034
+
1035
+ // Own properties of Gcr-3.Gcr.Certificate
1036
+
1037
+ static name: string
1038
+ static $gtype: GObject.GType<Certificate>
1039
+
1040
+ // Constructors of Gcr-3.Gcr.Certificate
1041
+
1042
+ constructor(config?: Certificate.ConstructorProperties)
1043
+ _init(config?: Certificate.ConstructorProperties): void
1044
+ /**
1045
+ * Compare one certificate against another. If the certificates are equal
1046
+ * then zero is returned. If one certificate is %NULL or not a certificate,
1047
+ * then a non-zero value is returned.
1048
+ *
1049
+ * The return value is useful in a stable sort, but has no user logical
1050
+ * meaning.
1051
+ * @param first the certificate to compare
1052
+ * @param other the certificate to compare against
1053
+ * @returns zero if the certificates match, non-zero otherwise.
1054
+ */
1055
+ static compare(first: Comparable | null, other: Comparable | null): number
1056
+ }
1057
+
1058
+ export module Collection {
1059
+
1060
+ // Signal callback interfaces
1061
+
1062
+ /**
1063
+ * Signal callback interface for `added`
1064
+ */
1065
+ export interface AddedSignalCallback {
1066
+ ($obj: Collection, object: GObject.Object): void
1067
+ }
1068
+
1069
+ /**
1070
+ * Signal callback interface for `removed`
1071
+ */
1072
+ export interface RemovedSignalCallback {
1073
+ ($obj: Collection, object: GObject.Object): void
1074
+ }
1075
+
1076
+
1077
+ // Constructor properties interface
1078
+
1079
+ export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
1080
+ }
1081
+
1082
+ }
1083
+
1084
+ export interface Collection {
1085
+
1086
+ // Owm methods of Gcr-3.Gcr.Collection
1087
+
1088
+ /**
1089
+ * Check whether the collection contains an object or not.
1090
+ * @param object object to check
1091
+ * @returns whether the collection contains this object
1092
+ */
1093
+ contains(object: GObject.Object): boolean
1094
+ /**
1095
+ * Emit the #GcrCollection::added signal for the given object. This function
1096
+ * is used by implementors of this interface.
1097
+ * @param object The object that was added
1098
+ */
1099
+ emit_added(object: GObject.Object): void
1100
+ /**
1101
+ * Emit the #GcrCollection::removed signal for the given object. This function
1102
+ * is used by implementors of this interface.
1103
+ * @param object The object that was removed
1104
+ */
1105
+ emit_removed(object: GObject.Object): void
1106
+ /**
1107
+ * Get the number of objects in this collection.
1108
+ * @returns The number of objects.
1109
+ */
1110
+ get_length(): number
1111
+ /**
1112
+ * Get a list of the objects in this collection.
1113
+ * @returns a list of the objects in this collection, which should be freed with g_list_free()
1114
+ */
1115
+ get_objects(): GObject.Object[]
1116
+
1117
+ // Own virtual methods of Gcr-3.Gcr.Collection
1118
+
1119
+ vfunc_added(object: GObject.Object): void
1120
+ /**
1121
+ * Check whether the collection contains an object or not.
1122
+ * @virtual
1123
+ * @param object object to check
1124
+ * @returns whether the collection contains this object
1125
+ */
1126
+ vfunc_contains(object: GObject.Object): boolean
1127
+ /**
1128
+ * Get the number of objects in this collection.
1129
+ * @virtual
1130
+ * @returns The number of objects.
1131
+ */
1132
+ vfunc_get_length(): number
1133
+ /**
1134
+ * Get a list of the objects in this collection.
1135
+ * @virtual
1136
+ * @returns a list of the objects in this collection, which should be freed with g_list_free()
1137
+ */
1138
+ vfunc_get_objects(): GObject.Object[]
1139
+ vfunc_removed(object: GObject.Object): void
1140
+
1141
+ // Own signals of Gcr-3.Gcr.Collection
1142
+
1143
+ connect(sigName: "added", callback: Collection.AddedSignalCallback): number
1144
+ connect_after(sigName: "added", callback: Collection.AddedSignalCallback): number
1145
+ emit(sigName: "added", object: GObject.Object, ...args: any[]): void
1146
+ connect(sigName: "removed", callback: Collection.RemovedSignalCallback): number
1147
+ connect_after(sigName: "removed", callback: Collection.RemovedSignalCallback): number
1148
+ emit(sigName: "removed", object: GObject.Object, ...args: any[]): void
1149
+
1150
+ // Class property signals of Gcr-3.Gcr.Collection
1151
+
1152
+ connect(sigName: string, callback: (...args: any[]) => void): number
1153
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
1154
+ emit(sigName: string, ...args: any[]): void
1155
+ disconnect(id: number): void
1156
+ }
1157
+
1158
+ /**
1159
+ * A #GcrCollection is used to group a set of objects.
1160
+ *
1161
+ * This is an abstract interface which can be used to determine which objects
1162
+ * show up in a selector or other user interface element.
1163
+ *
1164
+ * Use [ctor`SimpleCollection`.new] to create a concrete implementation of this
1165
+ * interface which you can add objects to.
1166
+ * @interface
1167
+ */
1168
+ export class Collection extends GObject.Object {
1169
+
1170
+ // Own properties of Gcr-3.Gcr.Collection
1171
+
1172
+ static name: string
1173
+ static $gtype: GObject.GType<Collection>
1174
+
1175
+ // Constructors of Gcr-3.Gcr.Collection
1176
+
1177
+ constructor(config?: Collection.ConstructorProperties)
1178
+ _init(config?: Collection.ConstructorProperties): void
1179
+ }
1180
+
1181
+ export module Comparable {
1182
+
1183
+ // Constructor properties interface
1184
+
1185
+ export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
1186
+ }
1187
+
1188
+ }
1189
+
1190
+ export interface Comparable {
1191
+
1192
+ // Owm methods of Gcr-3.Gcr.Comparable
1193
+
1194
+ /**
1195
+ * Compare whether two objects represent the same thing. The return value can
1196
+ * also be used to sort the objects.
1197
+ * @param other Another comparable object
1198
+ * @returns Zero if the two objects represent the same thing, non-zero if not.
1199
+ */
1200
+ compare(other: Comparable | null): number
1201
+
1202
+ // Own virtual methods of Gcr-3.Gcr.Comparable
1203
+
1204
+ /**
1205
+ * Compare whether two objects represent the same thing. The return value can
1206
+ * also be used to sort the objects.
1207
+ * @virtual
1208
+ * @param other Another comparable object
1209
+ * @returns Zero if the two objects represent the same thing, non-zero if not.
1210
+ */
1211
+ vfunc_compare(other: Comparable | null): number
1212
+
1213
+ // Class property signals of Gcr-3.Gcr.Comparable
1214
+
1215
+ connect(sigName: string, callback: (...args: any[]) => void): number
1216
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
1217
+ emit(sigName: string, ...args: any[]): void
1218
+ disconnect(id: number): void
1219
+ }
1220
+
1221
+ /**
1222
+ * An interface for comparing objects
1223
+ * @interface
1224
+ */
1225
+ export class Comparable extends GObject.Object {
1226
+
1227
+ // Own properties of Gcr-3.Gcr.Comparable
1228
+
1229
+ static name: string
1230
+ static $gtype: GObject.GType<Comparable>
1231
+
1232
+ // Constructors of Gcr-3.Gcr.Comparable
1233
+
1234
+ constructor(config?: Comparable.ConstructorProperties)
1235
+ _init(config?: Comparable.ConstructorProperties): void
1236
+ }
1237
+
1238
+ export module ImportInteraction {
1239
+
1240
+ // Constructor properties interface
1241
+
1242
+ export interface ConstructorProperties extends Gio.TlsInteraction.ConstructorProperties, GObject.Object.ConstructorProperties {
1243
+ }
1244
+
1245
+ }
1246
+
1247
+ export interface ImportInteraction extends Gio.TlsInteraction {
1248
+
1249
+ // Owm methods of Gcr-3.Gcr.ImportInteraction
1250
+
1251
+ /**
1252
+ * Supplement attributes before import. This means prompting the user for
1253
+ * things like labels and the like. The needed attributes will have been passed
1254
+ * to gcr_import_interaction_supplement_prep().
1255
+ *
1256
+ * This method prompts the user and fills in the attributes. If the user or
1257
+ * cancellable cancels the operation the error should be set with %G_IO_ERROR_CANCELLED.
1258
+ * @param builder supplemented attributes
1259
+ * @param cancellable optional cancellable object
1260
+ * @returns %G_TLS_INTERACTION_HANDLED if successful or %G_TLS_INTERACTION_FAILED
1261
+ */
1262
+ supplement(builder: Gck.Builder, cancellable: Gio.Cancellable | null): Gio.TlsInteractionResult
1263
+ /**
1264
+ * Asynchronously supplement attributes before import. This means prompting the
1265
+ * user for things like labels and the like. The needed attributes will have
1266
+ * been passed to gcr_import_interaction_supplement_prep().
1267
+ *
1268
+ * This method prompts the user and fills in the attributes.
1269
+ * @param builder supplemented attributes
1270
+ * @param cancellable optional cancellable object
1271
+ * @param callback called when the operation completes
1272
+ */
1273
+ supplement_async(builder: Gck.Builder, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
1274
+ /**
1275
+ * Complete operation to asynchronously supplement attributes before import.
1276
+ *
1277
+ * If the user or cancellable cancels the operation the error should be set
1278
+ * with %G_IO_ERROR_CANCELLED.
1279
+ * @param result the asynchronous result
1280
+ * @returns %G_TLS_INTERACTION_HANDLED if successful or %G_TLS_INTERACTION_FAILED
1281
+ */
1282
+ supplement_finish(result: Gio.AsyncResult): Gio.TlsInteractionResult
1283
+ /**
1284
+ * Prepare for supplementing the given attributes before import. This means
1285
+ * prompting the user for things like labels and the like. The attributes
1286
+ * will contain attributes for values that the importer needs, either empty
1287
+ * or prefilled with suggested values.
1288
+ *
1289
+ * This method does not prompt the user, but rather just prepares the
1290
+ * interaction that these are the attributes that are needed.
1291
+ * @param builder attributes to supplement
1292
+ */
1293
+ supplement_prep(builder: Gck.Builder): void
1294
+
1295
+ // Own virtual methods of Gcr-3.Gcr.ImportInteraction
1296
+
1297
+ /**
1298
+ * Supplement attributes before import. This means prompting the user for
1299
+ * things like labels and the like. The needed attributes will have been passed
1300
+ * to gcr_import_interaction_supplement_prep().
1301
+ *
1302
+ * This method prompts the user and fills in the attributes. If the user or
1303
+ * cancellable cancels the operation the error should be set with %G_IO_ERROR_CANCELLED.
1304
+ * @virtual
1305
+ * @param builder supplemented attributes
1306
+ * @param cancellable optional cancellable object
1307
+ * @returns %G_TLS_INTERACTION_HANDLED if successful or %G_TLS_INTERACTION_FAILED
1308
+ */
1309
+ vfunc_supplement(builder: Gck.Builder, cancellable: Gio.Cancellable | null): Gio.TlsInteractionResult
1310
+ /**
1311
+ * Asynchronously supplement attributes before import. This means prompting the
1312
+ * user for things like labels and the like. The needed attributes will have
1313
+ * been passed to gcr_import_interaction_supplement_prep().
1314
+ *
1315
+ * This method prompts the user and fills in the attributes.
1316
+ * @virtual
1317
+ * @param builder supplemented attributes
1318
+ * @param cancellable optional cancellable object
1319
+ * @param callback called when the operation completes
1320
+ */
1321
+ vfunc_supplement_async(builder: Gck.Builder, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
1322
+ /**
1323
+ * Complete operation to asynchronously supplement attributes before import.
1324
+ *
1325
+ * If the user or cancellable cancels the operation the error should be set
1326
+ * with %G_IO_ERROR_CANCELLED.
1327
+ * @virtual
1328
+ * @param result the asynchronous result
1329
+ * @returns %G_TLS_INTERACTION_HANDLED if successful or %G_TLS_INTERACTION_FAILED
1330
+ */
1331
+ vfunc_supplement_finish(result: Gio.AsyncResult): Gio.TlsInteractionResult
1332
+ /**
1333
+ * Prepare for supplementing the given attributes before import. This means
1334
+ * prompting the user for things like labels and the like. The attributes
1335
+ * will contain attributes for values that the importer needs, either empty
1336
+ * or prefilled with suggested values.
1337
+ *
1338
+ * This method does not prompt the user, but rather just prepares the
1339
+ * interaction that these are the attributes that are needed.
1340
+ * @virtual
1341
+ * @param builder attributes to supplement
1342
+ */
1343
+ vfunc_supplement_prep(builder: Gck.Builder): void
1344
+
1345
+ // Class property signals of Gcr-3.Gcr.ImportInteraction
1346
+
1347
+ connect(sigName: string, callback: (...args: any[]) => void): number
1348
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
1349
+ emit(sigName: string, ...args: any[]): void
1350
+ disconnect(id: number): void
1351
+ }
1352
+
1353
+ /**
1354
+ * This is an interface implemented by a caller performing an import. It allows
1355
+ * the importer to ask the caller for further information about the import.
1356
+ *
1357
+ * It must be implemented on a derived class of [class`Gio`.TlsInteraction]
1358
+ * @interface
1359
+ */
1360
+ export class ImportInteraction extends GObject.Object {
1361
+
1362
+ // Own properties of Gcr-3.Gcr.ImportInteraction
1363
+
1364
+ static name: string
1365
+ static $gtype: GObject.GType<ImportInteraction>
1366
+
1367
+ // Constructors of Gcr-3.Gcr.ImportInteraction
1368
+
1369
+ constructor(config?: ImportInteraction.ConstructorProperties)
1370
+ _init(config?: ImportInteraction.ConstructorProperties): void
1371
+ }
1372
+
1373
+ export module Importer {
1374
+
1375
+ // Constructor properties interface
1376
+
1377
+ export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
1378
+
1379
+ // Own constructor properties of Gcr-3.Gcr.Importer
1380
+
1381
+ /**
1382
+ * The interaction for the importer.
1383
+ */
1384
+ interaction?: Gio.TlsInteraction | null
1385
+ }
1386
+
1387
+ }
1388
+
1389
+ export interface Importer {
1390
+
1391
+ // Own properties of Gcr-3.Gcr.Importer
1392
+
1393
+ /**
1394
+ * The icon for the importer.
1395
+ */
1396
+ readonly icon: Gio.Icon
1397
+ /**
1398
+ * The interaction for the importer.
1399
+ */
1400
+ interaction: Gio.TlsInteraction
1401
+ /**
1402
+ * The label for the importer.
1403
+ */
1404
+ readonly label: string | null
1405
+ /**
1406
+ * The URI of the location imported to.
1407
+ */
1408
+ readonly uri: string | null
1409
+
1410
+ // Owm methods of Gcr-3.Gcr.Importer
1411
+
1412
+ /**
1413
+ * Get the interaction used to prompt the user when needed by this
1414
+ * importer.
1415
+ * @returns the interaction or %NULL
1416
+ */
1417
+ get_interaction(): Gio.TlsInteraction | null
1418
+ /**
1419
+ * Import the queued items in the importer. This call will block
1420
+ * until the operation completes.
1421
+ * @param cancellable a #GCancellable, or %NULL
1422
+ * @returns whether the items were imported successfully or not
1423
+ */
1424
+ import(cancellable: Gio.Cancellable | null): boolean
1425
+ /**
1426
+ * Import the queued items in the importer. This function returns immediately
1427
+ * and completes asynchronously.
1428
+ * @param cancellable a #GCancellable, or %NULL
1429
+ * @param callback called when the operation completes
1430
+ */
1431
+ import_async(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
1432
+ /**
1433
+ * Complete an asynchronous operation to import queued items.
1434
+ * @param result an asynchronous result
1435
+ * @returns whether the import succeeded or failed
1436
+ */
1437
+ import_finish(result: Gio.AsyncResult): boolean
1438
+ /**
1439
+ * Queues an additional item to be imported. The parsed item is represented
1440
+ * by the state of the [class`Parser]` at the time of calling this method.
1441
+ *
1442
+ * If the parsed item is incompatible with the importer, then this will
1443
+ * fail and the item will not be queued.
1444
+ * @param parsed a parsed item to import
1445
+ * @returns whether the item was queued or not
1446
+ */
1447
+ queue_for_parsed(parsed: Parsed): boolean
1448
+ /**
1449
+ * Set the interaction used to prompt the user when needed by this
1450
+ * importer.
1451
+ * @param interaction the interaction used by the importer
1452
+ */
1453
+ set_interaction(interaction: Gio.TlsInteraction): void
1454
+
1455
+ // Own virtual methods of Gcr-3.Gcr.Importer
1456
+
1457
+ /**
1458
+ * Import the queued items in the importer. This function returns immediately
1459
+ * and completes asynchronously.
1460
+ * @virtual
1461
+ * @param cancellable a #GCancellable, or %NULL
1462
+ * @param callback called when the operation completes
1463
+ */
1464
+ vfunc_import_async(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
1465
+ /**
1466
+ * Complete an asynchronous operation to import queued items.
1467
+ * @virtual
1468
+ * @param result an asynchronous result
1469
+ * @returns whether the import succeeded or failed
1470
+ */
1471
+ vfunc_import_finish(result: Gio.AsyncResult): boolean
1472
+ vfunc_import_sync(cancellable: Gio.Cancellable | null): boolean
1473
+ /**
1474
+ * Queues an additional item to be imported. The parsed item is represented
1475
+ * by the state of the [class`Parser]` at the time of calling this method.
1476
+ *
1477
+ * If the parsed item is incompatible with the importer, then this will
1478
+ * fail and the item will not be queued.
1479
+ * @virtual
1480
+ * @param parsed a parsed item to import
1481
+ * @returns whether the item was queued or not
1482
+ */
1483
+ vfunc_queue_for_parsed(parsed: Parsed): boolean
1484
+
1485
+ // Class property signals of Gcr-3.Gcr.Importer
1486
+
1487
+ connect(sigName: "notify::icon", callback: (($obj: Importer, pspec: GObject.ParamSpec) => void)): number
1488
+ connect_after(sigName: "notify::icon", callback: (($obj: Importer, pspec: GObject.ParamSpec) => void)): number
1489
+ emit(sigName: "notify::icon", ...args: any[]): void
1490
+ connect(sigName: "notify::interaction", callback: (($obj: Importer, pspec: GObject.ParamSpec) => void)): number
1491
+ connect_after(sigName: "notify::interaction", callback: (($obj: Importer, pspec: GObject.ParamSpec) => void)): number
1492
+ emit(sigName: "notify::interaction", ...args: any[]): void
1493
+ connect(sigName: "notify::label", callback: (($obj: Importer, pspec: GObject.ParamSpec) => void)): number
1494
+ connect_after(sigName: "notify::label", callback: (($obj: Importer, pspec: GObject.ParamSpec) => void)): number
1495
+ emit(sigName: "notify::label", ...args: any[]): void
1496
+ connect(sigName: "notify::uri", callback: (($obj: Importer, pspec: GObject.ParamSpec) => void)): number
1497
+ connect_after(sigName: "notify::uri", callback: (($obj: Importer, pspec: GObject.ParamSpec) => void)): number
1498
+ emit(sigName: "notify::uri", ...args: any[]): void
1499
+ connect(sigName: string, callback: (...args: any[]) => void): number
1500
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
1501
+ emit(sigName: string, ...args: any[]): void
1502
+ disconnect(id: number): void
1503
+ }
1504
+
1505
+ /**
1506
+ * An interface which allows importing of certificates and keys. Each importer
1507
+ * is registered with a set of PKCS#11 attributes to match stuff that it can
1508
+ * import.
1509
+ *
1510
+ * An importer gets passed a [class`Parser]` and accesses the currently parsed
1511
+ * item. To create a set of importers that can import the currently parsed
1512
+ * item in a parser, use [func`Importer`.create_for_parsed]. The list of
1513
+ * importers returned has the parsed item queued for import.
1514
+ *
1515
+ * To queue additional items with a importer use
1516
+ * [method`Importer`.queue_for_parsed]. In addition you can try and queue an
1517
+ * additional item with a set of importers using the
1518
+ * [func`Importer`.queue_and_filter_for_parsed].
1519
+ *
1520
+ * To start the import, use [method`Importer`.import] or its async variants.
1521
+ * @interface
1522
+ */
1523
+ export class Importer extends GObject.Object {
1524
+
1525
+ // Own properties of Gcr-3.Gcr.Importer
1526
+
1527
+ static name: string
1528
+ static $gtype: GObject.GType<Importer>
1529
+
1530
+ // Constructors of Gcr-3.Gcr.Importer
1531
+
1532
+ constructor(config?: Importer.ConstructorProperties)
1533
+ _init(config?: Importer.ConstructorProperties): void
1534
+ /**
1535
+ * Create a set of importers which can import this parsed item.
1536
+ * The parsed item is represented by the state of the GcrParser at the
1537
+ * time of calling this method.
1538
+ * @param parsed a parser with a parsed item to import
1539
+ * @returns a list of importers which can import the parsed item, which should be freed with g_object_unref(), or %NULL if no types of importers can be created
1540
+ */
1541
+ static create_for_parsed(parsed: Parsed): Importer[]
1542
+ /**
1543
+ * Queues an additional item to be imported in all compattible importers
1544
+ * in the set. The parsed item is represented by the state of the #GcrParser
1545
+ * at the time of calling this method.
1546
+ *
1547
+ * If the parsed item is incompatible with an importer, then that the item
1548
+ * will not be queued on that importer.
1549
+ * @param importers a set of importers
1550
+ * @param parsed a parsed item
1551
+ * @returns a new set of importers that queued the item, which should be freed with gck_list_unref_free()
1552
+ */
1553
+ static queue_and_filter_for_parsed(importers: Importer[], parsed: Parsed): Importer[]
1554
+ /**
1555
+ * Register an importer to handle parsed items that match the given attributes.
1556
+ *
1557
+ * If `attrs` are a floating reference, then it is consumed.
1558
+ * @param importer_type the GType of the importer being registered
1559
+ * @param attrs the attributes that this importer is compatible with
1560
+ */
1561
+ static register(importer_type: GObject.GType, attrs: Gck.Attributes): void
1562
+ /**
1563
+ * Register built-in PKCS#11 and GnuPG importers.
1564
+ */
1565
+ static register_well_known(): void
1566
+ }
1567
+
1568
+ export module Prompt {
1569
+
1570
+ // Signal callback interfaces
1571
+
1572
+ /**
1573
+ * Signal callback interface for `prompt-close`
1574
+ */
1575
+ export interface PromptCloseSignalCallback {
1576
+ ($obj: Prompt): void
1577
+ }
1578
+
1579
+
1580
+ // Constructor properties interface
1581
+
1582
+ export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
1583
+
1584
+ // Own constructor properties of Gcr-3.Gcr.Prompt
1585
+
1586
+ /**
1587
+ * The string handle of the caller's window.
1588
+ *
1589
+ * The caller window indicates to the prompt which window is prompting the
1590
+ * user. The prompt may choose to ignore this information or use it in whatever
1591
+ * way it sees fit.
1592
+ *
1593
+ * In X11, this will be a stringified version of the XWindow handle; in
1594
+ * Wayland this is the result of an export using the XDG foreign
1595
+ * protocol.
1596
+ */
1597
+ caller_window?: string | null
1598
+ /**
1599
+ * The label for the cancel button in the prompt.
1600
+ */
1601
+ cancel_label?: string | null
1602
+ /**
1603
+ * Whether the additional choice is chosen or not.
1604
+ *
1605
+ * The additional choice would have been setup using #GcrPrompt:choice-label.
1606
+ */
1607
+ choice_chosen?: boolean | null
1608
+ /**
1609
+ * The label for the additional choice.
1610
+ *
1611
+ * If this is a non-%NULL value then an additional boolean choice will be
1612
+ * displayed by the prompt allowing the user to select or deselect it.
1613
+ *
1614
+ * If %NULL, then no additional choice is displayed.
1615
+ *
1616
+ * The initial value of the choice can be set with #GcrPrompt:choice-chosen.
1617
+ */
1618
+ choice_label?: string | null
1619
+ /**
1620
+ * The label for the continue button in the prompt.
1621
+ */
1622
+ continue_label?: string | null
1623
+ /**
1624
+ * The detailed description of the prompt.
1625
+ *
1626
+ * A prompt implementation may choose not to display this detailed description.
1627
+ * The prompt message should contain relevant information.
1628
+ */
1629
+ description?: string | null
1630
+ /**
1631
+ * The prompt message for the user.
1632
+ *
1633
+ * A prompt implementation should always display this message.
1634
+ */
1635
+ message?: string | null
1636
+ /**
1637
+ * Whether the prompt will prompt for a new password.
1638
+ *
1639
+ * This will cause the prompt implementation to ask the user to confirm the
1640
+ * password and/or display other relevant user interface for creating a new
1641
+ * password.
1642
+ */
1643
+ password_new?: boolean | null
1644
+ /**
1645
+ * The title of the prompt.
1646
+ *
1647
+ * A prompt implementation may choose not to display the prompt title. The
1648
+ * #GcrPrompt:message should contain relevant information.
1649
+ */
1650
+ title?: string | null
1651
+ /**
1652
+ * A prompt warning displayed on the prompt, or %NULL for no warning.
1653
+ *
1654
+ * This is a warning like "The password is incorrect." usually displayed to the
1655
+ * user about a previous 'unsuccessful' prompt.
1656
+ */
1657
+ warning?: string | null
1658
+ }
1659
+
1660
+ }
1661
+
1662
+ export interface Prompt {
1663
+
1664
+ // Own properties of Gcr-3.Gcr.Prompt
1665
+
1666
+ /**
1667
+ * The string handle of the caller's window.
1668
+ *
1669
+ * The caller window indicates to the prompt which window is prompting the
1670
+ * user. The prompt may choose to ignore this information or use it in whatever
1671
+ * way it sees fit.
1672
+ *
1673
+ * In X11, this will be a stringified version of the XWindow handle; in
1674
+ * Wayland this is the result of an export using the XDG foreign
1675
+ * protocol.
1676
+ */
1677
+ caller_window: string | null
1678
+ /**
1679
+ * The label for the cancel button in the prompt.
1680
+ */
1681
+ cancel_label: string | null
1682
+ /**
1683
+ * Whether the additional choice is chosen or not.
1684
+ *
1685
+ * The additional choice would have been setup using #GcrPrompt:choice-label.
1686
+ */
1687
+ choice_chosen: boolean
1688
+ /**
1689
+ * The label for the additional choice.
1690
+ *
1691
+ * If this is a non-%NULL value then an additional boolean choice will be
1692
+ * displayed by the prompt allowing the user to select or deselect it.
1693
+ *
1694
+ * If %NULL, then no additional choice is displayed.
1695
+ *
1696
+ * The initial value of the choice can be set with #GcrPrompt:choice-chosen.
1697
+ */
1698
+ choice_label: string | null
1699
+ /**
1700
+ * The label for the continue button in the prompt.
1701
+ */
1702
+ continue_label: string | null
1703
+ /**
1704
+ * The detailed description of the prompt.
1705
+ *
1706
+ * A prompt implementation may choose not to display this detailed description.
1707
+ * The prompt message should contain relevant information.
1708
+ */
1709
+ description: string | null
1710
+ /**
1711
+ * The prompt message for the user.
1712
+ *
1713
+ * A prompt implementation should always display this message.
1714
+ */
1715
+ message: string | null
1716
+ /**
1717
+ * Whether the prompt will prompt for a new password.
1718
+ *
1719
+ * This will cause the prompt implementation to ask the user to confirm the
1720
+ * password and/or display other relevant user interface for creating a new
1721
+ * password.
1722
+ */
1723
+ password_new: boolean
1724
+ /**
1725
+ * Indication of the password strength.
1726
+ *
1727
+ * Prompts will return a zero value if the password is empty, and a value
1728
+ * greater than zero if the password has any characters.
1729
+ *
1730
+ * This is only valid after a successful prompt for a password.
1731
+ */
1732
+ readonly password_strength: number
1733
+ /**
1734
+ * The title of the prompt.
1735
+ *
1736
+ * A prompt implementation may choose not to display the prompt title. The
1737
+ * #GcrPrompt:message should contain relevant information.
1738
+ */
1739
+ title: string | null
1740
+ /**
1741
+ * A prompt warning displayed on the prompt, or %NULL for no warning.
1742
+ *
1743
+ * This is a warning like "The password is incorrect." usually displayed to the
1744
+ * user about a previous 'unsuccessful' prompt.
1745
+ */
1746
+ warning: string | null
1747
+
1748
+ // Owm methods of Gcr-3.Gcr.Prompt
1749
+
1750
+ /**
1751
+ * Closes the prompt so that in can no longer be used to prompt. The various
1752
+ * prompt methods will return results as if the user dismissed the prompt.
1753
+ *
1754
+ * The prompt may also be closed by the implementor of the prompt object.
1755
+ *
1756
+ * This emits the [signal`Prompt:`:prompt-close] signal on the prompt object.
1757
+ */
1758
+ close(): void
1759
+ /**
1760
+ * Prompts for confirmation asking a cancel/continue style question.
1761
+ * Set the various properties on the prompt before calling this function to
1762
+ * represent the question correctly.
1763
+ *
1764
+ * This method will block until the a response is returned from the prompter.
1765
+ *
1766
+ * %GCR_PROMPT_REPLY_CONTINUE will be returned if the user confirms the prompt. The
1767
+ * return value will also be %GCR_PROMPT_REPLY_CANCEL if the user cancels or if
1768
+ * an error occurs. Check the `error` argument to tell the difference.
1769
+ * @param cancellable optional cancellation object
1770
+ * @returns the reply from the prompt
1771
+ */
1772
+ confirm(cancellable: Gio.Cancellable | null): PromptReply
1773
+ /**
1774
+ * Prompts for confirmation asking a cancel/continue style question.
1775
+ * Set the various properties on the prompt before calling this method to
1776
+ * represent the question correctly.
1777
+ *
1778
+ * This method will return immediately and complete asynchronously.
1779
+ * @param cancellable optional cancellation object
1780
+ * @param callback called when the operation completes
1781
+ */
1782
+ confirm_async(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
1783
+ /**
1784
+ * Complete an operation to prompt for confirmation.
1785
+ *
1786
+ * %GCR_PROMPT_REPLY_CONTINUE will be returned if the user confirms the prompt. The
1787
+ * return value will also be %GCR_PROMPT_REPLY_CANCEL if the user cancels or if
1788
+ * an error occurs. Check the `error` argument to tell the difference.
1789
+ * @param result asynchronous result passed to callback
1790
+ * @returns the reply from the prompt
1791
+ */
1792
+ confirm_finish(result: Gio.AsyncResult): PromptReply
1793
+ /**
1794
+ * Prompts for confirmation asking a cancel/continue style question.
1795
+ * Set the various properties on the prompt before calling this function to
1796
+ * represent the question correctly.
1797
+ *
1798
+ * This method will block until the a response is returned from the prompter
1799
+ * and will run a main loop similar to a `gtk_dialog_run()`. The application
1800
+ * will remain responsive but care must be taken to handle reentrancy issues.
1801
+ *
1802
+ * %GCR_PROMPT_REPLY_CONTINUE will be returned if the user confirms the prompt. The
1803
+ * return value will also be %GCR_PROMPT_REPLY_CANCEL if the user cancels or if
1804
+ * an error occurs. Check the `error` argument to tell the difference.
1805
+ * @param cancellable optional cancellation object
1806
+ * @returns the reply from the prompt
1807
+ */
1808
+ confirm_run(cancellable: Gio.Cancellable | null): PromptReply
1809
+ /**
1810
+ * Get the string handle of the caller's window.
1811
+ *
1812
+ * The caller window indicates to the prompt which window is prompting the
1813
+ * user. The prompt may choose to ignore this information or use it in whatever
1814
+ * way it sees fit.
1815
+ * @returns a newly allocated string containing the string handle of the window.
1816
+ */
1817
+ get_caller_window(): string | null
1818
+ /**
1819
+ * Get the label for the cancel button.
1820
+ *
1821
+ * This is the button that results in a %GCR_PROMPT_REPLY_CANCEL reply
1822
+ * from the prompt.
1823
+ * @returns a newly allocated string containing the label
1824
+ */
1825
+ get_cancel_label(): string | null
1826
+ /**
1827
+ * Get whether the additional choice was chosen or not.
1828
+ *
1829
+ * The additional choice would have been setup using
1830
+ * gcr_prompt_set_choice_label().
1831
+ * @returns whether chosen
1832
+ */
1833
+ get_choice_chosen(): boolean
1834
+ /**
1835
+ * Get the label for the additional choice.
1836
+ *
1837
+ * This will be %NULL if no additional choice is being displayed.
1838
+ * @returns a newly allocated string containing the additional choice or %NULL
1839
+ */
1840
+ get_choice_label(): string | null
1841
+ /**
1842
+ * Get the label for the continue button.
1843
+ *
1844
+ * This is the button that results in a %GCR_PROMPT_REPLY_CONTINUE reply
1845
+ * from the prompt.
1846
+ * @returns a newly allocated string containing the label
1847
+ */
1848
+ get_continue_label(): string | null
1849
+ /**
1850
+ * Get the detailed description of the prompt.
1851
+ *
1852
+ * A prompt implementation may choose not to display this detailed description.
1853
+ * The prompt message should contain relevant information.
1854
+ * @returns a newly allocated string containing the detailed description of the prompt
1855
+ */
1856
+ get_description(): string | null
1857
+ /**
1858
+ * Gets the prompt message for the user.
1859
+ *
1860
+ * A prompt implementation should always display this message.
1861
+ * @returns a newly allocated string containing the detailed description of the prompt
1862
+ */
1863
+ get_message(): string | null
1864
+ /**
1865
+ * Get whether the prompt will prompt for a new password.
1866
+ *
1867
+ * This will cause the prompt implementation to ask the user to confirm the
1868
+ * password and/or display other relevant user interface for creating a new
1869
+ * password.
1870
+ * @returns whether in new password mode or not
1871
+ */
1872
+ get_password_new(): boolean
1873
+ /**
1874
+ * Get indication of the password strength.
1875
+ *
1876
+ * Prompts will return a zero value if the password is empty, and a value
1877
+ * greater than zero if the password has any characters.
1878
+ *
1879
+ * This is only valid after a successful prompt for a password.
1880
+ * @returns zero if the password is empty, greater than zero if not
1881
+ */
1882
+ get_password_strength(): number
1883
+ /**
1884
+ * Gets the title of the prompt.
1885
+ *
1886
+ * A prompt implementation may choose not to display the prompt title. The
1887
+ * prompt message should contain relevant information.
1888
+ * @returns a newly allocated string containing the prompt title.
1889
+ */
1890
+ get_title(): string | null
1891
+ /**
1892
+ * Get a prompt warning displayed on the prompt.
1893
+ *
1894
+ * This is a warning like "The password is incorrect." usually displayed to the
1895
+ * user about a previous 'unsuccessful' prompt.
1896
+ *
1897
+ * If this string is %NULL then no warning is displayed.
1898
+ * @returns a newly allocated string containing the prompt warning, or %NULL if no warning
1899
+ */
1900
+ get_warning(): string | null
1901
+ /**
1902
+ * Prompts for password. Set the various properties on the prompt before calling
1903
+ * this method to explain which password should be entered.
1904
+ *
1905
+ * This method will block until the a response is returned from the prompter.
1906
+ *
1907
+ * A password will be returned if the user enters a password successfully.
1908
+ * The returned password is valid until the next time a method is called
1909
+ * to display another prompt.
1910
+ *
1911
+ * %NULL will be returned if the user cancels or if an error occurs. Check the
1912
+ * `error` argument to tell the difference.
1913
+ * @param cancellable optional cancellation object
1914
+ * @returns the password owned by the prompt, or %NULL
1915
+ */
1916
+ password(cancellable: Gio.Cancellable | null): string | null
1917
+ /**
1918
+ * Prompts for password. Set the various properties on the prompt before calling
1919
+ * this method to explain which password should be entered.
1920
+ *
1921
+ * This method will return immediately and complete asynchronously.
1922
+ * @param cancellable optional cancellation object
1923
+ * @param callback called when the operation completes
1924
+ */
1925
+ password_async(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
1926
+ /**
1927
+ * Complete an operation to prompt for a password.
1928
+ *
1929
+ * A password will be returned if the user enters a password successfully.
1930
+ * The returned password is valid until the next time a method is called
1931
+ * to display another prompt.
1932
+ *
1933
+ * %NULL will be returned if the user cancels or if an error occurs. Check the
1934
+ * `error` argument to tell the difference.
1935
+ * @param result asynchronous result passed to callback
1936
+ * @returns the password owned by the prompt, or %NULL
1937
+ */
1938
+ password_finish(result: Gio.AsyncResult): string | null
1939
+ /**
1940
+ * Prompts for password. Set the various properties on the prompt before calling
1941
+ * this method to explain which password should be entered.
1942
+ *
1943
+ * This method will block until the a response is returned from the prompter
1944
+ * and will run a main loop similar to a gtk_dialog_run(). The application
1945
+ * will remain responsive but care must be taken to handle reentrancy issues.
1946
+ *
1947
+ * A password will be returned if the user enters a password successfully.
1948
+ * The returned password is valid until the next time a method is called
1949
+ * to display another prompt.
1950
+ *
1951
+ * %NULL will be returned if the user cancels or if an error occurs. Check the
1952
+ * `error` argument to tell the difference.
1953
+ * @param cancellable optional cancellation object
1954
+ * @returns the password owned by the prompt, or %NULL
1955
+ */
1956
+ password_run(cancellable: Gio.Cancellable | null): string | null
1957
+ /**
1958
+ * Reset the contents and properties of the prompt.
1959
+ */
1960
+ reset(): void
1961
+ /**
1962
+ * Set the string handle of the caller's window.
1963
+ *
1964
+ * The caller window indicates to the prompt which window is prompting the
1965
+ * user. The prompt may choose to ignore this information or use it in whatever
1966
+ * way it sees fit.
1967
+ * @param window_id the window id
1968
+ */
1969
+ set_caller_window(window_id: string | null): void
1970
+ /**
1971
+ * Set the label for the continue button.
1972
+ *
1973
+ * This is the button that results in a %GCR_PROMPT_REPLY_CANCEL reply
1974
+ * from the prompt.
1975
+ * @param cancel_label the label
1976
+ */
1977
+ set_cancel_label(cancel_label: string | null): void
1978
+ /**
1979
+ * Set whether the additional choice is chosen or not.
1980
+ *
1981
+ * The additional choice should be set up using gcr_prompt_set_choice_label().
1982
+ * @param chosen whether chosen
1983
+ */
1984
+ set_choice_chosen(chosen: boolean): void
1985
+ /**
1986
+ * Set the label for the additional choice.
1987
+ *
1988
+ * If this is a non-%NULL value then an additional boolean choice will be
1989
+ * displayed by the prompt allowing the user to select or deselect it.
1990
+ *
1991
+ * The initial value of the choice can be set with the
1992
+ * gcr_prompt_set_choice_label() method.
1993
+ *
1994
+ * If this is %NULL, then no additional choice is being displayed.
1995
+ * @param choice_label the additional choice or %NULL
1996
+ */
1997
+ set_choice_label(choice_label: string | null): void
1998
+ /**
1999
+ * Set the label for the continue button.
2000
+ *
2001
+ * This is the button that results in a %GCR_PROMPT_REPLY_CONTINUE reply
2002
+ * from the prompt.
2003
+ * @param continue_label the label
2004
+ */
2005
+ set_continue_label(continue_label: string | null): void
2006
+ /**
2007
+ * Set the detailed description of the prompt.
2008
+ *
2009
+ * A prompt implementation may choose not to display this detailed description.
2010
+ * Use gcr_prompt_set_message() to set a general message containing relevant
2011
+ * information.
2012
+ * @param description the detailed description
2013
+ */
2014
+ set_description(description: string | null): void
2015
+ /**
2016
+ * Sets the prompt message for the user.
2017
+ *
2018
+ * A prompt implementation should always display this message.
2019
+ * @param message the prompt message
2020
+ */
2021
+ set_message(message: string | null): void
2022
+ /**
2023
+ * Set whether the prompt will prompt for a new password.
2024
+ *
2025
+ * This will cause the prompt implementation to ask the user to confirm the
2026
+ * password and/or display other relevant user interface for creating a new
2027
+ * password.
2028
+ * @param new_password whether in new password mode or not
2029
+ */
2030
+ set_password_new(new_password: boolean): void
2031
+ /**
2032
+ * Sets the title of the prompt.
2033
+ *
2034
+ * A prompt implementation may choose not to display the prompt title. The
2035
+ * prompt message should contain relevant information.
2036
+ * @param title the prompt title
2037
+ */
2038
+ set_title(title: string | null): void
2039
+ /**
2040
+ * Set a prompt warning displayed on the prompt.
2041
+ *
2042
+ * This is a warning like "The password is incorrect." usually displayed to the
2043
+ * user about a previous 'unsuccessful' prompt.
2044
+ *
2045
+ * If this string is %NULL then no warning is displayed.
2046
+ * @param warning the warning or %NULL
2047
+ */
2048
+ set_warning(warning: string | null): void
2049
+
2050
+ // Own virtual methods of Gcr-3.Gcr.Prompt
2051
+
2052
+ vfunc_prompt_close(): void
2053
+ /**
2054
+ * Prompts for confirmation asking a cancel/continue style question.
2055
+ * Set the various properties on the prompt before calling this method to
2056
+ * represent the question correctly.
2057
+ *
2058
+ * This method will return immediately and complete asynchronously.
2059
+ * @virtual
2060
+ * @param cancellable optional cancellation object
2061
+ * @param callback called when the operation completes
2062
+ */
2063
+ vfunc_prompt_confirm_async(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
2064
+ /**
2065
+ * Complete an operation to prompt for confirmation.
2066
+ *
2067
+ * %GCR_PROMPT_REPLY_CONTINUE will be returned if the user confirms the prompt. The
2068
+ * return value will also be %GCR_PROMPT_REPLY_CANCEL if the user cancels or if
2069
+ * an error occurs. Check the `error` argument to tell the difference.
2070
+ * @virtual
2071
+ * @param result asynchronous result passed to callback
2072
+ * @returns the reply from the prompt
2073
+ */
2074
+ vfunc_prompt_confirm_finish(result: Gio.AsyncResult): PromptReply
2075
+ /**
2076
+ * Prompts for password. Set the various properties on the prompt before calling
2077
+ * this method to explain which password should be entered.
2078
+ *
2079
+ * This method will return immediately and complete asynchronously.
2080
+ * @virtual
2081
+ * @param cancellable optional cancellation object
2082
+ * @param callback called when the operation completes
2083
+ */
2084
+ vfunc_prompt_password_async(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
2085
+ /**
2086
+ * Complete an operation to prompt for a password.
2087
+ *
2088
+ * A password will be returned if the user enters a password successfully.
2089
+ * The returned password is valid until the next time a method is called
2090
+ * to display another prompt.
2091
+ *
2092
+ * %NULL will be returned if the user cancels or if an error occurs. Check the
2093
+ * `error` argument to tell the difference.
2094
+ * @virtual
2095
+ * @param result asynchronous result passed to callback
2096
+ * @returns the password owned by the prompt, or %NULL
2097
+ */
2098
+ vfunc_prompt_password_finish(result: Gio.AsyncResult): string | null
2099
+
2100
+ // Own signals of Gcr-3.Gcr.Prompt
2101
+
2102
+ connect(sigName: "prompt-close", callback: Prompt.PromptCloseSignalCallback): number
2103
+ connect_after(sigName: "prompt-close", callback: Prompt.PromptCloseSignalCallback): number
2104
+ emit(sigName: "prompt-close", ...args: any[]): void
2105
+
2106
+ // Class property signals of Gcr-3.Gcr.Prompt
2107
+
2108
+ connect(sigName: "notify::caller-window", callback: (($obj: Prompt, pspec: GObject.ParamSpec) => void)): number
2109
+ connect_after(sigName: "notify::caller-window", callback: (($obj: Prompt, pspec: GObject.ParamSpec) => void)): number
2110
+ emit(sigName: "notify::caller-window", ...args: any[]): void
2111
+ connect(sigName: "notify::cancel-label", callback: (($obj: Prompt, pspec: GObject.ParamSpec) => void)): number
2112
+ connect_after(sigName: "notify::cancel-label", callback: (($obj: Prompt, pspec: GObject.ParamSpec) => void)): number
2113
+ emit(sigName: "notify::cancel-label", ...args: any[]): void
2114
+ connect(sigName: "notify::choice-chosen", callback: (($obj: Prompt, pspec: GObject.ParamSpec) => void)): number
2115
+ connect_after(sigName: "notify::choice-chosen", callback: (($obj: Prompt, pspec: GObject.ParamSpec) => void)): number
2116
+ emit(sigName: "notify::choice-chosen", ...args: any[]): void
2117
+ connect(sigName: "notify::choice-label", callback: (($obj: Prompt, pspec: GObject.ParamSpec) => void)): number
2118
+ connect_after(sigName: "notify::choice-label", callback: (($obj: Prompt, pspec: GObject.ParamSpec) => void)): number
2119
+ emit(sigName: "notify::choice-label", ...args: any[]): void
2120
+ connect(sigName: "notify::continue-label", callback: (($obj: Prompt, pspec: GObject.ParamSpec) => void)): number
2121
+ connect_after(sigName: "notify::continue-label", callback: (($obj: Prompt, pspec: GObject.ParamSpec) => void)): number
2122
+ emit(sigName: "notify::continue-label", ...args: any[]): void
2123
+ connect(sigName: "notify::description", callback: (($obj: Prompt, pspec: GObject.ParamSpec) => void)): number
2124
+ connect_after(sigName: "notify::description", callback: (($obj: Prompt, pspec: GObject.ParamSpec) => void)): number
2125
+ emit(sigName: "notify::description", ...args: any[]): void
2126
+ connect(sigName: "notify::message", callback: (($obj: Prompt, pspec: GObject.ParamSpec) => void)): number
2127
+ connect_after(sigName: "notify::message", callback: (($obj: Prompt, pspec: GObject.ParamSpec) => void)): number
2128
+ emit(sigName: "notify::message", ...args: any[]): void
2129
+ connect(sigName: "notify::password-new", callback: (($obj: Prompt, pspec: GObject.ParamSpec) => void)): number
2130
+ connect_after(sigName: "notify::password-new", callback: (($obj: Prompt, pspec: GObject.ParamSpec) => void)): number
2131
+ emit(sigName: "notify::password-new", ...args: any[]): void
2132
+ connect(sigName: "notify::password-strength", callback: (($obj: Prompt, pspec: GObject.ParamSpec) => void)): number
2133
+ connect_after(sigName: "notify::password-strength", callback: (($obj: Prompt, pspec: GObject.ParamSpec) => void)): number
2134
+ emit(sigName: "notify::password-strength", ...args: any[]): void
2135
+ connect(sigName: "notify::title", callback: (($obj: Prompt, pspec: GObject.ParamSpec) => void)): number
2136
+ connect_after(sigName: "notify::title", callback: (($obj: Prompt, pspec: GObject.ParamSpec) => void)): number
2137
+ emit(sigName: "notify::title", ...args: any[]): void
2138
+ connect(sigName: "notify::warning", callback: (($obj: Prompt, pspec: GObject.ParamSpec) => void)): number
2139
+ connect_after(sigName: "notify::warning", callback: (($obj: Prompt, pspec: GObject.ParamSpec) => void)): number
2140
+ emit(sigName: "notify::warning", ...args: any[]): void
2141
+ connect(sigName: string, callback: (...args: any[]) => void): number
2142
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
2143
+ emit(sigName: string, ...args: any[]): void
2144
+ disconnect(id: number): void
2145
+ }
2146
+
2147
+ /**
2148
+ * A prompt displayed to the user. It is an interface with various
2149
+ * implementations.
2150
+ *
2151
+ * Various properties are set on the prompt, and then the prompt is displayed
2152
+ * the various prompt methods like [method`Prompt`.password_run].
2153
+ *
2154
+ * A `GcrPrompt` may be used to display multiple related prompts. Most
2155
+ * implementions do not hide the window between display of multiple related
2156
+ * prompts, and the #GcrPrompt must be closed or destroyed in order to make
2157
+ * it go away. This allows the user to see that the prompts are related.
2158
+ *
2159
+ * Use `GcrPromptDialog` (part of gcr-ui) to create an in-process GTK+ dialog
2160
+ * prompt. Use [class`SystemPrompt]` to create a system prompt in a prompter
2161
+ * process.
2162
+ *
2163
+ * The prompt implementation will always display the [property`Prompt:`message]
2164
+ * property, but may choose not to display the [property`Prompt:`description] or
2165
+ * [property`Prompt:`title] properties.
2166
+ * @interface
2167
+ */
2168
+ export class Prompt extends GObject.Object {
2169
+
2170
+ // Own properties of Gcr-3.Gcr.Prompt
2171
+
2172
+ static name: string
2173
+ static $gtype: GObject.GType<Prompt>
2174
+
2175
+ // Constructors of Gcr-3.Gcr.Prompt
2176
+
2177
+ constructor(config?: Prompt.ConstructorProperties)
2178
+ _init(config?: Prompt.ConstructorProperties): void
2179
+ }
2180
+
2181
+ export module CertificateChain {
2182
+
2183
+ // Constructor properties interface
2184
+
2185
+ export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
2186
+ }
2187
+
2188
+ }
2189
+
2190
+ export interface CertificateChain {
2191
+
2192
+ // Own properties of Gcr-3.Gcr.CertificateChain
2193
+
2194
+ /**
2195
+ * The length of the certificate chain.
2196
+ */
2197
+ readonly length: number
2198
+
2199
+ // Own fields of Gcr-3.Gcr.CertificateChain
2200
+
2201
+ parent: GObject.Object
2202
+
2203
+ // Owm methods of Gcr-3.Gcr.CertificateChain
2204
+
2205
+ /**
2206
+ * Add `certificate` to the chain. The order of certificates in the chain are
2207
+ * important. The first certificate should be the endpoint certificate, and
2208
+ * then come the signers (certificate authorities) each in turn. If a root
2209
+ * certificate authority is present, it should come last.
2210
+ *
2211
+ * Adding a certificate an already built chain (see
2212
+ * gcr_certificate_chain_build()) resets the type of the certificate chain
2213
+ * to %GCR_CERTIFICATE_CHAIN_UNKNOWN
2214
+ * @param certificate a #GcrCertificate to add to the chain
2215
+ */
2216
+ add(certificate: Certificate): void
2217
+ /**
2218
+ * Complete a certificate chain. Once a certificate chain has been built
2219
+ * its status can be examined.
2220
+ *
2221
+ * This operation will lookup missing certificates in PKCS#11
2222
+ * modules and also that each certificate in the chain is the signer of the
2223
+ * previous one. If a trust anchor, pinned certificate, or self-signed certificate
2224
+ * is found, then the chain is considered built. Any extra certificates are
2225
+ * removed from the chain.
2226
+ *
2227
+ * It's important to understand that building of a certificate chain does not
2228
+ * constitute verifying that chain. This is merely the first step towards
2229
+ * trust verification.
2230
+ *
2231
+ * The `purpose` is a string like %GCR_PURPOSE_CLIENT_AUTH and is the purpose
2232
+ * for which the certificate chain will be used. Trust anchors are looked up
2233
+ * for this purpose. This argument is required.
2234
+ *
2235
+ * The `peer` is usually the host name of the peer whith which this certificate
2236
+ * chain is being used. It is used to look up pinned certificates that have
2237
+ * been stored for this peer. If %NULL then no pinned certificates will
2238
+ * be considered.
2239
+ *
2240
+ * If the %GCR_CERTIFICATE_CHAIN_NO_LOOKUPS flag is specified then no
2241
+ * lookups for anchors or pinned certificates are done, and the resulting chain
2242
+ * will be neither anchored or pinned. Additionally no missing certificate
2243
+ * authorities are looked up in PKCS#11
2244
+ *
2245
+ * This call will block, see gcr_certificate_chain_build_async() for the
2246
+ * asynchronous version.
2247
+ * @param purpose the purpose the certificate chain will be used for
2248
+ * @param peer the peer the certificate chain will be used with, or %NULL
2249
+ * @param flags chain completion flags
2250
+ * @param cancellable a #GCancellable or %NULL
2251
+ * @returns whether the operation completed successfully
2252
+ */
2253
+ build(purpose: string | null, peer: string | null, flags: CertificateChainFlags, cancellable: Gio.Cancellable | null): boolean
2254
+ /**
2255
+ * Complete a certificate chain. Once a certificate chain has been built
2256
+ * its status can be examined.
2257
+ *
2258
+ * This will lookup missing certificates in PKCS#11
2259
+ * modules and also that each certificate in the chain is the signer of the
2260
+ * previous one. If a trust anchor, pinned certificate, or self-signed certificate
2261
+ * is found, then the chain is considered built. Any extra certificates are
2262
+ * removed from the chain.
2263
+ *
2264
+ * It's important to understand that building of a certificate chain does not
2265
+ * constitute verifying that chain. This is merely the first step towards
2266
+ * trust verification.
2267
+ *
2268
+ * The `purpose` is a string like %GCR_PURPOSE_CLIENT_AUTH and is the purpose
2269
+ * for which the certificate chain will be used. Trust anchors are looked up
2270
+ * for this purpose. This argument is required.
2271
+ *
2272
+ * The `peer` is usually the host name of the peer whith which this certificate
2273
+ * chain is being used. It is used to look up pinned certificates that have
2274
+ * been stored for this peer. If %NULL then no pinned certificates will
2275
+ * be considered.
2276
+ *
2277
+ * If the %GCR_CERTIFICATE_CHAIN_NO_LOOKUPS flag is specified then no
2278
+ * lookups for anchors or pinned certificates are done, and the resulting chain
2279
+ * will be neither anchored or pinned. Additionally no missing certificate
2280
+ * authorities are looked up in PKCS#11
2281
+ *
2282
+ * When the operation is finished, `callback` will be called. You can then call
2283
+ * gcr_certificate_chain_build_finish() to get the result of the operation.
2284
+ * @param purpose the purpose the certificate chain will be used for
2285
+ * @param peer the peer the certificate chain will be used with, or %NULL
2286
+ * @param flags chain completion flags
2287
+ * @param cancellable a #GCancellable or %NULL
2288
+ * @param callback this will be called when the operation completes.
2289
+ */
2290
+ build_async(purpose: string | null, peer: string | null, flags: CertificateChainFlags, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
2291
+ /**
2292
+ * Finishes an asynchronous operation started by
2293
+ * gcr_certificate_chain_build_async().
2294
+ * @param result the #GAsyncResult passed to the callback
2295
+ * @returns whether the operation succeeded
2296
+ */
2297
+ build_finish(result: Gio.AsyncResult): boolean
2298
+ /**
2299
+ * If the certificate chain has been built and is of status
2300
+ * %GCR_CERTIFICATE_CHAIN_ANCHORED, then this will return the anchor
2301
+ * certificate that was found. This is not necessarily a root certificate
2302
+ * authority. If an intermediate certificate authority in the chain was
2303
+ * found to be anchored, then that certificate will be returned.
2304
+ *
2305
+ * If an anchor is returned it does not mean that the certificate chain has
2306
+ * been verified, but merely that an anchor has been found.
2307
+ * @returns the anchor certificate, or %NULL if not anchored.
2308
+ */
2309
+ get_anchor(): Certificate
2310
+ /**
2311
+ * Get a certificate in the chain. It is an error to call this function
2312
+ * with an invalid index.
2313
+ * @param index index of the certificate to get
2314
+ * @returns the certificate
2315
+ */
2316
+ get_certificate(index: number): Certificate
2317
+ /**
2318
+ * Get the endpoint certificate in the chain. This is always the first
2319
+ * certificate in the chain. The endpoint certificate cannot be anchored.
2320
+ * @returns the endpoint certificate, or %NULL if the chain is empty
2321
+ */
2322
+ get_endpoint(): Certificate
2323
+ /**
2324
+ * Get the length of the certificate chain.
2325
+ * @returns the length of the certificate chain
2326
+ */
2327
+ get_length(): number
2328
+ /**
2329
+ * Get the status of a certificate chain. If the certificate chain has not
2330
+ * been built, then the status will be %GCR_CERTIFICATE_CHAIN_UNKNOWN.
2331
+ *
2332
+ * A status of %GCR_CERTIFICATE_CHAIN_ANCHORED does not mean that the
2333
+ * certificate chain has been verified, but merely that an anchor has been
2334
+ * found.
2335
+ * @returns the status of the certificate chain.
2336
+ */
2337
+ get_status(): CertificateChainStatus
2338
+
2339
+ // Class property signals of Gcr-3.Gcr.CertificateChain
2340
+
2341
+ connect(sigName: "notify::length", callback: (($obj: CertificateChain, pspec: GObject.ParamSpec) => void)): number
2342
+ connect_after(sigName: "notify::length", callback: (($obj: CertificateChain, pspec: GObject.ParamSpec) => void)): number
2343
+ emit(sigName: "notify::length", ...args: any[]): void
2344
+ connect(sigName: string, callback: (...args: any[]) => void): number
2345
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
2346
+ emit(sigName: string, ...args: any[]): void
2347
+ disconnect(id: number): void
2348
+ }
2349
+
2350
+ /**
2351
+ * Represents a chain of certificates, normally used to
2352
+ * validate the trust in a certificate. An X.509 certificate chain has one
2353
+ * endpoint certificate (the one for which trust is being verified) and then
2354
+ * in turn the certificate that issued each previous certificate in the chain.
2355
+ *
2356
+ * This functionality is for building of certificate chains not for validating
2357
+ * them. Use your favorite crypto library to validate trust in a certificate
2358
+ * chain once its built.
2359
+ *
2360
+ * The order of certificates in the chain should be first the endpoint
2361
+ * certificates and then the signing certificates.
2362
+ *
2363
+ * Create a new certificate chain with [ctor`CertificateChain`.new] and then
2364
+ * add the certificates with [method`CertificateChain`.add].
2365
+ *
2366
+ * You can then use [method`CertificateChain`.build] to build the remainder of
2367
+ * the chain. This will lookup missing certificates in PKCS#11 modules and
2368
+ * also check that each certificate in the chain is the signer of the previous
2369
+ * one. If a trust anchor, pinned certificate, or self-signed certificate is
2370
+ * found, then the chain is considered built. Any extra certificates are
2371
+ * removed from the chain.
2372
+ *
2373
+ * Once the certificate chain has been built, you can access its status
2374
+ * through [method`CertificateChain`.get_status]. The status signifies whether
2375
+ * the chain is anchored on a trust root, self-signed, incomplete etc. See
2376
+ * [enum`CertificateChainStatus]` for information on the various statuses.
2377
+ *
2378
+ * It's important to understand that the building of a certificate chain is
2379
+ * merely the first step towards verifying trust in a certificate.
2380
+ * @class
2381
+ */
2382
+ export class CertificateChain extends GObject.Object {
2383
+
2384
+ // Own properties of Gcr-3.Gcr.CertificateChain
2385
+
2386
+ static name: string
2387
+ static $gtype: GObject.GType<CertificateChain>
2388
+
2389
+ // Constructors of Gcr-3.Gcr.CertificateChain
2390
+
2391
+ constructor(config?: CertificateChain.ConstructorProperties)
2392
+ /**
2393
+ * Create a new #GcrCertificateChain.
2394
+ * @constructor
2395
+ * @returns a newly allocated certificate chain
2396
+ */
2397
+ constructor()
2398
+ /**
2399
+ * Create a new #GcrCertificateChain.
2400
+ * @constructor
2401
+ * @returns a newly allocated certificate chain
2402
+ */
2403
+ static new(): CertificateChain
2404
+ _init(config?: CertificateChain.ConstructorProperties): void
2405
+ }
2406
+
2407
+ export module CertificateRequest {
2408
+
2409
+ // Constructor properties interface
2410
+
2411
+ export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
2412
+
2413
+ // Own constructor properties of Gcr-3.Gcr.CertificateRequest
2414
+
2415
+ /**
2416
+ * The private key that this certificate request is for.
2417
+ */
2418
+ private_key?: Gck.Object | null
2419
+ }
2420
+
2421
+ }
2422
+
2423
+ export interface CertificateRequest {
2424
+
2425
+ // Own properties of Gcr-3.Gcr.CertificateRequest
2426
+
2427
+ /**
2428
+ * The private key that this certificate request is for.
2429
+ */
2430
+ readonly private_key: Gck.Object
2431
+
2432
+ // Owm methods of Gcr-3.Gcr.CertificateRequest
2433
+
2434
+ /**
2435
+ * Complete and sign a certificate request, so that it can be encoded
2436
+ * and sent to a certificate authority.
2437
+ *
2438
+ * This call may block as it signs the request using the private key.
2439
+ * @param cancellable a cancellation object
2440
+ * @returns whether certificate request was successfully completed or not
2441
+ */
2442
+ complete(cancellable: Gio.Cancellable | null): boolean
2443
+ /**
2444
+ * Asynchronously complete and sign a certificate request, so that it can
2445
+ * be encoded and sent to a certificate authority.
2446
+ *
2447
+ * This call will return immediately and complete later.
2448
+ * @param cancellable a cancellation object
2449
+ * @param callback called when the operation completes
2450
+ */
2451
+ complete_async(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
2452
+ /**
2453
+ * Finish an asynchronous operation to complete and sign a certificate
2454
+ * request.
2455
+ * @param result result of the asynchronous operation
2456
+ * @returns whether certificate request was successfully completed or not
2457
+ */
2458
+ complete_finish(result: Gio.AsyncResult): boolean
2459
+ /**
2460
+ * Encode the certificate request. It must have been completed with
2461
+ * [method`CertificateRequest`.complete] or
2462
+ * [method`CertificateRequest`.complete_async].
2463
+ *
2464
+ * If `textual` is %FALSE, the output is a DER encoded certificate request.
2465
+ *
2466
+ * If `textual` is %TRUE, the output is encoded as text. For PKCS#10 requests
2467
+ * this is done using the OpenSSL style PEM encoding.
2468
+ * @param textual whether to encode output as text
2469
+ * @returns the encoded certificate request
2470
+ */
2471
+ encode(textual: boolean): Uint8Array
2472
+ /**
2473
+ * Get the format of this certificate request.
2474
+ * @returns the format
2475
+ */
2476
+ get_format(): CertificateRequestFormat
2477
+ /**
2478
+ * Get the private key this certificate request is for.
2479
+ * @returns the private key,
2480
+ */
2481
+ get_private_key(): Gck.Object
2482
+ /**
2483
+ * Set the common name encoded in the certificate request.
2484
+ * @param cn common name to set on the request
2485
+ */
2486
+ set_cn(cn: string | null): void
2487
+
2488
+ // Class property signals of Gcr-3.Gcr.CertificateRequest
2489
+
2490
+ connect(sigName: "notify::private-key", callback: (($obj: CertificateRequest, pspec: GObject.ParamSpec) => void)): number
2491
+ connect_after(sigName: "notify::private-key", callback: (($obj: CertificateRequest, pspec: GObject.ParamSpec) => void)): number
2492
+ emit(sigName: "notify::private-key", ...args: any[]): void
2493
+ connect(sigName: string, callback: (...args: any[]) => void): number
2494
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
2495
+ emit(sigName: string, ...args: any[]): void
2496
+ disconnect(id: number): void
2497
+ }
2498
+
2499
+ /**
2500
+ * An object that allows creation of certificate requests. A certificate
2501
+ * request is sent to a certificate authority to request an X.509 certificate.
2502
+ *
2503
+ * Use [func`CertificateRequest`.prepare] to create a blank certificate
2504
+ * request for a given private key. Set the common name on the certificate
2505
+ * request with [method`CertificateRequest`.set_cn], and then sign the request
2506
+ * with [method`CertificateRequest`.complete_async].
2507
+ * @class
2508
+ */
2509
+ export class CertificateRequest extends GObject.Object {
2510
+
2511
+ // Own properties of Gcr-3.Gcr.CertificateRequest
2512
+
2513
+ static name: string
2514
+ static $gtype: GObject.GType<CertificateRequest>
2515
+
2516
+ // Constructors of Gcr-3.Gcr.CertificateRequest
2517
+
2518
+ constructor(config?: CertificateRequest.ConstructorProperties)
2519
+ _init(config?: CertificateRequest.ConstructorProperties): void
2520
+ /**
2521
+ * Check whether [class`CertificateRequest]` is capable of creating a request
2522
+ * for the given `private_key`.
2523
+ * @param private_key a private key
2524
+ * @param cancellable cancellation object
2525
+ * @returns whether a request can be created
2526
+ */
2527
+ static capable(private_key: Gck.Object, cancellable: Gio.Cancellable | null): boolean
2528
+ /**
2529
+ * Asynchronously check whether [class`CertificateRequest]` is capable of
2530
+ * creating a request for the given `private_key`.
2531
+ * @param private_key a private key
2532
+ * @param cancellable cancellation object
2533
+ * @param callback will be called when the operation completes
2534
+ */
2535
+ static capable_async(private_key: Gck.Object, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<CertificateRequest> | null): void
2536
+ /**
2537
+ * Get the result for asynchronously check whether [class`CertificateRequest]` is
2538
+ * capable of creating a request for the given `private_key`.
2539
+ * @param result asynchronous result
2540
+ * @returns whether a request can be created
2541
+ */
2542
+ static capable_finish(result: Gio.AsyncResult): boolean
2543
+ /**
2544
+ * Create a new certificate request, in the given format for the private key.
2545
+ * @param format the format for the certificate request
2546
+ * @param private_key the private key the the certificate is being requested for
2547
+ * @returns a new #GcrCertificate request
2548
+ */
2549
+ static prepare(format: CertificateRequestFormat, private_key: Gck.Object): CertificateRequest
2550
+ }
2551
+
2552
+ export module FilterCollection {
2553
+
2554
+ // Constructor properties interface
2555
+
2556
+ export interface ConstructorProperties extends Collection.ConstructorProperties, GObject.Object.ConstructorProperties {
2557
+
2558
+ // Own constructor properties of Gcr-3.Gcr.FilterCollection
2559
+
2560
+ underlying?: Collection | null
2561
+ }
2562
+
2563
+ }
2564
+
2565
+ export interface FilterCollection extends Collection {
2566
+
2567
+ // Own properties of Gcr-3.Gcr.FilterCollection
2568
+
2569
+ readonly underlying: Collection
2570
+
2571
+ // Own fields of Gcr-3.Gcr.FilterCollection
2572
+
2573
+ parent: GObject.Object
2574
+
2575
+ // Owm methods of Gcr-3.Gcr.FilterCollection
2576
+
2577
+ /**
2578
+ * Get the collection that is being filtered by this filter collection.
2579
+ * @returns the underlying collection
2580
+ */
2581
+ get_underlying(): Collection
2582
+ /**
2583
+ * Refilter all objects in the underlying collection. Call this function if
2584
+ * the filter callback function changes its filtering criteria.
2585
+ */
2586
+ refilter(): void
2587
+ /**
2588
+ * Set the callback used to filter the objects in the underlying collection.
2589
+ * The callback should return %TRUE if an object should appear in the
2590
+ * filtered collection.
2591
+ *
2592
+ * If a %NULL callback is set, then all underlynig objects will appear in the
2593
+ * filtered collection.
2594
+ *
2595
+ * This will refilter the collection.
2596
+ * @param callback function to call for each object
2597
+ */
2598
+ set_callback(callback: FilterCollectionFunc | null): void
2599
+
2600
+ // Class property signals of Gcr-3.Gcr.FilterCollection
2601
+
2602
+ connect(sigName: "notify::underlying", callback: (($obj: FilterCollection, pspec: GObject.ParamSpec) => void)): number
2603
+ connect_after(sigName: "notify::underlying", callback: (($obj: FilterCollection, pspec: GObject.ParamSpec) => void)): number
2604
+ emit(sigName: "notify::underlying", ...args: any[]): void
2605
+ connect(sigName: string, callback: (...args: any[]) => void): number
2606
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
2607
+ emit(sigName: string, ...args: any[]): void
2608
+ disconnect(id: number): void
2609
+ }
2610
+
2611
+ /**
2612
+ * A collection which filters a [iface`Collection]`.
2613
+ *
2614
+ * An implementation of [iface`Collection]` which filters objects from another
2615
+ * underlying collection. Use [ctor`FilterCollection`.new_with_callback]
2616
+ * to create a new filter collection.
2617
+ *
2618
+ * The callback will determine the criteria for whether an object shows through
2619
+ * the filter or not.
2620
+ * @class
2621
+ */
2622
+ export class FilterCollection extends GObject.Object {
2623
+
2624
+ // Own properties of Gcr-3.Gcr.FilterCollection
2625
+
2626
+ static name: string
2627
+ static $gtype: GObject.GType<FilterCollection>
2628
+
2629
+ // Constructors of Gcr-3.Gcr.FilterCollection
2630
+
2631
+ constructor(config?: FilterCollection.ConstructorProperties)
2632
+ /**
2633
+ * Create a new #GcrFilterCollection.
2634
+ *
2635
+ * The callback should return %TRUE if an object should appear in the
2636
+ * filtered collection.
2637
+ *
2638
+ * If a %NULL callback is set, then all underlynig objects will appear in the
2639
+ * filtered collection.
2640
+ * @constructor
2641
+ * @param underlying the underlying collection
2642
+ * @param callback function to call for each object
2643
+ * @returns a newly allocated filtered collection, which should be freed with g_object_unref()
2644
+ */
2645
+ static new_with_callback(underlying: Collection, callback: FilterCollectionFunc | null): FilterCollection
2646
+ _init(config?: FilterCollection.ConstructorProperties): void
2647
+ }
2648
+
2649
+ export module Parser {
2650
+
2651
+ // Signal callback interfaces
2652
+
2653
+ /**
2654
+ * Signal callback interface for `authenticate`
2655
+ */
2656
+ export interface AuthenticateSignalCallback {
2657
+ ($obj: Parser, count: number): boolean
2658
+ }
2659
+
2660
+ /**
2661
+ * Signal callback interface for `parsed`
2662
+ */
2663
+ export interface ParsedSignalCallback {
2664
+ ($obj: Parser): void
2665
+ }
2666
+
2667
+
2668
+ // Constructor properties interface
2669
+
2670
+ export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
2671
+ }
2672
+
2673
+ }
2674
+
2675
+ export interface Parser {
2676
+
2677
+ // Own properties of Gcr-3.Gcr.Parser
2678
+
2679
+ /**
2680
+ * Get the attributes that make up the currently parsed item. This is
2681
+ * generally only valid during a #GcrParser::parsed signal.
2682
+ */
2683
+ readonly parsed_attributes: Gck.Attributes
2684
+ /**
2685
+ * The description of the type of the currently parsed item. This is generally
2686
+ * only valid during a #GcrParser::parsed signal.
2687
+ */
2688
+ readonly parsed_description: string | null
2689
+ /**
2690
+ * The label of the currently parsed item. This is generally
2691
+ * only valid during a #GcrParser::parsed signal.
2692
+ */
2693
+ readonly parsed_label: string | null
2694
+
2695
+ // Own fields of Gcr-3.Gcr.Parser
2696
+
2697
+ parent: GObject.Object
2698
+
2699
+ // Owm methods of Gcr-3.Gcr.Parser
2700
+
2701
+ /**
2702
+ * Add a password to the set of passwords to try when parsing locked or encrypted
2703
+ * items. This is usually called from the #GcrParser::authenticate signal.
2704
+ * @param password a password to try
2705
+ */
2706
+ add_password(password: string | null): void
2707
+ /**
2708
+ * Disable parsing of the given format. Use %GCR_FORMAT_ALL to disable all the formats.
2709
+ * @param format The format identifier
2710
+ */
2711
+ format_disable(format: DataFormat): void
2712
+ /**
2713
+ * Enable parsing of the given format. Use %GCR_FORMAT_ALL to enable all the formats.
2714
+ * @param format The format identifier
2715
+ */
2716
+ format_enable(format: DataFormat): void
2717
+ /**
2718
+ * Check whether the given format is supported by the parser.
2719
+ * @param format The format identifier
2720
+ * @returns Whether the format is supported.
2721
+ */
2722
+ format_supported(format: DataFormat): boolean
2723
+ /**
2724
+ * Get the filename of the parser item.
2725
+ * @returns the filename set on the parser, or %NULL
2726
+ */
2727
+ get_filename(): string | null
2728
+ /**
2729
+ * Get the currently parsed item
2730
+ * @returns the currently parsed item
2731
+ */
2732
+ get_parsed(): Parsed
2733
+ /**
2734
+ * Get the attributes which make up the currently parsed item. This is generally
2735
+ * only valid during the #GcrParser::parsed signal.
2736
+ * @returns the attributes for the current item, which are owned by the parser and should not be freed
2737
+ */
2738
+ get_parsed_attributes(): Gck.Attributes | null
2739
+ /**
2740
+ * Get the raw data block that represents this parsed object. This is only
2741
+ * valid during the #GcrParser::parsed signal.
2742
+ * @returns the raw data block of the currently parsed item; the value is owned by the parser and should not be freed
2743
+ */
2744
+ get_parsed_block(): Uint8Array | null
2745
+ /**
2746
+ * Get the raw data block that represents this parsed object. This is only
2747
+ * valid during the #GcrParser::parsed signal.
2748
+ * @returns the raw data block of the currently parsed item
2749
+ */
2750
+ get_parsed_bytes(): GLib.Bytes
2751
+ /**
2752
+ * Get a description for the type of the currently parsed item. This is generally
2753
+ * only valid during the #GcrParser::parsed signal.
2754
+ * @returns the description for the current item; this is owned by the parser and should not be freed
2755
+ */
2756
+ get_parsed_description(): string | null
2757
+ /**
2758
+ * Get the format of the raw data block that represents this parsed object.
2759
+ * This corresponds with the data returned from gcr_parser_get_parsed_block().
2760
+ *
2761
+ * This is only valid during the #GcrParser::parsed signal.
2762
+ * @returns the data format of the currently parsed item
2763
+ */
2764
+ get_parsed_format(): DataFormat
2765
+ /**
2766
+ * Get the label of the currently parsed item. This is generally only valid
2767
+ * during the #GcrParser::parsed signal.
2768
+ * @returns the label of the currently parsed item. The value is owned by the parser and should not be freed.
2769
+ */
2770
+ get_parsed_label(): string | null
2771
+ /**
2772
+ * Parse the data. The #GcrParser::parsed and #GcrParser::authenticate signals
2773
+ * may fire during the parsing.
2774
+ * @param data the data to parse
2775
+ * @returns Whether the data was parsed successfully or not.
2776
+ */
2777
+ parse_bytes(data: GLib.Bytes): boolean
2778
+ /**
2779
+ * Parse the data. The #GcrParser::parsed and #GcrParser::authenticate signals
2780
+ * may fire during the parsing.
2781
+ *
2782
+ * A copy of the data will be made. Use gcr_parser_parse_bytes() to avoid this.
2783
+ * @param data the data to parse
2784
+ * @returns Whether the data was parsed successfully or not.
2785
+ */
2786
+ parse_data(data: Uint8Array): boolean
2787
+ /**
2788
+ * Parse items from the data in a #GInputStream. This function may block while
2789
+ * reading from the input stream. Use gcr_parser_parse_stream_async() for
2790
+ * a non-blocking variant.
2791
+ *
2792
+ * The #GcrParser::parsed and #GcrParser::authenticate signals
2793
+ * may fire during the parsing.
2794
+ * @param input The input stream
2795
+ * @param cancellable An optional cancellation object
2796
+ * @returns Whether the parsing completed successfully or not.
2797
+ */
2798
+ parse_stream(input: Gio.InputStream, cancellable: Gio.Cancellable | null): boolean
2799
+ /**
2800
+ * Parse items from the data in a #GInputStream. This function completes
2801
+ * asyncronously and doesn't block.
2802
+ *
2803
+ * The #GcrParser::parsed and #GcrParser::authenticate signals
2804
+ * may fire during the parsing.
2805
+ * @param input The input stream
2806
+ * @param cancellable An optional cancellation object
2807
+ * @param callback Called when the operation result is ready.
2808
+ */
2809
+ parse_stream_async(input: Gio.InputStream, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
2810
+ /**
2811
+ * Complete an operation to parse a stream.
2812
+ * @param result The operation result
2813
+ * @returns Whether the parsing completed successfully or not.
2814
+ */
2815
+ parse_stream_finish(result: Gio.AsyncResult): boolean
2816
+ /**
2817
+ * Sets the filename of the parser item.
2818
+ * @param filename a string of the filename of the parser item
2819
+ */
2820
+ set_filename(filename: string | null): void
2821
+
2822
+ // Own virtual methods of Gcr-3.Gcr.Parser
2823
+
2824
+ vfunc_authenticate(count: number): boolean
2825
+ vfunc_parsed(): void
2826
+
2827
+ // Own signals of Gcr-3.Gcr.Parser
2828
+
2829
+ connect(sigName: "authenticate", callback: Parser.AuthenticateSignalCallback): number
2830
+ connect_after(sigName: "authenticate", callback: Parser.AuthenticateSignalCallback): number
2831
+ emit(sigName: "authenticate", count: number, ...args: any[]): void
2832
+ connect(sigName: "parsed", callback: Parser.ParsedSignalCallback): number
2833
+ connect_after(sigName: "parsed", callback: Parser.ParsedSignalCallback): number
2834
+ emit(sigName: "parsed", ...args: any[]): void
2835
+
2836
+ // Class property signals of Gcr-3.Gcr.Parser
2837
+
2838
+ connect(sigName: "notify::parsed-attributes", callback: (($obj: Parser, pspec: GObject.ParamSpec) => void)): number
2839
+ connect_after(sigName: "notify::parsed-attributes", callback: (($obj: Parser, pspec: GObject.ParamSpec) => void)): number
2840
+ emit(sigName: "notify::parsed-attributes", ...args: any[]): void
2841
+ connect(sigName: "notify::parsed-description", callback: (($obj: Parser, pspec: GObject.ParamSpec) => void)): number
2842
+ connect_after(sigName: "notify::parsed-description", callback: (($obj: Parser, pspec: GObject.ParamSpec) => void)): number
2843
+ emit(sigName: "notify::parsed-description", ...args: any[]): void
2844
+ connect(sigName: "notify::parsed-label", callback: (($obj: Parser, pspec: GObject.ParamSpec) => void)): number
2845
+ connect_after(sigName: "notify::parsed-label", callback: (($obj: Parser, pspec: GObject.ParamSpec) => void)): number
2846
+ emit(sigName: "notify::parsed-label", ...args: any[]): void
2847
+ connect(sigName: string, callback: (...args: any[]) => void): number
2848
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
2849
+ emit(sigName: string, ...args: any[]): void
2850
+ disconnect(id: number): void
2851
+ }
2852
+
2853
+ /**
2854
+ * A parser for parsing various types of files or data.
2855
+ *
2856
+ * A `GcrParser` can parse various certificate and key files such as OpenSSL
2857
+ * PEM files, DER encoded certifictes, PKCS#8 keys and so on. Each various
2858
+ * format is identified by a value in the [enum`DataFormat]` enumeration.
2859
+ *
2860
+ * In order to parse data, a new parser is created with gcr_parser_new() and
2861
+ * then the [signal`Parser:`:authenticate] and [signal`Parser:`:parsed] signals
2862
+ * should be connected to. Data is then fed to the parser via
2863
+ * [method`Parser`.parse_data] or [method`Parser`.parse_stream].
2864
+ *
2865
+ * During the [signal`Parser:`:parsed] signal the attributes that make up the
2866
+ * currently parsed item can be retrieved using the
2867
+ * [method`Parser`.get_parsed_attributes] function.
2868
+ * @class
2869
+ */
2870
+ export class Parser extends GObject.Object {
2871
+
2872
+ // Own properties of Gcr-3.Gcr.Parser
2873
+
2874
+ static name: string
2875
+ static $gtype: GObject.GType<Parser>
2876
+
2877
+ // Constructors of Gcr-3.Gcr.Parser
2878
+
2879
+ constructor(config?: Parser.ConstructorProperties)
2880
+ /**
2881
+ * Create a new #GcrParser
2882
+ * @constructor
2883
+ * @returns a newly allocated #GcrParser
2884
+ */
2885
+ constructor()
2886
+ /**
2887
+ * Create a new #GcrParser
2888
+ * @constructor
2889
+ * @returns a newly allocated #GcrParser
2890
+ */
2891
+ static new(): Parser
2892
+ _init(config?: Parser.ConstructorProperties): void
2893
+ }
2894
+
2895
+ export module Pkcs11Certificate {
2896
+
2897
+ // Constructor properties interface
2898
+
2899
+ export interface ConstructorProperties extends Certificate.ConstructorProperties, Comparable.ConstructorProperties, Gck.Object.ConstructorProperties {
2900
+
2901
+ // Own constructor properties of Gcr-3.Gcr.Pkcs11Certificate
2902
+
2903
+ /**
2904
+ * Automatically loaded attributes for this certificate.
2905
+ */
2906
+ attributes?: Gck.Attributes | null
2907
+ }
2908
+
2909
+ }
2910
+
2911
+ export interface Pkcs11Certificate extends Certificate, Comparable {
2912
+
2913
+ // Own properties of Gcr-3.Gcr.Pkcs11Certificate
2914
+
2915
+ /**
2916
+ * Automatically loaded attributes for this certificate.
2917
+ */
2918
+ readonly attributes: Gck.Attributes
2919
+
2920
+ // Own fields of Gcr-3.Gcr.Pkcs11Certificate
2921
+
2922
+ parent: Gck.Object & GObject.Object
2923
+
2924
+ // Owm methods of Gcr-3.Gcr.Pkcs11Certificate
2925
+
2926
+ /**
2927
+ * Access the automatically loaded attributes for this certificate.
2928
+ * @returns the certificate attributes
2929
+ */
2930
+ get_attributes(): Gck.Attributes
2931
+
2932
+ // Conflicting methods
2933
+
2934
+ /**
2935
+ * Get the data for the specified attribute from the object. For convenience
2936
+ * the returned data has a null terminator.
2937
+ *
2938
+ * This call may block for an indefinite period.
2939
+ * @param attr_type The attribute to get data for.
2940
+ * @param cancellable A #GCancellable or %NULL
2941
+ * @returns the resulting PKCS#11 attribute data, or %NULL if an error occurred
2942
+ */
2943
+ get_data(attr_type: number, cancellable: Gio.Cancellable | null): Uint8Array
2944
+
2945
+ // Overloads of get_data
2946
+
2947
+ /**
2948
+ * Gets a named field from the objects table of associations (see g_object_set_data()).
2949
+ * @param key name of the key for that association
2950
+ * @returns the data if found, or %NULL if no such data exists.
2951
+ */
2952
+ get_data(key: string | null): any | null
2953
+ /**
2954
+ * Gets a named field from the objects table of associations (see g_object_set_data()).
2955
+ * @param key name of the key for that association
2956
+ * @returns the data if found, or %NULL if no such data exists.
2957
+ */
2958
+ get_data(key: string | null): any | null
2959
+
2960
+ // Class property signals of Gcr-3.Gcr.Pkcs11Certificate
2961
+
2962
+ connect(sigName: "notify::attributes", callback: (($obj: Pkcs11Certificate, pspec: GObject.ParamSpec) => void)): number
2963
+ connect_after(sigName: "notify::attributes", callback: (($obj: Pkcs11Certificate, pspec: GObject.ParamSpec) => void)): number
2964
+ emit(sigName: "notify::attributes", ...args: any[]): void
2965
+ connect(sigName: "notify::handle", callback: (($obj: Pkcs11Certificate, pspec: GObject.ParamSpec) => void)): number
2966
+ connect_after(sigName: "notify::handle", callback: (($obj: Pkcs11Certificate, pspec: GObject.ParamSpec) => void)): number
2967
+ emit(sigName: "notify::handle", ...args: any[]): void
2968
+ connect(sigName: "notify::module", callback: (($obj: Pkcs11Certificate, pspec: GObject.ParamSpec) => void)): number
2969
+ connect_after(sigName: "notify::module", callback: (($obj: Pkcs11Certificate, pspec: GObject.ParamSpec) => void)): number
2970
+ emit(sigName: "notify::module", ...args: any[]): void
2971
+ connect(sigName: "notify::session", callback: (($obj: Pkcs11Certificate, pspec: GObject.ParamSpec) => void)): number
2972
+ connect_after(sigName: "notify::session", callback: (($obj: Pkcs11Certificate, pspec: GObject.ParamSpec) => void)): number
2973
+ emit(sigName: "notify::session", ...args: any[]): void
2974
+ connect(sigName: "notify::description", callback: (($obj: Pkcs11Certificate, pspec: GObject.ParamSpec) => void)): number
2975
+ connect_after(sigName: "notify::description", callback: (($obj: Pkcs11Certificate, pspec: GObject.ParamSpec) => void)): number
2976
+ emit(sigName: "notify::description", ...args: any[]): void
2977
+ connect(sigName: "notify::expiry", callback: (($obj: Pkcs11Certificate, pspec: GObject.ParamSpec) => void)): number
2978
+ connect_after(sigName: "notify::expiry", callback: (($obj: Pkcs11Certificate, pspec: GObject.ParamSpec) => void)): number
2979
+ emit(sigName: "notify::expiry", ...args: any[]): void
2980
+ connect(sigName: "notify::icon", callback: (($obj: Pkcs11Certificate, pspec: GObject.ParamSpec) => void)): number
2981
+ connect_after(sigName: "notify::icon", callback: (($obj: Pkcs11Certificate, pspec: GObject.ParamSpec) => void)): number
2982
+ emit(sigName: "notify::icon", ...args: any[]): void
2983
+ connect(sigName: "notify::issuer", callback: (($obj: Pkcs11Certificate, pspec: GObject.ParamSpec) => void)): number
2984
+ connect_after(sigName: "notify::issuer", callback: (($obj: Pkcs11Certificate, pspec: GObject.ParamSpec) => void)): number
2985
+ emit(sigName: "notify::issuer", ...args: any[]): void
2986
+ connect(sigName: "notify::label", callback: (($obj: Pkcs11Certificate, pspec: GObject.ParamSpec) => void)): number
2987
+ connect_after(sigName: "notify::label", callback: (($obj: Pkcs11Certificate, pspec: GObject.ParamSpec) => void)): number
2988
+ emit(sigName: "notify::label", ...args: any[]): void
2989
+ connect(sigName: "notify::markup", callback: (($obj: Pkcs11Certificate, pspec: GObject.ParamSpec) => void)): number
2990
+ connect_after(sigName: "notify::markup", callback: (($obj: Pkcs11Certificate, pspec: GObject.ParamSpec) => void)): number
2991
+ emit(sigName: "notify::markup", ...args: any[]): void
2992
+ connect(sigName: "notify::subject", callback: (($obj: Pkcs11Certificate, pspec: GObject.ParamSpec) => void)): number
2993
+ connect_after(sigName: "notify::subject", callback: (($obj: Pkcs11Certificate, pspec: GObject.ParamSpec) => void)): number
2994
+ emit(sigName: "notify::subject", ...args: any[]): void
2995
+ connect(sigName: string, callback: (...args: any[]) => void): number
2996
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
2997
+ emit(sigName: string, ...args: any[]): void
2998
+ disconnect(id: number): void
2999
+ }
3000
+
3001
+ /**
3002
+ * A certificate loaded from a PKCS#11 storage.
3003
+ * It is also a valid [class`Gck`.Object] and can be used as such.
3004
+ *
3005
+ * Use gcr_pkcs11_certificate_lookup_issuer() to lookup the issuer of a given
3006
+ * certificate in the PKCS#11 store.
3007
+ *
3008
+ * Various common PKCS#11 certificate attributes are automatically loaded and
3009
+ * are available via gcr_pkcs11_certificate_get_attributes().
3010
+ * @class
3011
+ */
3012
+ export class Pkcs11Certificate extends Gck.Object {
3013
+
3014
+ // Own properties of Gcr-3.Gcr.Pkcs11Certificate
3015
+
3016
+ static name: string
3017
+ static $gtype: GObject.GType<Pkcs11Certificate>
3018
+
3019
+ // Constructors of Gcr-3.Gcr.Pkcs11Certificate
3020
+
3021
+ constructor(config?: Pkcs11Certificate.ConstructorProperties)
3022
+ _init(config?: Pkcs11Certificate.ConstructorProperties): void
3023
+ /**
3024
+ * Lookup a the issuer of a `certificate` in the PKCS#11 storage. The
3025
+ * lookup is done using the issuer DN of the certificate. No certificate chain
3026
+ * verification is done. Use a crypto library to make trust decisions.
3027
+ *
3028
+ * This call may block, see gcr_pkcs11_certificate_lookup_issuer() for the
3029
+ * non-blocking version.
3030
+ *
3031
+ * Will return %NULL if no issuer certificate is found. Use `error` to determine
3032
+ * if an error occurred.
3033
+ * @param certificate a #GcrCertificate
3034
+ * @param cancellable a #GCancellable
3035
+ * @returns a new #GcrPkcs11Certificate, or %NULL
3036
+ */
3037
+ static lookup_issuer(certificate: Certificate, cancellable: Gio.Cancellable | null): Certificate
3038
+ /**
3039
+ * Lookup a the issuer of a `certificate` in the PKCS#11 storage. The
3040
+ * lookup is done using the issuer DN of the certificate. No certificate chain
3041
+ * verification is done. Use a crypto library to make trust decisions.
3042
+ *
3043
+ * When the operation is finished, callback will be called. You can then call
3044
+ * gcr_pkcs11_certificate_lookup_issuer_finish() to get the result of the
3045
+ * operation.
3046
+ * @param certificate a #GcrCertificate
3047
+ * @param cancellable a #GCancellable
3048
+ * @param callback a #GAsyncReadyCallback to call when the operation completes
3049
+ */
3050
+ static lookup_issuer_async(certificate: Certificate, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<Pkcs11Certificate> | null): void
3051
+ /**
3052
+ * Finishes an asynchronous operation started by
3053
+ * gcr_pkcs11_certificate_lookup_issuer_async().
3054
+ *
3055
+ * Will return %NULL if no issuer certificate is found. Use `error` to determine
3056
+ * if an error occurred.
3057
+ * @param result the #GAsyncResult passed to the callback
3058
+ * @returns a new #GcrPkcs11Certificate, or %NULL
3059
+ */
3060
+ static lookup_issuer_finish(result: Gio.AsyncResult): Certificate
3061
+ }
3062
+
3063
+ export module SecretExchange {
3064
+
3065
+ // Constructor properties interface
3066
+
3067
+ export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
3068
+
3069
+ // Own constructor properties of Gcr-3.Gcr.SecretExchange
3070
+
3071
+ /**
3072
+ * The protocol being used for the exchange.
3073
+ *
3074
+ * Will be %NULL if no protocol was specified when creating this object,
3075
+ * and either [method`SecretExchange`.begin] or [method`SecretExchange`.receive]
3076
+ * have not been called successfully.
3077
+ */
3078
+ protocol?: string | null
3079
+ }
3080
+
3081
+ }
3082
+
3083
+ export interface SecretExchange {
3084
+
3085
+ // Own properties of Gcr-3.Gcr.SecretExchange
3086
+
3087
+ /**
3088
+ * The protocol being used for the exchange.
3089
+ *
3090
+ * Will be %NULL if no protocol was specified when creating this object,
3091
+ * and either [method`SecretExchange`.begin] or [method`SecretExchange`.receive]
3092
+ * have not been called successfully.
3093
+ */
3094
+ readonly protocol: string | null
3095
+
3096
+ // Owm methods of Gcr-3.Gcr.SecretExchange
3097
+
3098
+ /**
3099
+ * Begin the secret exchange. The resulting string should be sent to the other
3100
+ * side of the exchange. The other side should use [method`SecretExchange`.receive]
3101
+ * to process the string.
3102
+ * @returns A newly allocated string to be sent to the other side of the secret exchange
3103
+ */
3104
+ begin(): string | null
3105
+ /**
3106
+ * Will return %NULL if no protocol was specified, and either
3107
+ * [method`SecretExchange`.begin] or [method`SecretExchange`.receive] have not
3108
+ * been called successfully.
3109
+ * @returns the protocol or %NULL
3110
+ */
3111
+ get_protocol(): string | null
3112
+ /**
3113
+ * Returns the last secret received. If no secret has yet been received this
3114
+ * will return %NULL. The string is owned by the #GcrSecretExchange object
3115
+ * and will be valid until the next time that gcr_secret_exchange_receive()
3116
+ * is called on this object, or the object is destroyed.
3117
+ *
3118
+ * Depending on the secret passed into the other side of the secret exchange,
3119
+ * the result may be a binary string. It does however have a null terminator,
3120
+ * so if you're certain that it is does not contain arbitrary binary data,
3121
+ * it can be used as a string.
3122
+ * @returns the last secret received
3123
+ */
3124
+ get_secret(): string[]
3125
+ /**
3126
+ * Receive a string from the other side of secret exchange. This string will
3127
+ * have been created by [method`SecretExchange`.begin] or
3128
+ * [method`SecretExchange`.send].
3129
+ *
3130
+ * After this call completes successfully the value returned from
3131
+ * gcr_secret_exchange_get_secret() will have changed.
3132
+ * @param exchange the string received
3133
+ * @returns whether the string was successfully parsed and received
3134
+ */
3135
+ receive(exchange: string | null): boolean
3136
+ /**
3137
+ * Send a reply to the other side of the secret exchange, optionally sending a
3138
+ * secret.
3139
+ *
3140
+ * [method`SecretExchange`.receive] must have been successfully called at least
3141
+ * once on this object. In other words this object must have received data
3142
+ * from the other side of the secret exchange, before we can send a secret.
3143
+ * @param secret optionally, a secret to send to the other side
3144
+ * @param secret_len length of `secret,` or -1 if null terminated
3145
+ * @returns a newly allocated string to be sent to the other side of the secret exchange
3146
+ */
3147
+ send(secret: string | null, secret_len: number): string | null
3148
+
3149
+ // Own virtual methods of Gcr-3.Gcr.SecretExchange
3150
+
3151
+ vfunc_derive_transport_key(peer: number, n_peer: number): boolean
3152
+ vfunc_generate_exchange_key(scheme: string | null, public_key: number, n_public_key: number): boolean
3153
+
3154
+ // Class property signals of Gcr-3.Gcr.SecretExchange
3155
+
3156
+ connect(sigName: "notify::protocol", callback: (($obj: SecretExchange, pspec: GObject.ParamSpec) => void)): number
3157
+ connect_after(sigName: "notify::protocol", callback: (($obj: SecretExchange, pspec: GObject.ParamSpec) => void)): number
3158
+ emit(sigName: "notify::protocol", ...args: any[]): void
3159
+ connect(sigName: string, callback: (...args: any[]) => void): number
3160
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
3161
+ emit(sigName: string, ...args: any[]): void
3162
+ disconnect(id: number): void
3163
+ }
3164
+
3165
+ /**
3166
+ * Allows exchange of secrets between two processes on the same system without
3167
+ * exposing those secrets to things like loggers, non-pageable memory etc.
3168
+ *
3169
+ * This does not protect against active attacks like MITM attacks.
3170
+ *
3171
+ * Each side creates a secret exchange object, and one of the sides calls
3172
+ * [method`SecretExchange`.begin]. This creates a string, which should be passed
3173
+ * to the other side. Each side passes the strings it receives into
3174
+ * [method`SecretExchange`.receive].
3175
+ *
3176
+ * In order to send a reply (either with or without a secret) use
3177
+ * [method`SecretExchange`.send]. A side must have successfully called
3178
+ * [method`SecretExchange`.receive] before it can use
3179
+ * [method`SecretExchange`.send].
3180
+ *
3181
+ * The secret exchange objects can be used for multiple iterations of the
3182
+ * conversation, or for just one request/reply. The only limitation being that
3183
+ * the initial request cannot contain a secret.
3184
+ *
3185
+ * Caveat: Information about the approximate length (rounded up to the nearest
3186
+ * 16 bytes) may be leaked. If this is considered inacceptable, do not use
3187
+ * [class`SecretExchange]`.
3188
+ * @class
3189
+ */
3190
+ export class SecretExchange extends GObject.Object {
3191
+
3192
+ // Own properties of Gcr-3.Gcr.SecretExchange
3193
+
3194
+ static name: string
3195
+ static $gtype: GObject.GType<SecretExchange>
3196
+
3197
+ // Constructors of Gcr-3.Gcr.SecretExchange
3198
+
3199
+ constructor(config?: SecretExchange.ConstructorProperties)
3200
+ /**
3201
+ * Create a new secret exchange object.
3202
+ *
3203
+ * Specify a protocol of %NULL to allow any protocol. This is especially
3204
+ * relevant on the side of the exchange that does not call
3205
+ * [method`SecretExchange`.begin], that is the originator. Currently the only
3206
+ * protocol supported is %GCR_SECRET_EXCHANGE_PROTOCOL_1.
3207
+ * @constructor
3208
+ * @param protocol the exchange protocol to use
3209
+ * @returns A new #GcrSecretExchange object
3210
+ */
3211
+ constructor(protocol: string | null)
3212
+ /**
3213
+ * Create a new secret exchange object.
3214
+ *
3215
+ * Specify a protocol of %NULL to allow any protocol. This is especially
3216
+ * relevant on the side of the exchange that does not call
3217
+ * [method`SecretExchange`.begin], that is the originator. Currently the only
3218
+ * protocol supported is %GCR_SECRET_EXCHANGE_PROTOCOL_1.
3219
+ * @constructor
3220
+ * @param protocol the exchange protocol to use
3221
+ * @returns A new #GcrSecretExchange object
3222
+ */
3223
+ static new(protocol: string | null): SecretExchange
3224
+ _init(config?: SecretExchange.ConstructorProperties): void
3225
+ }
3226
+
3227
+ export module SimpleCertificate {
3228
+
3229
+ // Constructor properties interface
3230
+
3231
+ export interface ConstructorProperties extends Certificate.ConstructorProperties, Comparable.ConstructorProperties, GObject.Object.ConstructorProperties {
3232
+ }
3233
+
3234
+ }
3235
+
3236
+ export interface SimpleCertificate extends Certificate, Comparable {
3237
+
3238
+ // Own fields of Gcr-3.Gcr.SimpleCertificate
3239
+
3240
+ parent: GObject.Object
3241
+
3242
+ // Class property signals of Gcr-3.Gcr.SimpleCertificate
3243
+
3244
+ connect(sigName: "notify::description", callback: (($obj: SimpleCertificate, pspec: GObject.ParamSpec) => void)): number
3245
+ connect_after(sigName: "notify::description", callback: (($obj: SimpleCertificate, pspec: GObject.ParamSpec) => void)): number
3246
+ emit(sigName: "notify::description", ...args: any[]): void
3247
+ connect(sigName: "notify::expiry", callback: (($obj: SimpleCertificate, pspec: GObject.ParamSpec) => void)): number
3248
+ connect_after(sigName: "notify::expiry", callback: (($obj: SimpleCertificate, pspec: GObject.ParamSpec) => void)): number
3249
+ emit(sigName: "notify::expiry", ...args: any[]): void
3250
+ connect(sigName: "notify::icon", callback: (($obj: SimpleCertificate, pspec: GObject.ParamSpec) => void)): number
3251
+ connect_after(sigName: "notify::icon", callback: (($obj: SimpleCertificate, pspec: GObject.ParamSpec) => void)): number
3252
+ emit(sigName: "notify::icon", ...args: any[]): void
3253
+ connect(sigName: "notify::issuer", callback: (($obj: SimpleCertificate, pspec: GObject.ParamSpec) => void)): number
3254
+ connect_after(sigName: "notify::issuer", callback: (($obj: SimpleCertificate, pspec: GObject.ParamSpec) => void)): number
3255
+ emit(sigName: "notify::issuer", ...args: any[]): void
3256
+ connect(sigName: "notify::label", callback: (($obj: SimpleCertificate, pspec: GObject.ParamSpec) => void)): number
3257
+ connect_after(sigName: "notify::label", callback: (($obj: SimpleCertificate, pspec: GObject.ParamSpec) => void)): number
3258
+ emit(sigName: "notify::label", ...args: any[]): void
3259
+ connect(sigName: "notify::markup", callback: (($obj: SimpleCertificate, pspec: GObject.ParamSpec) => void)): number
3260
+ connect_after(sigName: "notify::markup", callback: (($obj: SimpleCertificate, pspec: GObject.ParamSpec) => void)): number
3261
+ emit(sigName: "notify::markup", ...args: any[]): void
3262
+ connect(sigName: "notify::subject", callback: (($obj: SimpleCertificate, pspec: GObject.ParamSpec) => void)): number
3263
+ connect_after(sigName: "notify::subject", callback: (($obj: SimpleCertificate, pspec: GObject.ParamSpec) => void)): number
3264
+ emit(sigName: "notify::subject", ...args: any[]): void
3265
+ connect(sigName: string, callback: (...args: any[]) => void): number
3266
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
3267
+ emit(sigName: string, ...args: any[]): void
3268
+ disconnect(id: number): void
3269
+ }
3270
+
3271
+ /**
3272
+ * An implementation of [iface`Certificate]` which loads a certificate from DER
3273
+ * data already located in memory.
3274
+ *
3275
+ * To create an object, use the [ctor`SimpleCertificate`.new] or
3276
+ * [ctor`SimpleCertificate`.new_static] functions.
3277
+ * @class
3278
+ */
3279
+ export class SimpleCertificate extends GObject.Object {
3280
+
3281
+ // Own properties of Gcr-3.Gcr.SimpleCertificate
3282
+
3283
+ static name: string
3284
+ static $gtype: GObject.GType<SimpleCertificate>
3285
+
3286
+ // Constructors of Gcr-3.Gcr.SimpleCertificate
3287
+
3288
+ constructor(config?: SimpleCertificate.ConstructorProperties)
3289
+ /**
3290
+ * Create a new #GcrSimpleCertificate for the raw DER data. The `data` memory is
3291
+ * copied so you can dispose of it after this function returns.
3292
+ * @constructor
3293
+ * @param data the raw DER certificate data
3294
+ * @returns a new #GcrSimpleCertificate
3295
+ */
3296
+ constructor(data: Uint8Array)
3297
+ /**
3298
+ * Create a new #GcrSimpleCertificate for the raw DER data. The `data` memory is
3299
+ * copied so you can dispose of it after this function returns.
3300
+ * @constructor
3301
+ * @param data the raw DER certificate data
3302
+ * @returns a new #GcrSimpleCertificate
3303
+ */
3304
+ static new(data: Uint8Array): SimpleCertificate
3305
+ _init(config?: SimpleCertificate.ConstructorProperties): void
3306
+ }
3307
+
3308
+ export module SimpleCollection {
3309
+
3310
+ // Constructor properties interface
3311
+
3312
+ export interface ConstructorProperties extends Collection.ConstructorProperties, GObject.Object.ConstructorProperties {
3313
+ }
3314
+
3315
+ }
3316
+
3317
+ export interface SimpleCollection extends Collection {
3318
+
3319
+ // Own fields of Gcr-3.Gcr.SimpleCollection
3320
+
3321
+ parent: GObject.Object
3322
+
3323
+ // Owm methods of Gcr-3.Gcr.SimpleCollection
3324
+
3325
+ /**
3326
+ * Add an object to this collection
3327
+ * @param object The object to add
3328
+ */
3329
+ add(object: GObject.Object): void
3330
+ /**
3331
+ * Remove an object from the collection.
3332
+ * @param object The object to remove from the collection
3333
+ */
3334
+ remove(object: GObject.Object): void
3335
+
3336
+ // Class property signals of Gcr-3.Gcr.SimpleCollection
3337
+
3338
+ connect(sigName: string, callback: (...args: any[]) => void): number
3339
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
3340
+ emit(sigName: string, ...args: any[]): void
3341
+ disconnect(id: number): void
3342
+ }
3343
+
3344
+ /**
3345
+ * A simple implementation of [iface`Collection]`, which you can add and remove
3346
+ * objects from.
3347
+ *
3348
+ * You can use [method`SimpleCollection`.add] to add objects, and
3349
+ * [method`SimpleCollection`.remove] to remove them again.
3350
+ * @class
3351
+ */
3352
+ export class SimpleCollection extends GObject.Object {
3353
+
3354
+ // Own properties of Gcr-3.Gcr.SimpleCollection
3355
+
3356
+ static name: string
3357
+ static $gtype: GObject.GType<SimpleCollection>
3358
+
3359
+ // Constructors of Gcr-3.Gcr.SimpleCollection
3360
+
3361
+ constructor(config?: SimpleCollection.ConstructorProperties)
3362
+ /**
3363
+ * Create a new #GcrSimpleCollection.
3364
+ * @constructor
3365
+ * @returns a newly allocated collection, which should be freed with g_object_unref()
3366
+ */
3367
+ constructor()
3368
+ /**
3369
+ * Create a new #GcrSimpleCollection.
3370
+ * @constructor
3371
+ * @returns a newly allocated collection, which should be freed with g_object_unref()
3372
+ */
3373
+ static new(): SimpleCollection
3374
+ _init(config?: SimpleCollection.ConstructorProperties): void
3375
+ }
3376
+
3377
+ export module SshAskpass {
3378
+
3379
+ // Constructor properties interface
3380
+
3381
+ export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
3382
+
3383
+ // Own constructor properties of Gcr-3.Gcr.SshAskpass
3384
+
3385
+ /**
3386
+ * The interaction used to prompt for passwords.
3387
+ */
3388
+ interaction?: Gio.TlsInteraction | null
3389
+ }
3390
+
3391
+ }
3392
+
3393
+ export interface SshAskpass {
3394
+
3395
+ // Own properties of Gcr-3.Gcr.SshAskpass
3396
+
3397
+ /**
3398
+ * The interaction used to prompt for passwords.
3399
+ */
3400
+ readonly interaction: Gio.TlsInteraction
3401
+
3402
+ // Owm methods of Gcr-3.Gcr.SshAskpass
3403
+
3404
+ /**
3405
+ * Get the interaction associated with this object.
3406
+ * @returns the interaction
3407
+ */
3408
+ get_interaction(): Gio.TlsInteraction
3409
+
3410
+ // Class property signals of Gcr-3.Gcr.SshAskpass
3411
+
3412
+ connect(sigName: "notify::interaction", callback: (($obj: SshAskpass, pspec: GObject.ParamSpec) => void)): number
3413
+ connect_after(sigName: "notify::interaction", callback: (($obj: SshAskpass, pspec: GObject.ParamSpec) => void)): number
3414
+ emit(sigName: "notify::interaction", ...args: any[]): void
3415
+ connect(sigName: string, callback: (...args: any[]) => void): number
3416
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
3417
+ emit(sigName: string, ...args: any[]): void
3418
+ disconnect(id: number): void
3419
+ }
3420
+
3421
+ /**
3422
+ * When used as the setup function while spawning an ssh command like ssh-add
3423
+ * or ssh, this allows callbacks for passwords on the provided interaction.
3424
+ * @class
3425
+ */
3426
+ export class SshAskpass extends GObject.Object {
3427
+
3428
+ // Own properties of Gcr-3.Gcr.SshAskpass
3429
+
3430
+ static name: string
3431
+ static $gtype: GObject.GType<SshAskpass>
3432
+
3433
+ // Constructors of Gcr-3.Gcr.SshAskpass
3434
+
3435
+ constructor(config?: SshAskpass.ConstructorProperties)
3436
+ /**
3437
+ * Create a new GcrSshAskpass object which can be used to spawn an
3438
+ * ssh command and prompt for any necessary passwords.
3439
+ *
3440
+ * Use the gcr_ssh_askpass_child_setup() function as a callback with
3441
+ * g_spawn_sync(), g_spawn_async() or g_spawn_async_with_pipes().
3442
+ * @constructor
3443
+ * @param interaction the interaction to use for prompting paswords
3444
+ * @returns A new #GcrSshAskpass object
3445
+ */
3446
+ constructor(interaction: Gio.TlsInteraction)
3447
+ /**
3448
+ * Create a new GcrSshAskpass object which can be used to spawn an
3449
+ * ssh command and prompt for any necessary passwords.
3450
+ *
3451
+ * Use the gcr_ssh_askpass_child_setup() function as a callback with
3452
+ * g_spawn_sync(), g_spawn_async() or g_spawn_async_with_pipes().
3453
+ * @constructor
3454
+ * @param interaction the interaction to use for prompting paswords
3455
+ * @returns A new #GcrSshAskpass object
3456
+ */
3457
+ static new(interaction: Gio.TlsInteraction): SshAskpass
3458
+ _init(config?: SshAskpass.ConstructorProperties): void
3459
+ /**
3460
+ * Use this function as a callback setup function passed to g_spawn_sync(),
3461
+ * g_spawn_async(), g_spawn_async_with_pipes().
3462
+ * @param askpass a #GcrSshAskpass object
3463
+ */
3464
+ static child_setup(askpass: any | null): void
3465
+ }
3466
+
3467
+ export module SystemPrompt {
3468
+
3469
+ // Constructor properties interface
3470
+
3471
+ export interface ConstructorProperties extends Prompt.ConstructorProperties, Gio.AsyncInitable.ConstructorProperties, Gio.Initable.ConstructorProperties, GObject.Object.ConstructorProperties {
3472
+
3473
+ // Own constructor properties of Gcr-3.Gcr.SystemPrompt
3474
+
3475
+ /**
3476
+ * The DBus bus name of the prompter to use for prompting, or %NULL
3477
+ * for the default prompter.
3478
+ */
3479
+ bus_name?: string | null
3480
+ /**
3481
+ * The #GcrSecretExchange to use when transferring passwords. A default
3482
+ * secret exchange will be used if this is not set.
3483
+ */
3484
+ secret_exchange?: SecretExchange | null
3485
+ /**
3486
+ * The timeout in seconds to wait when opening the prompt.
3487
+ */
3488
+ timeout_seconds?: number | null
3489
+ }
3490
+
3491
+ }
3492
+
3493
+ export interface SystemPrompt extends Prompt, Gio.AsyncInitable, Gio.Initable {
3494
+
3495
+ // Own properties of Gcr-3.Gcr.SystemPrompt
3496
+
3497
+ /**
3498
+ * The DBus bus name of the prompter to use for prompting, or %NULL
3499
+ * for the default prompter.
3500
+ */
3501
+ readonly bus_name: string | null
3502
+ /**
3503
+ * The #GcrSecretExchange to use when transferring passwords. A default
3504
+ * secret exchange will be used if this is not set.
3505
+ */
3506
+ secret_exchange: SecretExchange
3507
+ /**
3508
+ * The timeout in seconds to wait when opening the prompt.
3509
+ */
3510
+ readonly timeout_seconds: number
3511
+
3512
+ // Own fields of Gcr-3.Gcr.SystemPrompt
3513
+
3514
+ parent: GObject.Object
3515
+
3516
+ // Owm methods of Gcr-3.Gcr.SystemPrompt
3517
+
3518
+ /**
3519
+ * Close this prompt. After calling this function, no further prompts will
3520
+ * succeed on this object. The prompt object is not unreferenced by this
3521
+ * function, and you must unreference it once done.
3522
+ *
3523
+ * This call may block, use the gcr_system_prompt_close_async() to perform
3524
+ * this action indefinitely.
3525
+ *
3526
+ * Whether or not this function returns %TRUE, the system prompt object is
3527
+ * still closed and may not be further used.
3528
+ * @param cancellable an optional cancellation object
3529
+ * @returns whether close was cleanly completed
3530
+ */
3531
+ close(cancellable: Gio.Cancellable | null): boolean
3532
+
3533
+ // Overloads of close
3534
+
3535
+ /**
3536
+ * Closes the prompt so that in can no longer be used to prompt. The various
3537
+ * prompt methods will return results as if the user dismissed the prompt.
3538
+ *
3539
+ * The prompt may also be closed by the implementor of the prompt object.
3540
+ *
3541
+ * This emits the [signal`Prompt:`:prompt-close] signal on the prompt object.
3542
+ */
3543
+ close(): void
3544
+ /**
3545
+ * Close this prompt asynchronously. After calling this function, no further
3546
+ * methods may be called on this object. The prompt object is not unreferenced
3547
+ * by this function, and you must unreference it once done.
3548
+ *
3549
+ * This call returns immediately and completes asynchronously.
3550
+ * @param cancellable an optional cancellation object
3551
+ * @param callback called when the operation completes
3552
+ */
3553
+ close_async(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
3554
+ /**
3555
+ * Complete operation to close this prompt.
3556
+ *
3557
+ * Whether or not this function returns %TRUE, the system prompt object is
3558
+ * still closed and may not be further used.
3559
+ * @param result asynchronous operation result
3560
+ * @returns whether close was cleanly completed
3561
+ */
3562
+ close_finish(result: Gio.AsyncResult): boolean
3563
+ /**
3564
+ * Get the current [class`SecretExchange]` used to transfer secrets in this prompt.
3565
+ * @returns the secret exchange
3566
+ */
3567
+ get_secret_exchange(): SecretExchange
3568
+
3569
+ // Class property signals of Gcr-3.Gcr.SystemPrompt
3570
+
3571
+ connect(sigName: "notify::bus-name", callback: (($obj: SystemPrompt, pspec: GObject.ParamSpec) => void)): number
3572
+ connect_after(sigName: "notify::bus-name", callback: (($obj: SystemPrompt, pspec: GObject.ParamSpec) => void)): number
3573
+ emit(sigName: "notify::bus-name", ...args: any[]): void
3574
+ connect(sigName: "notify::secret-exchange", callback: (($obj: SystemPrompt, pspec: GObject.ParamSpec) => void)): number
3575
+ connect_after(sigName: "notify::secret-exchange", callback: (($obj: SystemPrompt, pspec: GObject.ParamSpec) => void)): number
3576
+ emit(sigName: "notify::secret-exchange", ...args: any[]): void
3577
+ connect(sigName: "notify::timeout-seconds", callback: (($obj: SystemPrompt, pspec: GObject.ParamSpec) => void)): number
3578
+ connect_after(sigName: "notify::timeout-seconds", callback: (($obj: SystemPrompt, pspec: GObject.ParamSpec) => void)): number
3579
+ emit(sigName: "notify::timeout-seconds", ...args: any[]): void
3580
+ connect(sigName: "notify::caller-window", callback: (($obj: SystemPrompt, pspec: GObject.ParamSpec) => void)): number
3581
+ connect_after(sigName: "notify::caller-window", callback: (($obj: SystemPrompt, pspec: GObject.ParamSpec) => void)): number
3582
+ emit(sigName: "notify::caller-window", ...args: any[]): void
3583
+ connect(sigName: "notify::cancel-label", callback: (($obj: SystemPrompt, pspec: GObject.ParamSpec) => void)): number
3584
+ connect_after(sigName: "notify::cancel-label", callback: (($obj: SystemPrompt, pspec: GObject.ParamSpec) => void)): number
3585
+ emit(sigName: "notify::cancel-label", ...args: any[]): void
3586
+ connect(sigName: "notify::choice-chosen", callback: (($obj: SystemPrompt, pspec: GObject.ParamSpec) => void)): number
3587
+ connect_after(sigName: "notify::choice-chosen", callback: (($obj: SystemPrompt, pspec: GObject.ParamSpec) => void)): number
3588
+ emit(sigName: "notify::choice-chosen", ...args: any[]): void
3589
+ connect(sigName: "notify::choice-label", callback: (($obj: SystemPrompt, pspec: GObject.ParamSpec) => void)): number
3590
+ connect_after(sigName: "notify::choice-label", callback: (($obj: SystemPrompt, pspec: GObject.ParamSpec) => void)): number
3591
+ emit(sigName: "notify::choice-label", ...args: any[]): void
3592
+ connect(sigName: "notify::continue-label", callback: (($obj: SystemPrompt, pspec: GObject.ParamSpec) => void)): number
3593
+ connect_after(sigName: "notify::continue-label", callback: (($obj: SystemPrompt, pspec: GObject.ParamSpec) => void)): number
3594
+ emit(sigName: "notify::continue-label", ...args: any[]): void
3595
+ connect(sigName: "notify::description", callback: (($obj: SystemPrompt, pspec: GObject.ParamSpec) => void)): number
3596
+ connect_after(sigName: "notify::description", callback: (($obj: SystemPrompt, pspec: GObject.ParamSpec) => void)): number
3597
+ emit(sigName: "notify::description", ...args: any[]): void
3598
+ connect(sigName: "notify::message", callback: (($obj: SystemPrompt, pspec: GObject.ParamSpec) => void)): number
3599
+ connect_after(sigName: "notify::message", callback: (($obj: SystemPrompt, pspec: GObject.ParamSpec) => void)): number
3600
+ emit(sigName: "notify::message", ...args: any[]): void
3601
+ connect(sigName: "notify::password-new", callback: (($obj: SystemPrompt, pspec: GObject.ParamSpec) => void)): number
3602
+ connect_after(sigName: "notify::password-new", callback: (($obj: SystemPrompt, pspec: GObject.ParamSpec) => void)): number
3603
+ emit(sigName: "notify::password-new", ...args: any[]): void
3604
+ connect(sigName: "notify::password-strength", callback: (($obj: SystemPrompt, pspec: GObject.ParamSpec) => void)): number
3605
+ connect_after(sigName: "notify::password-strength", callback: (($obj: SystemPrompt, pspec: GObject.ParamSpec) => void)): number
3606
+ emit(sigName: "notify::password-strength", ...args: any[]): void
3607
+ connect(sigName: "notify::title", callback: (($obj: SystemPrompt, pspec: GObject.ParamSpec) => void)): number
3608
+ connect_after(sigName: "notify::title", callback: (($obj: SystemPrompt, pspec: GObject.ParamSpec) => void)): number
3609
+ emit(sigName: "notify::title", ...args: any[]): void
3610
+ connect(sigName: "notify::warning", callback: (($obj: SystemPrompt, pspec: GObject.ParamSpec) => void)): number
3611
+ connect_after(sigName: "notify::warning", callback: (($obj: SystemPrompt, pspec: GObject.ParamSpec) => void)): number
3612
+ emit(sigName: "notify::warning", ...args: any[]): void
3613
+ connect(sigName: string, callback: (...args: any[]) => void): number
3614
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
3615
+ emit(sigName: string, ...args: any[]): void
3616
+ disconnect(id: number): void
3617
+ }
3618
+
3619
+ /**
3620
+ * A [iface`Prompt]` implementation which calls to the system prompter to
3621
+ * display prompts in a system modal fashion.
3622
+ *
3623
+ * Since the system prompter usually only displays one prompt at a time, you
3624
+ * may have to wait for the prompt to be displayed. Use [func`SystemPrompt`.open]
3625
+ * or a related function to open a prompt. Since this can take a long time, you
3626
+ * should always check that the prompt is still needed after it is opened. A
3627
+ * previous prompt may have already provided the information needed and you
3628
+ * may no longer need to prompt.
3629
+ *
3630
+ * Use [method`SystemPrompt`.close] to close the prompt when you're done with it.
3631
+ * @class
3632
+ */
3633
+ export class SystemPrompt extends GObject.Object {
3634
+
3635
+ // Own properties of Gcr-3.Gcr.SystemPrompt
3636
+
3637
+ static name: string
3638
+ static $gtype: GObject.GType<SystemPrompt>
3639
+
3640
+ // Constructors of Gcr-3.Gcr.SystemPrompt
3641
+
3642
+ constructor(config?: SystemPrompt.ConstructorProperties)
3643
+ _init(config?: SystemPrompt.ConstructorProperties): void
3644
+ static error_get_domain(): GLib.Quark
3645
+ /**
3646
+ * Opens a system prompt with the default prompter.
3647
+ *
3648
+ * Most system prompters only allow showing one prompt at a time, and if
3649
+ * another prompt is shown then this method will block for up to
3650
+ * `timeout_seconds` seconds. If `timeout_seconds` is equal to -1, then this
3651
+ * will block indefinitely until the prompt can be opened. If `timeout_seconds`
3652
+ * expires, then this function will fail with a %GCR_SYSTEM_PROMPT_IN_PROGRESS
3653
+ * error.
3654
+ * @param timeout_seconds the number of seconds to wait to access the prompt, or -1
3655
+ * @param cancellable optional cancellation object
3656
+ * @returns the prompt, or %NULL if prompt could not be opened
3657
+ */
3658
+ static open(timeout_seconds: number, cancellable: Gio.Cancellable | null): SystemPrompt
3659
+ /**
3660
+ * Asynchronously open a system prompt with the default system prompter.
3661
+ *
3662
+ * Most system prompters only allow showing one prompt at a time, and if
3663
+ * another prompt is shown then this method will block for up to
3664
+ * `timeout_seconds` seconds. If `timeout_seconds` is equal to -1, then this
3665
+ * will block indefinitely until the prompt can be opened. If `timeout_seconds`
3666
+ * expires, then this operation will fail with a %GCR_SYSTEM_PROMPT_IN_PROGRESS
3667
+ * error.
3668
+ * @param timeout_seconds the number of seconds to wait to access the prompt, or -1
3669
+ * @param cancellable optional cancellation object
3670
+ * @param callback called when the operation completes
3671
+ */
3672
+ static open_async(timeout_seconds: number, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<SystemPrompt> | null): void
3673
+ /**
3674
+ * Complete an operation to asynchronously open a system prompt.
3675
+ * @param result the asynchronous result
3676
+ * @returns the prompt, or %NULL if prompt could not be opened
3677
+ */
3678
+ static open_finish(result: Gio.AsyncResult): SystemPrompt
3679
+ /**
3680
+ * Opens a system prompt. If prompter_name is %NULL, then the default
3681
+ * system prompter is used.
3682
+ *
3683
+ * Most system prompters only allow showing one prompt at a time, and if
3684
+ * another prompt is shown then this method will block for up to
3685
+ * `timeout_seconds` seconds. If `timeout_seconds` is equal to -1, then this
3686
+ * will block indefinitely until the prompt can be opened. If `timeout_seconds`
3687
+ * expires, then this function will fail with a %GCR_SYSTEM_PROMPT_IN_PROGRESS
3688
+ * error.
3689
+ * @param prompter_name the prompter dbus name
3690
+ * @param timeout_seconds the number of seconds to wait to access the prompt, or -1
3691
+ * @param cancellable optional cancellation object
3692
+ * @returns the prompt, or %NULL if prompt could not be opened
3693
+ */
3694
+ static open_for_prompter(prompter_name: string | null, timeout_seconds: number, cancellable: Gio.Cancellable | null): SystemPrompt
3695
+ /**
3696
+ * Opens a system prompt asynchronously. If prompter_name is %NULL, then the
3697
+ * default system prompter is used.
3698
+ *
3699
+ * Most system prompters only allow showing one prompt at a time, and if
3700
+ * another prompt is shown then this method will block for up to
3701
+ * `timeout_seconds` seconds. If `timeout_seconds` is equal to -1, then this
3702
+ * will block indefinitely until the prompt can be opened. If `timeout_seconds`
3703
+ * expires, then this operation will fail with a %GCR_SYSTEM_PROMPT_IN_PROGRESS
3704
+ * error.
3705
+ * @param prompter_name the prompter D-Bus name
3706
+ * @param timeout_seconds the number of seconds to wait to access the prompt, or -1
3707
+ * @param cancellable optional cancellation object
3708
+ * @param callback called when the operation completes
3709
+ */
3710
+ static open_for_prompter_async(prompter_name: string | null, timeout_seconds: number, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<SystemPrompt> | null): void
3711
+ }
3712
+
3713
+ export module SystemPrompter {
3714
+
3715
+ // Signal callback interfaces
3716
+
3717
+ /**
3718
+ * Signal callback interface for `new-prompt`
3719
+ */
3720
+ export interface NewPromptSignalCallback {
3721
+ ($obj: SystemPrompter): Prompt
3722
+ }
3723
+
3724
+
3725
+ // Constructor properties interface
3726
+
3727
+ export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
3728
+
3729
+ // Own constructor properties of Gcr-3.Gcr.SystemPrompter
3730
+
3731
+ /**
3732
+ * The #GType for prompts created by this prompter. This must be a
3733
+ * #GcrPrompt implementation.
3734
+ */
3735
+ prompt_type?: GObject.GType | null
3736
+ }
3737
+
3738
+ }
3739
+
3740
+ export interface SystemPrompter {
3741
+
3742
+ // Own properties of Gcr-3.Gcr.SystemPrompter
3743
+
3744
+ /**
3745
+ * The #GType for prompts created by this prompter. This must be a
3746
+ * #GcrPrompt implementation.
3747
+ */
3748
+ readonly prompt_type: GObject.GType
3749
+ /**
3750
+ * Whether the prompter is prompting or not.
3751
+ */
3752
+ readonly prompting: boolean
3753
+
3754
+ // Own fields of Gcr-3.Gcr.SystemPrompter
3755
+
3756
+ parent: GObject.Object
3757
+
3758
+ // Owm methods of Gcr-3.Gcr.SystemPrompter
3759
+
3760
+ /**
3761
+ * Get the mode for this prompter.
3762
+ *
3763
+ * Most system prompters only display one prompt at a time and therefore
3764
+ * return %GCR_SYSTEM_PROMPTER_SINGLE.
3765
+ * @returns the prompter mode
3766
+ */
3767
+ get_mode(): SystemPrompterMode
3768
+ /**
3769
+ * Get the #GType for prompts created by this prompter.
3770
+ *
3771
+ * The returned #GType will be a #GcrPrompt implementation.
3772
+ * @returns the prompt #GType
3773
+ */
3774
+ get_prompt_type(): GObject.GType
3775
+ /**
3776
+ * Get whether prompting or not.
3777
+ * @returns whether prompting or not
3778
+ */
3779
+ get_prompting(): boolean
3780
+ /**
3781
+ * Register this system prompter on the DBus `connection`.
3782
+ *
3783
+ * This makes the prompter available for clients to call. The prompter will
3784
+ * remain registered until gcr_system_prompter_unregister() is called, or the
3785
+ * prompter is unreferenced.
3786
+ * @param connection a DBus connection
3787
+ */
3788
+ register(connection: Gio.DBusConnection): void
3789
+ /**
3790
+ * Unregister this system prompter on the DBus `connection`.
3791
+ *
3792
+ * The prompter must have previously been registered with gcr_system_prompter_register().
3793
+ *
3794
+ * If `wait` is set then this function will wait until all prompts have been closed
3795
+ * or cancelled. This is usually only used by tests.
3796
+ * @param wait whether to wait for closing prompts
3797
+ */
3798
+ unregister(wait: boolean): void
3799
+
3800
+ // Own signals of Gcr-3.Gcr.SystemPrompter
3801
+
3802
+ connect(sigName: "new-prompt", callback: SystemPrompter.NewPromptSignalCallback): number
3803
+ connect_after(sigName: "new-prompt", callback: SystemPrompter.NewPromptSignalCallback): number
3804
+ emit(sigName: "new-prompt", ...args: any[]): void
3805
+
3806
+ // Class property signals of Gcr-3.Gcr.SystemPrompter
3807
+
3808
+ connect(sigName: "notify::prompt-type", callback: (($obj: SystemPrompter, pspec: GObject.ParamSpec) => void)): number
3809
+ connect_after(sigName: "notify::prompt-type", callback: (($obj: SystemPrompter, pspec: GObject.ParamSpec) => void)): number
3810
+ emit(sigName: "notify::prompt-type", ...args: any[]): void
3811
+ connect(sigName: "notify::prompting", callback: (($obj: SystemPrompter, pspec: GObject.ParamSpec) => void)): number
3812
+ connect_after(sigName: "notify::prompting", callback: (($obj: SystemPrompter, pspec: GObject.ParamSpec) => void)): number
3813
+ emit(sigName: "notify::prompting", ...args: any[]): void
3814
+ connect(sigName: string, callback: (...args: any[]) => void): number
3815
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
3816
+ emit(sigName: string, ...args: any[]): void
3817
+ disconnect(id: number): void
3818
+ }
3819
+
3820
+ /**
3821
+ * A prompter used by implementations of system prompts.
3822
+ *
3823
+ * This is a D-Bus service which is rarely implemented. Use [class`SystemPrompt]`
3824
+ * to display system prompts.
3825
+ *
3826
+ * The system prompter service responds to D-Bus requests to create system
3827
+ * prompts and creates #GcrPrompt type objects to display those prompts.
3828
+ *
3829
+ * Pass the GType of the implementation of [iface`Prompt]` to
3830
+ * [ctor`SystemPrompter`.new].
3831
+ * @class
3832
+ */
3833
+ export class SystemPrompter extends GObject.Object {
3834
+
3835
+ // Own properties of Gcr-3.Gcr.SystemPrompter
3836
+
3837
+ static name: string
3838
+ static $gtype: GObject.GType<SystemPrompter>
3839
+
3840
+ // Constructors of Gcr-3.Gcr.SystemPrompter
3841
+
3842
+ constructor(config?: SystemPrompter.ConstructorProperties)
3843
+ /**
3844
+ * Create a new system prompter service. This prompter won't do anything unless
3845
+ * you connect to its signals and show appropriate prompts.
3846
+ *
3847
+ * If `prompt_type` is zero, then the new-prompt signal must be handled and
3848
+ * return a valid prompt object implementing the #GcrPrompt interface.
3849
+ *
3850
+ * If `prompt_type` is non-zero then the #GType must implement the #GcrPrompt
3851
+ * interface.
3852
+ * @constructor
3853
+ * @param mode the mode for the prompt
3854
+ * @param prompt_type the gobject type for prompts created by this prompter
3855
+ * @returns a new prompter service
3856
+ */
3857
+ constructor(mode: SystemPrompterMode, prompt_type: GObject.GType)
3858
+ /**
3859
+ * Create a new system prompter service. This prompter won't do anything unless
3860
+ * you connect to its signals and show appropriate prompts.
3861
+ *
3862
+ * If `prompt_type` is zero, then the new-prompt signal must be handled and
3863
+ * return a valid prompt object implementing the #GcrPrompt interface.
3864
+ *
3865
+ * If `prompt_type` is non-zero then the #GType must implement the #GcrPrompt
3866
+ * interface.
3867
+ * @constructor
3868
+ * @param mode the mode for the prompt
3869
+ * @param prompt_type the gobject type for prompts created by this prompter
3870
+ * @returns a new prompter service
3871
+ */
3872
+ static new(mode: SystemPrompterMode, prompt_type: GObject.GType): SystemPrompter
3873
+ _init(config?: SystemPrompter.ConstructorProperties): void
3874
+ }
3875
+
3876
+ export module UnionCollection {
3877
+
3878
+ // Constructor properties interface
3879
+
3880
+ export interface ConstructorProperties extends Collection.ConstructorProperties, GObject.Object.ConstructorProperties {
3881
+ }
3882
+
3883
+ }
3884
+
3885
+ export interface UnionCollection extends Collection {
3886
+
3887
+ // Own fields of Gcr-3.Gcr.UnionCollection
3888
+
3889
+ parent: GObject.Object
3890
+
3891
+ // Owm methods of Gcr-3.Gcr.UnionCollection
3892
+
3893
+ /**
3894
+ * Add objects from this collection to the union
3895
+ * @param collection The collection whose objects to add
3896
+ */
3897
+ add(collection: Collection): void
3898
+ /**
3899
+ * Get the collections that have been added to this union.
3900
+ * @returns collections added to the union
3901
+ */
3902
+ elements(): Collection[]
3903
+ /**
3904
+ * Check whether the collection is present in the union.
3905
+ * @param collection the collection to check
3906
+ * @returns whether present or not
3907
+ */
3908
+ have(collection: Collection): boolean
3909
+ /**
3910
+ * Remove an object from the collection.
3911
+ * @param collection The collection whose objects to remove
3912
+ */
3913
+ remove(collection: Collection): void
3914
+ /**
3915
+ * Return the number of collections in this union. This does not reflect
3916
+ * the number of objects in the combined collection.
3917
+ * @returns number of collections inlcuded
3918
+ */
3919
+ size(): number
3920
+ /**
3921
+ * Add objects from this collection to the union. Do not add an additional
3922
+ * reference to the collection.
3923
+ * @param collection The collection whose objects to add
3924
+ */
3925
+ take(collection: Collection): void
3926
+
3927
+ // Class property signals of Gcr-3.Gcr.UnionCollection
3928
+
3929
+ connect(sigName: string, callback: (...args: any[]) => void): number
3930
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
3931
+ emit(sigName: string, ...args: any[]): void
3932
+ disconnect(id: number): void
3933
+ }
3934
+
3935
+ /**
3936
+ * An implementation of #GcrCollection, which combines the objects in
3937
+ * other [iface`Collection]`s. Use [method`UnionCollection`.add] to add and
3938
+ * [method`UnionCollection`.remove] to remove them.
3939
+ * @class
3940
+ */
3941
+ export class UnionCollection extends GObject.Object {
3942
+
3943
+ // Own properties of Gcr-3.Gcr.UnionCollection
3944
+
3945
+ static name: string
3946
+ static $gtype: GObject.GType<UnionCollection>
3947
+
3948
+ // Constructors of Gcr-3.Gcr.UnionCollection
3949
+
3950
+ constructor(config?: UnionCollection.ConstructorProperties)
3951
+ /**
3952
+ * Create a new #GcrUnionCollection.
3953
+ * @constructor
3954
+ * @returns a newly allocated collection, which should be freed with g_object_unref()
3955
+ */
3956
+ constructor()
3957
+ /**
3958
+ * Create a new #GcrUnionCollection.
3959
+ * @constructor
3960
+ * @returns a newly allocated collection, which should be freed with g_object_unref()
3961
+ */
3962
+ static new(): UnionCollection
3963
+ _init(config?: UnionCollection.ConstructorProperties): void
3964
+ }
3965
+
3966
+ export interface CertificateChainClass {
3967
+
3968
+ // Own fields of Gcr-3.Gcr.CertificateChainClass
3969
+
3970
+ /**
3971
+ * The parent class
3972
+ * @field
3973
+ */
3974
+ parent_class: GObject.ObjectClass
3975
+ }
3976
+
3977
+ /**
3978
+ * The class for #GcrCertificateChain.
3979
+ * @record
3980
+ */
3981
+ export abstract class CertificateChainClass {
3982
+
3983
+ // Own properties of Gcr-3.Gcr.CertificateChainClass
3984
+
3985
+ static name: string
3986
+ }
3987
+
3988
+ export interface CertificateChainPrivate {
3989
+ }
3990
+
3991
+ export class CertificateChainPrivate {
3992
+
3993
+ // Own properties of Gcr-3.Gcr.CertificateChainPrivate
3994
+
3995
+ static name: string
3996
+ }
3997
+
3998
+ export interface CertificateIface {
3999
+
4000
+ // Own fields of Gcr-3.Gcr.CertificateIface
4001
+
4002
+ /**
4003
+ * the parent interface type
4004
+ * @field
4005
+ */
4006
+ parent: GObject.TypeInterface
4007
+ get_der_data: (self: Certificate) => Uint8Array
4008
+ }
4009
+
4010
+ /**
4011
+ * The interface that implementors of #GcrCertificate must implement.
4012
+ * @record
4013
+ */
4014
+ export abstract class CertificateIface {
4015
+
4016
+ // Own properties of Gcr-3.Gcr.CertificateIface
4017
+
4018
+ static name: string
4019
+ }
4020
+
4021
+ export interface CertificateRequestClass {
4022
+
4023
+ // Own fields of Gcr-3.Gcr.CertificateRequestClass
4024
+
4025
+ parent_class: GObject.ObjectClass
4026
+ }
4027
+
4028
+ export abstract class CertificateRequestClass {
4029
+
4030
+ // Own properties of Gcr-3.Gcr.CertificateRequestClass
4031
+
4032
+ static name: string
4033
+ }
4034
+
4035
+ export interface CollectionIface {
4036
+
4037
+ // Own fields of Gcr-3.Gcr.CollectionIface
4038
+
4039
+ parent: GObject.TypeInterface
4040
+ added: (self: Collection, object: GObject.Object) => void
4041
+ removed: (self: Collection, object: GObject.Object) => void
4042
+ get_length: (self: Collection) => number
4043
+ get_objects: (self: Collection) => GObject.Object[]
4044
+ contains: (self: Collection, object: GObject.Object) => boolean
4045
+ }
4046
+
4047
+ export abstract class CollectionIface {
4048
+
4049
+ // Own properties of Gcr-3.Gcr.CollectionIface
4050
+
4051
+ static name: string
4052
+ }
4053
+
4054
+ export interface Column {
4055
+
4056
+ // Own fields of Gcr-3.Gcr.Column
4057
+
4058
+ property_name: string | null
4059
+ property_type: GObject.GType
4060
+ column_type: GObject.GType
4061
+ label: string | null
4062
+ flags: ColumnFlags
4063
+ transformer: GObject.ValueTransform
4064
+ user_data: any
4065
+ }
4066
+
4067
+ export class Column {
4068
+
4069
+ // Own properties of Gcr-3.Gcr.Column
4070
+
4071
+ static name: string
4072
+ }
4073
+
4074
+ export interface ComparableIface {
4075
+
4076
+ // Own fields of Gcr-3.Gcr.ComparableIface
4077
+
4078
+ /**
4079
+ * type interface
4080
+ * @field
4081
+ */
4082
+ parent: GObject.TypeInterface
4083
+ compare: (self: Comparable, other: Comparable | null) => number
4084
+ }
4085
+
4086
+ /**
4087
+ * The interface to implement for [iface`Comparable]`
4088
+ * @record
4089
+ */
4090
+ export abstract class ComparableIface {
4091
+
4092
+ // Own properties of Gcr-3.Gcr.ComparableIface
4093
+
4094
+ static name: string
4095
+ }
4096
+
4097
+ export interface FilterCollectionClass {
4098
+
4099
+ // Own fields of Gcr-3.Gcr.FilterCollectionClass
4100
+
4101
+ /**
4102
+ * the parent class
4103
+ * @field
4104
+ */
4105
+ parent_class: GObject.ObjectClass
4106
+ }
4107
+
4108
+ /**
4109
+ * The class struct for [class`FilterCollection]`.
4110
+ * @record
4111
+ */
4112
+ export abstract class FilterCollectionClass {
4113
+
4114
+ // Own properties of Gcr-3.Gcr.FilterCollectionClass
4115
+
4116
+ static name: string
4117
+ }
4118
+
4119
+ export interface FilterCollectionPrivate {
4120
+ }
4121
+
4122
+ export class FilterCollectionPrivate {
4123
+
4124
+ // Own properties of Gcr-3.Gcr.FilterCollectionPrivate
4125
+
4126
+ static name: string
4127
+ }
4128
+
4129
+ export interface ImportInteractionIface {
4130
+
4131
+ // Own fields of Gcr-3.Gcr.ImportInteractionIface
4132
+
4133
+ /**
4134
+ * parent interface
4135
+ * @field
4136
+ */
4137
+ parent: GObject.TypeInterface
4138
+ supplement_prep: (interaction: ImportInteraction, builder: Gck.Builder) => void
4139
+ supplement: (interaction: ImportInteraction, builder: Gck.Builder, cancellable: Gio.Cancellable | null) => Gio.TlsInteractionResult
4140
+ supplement_async: (interaction: ImportInteraction, builder: Gck.Builder, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback | null) => void
4141
+ supplement_finish: (interaction: ImportInteraction, result: Gio.AsyncResult) => Gio.TlsInteractionResult
4142
+ }
4143
+
4144
+ /**
4145
+ * Interface implemented by implementations of [iface`ImportInteraction]`.
4146
+ * @record
4147
+ */
4148
+ export abstract class ImportInteractionIface {
4149
+
4150
+ // Own properties of Gcr-3.Gcr.ImportInteractionIface
4151
+
4152
+ static name: string
4153
+ }
4154
+
4155
+ export interface ImporterIface {
4156
+
4157
+ // Own fields of Gcr-3.Gcr.ImporterIface
4158
+
4159
+ /**
4160
+ * parent interface
4161
+ * @field
4162
+ */
4163
+ parent: GObject.TypeInterface
4164
+ queue_for_parsed: (importer: Importer, parsed: Parsed) => boolean
4165
+ import_sync: (importer: Importer, cancellable: Gio.Cancellable | null) => boolean
4166
+ import_async: (importer: Importer, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback | null) => void
4167
+ import_finish: (importer: Importer, result: Gio.AsyncResult) => boolean
4168
+ }
4169
+
4170
+ /**
4171
+ * Interface implemented for a #GcrImporter.
4172
+ * @record
4173
+ */
4174
+ export abstract class ImporterIface {
4175
+
4176
+ // Own properties of Gcr-3.Gcr.ImporterIface
4177
+
4178
+ static name: string
4179
+ }
4180
+
4181
+ export interface Parsed {
4182
+
4183
+ // Owm methods of Gcr-3.Gcr.Parsed
4184
+
4185
+ /**
4186
+ * Get the attributes which make up the parsed item.
4187
+ * @returns the attributes for the item; these are owned by the parsed item and should not be freed
4188
+ */
4189
+ get_attributes(): Gck.Attributes | null
4190
+ /**
4191
+ * Get the raw data block for the parsed item.
4192
+ * @returns the raw data of the parsed item, or %NULL
4193
+ */
4194
+ get_bytes(): GLib.Bytes
4195
+ /**
4196
+ * Get the raw data block for the parsed item.
4197
+ * @returns the raw data of the parsed item, or %NULL
4198
+ */
4199
+ get_data(): Uint8Array | null
4200
+ /**
4201
+ * Get the descirption for a parsed item.
4202
+ * @returns the description
4203
+ */
4204
+ get_description(): string | null
4205
+ /**
4206
+ * Get the filename of the parsed item.
4207
+ * @returns the filename of the parsed item, or %NULL
4208
+ */
4209
+ get_filename(): string | null
4210
+ /**
4211
+ * Get the format of the parsed item.
4212
+ * @returns the data format of the item
4213
+ */
4214
+ get_format(): DataFormat
4215
+ /**
4216
+ * Get the label for the parsed item.
4217
+ * @returns the label for the item
4218
+ */
4219
+ get_label(): string | null
4220
+ /**
4221
+ * Add a reference to a parsed item. An item may not be shared across threads
4222
+ * until it has been referenced at least once.
4223
+ * @returns the parsed item
4224
+ */
4225
+ ref(): Parsed
4226
+ }
4227
+
4228
+ /**
4229
+ * A parsed item parsed by a #GcrParser.
4230
+ * @record
4231
+ */
4232
+ export class Parsed {
4233
+
4234
+ // Own properties of Gcr-3.Gcr.Parsed
4235
+
4236
+ static name: string
4237
+
4238
+ // Constructors of Gcr-3.Gcr.Parsed
4239
+
4240
+ /**
4241
+ * Unreferences a parsed item which was referenced with gcr_parsed_ref()
4242
+ * @param parsed a parsed item
4243
+ */
4244
+ static unref(parsed: any | null): void
4245
+ }
4246
+
4247
+ export interface ParserClass {
4248
+
4249
+ // Own fields of Gcr-3.Gcr.ParserClass
4250
+
4251
+ /**
4252
+ * The parent class
4253
+ * @field
4254
+ */
4255
+ parent_class: GObject.ObjectClass
4256
+ authenticate: (self: Parser, count: number) => boolean
4257
+ parsed: (self: Parser) => void
4258
+ }
4259
+
4260
+ /**
4261
+ * The class for #GcrParser
4262
+ * @record
4263
+ */
4264
+ export abstract class ParserClass {
4265
+
4266
+ // Own properties of Gcr-3.Gcr.ParserClass
4267
+
4268
+ static name: string
4269
+ }
4270
+
4271
+ export interface ParserPrivate {
4272
+ }
4273
+
4274
+ export class ParserPrivate {
4275
+
4276
+ // Own properties of Gcr-3.Gcr.ParserPrivate
4277
+
4278
+ static name: string
4279
+ }
4280
+
4281
+ export interface Pkcs11CertificateClass {
4282
+ }
4283
+
4284
+ export abstract class Pkcs11CertificateClass {
4285
+
4286
+ // Own properties of Gcr-3.Gcr.Pkcs11CertificateClass
4287
+
4288
+ static name: string
4289
+ }
4290
+
4291
+ export interface Pkcs11CertificatePrivate {
4292
+ }
4293
+
4294
+ export class Pkcs11CertificatePrivate {
4295
+
4296
+ // Own properties of Gcr-3.Gcr.Pkcs11CertificatePrivate
4297
+
4298
+ static name: string
4299
+ }
4300
+
4301
+ export interface PromptIface {
4302
+
4303
+ // Own fields of Gcr-3.Gcr.PromptIface
4304
+
4305
+ /**
4306
+ * parent interface
4307
+ * @field
4308
+ */
4309
+ parent_iface: GObject.TypeInterface
4310
+ prompt_password_async: (prompt: Prompt, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback | null) => void
4311
+ prompt_password_finish: (prompt: Prompt, result: Gio.AsyncResult) => string | null
4312
+ prompt_confirm_async: (prompt: Prompt, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback | null) => void
4313
+ prompt_confirm_finish: (prompt: Prompt, result: Gio.AsyncResult) => PromptReply
4314
+ prompt_close: (prompt: Prompt) => void
4315
+ }
4316
+
4317
+ /**
4318
+ * The interface for implementing [class`Prompt]`.
4319
+ * @record
4320
+ */
4321
+ export abstract class PromptIface {
4322
+
4323
+ // Own properties of Gcr-3.Gcr.PromptIface
4324
+
4325
+ static name: string
4326
+ }
4327
+
4328
+ export interface SecretExchangeClass {
4329
+
4330
+ // Own fields of Gcr-3.Gcr.SecretExchangeClass
4331
+
4332
+ generate_exchange_key: (exchange: SecretExchange, scheme: string | null, public_key: number, n_public_key: number) => boolean
4333
+ derive_transport_key: (exchange: SecretExchange, peer: number, n_peer: number) => boolean
4334
+ }
4335
+
4336
+ export abstract class SecretExchangeClass {
4337
+
4338
+ // Own properties of Gcr-3.Gcr.SecretExchangeClass
4339
+
4340
+ static name: string
4341
+ }
4342
+
4343
+ export interface SecretExchangePrivate {
4344
+ }
4345
+
4346
+ export class SecretExchangePrivate {
4347
+
4348
+ // Own properties of Gcr-3.Gcr.SecretExchangePrivate
4349
+
4350
+ static name: string
4351
+ }
4352
+
4353
+ export interface SimpleCertificateClass {
4354
+
4355
+ // Own fields of Gcr-3.Gcr.SimpleCertificateClass
4356
+
4357
+ parent_class: GObject.ObjectClass
4358
+ }
4359
+
4360
+ export abstract class SimpleCertificateClass {
4361
+
4362
+ // Own properties of Gcr-3.Gcr.SimpleCertificateClass
4363
+
4364
+ static name: string
4365
+ }
4366
+
4367
+ export interface SimpleCertificatePrivate {
4368
+ }
4369
+
4370
+ export class SimpleCertificatePrivate {
4371
+
4372
+ // Own properties of Gcr-3.Gcr.SimpleCertificatePrivate
4373
+
4374
+ static name: string
4375
+ }
4376
+
4377
+ export interface SimpleCollectionClass {
4378
+
4379
+ // Own fields of Gcr-3.Gcr.SimpleCollectionClass
4380
+
4381
+ parent_class: GObject.ObjectClass
4382
+ }
4383
+
4384
+ export abstract class SimpleCollectionClass {
4385
+
4386
+ // Own properties of Gcr-3.Gcr.SimpleCollectionClass
4387
+
4388
+ static name: string
4389
+ }
4390
+
4391
+ export interface SimpleCollectionPrivate {
4392
+ }
4393
+
4394
+ export class SimpleCollectionPrivate {
4395
+
4396
+ // Own properties of Gcr-3.Gcr.SimpleCollectionPrivate
4397
+
4398
+ static name: string
4399
+ }
4400
+
4401
+ export interface SshAskpassClass {
4402
+
4403
+ // Own fields of Gcr-3.Gcr.SshAskpassClass
4404
+
4405
+ parent_class: GObject.ObjectClass
4406
+ }
4407
+
4408
+ export abstract class SshAskpassClass {
4409
+
4410
+ // Own properties of Gcr-3.Gcr.SshAskpassClass
4411
+
4412
+ static name: string
4413
+ }
4414
+
4415
+ export interface SystemPromptClass {
4416
+
4417
+ // Own fields of Gcr-3.Gcr.SystemPromptClass
4418
+
4419
+ parent_class: GObject.ObjectClass
4420
+ }
4421
+
4422
+ export abstract class SystemPromptClass {
4423
+
4424
+ // Own properties of Gcr-3.Gcr.SystemPromptClass
4425
+
4426
+ static name: string
4427
+ }
4428
+
4429
+ export interface SystemPromptPrivate {
4430
+ }
4431
+
4432
+ export class SystemPromptPrivate {
4433
+
4434
+ // Own properties of Gcr-3.Gcr.SystemPromptPrivate
4435
+
4436
+ static name: string
4437
+ }
4438
+
4439
+ export interface SystemPrompterClass {
4440
+
4441
+ // Own fields of Gcr-3.Gcr.SystemPrompterClass
4442
+
4443
+ /**
4444
+ * parent class
4445
+ * @field
4446
+ */
4447
+ parent_class: GObject.ObjectClass
4448
+ }
4449
+
4450
+ /**
4451
+ * The class for #GcrSystemPrompter.
4452
+ * @record
4453
+ */
4454
+ export abstract class SystemPrompterClass {
4455
+
4456
+ // Own properties of Gcr-3.Gcr.SystemPrompterClass
4457
+
4458
+ static name: string
4459
+ }
4460
+
4461
+ export interface SystemPrompterPrivate {
4462
+ }
4463
+
4464
+ export class SystemPrompterPrivate {
4465
+
4466
+ // Own properties of Gcr-3.Gcr.SystemPrompterPrivate
4467
+
4468
+ static name: string
4469
+ }
4470
+
4471
+ export interface UnionCollectionClass {
4472
+
4473
+ // Own fields of Gcr-3.Gcr.UnionCollectionClass
4474
+
4475
+ parent_class: GObject.ObjectClass
4476
+ }
4477
+
4478
+ export abstract class UnionCollectionClass {
4479
+
4480
+ // Own properties of Gcr-3.Gcr.UnionCollectionClass
4481
+
4482
+ static name: string
4483
+ }
4484
+
4485
+ export interface UnionCollectionPrivate {
4486
+ }
4487
+
4488
+ export class UnionCollectionPrivate {
4489
+
4490
+ // Own properties of Gcr-3.Gcr.UnionCollectionPrivate
4491
+
4492
+ static name: string
4493
+ }
4494
+
4495
+ /**
4496
+ * Name of the imported GIR library
4497
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
4498
+ */
4499
+ export const __name__: string
4500
+ /**
4501
+ * Version of the imported GIR library
4502
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
4503
+ */
4504
+ export const __version__: string
4505
+ // END