@girs/trackerminer-1.0 1.0.0-3.0.0-beta.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2160 @@
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
+ * TrackerMiner-1.0
10
+ */
11
+
12
+ import type Tracker from '@girs/tracker-1.0';
13
+ import type GLib from '@girs/glib-2.0';
14
+ import type Gio from '@girs/gio-2.0';
15
+ import type GObject from '@girs/gobject-2.0';
16
+ import type GModule from '@girs/gmodule-2.0';
17
+
18
+ /**
19
+ * Possible errors returned when calling tracker_decorator_next_finish().
20
+ */
21
+ export enum DecoratorError {
22
+ /**
23
+ * There is no item to be processed
24
+ * next. It is entirely possible to have a ::items_available signal
25
+ * emitted and then have this error when calling
26
+ * tracker_decorator_next_finish() because the signal may apply to a
27
+ * class which we're not interested in. For example, a new nmo:Email
28
+ * might have been added to Tracker, but we might only be interested
29
+ * in nfo:Document. This case would give this error.
30
+ */
31
+ EMPTY,
32
+ /**
33
+ * No work was done or will be done
34
+ * because the miner is currently paused.
35
+ */
36
+ PAUSED,
37
+ }
38
+ export enum FilterPolicy {
39
+ DENY,
40
+ ACCEPT,
41
+ }
42
+ export enum FilterType {
43
+ FILE,
44
+ DIRECTORY,
45
+ PARENT_DIRECTORY,
46
+ }
47
+ /**
48
+ * Possible errors returned when calling #TrackerMiner APIs or
49
+ * subclassed miners where the error is generic to all miners.
50
+ */
51
+ export enum MinerError {
52
+ /**
53
+ * No name was given when creating
54
+ * the miner. The name is crucial for D-Bus presence and a host of
55
+ * other things.
56
+ */
57
+ NAME_MISSING,
58
+ /**
59
+ * The name trying to be used
60
+ * for the miner was not available, possibly because the miner is
61
+ * already running with the same name in another process.
62
+ */
63
+ NAME_UNAVAILABLE,
64
+ /**
65
+ * Given by miners when an API is used at
66
+ * the time the miner itself is paused and such actions should be avoided.
67
+ */
68
+ PAUSED,
69
+ /**
70
+ * The pause request has already
71
+ * been given by the same application with the same reason. Duplicate
72
+ * pause calls with the same reason by the same application can not
73
+ * be carried out.
74
+ */
75
+ PAUSED_ALREADY,
76
+ /**
77
+ * When pausing a miner, a cookie
78
+ * (or `gint` based ID) is given. That cookie must be used to resume a
79
+ * previous pause request. If the cookie is unrecognised, this error
80
+ * is given.
81
+ */
82
+ INVALID_COOKIE,
83
+ }
84
+ /**
85
+ * Possible errors returned when calling creating new objects based on
86
+ * the #TrackerMinerFS type and other APIs available with this class.
87
+ */
88
+ export enum MinerFSError {
89
+ /**
90
+ * There was an error during
91
+ * initialization of the object. The specific details are in the
92
+ * message.
93
+ */
94
+ MINER_FS_ERROR_INIT,
95
+ }
96
+ export enum NetworkType {
97
+ NONE,
98
+ UNKNOWN,
99
+ GPRS,
100
+ EDGE,
101
+ TODO_3G,
102
+ LAN,
103
+ }
104
+ export enum DirectoryFlags {
105
+ NONE,
106
+ RECURSE,
107
+ CHECK_MTIME,
108
+ MONITOR,
109
+ IGNORE,
110
+ PRESERVE,
111
+ PRIORITY,
112
+ NO_STAT,
113
+ CHECK_DELETED,
114
+ }
115
+ /**
116
+ * The name of the D-Bus interface to use for all data miners that
117
+ * inter-operate with Tracker.
118
+ */
119
+ export const MINER_DBUS_INTERFACE: string | null
120
+ /**
121
+ * D-Bus name prefix to use for all data miners. This allows custom
122
+ * miners to be written using `TRACKER_MINER_DBUS_NAME_PREFIX` + "Files" for
123
+ * example and would show up on D-Bus under
124
+ * "org.freedesktop.Tracker1.Miner.Files".
125
+ */
126
+ export const MINER_DBUS_NAME_PREFIX: string | null
127
+ /**
128
+ * D-Bus path prefix to use for all data miners. This allows custom
129
+ * miners to be written using `TRACKER_MINER_DBUS_PATH_PREFIX` + "Files" for
130
+ * example and would show up on D-Bus under
131
+ * "/org/freedesktop/Tracker1/Miner/Files".
132
+ */
133
+ export const MINER_DBUS_PATH_PREFIX: string | null
134
+ /**
135
+ * Used as the domain for any #GErrors reported by `TrackerMiner` objects.
136
+ */
137
+ export const MINER_ERROR_DOMAIN: string | null
138
+ export module DataProvider {
139
+
140
+ // Constructor properties interface
141
+
142
+ export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
143
+ }
144
+
145
+ }
146
+
147
+ export interface DataProvider {
148
+
149
+ // Owm methods of TrackerMiner-1.0.TrackerMiner.DataProvider
150
+
151
+ /**
152
+ * Creates a #TrackerEnumerator to enumerate children at the URI
153
+ * provided by `url`.
154
+ *
155
+ * The attributes value is a string that specifies the file attributes
156
+ * that should be gathered. It is not an error if it's not possible to
157
+ * read a particular requested attribute from a file - it just won't
158
+ * be set. attributes should be a comma-separated list of attributes
159
+ * or attribute wildcards. The wildcard "*" means all attributes, and
160
+ * a wildcard like "standard::*" means all attributes in the standard
161
+ * namespace. An example attribute query be "standard::*,owner::user".
162
+ * The standard attributes are available as defines, like
163
+ * G_FILE_ATTRIBUTE_STANDARD_NAME. See g_file_enumerate_children() for
164
+ * more details.
165
+ * @param url a #GFile to enumerate
166
+ * @param attributes an attribute query string
167
+ * @param flags a set of #TrackerDirectoryFlags
168
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
169
+ * @returns a #TrackerEnumerator or %NULL on failure. This must be freed with g_object_unref().
170
+ */
171
+ begin(url: Gio.File, attributes: string | null, flags: DirectoryFlags, cancellable: Gio.Cancellable | null): Enumerator
172
+ /**
173
+ * Precisely the same operation as tracker_data_provider_begin()
174
+ * is performing, but asynchronously.
175
+ *
176
+ * When all i/o for the operation is finished the `callback` will be
177
+ * called with the requested information.
178
+ *
179
+ * See the documentation of #TrackerDataProvider for information about the
180
+ * order of returned files.
181
+ *
182
+ * In case of a partial error the callback will be called with any
183
+ * succeeding items and no error, and on the next request the error
184
+ * will be reported. If a request is cancelled the callback will be
185
+ * called with %G_IO_ERROR_CANCELLED.
186
+ *
187
+ * During an async request no other sync and async calls are allowed,
188
+ * and will result in %G_IO_ERROR_PENDING errors.
189
+ *
190
+ * Any outstanding i/o request with higher priority (lower numerical
191
+ * value) will be executed before an outstanding request with lower
192
+ * priority. Default priority is %G_PRIORITY_DEFAULT.
193
+ * @param url a #GFile to enumerate
194
+ * @param attributes an attribute query string
195
+ * @param flags a set of #TrackerDirectoryFlags
196
+ * @param io_priority the [I/O priority][io-priority] of the request
197
+ * @param cancellable optional #GCancellable object, %NULL to ignore
198
+ * @param callback a #GAsyncReadyCallback to call when the request is satisfied
199
+ */
200
+ begin_async(url: Gio.File, attributes: string | null, flags: DirectoryFlags, io_priority: number, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
201
+ /**
202
+ * Finishes the asynchronous operation started with
203
+ * tracker_data_provider_begin_async().
204
+ * @param result a #GAsyncResult.
205
+ * @returns a #TrackerEnumerator or %NULL on failure. This must be freed with g_object_unref().
206
+ */
207
+ begin_finish(result: Gio.AsyncResult): Enumerator
208
+ /**
209
+ * Closes any caches or operations related to creating the
210
+ * #TrackerEnumerator to enumerate data at `url`.
211
+ *
212
+ * The attributes value is a string that specifies the file attributes
213
+ * that should be gathered. It is not an error if it's not possible to
214
+ * read a particular requested attribute from a file - it just won't
215
+ * be set. attributes should be a comma-separated list of attributes
216
+ * or attribute wildcards. The wildcard "*" means all attributes, and
217
+ * a wildcard like "standard::*" means all attributes in the standard
218
+ * namespace. An example attribute query be "standard::*,owner::user".
219
+ * The standard attributes are available as defines, like
220
+ * G_FILE_ATTRIBUTE_STANDARD_NAME. See g_file_enumerate_children() for
221
+ * more details.
222
+ * @param enumerator a #TrackerEnumerator originally created by tracker_data_provider_begin().
223
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
224
+ * @returns %TRUE on success, otherwise %FALSE and @error is set.
225
+ */
226
+ end(enumerator: Enumerator, cancellable: Gio.Cancellable | null): boolean
227
+ /**
228
+ * Precisely the same operation as tracker_data_provider_end()
229
+ * is performing, but asynchronously.
230
+ *
231
+ * When all i/o for the operation is finished the `callback` will be
232
+ * called with the requested information.
233
+ *
234
+ * See the documentation of #TrackerDataProvider for information about the
235
+ * order of returned files.
236
+ *
237
+ * In case of a partial error the callback will be called with any
238
+ * succeeding items and no error, and on the next request the error
239
+ * will be reported. If a request is cancelled the callback will be
240
+ * called with %G_IO_ERROR_CANCELLED.
241
+ *
242
+ * During an async request no other sync and async calls are allowed,
243
+ * and will result in %G_IO_ERROR_PENDING errors.
244
+ *
245
+ * Any outstanding i/o request with higher priority (lower numerical
246
+ * value) will be executed before an outstanding request with lower
247
+ * priority. Default priority is %G_PRIORITY_DEFAULT.
248
+ * @param enumerator a #TrackerEnumerator originally created by tracker_data_provider_begin().
249
+ * @param io_priority the [I/O priority][io-priority] of the request
250
+ * @param cancellable optional #GCancellable object, %NULL to ignore
251
+ * @param callback a #GAsyncReadyCallback to call when the request is satisfied
252
+ */
253
+ end_async(enumerator: Enumerator, io_priority: number, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
254
+ /**
255
+ * Finishes the asynchronous operation started with
256
+ * tracker_data_provider_end_async().
257
+ * @param result a #GAsyncResult.
258
+ * @returns %TRUE on success, otherwise %FALSE and @error is set.
259
+ */
260
+ end_finish(result: Gio.AsyncResult): boolean
261
+
262
+ // Own virtual methods of TrackerMiner-1.0.TrackerMiner.DataProvider
263
+
264
+ /**
265
+ * Creates a #TrackerEnumerator to enumerate children at the URI
266
+ * provided by `url`.
267
+ *
268
+ * The attributes value is a string that specifies the file attributes
269
+ * that should be gathered. It is not an error if it's not possible to
270
+ * read a particular requested attribute from a file - it just won't
271
+ * be set. attributes should be a comma-separated list of attributes
272
+ * or attribute wildcards. The wildcard "*" means all attributes, and
273
+ * a wildcard like "standard::*" means all attributes in the standard
274
+ * namespace. An example attribute query be "standard::*,owner::user".
275
+ * The standard attributes are available as defines, like
276
+ * G_FILE_ATTRIBUTE_STANDARD_NAME. See g_file_enumerate_children() for
277
+ * more details.
278
+ * @virtual
279
+ * @param url a #GFile to enumerate
280
+ * @param attributes an attribute query string
281
+ * @param flags a set of #TrackerDirectoryFlags
282
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
283
+ * @returns a #TrackerEnumerator or %NULL on failure. This must be freed with g_object_unref().
284
+ */
285
+ vfunc_begin(url: Gio.File, attributes: string | null, flags: DirectoryFlags, cancellable: Gio.Cancellable | null): Enumerator
286
+ /**
287
+ * Precisely the same operation as tracker_data_provider_begin()
288
+ * is performing, but asynchronously.
289
+ *
290
+ * When all i/o for the operation is finished the `callback` will be
291
+ * called with the requested information.
292
+ *
293
+ * See the documentation of #TrackerDataProvider for information about the
294
+ * order of returned files.
295
+ *
296
+ * In case of a partial error the callback will be called with any
297
+ * succeeding items and no error, and on the next request the error
298
+ * will be reported. If a request is cancelled the callback will be
299
+ * called with %G_IO_ERROR_CANCELLED.
300
+ *
301
+ * During an async request no other sync and async calls are allowed,
302
+ * and will result in %G_IO_ERROR_PENDING errors.
303
+ *
304
+ * Any outstanding i/o request with higher priority (lower numerical
305
+ * value) will be executed before an outstanding request with lower
306
+ * priority. Default priority is %G_PRIORITY_DEFAULT.
307
+ * @virtual
308
+ * @param url a #GFile to enumerate
309
+ * @param attributes an attribute query string
310
+ * @param flags a set of #TrackerDirectoryFlags
311
+ * @param io_priority the [I/O priority][io-priority] of the request
312
+ * @param cancellable optional #GCancellable object, %NULL to ignore
313
+ * @param callback a #GAsyncReadyCallback to call when the request is satisfied
314
+ */
315
+ vfunc_begin_async(url: Gio.File, attributes: string | null, flags: DirectoryFlags, io_priority: number, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
316
+ /**
317
+ * Finishes the asynchronous operation started with
318
+ * tracker_data_provider_begin_async().
319
+ * @virtual
320
+ * @param result a #GAsyncResult.
321
+ * @returns a #TrackerEnumerator or %NULL on failure. This must be freed with g_object_unref().
322
+ */
323
+ vfunc_begin_finish(result: Gio.AsyncResult): Enumerator
324
+ /**
325
+ * Closes any caches or operations related to creating the
326
+ * #TrackerEnumerator to enumerate data at `url`.
327
+ *
328
+ * The attributes value is a string that specifies the file attributes
329
+ * that should be gathered. It is not an error if it's not possible to
330
+ * read a particular requested attribute from a file - it just won't
331
+ * be set. attributes should be a comma-separated list of attributes
332
+ * or attribute wildcards. The wildcard "*" means all attributes, and
333
+ * a wildcard like "standard::*" means all attributes in the standard
334
+ * namespace. An example attribute query be "standard::*,owner::user".
335
+ * The standard attributes are available as defines, like
336
+ * G_FILE_ATTRIBUTE_STANDARD_NAME. See g_file_enumerate_children() for
337
+ * more details.
338
+ * @virtual
339
+ * @param enumerator a #TrackerEnumerator originally created by tracker_data_provider_begin().
340
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
341
+ * @returns %TRUE on success, otherwise %FALSE and @error is set.
342
+ */
343
+ vfunc_end(enumerator: Enumerator, cancellable: Gio.Cancellable | null): boolean
344
+ /**
345
+ * Precisely the same operation as tracker_data_provider_end()
346
+ * is performing, but asynchronously.
347
+ *
348
+ * When all i/o for the operation is finished the `callback` will be
349
+ * called with the requested information.
350
+ *
351
+ * See the documentation of #TrackerDataProvider for information about the
352
+ * order of returned files.
353
+ *
354
+ * In case of a partial error the callback will be called with any
355
+ * succeeding items and no error, and on the next request the error
356
+ * will be reported. If a request is cancelled the callback will be
357
+ * called with %G_IO_ERROR_CANCELLED.
358
+ *
359
+ * During an async request no other sync and async calls are allowed,
360
+ * and will result in %G_IO_ERROR_PENDING errors.
361
+ *
362
+ * Any outstanding i/o request with higher priority (lower numerical
363
+ * value) will be executed before an outstanding request with lower
364
+ * priority. Default priority is %G_PRIORITY_DEFAULT.
365
+ * @virtual
366
+ * @param enumerator a #TrackerEnumerator originally created by tracker_data_provider_begin().
367
+ * @param io_priority the [I/O priority][io-priority] of the request
368
+ * @param cancellable optional #GCancellable object, %NULL to ignore
369
+ * @param callback a #GAsyncReadyCallback to call when the request is satisfied
370
+ */
371
+ vfunc_end_async(enumerator: Enumerator, io_priority: number, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
372
+ /**
373
+ * Finishes the asynchronous operation started with
374
+ * tracker_data_provider_end_async().
375
+ * @virtual
376
+ * @param result a #GAsyncResult.
377
+ * @returns %TRUE on success, otherwise %FALSE and @error is set.
378
+ */
379
+ vfunc_end_finish(result: Gio.AsyncResult): boolean
380
+
381
+ // Class property signals of TrackerMiner-1.0.TrackerMiner.DataProvider
382
+
383
+ connect(sigName: string, callback: (...args: any[]) => void): number
384
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
385
+ emit(sigName: string, ...args: any[]): void
386
+ disconnect(id: number): void
387
+ }
388
+
389
+ /**
390
+ * An interface to enumerate URIs and feed the data to Tracker.
391
+ * @interface
392
+ */
393
+ export class DataProvider extends GObject.Object {
394
+
395
+ // Own properties of TrackerMiner-1.0.TrackerMiner.DataProvider
396
+
397
+ static name: string
398
+ static $gtype: GObject.GType<DataProvider>
399
+
400
+ // Constructors of TrackerMiner-1.0.TrackerMiner.DataProvider
401
+
402
+ constructor(config?: DataProvider.ConstructorProperties)
403
+ _init(config?: DataProvider.ConstructorProperties): void
404
+ }
405
+
406
+ export module Enumerator {
407
+
408
+ // Constructor properties interface
409
+
410
+ export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
411
+ }
412
+
413
+ }
414
+
415
+ export interface Enumerator {
416
+
417
+ // Owm methods of TrackerMiner-1.0.TrackerMiner.Enumerator
418
+
419
+ /**
420
+ * Enumerates to the next piece of data according to the `enumerator`
421
+ * implementation.
422
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
423
+ * @returns Returns a #gpointer with the next item from the @enumerator, or %NULL when @error is set or the operation was cancelled in @cancellable. The data must be freed. The function to free depends on the data returned by the enumerator and the #TrackerDataProvider that created the @enumerator.
424
+ */
425
+ next(cancellable: Gio.Cancellable | null): any | null
426
+ /**
427
+ * Precisely the same operation as tracker_enumerator_next()
428
+ * is performing, but asynchronously.
429
+ *
430
+ * When all i/o for the operation is finished the `callback` will be
431
+ * called with the requested information.
432
+ *
433
+ * In case of a partial error the callback will be called with any
434
+ * succeeding items and no error, and on the next request the error
435
+ * will be reported. If a request is cancelled the callback will be
436
+ * called with %G_IO_ERROR_CANCELLED.
437
+ *
438
+ * During an async request no other sync and async calls are allowed,
439
+ * and will result in %G_IO_ERROR_PENDING errors.
440
+ *
441
+ * Any outstanding i/o request with higher priority (lower numerical
442
+ * value) will be executed before an outstanding request with lower
443
+ * priority. Default priority is %G_PRIORITY_DEFAULT.
444
+ * @param io_priority the [I/O priority][io-priority] of the request
445
+ * @param cancellable optional #GCancellable object, %NULL to ignore
446
+ * @param callback a #GAsyncReadyCallback to call when the request is satisfied
447
+ */
448
+ next_async(io_priority: number, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
449
+ /**
450
+ * Finishes the asynchronous operation started with
451
+ * tracker_enumerator_next_async().
452
+ * @param result a #GAsyncResult.
453
+ * @returns Returns a #gpointer with the next item from the @enumerator, or %NULL when @error is set or the operation was cancelled in @cancellable. The data must be freed. The function to free depends on the data returned by the enumerator and the #TrackerDataProvider that created the @enumerator.
454
+ */
455
+ next_finish(result: Gio.AsyncResult): any | null
456
+
457
+ // Own virtual methods of TrackerMiner-1.0.TrackerMiner.Enumerator
458
+
459
+ /**
460
+ * Enumerates to the next piece of data according to the `enumerator`
461
+ * implementation.
462
+ * @virtual
463
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
464
+ * @returns Returns a #gpointer with the next item from the @enumerator, or %NULL when @error is set or the operation was cancelled in @cancellable. The data must be freed. The function to free depends on the data returned by the enumerator and the #TrackerDataProvider that created the @enumerator.
465
+ */
466
+ vfunc_next(cancellable: Gio.Cancellable | null): any | null
467
+ /**
468
+ * Precisely the same operation as tracker_enumerator_next()
469
+ * is performing, but asynchronously.
470
+ *
471
+ * When all i/o for the operation is finished the `callback` will be
472
+ * called with the requested information.
473
+ *
474
+ * In case of a partial error the callback will be called with any
475
+ * succeeding items and no error, and on the next request the error
476
+ * will be reported. If a request is cancelled the callback will be
477
+ * called with %G_IO_ERROR_CANCELLED.
478
+ *
479
+ * During an async request no other sync and async calls are allowed,
480
+ * and will result in %G_IO_ERROR_PENDING errors.
481
+ *
482
+ * Any outstanding i/o request with higher priority (lower numerical
483
+ * value) will be executed before an outstanding request with lower
484
+ * priority. Default priority is %G_PRIORITY_DEFAULT.
485
+ * @virtual
486
+ * @param io_priority the [I/O priority][io-priority] of the request
487
+ * @param cancellable optional #GCancellable object, %NULL to ignore
488
+ * @param callback a #GAsyncReadyCallback to call when the request is satisfied
489
+ */
490
+ vfunc_next_async(io_priority: number, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
491
+ /**
492
+ * Finishes the asynchronous operation started with
493
+ * tracker_enumerator_next_async().
494
+ * @virtual
495
+ * @param result a #GAsyncResult.
496
+ * @returns Returns a #gpointer with the next item from the @enumerator, or %NULL when @error is set or the operation was cancelled in @cancellable. The data must be freed. The function to free depends on the data returned by the enumerator and the #TrackerDataProvider that created the @enumerator.
497
+ */
498
+ vfunc_next_finish(result: Gio.AsyncResult): any | null
499
+
500
+ // Class property signals of TrackerMiner-1.0.TrackerMiner.Enumerator
501
+
502
+ connect(sigName: string, callback: (...args: any[]) => void): number
503
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
504
+ emit(sigName: string, ...args: any[]): void
505
+ disconnect(id: number): void
506
+ }
507
+
508
+ /**
509
+ * An interface to enumerate URIs and feed the data to Tracker.
510
+ * @interface
511
+ */
512
+ export class Enumerator extends GObject.Object {
513
+
514
+ // Own properties of TrackerMiner-1.0.TrackerMiner.Enumerator
515
+
516
+ static name: string
517
+ static $gtype: GObject.GType<Enumerator>
518
+
519
+ // Constructors of TrackerMiner-1.0.TrackerMiner.Enumerator
520
+
521
+ constructor(config?: Enumerator.ConstructorProperties)
522
+ _init(config?: Enumerator.ConstructorProperties): void
523
+ }
524
+
525
+ export module Decorator {
526
+
527
+ // Signal callback interfaces
528
+
529
+ /**
530
+ * Signal callback interface for `finished`
531
+ */
532
+ export interface FinishedSignalCallback {
533
+ ($obj: Decorator): void
534
+ }
535
+
536
+ /**
537
+ * Signal callback interface for `items-available`
538
+ */
539
+ export interface ItemsAvailableSignalCallback {
540
+ ($obj: Decorator): void
541
+ }
542
+
543
+
544
+ // Constructor properties interface
545
+
546
+ export interface ConstructorProperties extends Gio.Initable.ConstructorProperties, Miner.ConstructorProperties {
547
+
548
+ // Own constructor properties of TrackerMiner-1.0.TrackerMiner.Decorator
549
+
550
+ class_names?: string[] | null
551
+ commit_batch_size?: number | null
552
+ data_source?: string | null
553
+ priority_rdf_types?: string[] | null
554
+ }
555
+
556
+ }
557
+
558
+ export interface Decorator extends Gio.Initable {
559
+
560
+ // Own properties of TrackerMiner-1.0.TrackerMiner.Decorator
561
+
562
+ class_names: string[]
563
+ commit_batch_size: number
564
+ readonly data_source: string | null
565
+ priority_rdf_types: string[]
566
+
567
+ // Own fields of TrackerMiner-1.0.TrackerMiner.Decorator
568
+
569
+ parent_instance: Miner & GObject.Object
570
+ priv: any
571
+
572
+ // Owm methods of TrackerMiner-1.0.TrackerMiner.Decorator
573
+
574
+ /**
575
+ * Deletes resource needing extended metadata extraction from the
576
+ * queue. `id` is the same IDs emitted by tracker-store when the database is
577
+ * updated for consistency. For details, see the GraphUpdated signal.
578
+ * @param id an ID.
579
+ */
580
+ delete_id(id: number): void
581
+ /**
582
+ * This function returns a string list of class names which are being
583
+ * updated with extended metadata. An example would be 'nfo:Document'.
584
+ * @returns a const gchar** or #NULL.
585
+ */
586
+ get_class_names(): string[]
587
+ /**
588
+ * The unique string identifying this #TrackerDecorator that has
589
+ * extracted the extended metadata. This is essentially an identifier
590
+ * so it's clear WHO has extracted this extended metadata.
591
+ * @returns a const gchar* or #NULL if an error happened.
592
+ */
593
+ get_data_source(): string | null
594
+ /**
595
+ * Get the number of items left in the queue to be processed. This
596
+ * indicates content that may already exist in Tracker but is waiting
597
+ * to be further flurished with metadata with a 2nd pass extraction or
598
+ * index.
599
+ * @returns the number of items queued to be processed, always >= 0.
600
+ */
601
+ get_n_items(): number
602
+ /**
603
+ * Processes the next resource in the queue to have extended metadata
604
+ * extracted. If the item in the queue has been completed already, it
605
+ * signals it's completion instead.
606
+ *
607
+ * This function will give a #GError if the miner is paused at the
608
+ * time it is called.
609
+ * @param cancellable a #GCancellable.
610
+ * @param callback a #GAsyncReadyCallback.
611
+ */
612
+ next(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
613
+ /**
614
+ * Should be called in the callback function provided to
615
+ * tracker_decorator_next() to return the result of the task be it an
616
+ * error or not.
617
+ * @param result a #GAsyncResult.
618
+ * @returns a #TrackerDecoratorInfo on success or #NULL on error. Free with tracker_decorator_info_unref().
619
+ */
620
+ next_finish(result: Gio.AsyncResult): DecoratorInfo
621
+ /**
622
+ * Adds resource needing extended metadata extraction to the queue.
623
+ * `id` is the same IDs emitted by tracker-store when the database is updated for
624
+ * consistency. For details, see the GraphUpdated signal.
625
+ * @param id the ID of the resource ID.
626
+ * @param class_name_id the ID of the resource's class.
627
+ */
628
+ prepend_id(id: number, class_name_id: number): void
629
+ /**
630
+ * Re-evaluate the priority queues internally to ensure that
631
+ * `rdf_types` are handled before all other content. This is useful for
632
+ * applications that need their content available sooner than the
633
+ * standard time it would take to index content.
634
+ * @param rdf_types a string array of rdf types
635
+ */
636
+ set_priority_rdf_types(rdf_types: string | null): void
637
+
638
+ // Own virtual methods of TrackerMiner-1.0.TrackerMiner.Decorator
639
+
640
+ vfunc_finished(): void
641
+ vfunc_items_available(): void
642
+
643
+ // Own signals of TrackerMiner-1.0.TrackerMiner.Decorator
644
+
645
+ connect(sigName: "finished", callback: Decorator.FinishedSignalCallback): number
646
+ connect_after(sigName: "finished", callback: Decorator.FinishedSignalCallback): number
647
+ emit(sigName: "finished", ...args: any[]): void
648
+ connect(sigName: "items-available", callback: Decorator.ItemsAvailableSignalCallback): number
649
+ connect_after(sigName: "items-available", callback: Decorator.ItemsAvailableSignalCallback): number
650
+ emit(sigName: "items-available", ...args: any[]): void
651
+
652
+ // Class property signals of TrackerMiner-1.0.TrackerMiner.Decorator
653
+
654
+ connect(sigName: "notify::class-names", callback: (($obj: Decorator, pspec: GObject.ParamSpec) => void)): number
655
+ connect_after(sigName: "notify::class-names", callback: (($obj: Decorator, pspec: GObject.ParamSpec) => void)): number
656
+ emit(sigName: "notify::class-names", ...args: any[]): void
657
+ connect(sigName: "notify::commit-batch-size", callback: (($obj: Decorator, pspec: GObject.ParamSpec) => void)): number
658
+ connect_after(sigName: "notify::commit-batch-size", callback: (($obj: Decorator, pspec: GObject.ParamSpec) => void)): number
659
+ emit(sigName: "notify::commit-batch-size", ...args: any[]): void
660
+ connect(sigName: "notify::data-source", callback: (($obj: Decorator, pspec: GObject.ParamSpec) => void)): number
661
+ connect_after(sigName: "notify::data-source", callback: (($obj: Decorator, pspec: GObject.ParamSpec) => void)): number
662
+ emit(sigName: "notify::data-source", ...args: any[]): void
663
+ connect(sigName: "notify::priority-rdf-types", callback: (($obj: Decorator, pspec: GObject.ParamSpec) => void)): number
664
+ connect_after(sigName: "notify::priority-rdf-types", callback: (($obj: Decorator, pspec: GObject.ParamSpec) => void)): number
665
+ emit(sigName: "notify::priority-rdf-types", ...args: any[]): void
666
+ connect(sigName: "notify::introspection-handler", callback: (($obj: Decorator, pspec: GObject.ParamSpec) => void)): number
667
+ connect_after(sigName: "notify::introspection-handler", callback: (($obj: Decorator, pspec: GObject.ParamSpec) => void)): number
668
+ emit(sigName: "notify::introspection-handler", ...args: any[]): void
669
+ connect(sigName: "notify::introspection-xml", callback: (($obj: Decorator, pspec: GObject.ParamSpec) => void)): number
670
+ connect_after(sigName: "notify::introspection-xml", callback: (($obj: Decorator, pspec: GObject.ParamSpec) => void)): number
671
+ emit(sigName: "notify::introspection-xml", ...args: any[]): void
672
+ connect(sigName: "notify::name", callback: (($obj: Decorator, pspec: GObject.ParamSpec) => void)): number
673
+ connect_after(sigName: "notify::name", callback: (($obj: Decorator, pspec: GObject.ParamSpec) => void)): number
674
+ emit(sigName: "notify::name", ...args: any[]): void
675
+ connect(sigName: "notify::progress", callback: (($obj: Decorator, pspec: GObject.ParamSpec) => void)): number
676
+ connect_after(sigName: "notify::progress", callback: (($obj: Decorator, pspec: GObject.ParamSpec) => void)): number
677
+ emit(sigName: "notify::progress", ...args: any[]): void
678
+ connect(sigName: "notify::remaining-time", callback: (($obj: Decorator, pspec: GObject.ParamSpec) => void)): number
679
+ connect_after(sigName: "notify::remaining-time", callback: (($obj: Decorator, pspec: GObject.ParamSpec) => void)): number
680
+ emit(sigName: "notify::remaining-time", ...args: any[]): void
681
+ connect(sigName: "notify::status", callback: (($obj: Decorator, pspec: GObject.ParamSpec) => void)): number
682
+ connect_after(sigName: "notify::status", callback: (($obj: Decorator, pspec: GObject.ParamSpec) => void)): number
683
+ emit(sigName: "notify::status", ...args: any[]): void
684
+ connect(sigName: string, callback: (...args: any[]) => void): number
685
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
686
+ emit(sigName: string, ...args: any[]): void
687
+ disconnect(id: number): void
688
+ }
689
+
690
+ /**
691
+ * Abstract miner object for passive extended metadata indexing, i.e.
692
+ * data past the basic information such as file name, size, etc.
693
+ * @class
694
+ */
695
+ export class Decorator extends Miner {
696
+
697
+ // Own properties of TrackerMiner-1.0.TrackerMiner.Decorator
698
+
699
+ static name: string
700
+ static $gtype: GObject.GType<Decorator>
701
+
702
+ // Constructors of TrackerMiner-1.0.TrackerMiner.Decorator
703
+
704
+ constructor(config?: Decorator.ConstructorProperties)
705
+ _init(config?: Decorator.ConstructorProperties): void
706
+ /**
707
+ * Gives the caller the #GQuark used to identify #TrackerDecorator errors
708
+ * in #GError structures. The #GQuark is used as the domain for the error.
709
+ * @returns the #GQuark used for the domain of a #GError.
710
+ */
711
+ static error_quark(): GLib.Quark
712
+ }
713
+
714
+ export module DecoratorFS {
715
+
716
+ // Constructor properties interface
717
+
718
+ export interface ConstructorProperties extends Gio.Initable.ConstructorProperties, Decorator.ConstructorProperties {
719
+ }
720
+
721
+ }
722
+
723
+ export interface DecoratorFS extends Gio.Initable {
724
+
725
+ // Own fields of TrackerMiner-1.0.TrackerMiner.DecoratorFS
726
+
727
+ parent_instance: Decorator & Miner & GObject.Object & GObject.Object
728
+ priv: any
729
+
730
+ // Owm methods of TrackerMiner-1.0.TrackerMiner.DecoratorFS
731
+
732
+ /**
733
+ * Prepends a file for processing.
734
+ * @param file a #GFile to process
735
+ * @returns the tracker:id of the element corresponding to the file
736
+ */
737
+ prepend_file(file: Gio.File): number
738
+
739
+ // Class property signals of TrackerMiner-1.0.TrackerMiner.DecoratorFS
740
+
741
+ connect(sigName: "notify::class-names", callback: (($obj: DecoratorFS, pspec: GObject.ParamSpec) => void)): number
742
+ connect_after(sigName: "notify::class-names", callback: (($obj: DecoratorFS, pspec: GObject.ParamSpec) => void)): number
743
+ emit(sigName: "notify::class-names", ...args: any[]): void
744
+ connect(sigName: "notify::commit-batch-size", callback: (($obj: DecoratorFS, pspec: GObject.ParamSpec) => void)): number
745
+ connect_after(sigName: "notify::commit-batch-size", callback: (($obj: DecoratorFS, pspec: GObject.ParamSpec) => void)): number
746
+ emit(sigName: "notify::commit-batch-size", ...args: any[]): void
747
+ connect(sigName: "notify::data-source", callback: (($obj: DecoratorFS, pspec: GObject.ParamSpec) => void)): number
748
+ connect_after(sigName: "notify::data-source", callback: (($obj: DecoratorFS, pspec: GObject.ParamSpec) => void)): number
749
+ emit(sigName: "notify::data-source", ...args: any[]): void
750
+ connect(sigName: "notify::priority-rdf-types", callback: (($obj: DecoratorFS, pspec: GObject.ParamSpec) => void)): number
751
+ connect_after(sigName: "notify::priority-rdf-types", callback: (($obj: DecoratorFS, pspec: GObject.ParamSpec) => void)): number
752
+ emit(sigName: "notify::priority-rdf-types", ...args: any[]): void
753
+ connect(sigName: "notify::introspection-handler", callback: (($obj: DecoratorFS, pspec: GObject.ParamSpec) => void)): number
754
+ connect_after(sigName: "notify::introspection-handler", callback: (($obj: DecoratorFS, pspec: GObject.ParamSpec) => void)): number
755
+ emit(sigName: "notify::introspection-handler", ...args: any[]): void
756
+ connect(sigName: "notify::introspection-xml", callback: (($obj: DecoratorFS, pspec: GObject.ParamSpec) => void)): number
757
+ connect_after(sigName: "notify::introspection-xml", callback: (($obj: DecoratorFS, pspec: GObject.ParamSpec) => void)): number
758
+ emit(sigName: "notify::introspection-xml", ...args: any[]): void
759
+ connect(sigName: "notify::name", callback: (($obj: DecoratorFS, pspec: GObject.ParamSpec) => void)): number
760
+ connect_after(sigName: "notify::name", callback: (($obj: DecoratorFS, pspec: GObject.ParamSpec) => void)): number
761
+ emit(sigName: "notify::name", ...args: any[]): void
762
+ connect(sigName: "notify::progress", callback: (($obj: DecoratorFS, pspec: GObject.ParamSpec) => void)): number
763
+ connect_after(sigName: "notify::progress", callback: (($obj: DecoratorFS, pspec: GObject.ParamSpec) => void)): number
764
+ emit(sigName: "notify::progress", ...args: any[]): void
765
+ connect(sigName: "notify::remaining-time", callback: (($obj: DecoratorFS, pspec: GObject.ParamSpec) => void)): number
766
+ connect_after(sigName: "notify::remaining-time", callback: (($obj: DecoratorFS, pspec: GObject.ParamSpec) => void)): number
767
+ emit(sigName: "notify::remaining-time", ...args: any[]): void
768
+ connect(sigName: "notify::status", callback: (($obj: DecoratorFS, pspec: GObject.ParamSpec) => void)): number
769
+ connect_after(sigName: "notify::status", callback: (($obj: DecoratorFS, pspec: GObject.ParamSpec) => void)): number
770
+ emit(sigName: "notify::status", ...args: any[]): void
771
+ connect(sigName: string, callback: (...args: any[]) => void): number
772
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
773
+ emit(sigName: string, ...args: any[]): void
774
+ disconnect(id: number): void
775
+ }
776
+
777
+ /**
778
+ * A decorator object.
779
+ * @class
780
+ */
781
+ export class DecoratorFS extends Decorator {
782
+
783
+ // Own properties of TrackerMiner-1.0.TrackerMiner.DecoratorFS
784
+
785
+ static name: string
786
+ static $gtype: GObject.GType<DecoratorFS>
787
+
788
+ // Constructors of TrackerMiner-1.0.TrackerMiner.DecoratorFS
789
+
790
+ constructor(config?: DecoratorFS.ConstructorProperties)
791
+ _init(config?: DecoratorFS.ConstructorProperties): void
792
+ }
793
+
794
+ export module IndexingTree {
795
+
796
+ // Signal callback interfaces
797
+
798
+ /**
799
+ * Signal callback interface for `child-updated`
800
+ */
801
+ export interface ChildUpdatedSignalCallback {
802
+ ($obj: IndexingTree, root: Gio.File, child: Gio.File): void
803
+ }
804
+
805
+ /**
806
+ * Signal callback interface for `directory-added`
807
+ */
808
+ export interface DirectoryAddedSignalCallback {
809
+ ($obj: IndexingTree, directory: Gio.File): void
810
+ }
811
+
812
+ /**
813
+ * Signal callback interface for `directory-removed`
814
+ */
815
+ export interface DirectoryRemovedSignalCallback {
816
+ ($obj: IndexingTree, directory: Gio.File): void
817
+ }
818
+
819
+ /**
820
+ * Signal callback interface for `directory-updated`
821
+ */
822
+ export interface DirectoryUpdatedSignalCallback {
823
+ ($obj: IndexingTree, directory: Gio.File): void
824
+ }
825
+
826
+
827
+ // Constructor properties interface
828
+
829
+ export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
830
+
831
+ // Own constructor properties of TrackerMiner-1.0.TrackerMiner.IndexingTree
832
+
833
+ filter_hidden?: boolean | null
834
+ root?: Gio.File | null
835
+ }
836
+
837
+ }
838
+
839
+ export interface IndexingTree {
840
+
841
+ // Own properties of TrackerMiner-1.0.TrackerMiner.IndexingTree
842
+
843
+ filter_hidden: boolean
844
+ readonly root: Gio.File
845
+
846
+ // Own fields of TrackerMiner-1.0.TrackerMiner.IndexingTree
847
+
848
+ parent_instance: GObject.Object
849
+ priv: any
850
+
851
+ // Owm methods of TrackerMiner-1.0.TrackerMiner.IndexingTree
852
+
853
+ /**
854
+ * Adds a directory to the indexing tree with the
855
+ * given configuration flags.
856
+ * @param directory #GFile pointing to a directory
857
+ * @param flags Configuration flags for the directory
858
+ */
859
+ add(directory: Gio.File, flags: DirectoryFlags): void
860
+ /**
861
+ * Adds a new filter for basenames.
862
+ * @param filter filter type
863
+ * @param glob_string glob-style string for the filter
864
+ */
865
+ add_filter(filter: FilterType, glob_string: string | null): void
866
+ /**
867
+ * Clears all filters of a given type.
868
+ * @param type filter type to clear
869
+ */
870
+ clear_filters(type: FilterType): void
871
+ /**
872
+ * returns %TRUE if `file` should be indexed according to the
873
+ * parameters given through tracker_indexing_tree_add() and
874
+ * tracker_indexing_tree_add_filter().
875
+ *
876
+ * If `file_type` is #G_FILE_TYPE_UNKNOWN, file type will be queried to the
877
+ * file system.
878
+ * @param file a #GFile
879
+ * @param file_type a #GFileType
880
+ * @returns %TRUE if @file should be indexed.
881
+ */
882
+ file_is_indexable(file: Gio.File, file_type: Gio.FileType): boolean
883
+ /**
884
+ * Evaluates if the URL represented by `file` is the same of that for
885
+ * the root of the `tree`.
886
+ * @param file a #GFile to compare
887
+ * @returns %TRUE if @file matches the URL canonically, otherwise %FALSE.
888
+ */
889
+ file_is_root(file: Gio.File): boolean
890
+ /**
891
+ * Returns %TRUE if `file` matches any filter of the given filter type.
892
+ * @param type filter type
893
+ * @param file a #GFile
894
+ * @returns %TRUE if @file is filtered.
895
+ */
896
+ file_matches_filter(type: FilterType, file: Gio.File): boolean
897
+ /**
898
+ * Get the default filtering policies for `tree` when indexing content.
899
+ * Some content is black listed or white listed and the default policy
900
+ * for that is returned here. The `filter` allows specific type of
901
+ * policies to be returned, for example, the default policy for files
902
+ * (#TRACKER_FILTER_FILE).
903
+ * @param filter a #TrackerFilterType
904
+ * @returns Either #TRACKER_FILTER_POLICY_DENY or #TRACKER_FILTER_POLICY_ALLOW.
905
+ */
906
+ get_default_policy(filter: FilterType): FilterPolicy
907
+ /**
908
+ * Describes if the `tree` should index hidden content. To change this
909
+ * setting, see tracker_indexing_tree_set_filter_hidden().
910
+ * @returns %FALSE if hidden files are indexed, otherwise %TRUE.
911
+ */
912
+ get_filter_hidden(): boolean
913
+ /**
914
+ * Returns the #GFile that represents the master root location for all
915
+ * indexing locations. For example, if
916
+ * <filename>file:///etc</filename> is an indexed path and so was
917
+ * <filename>file:///home/user</filename>, the master root is
918
+ * <filename>file:///</filename>. Only one scheme per `tree` can be
919
+ * used, so you can not mix <filename>http</filename> and
920
+ * <filename>file</filename> roots in `tree`.
921
+ *
922
+ * The return value should <emphasis>NEVER</emphasis> be %NULL. In
923
+ * cases where no root is given, we fallback to
924
+ * <filename>file:///</filename>.
925
+ *
926
+ * Roots explained:
927
+ *
928
+ * - master root = top most level root node,
929
+ * e.g. file:///
930
+ *
931
+ * - config root = a root node from GSettings,
932
+ * e.g. file:///home/martyn/Documents
933
+ *
934
+ * - root = ANY root, normally config root, but it can also apply to
935
+ * roots added for devices, which technically are not a config root or a
936
+ * master root.
937
+ * @returns the effective root for all locations, or %NULL on error. The root is owned by @tree and should not be freed. It can be referenced using g_object_ref().
938
+ */
939
+ get_master_root(): Gio.File
940
+ /**
941
+ * Returns the #GFile that was previously added through tracker_indexing_tree_add()
942
+ * and would equal or contain `file,` or %NULL if none applies.
943
+ *
944
+ * If the return value is non-%NULL, `directory_flags` would contain the
945
+ * #TrackerDirectoryFlags applying to `file`.
946
+ * @param file a #GFile
947
+ * @returns the effective parent in @tree, or %NULL
948
+ */
949
+ get_root(file: Gio.File): [ /* returnType */ Gio.File, /* directory_flags */ DirectoryFlags ]
950
+ /**
951
+ * Returns the list of indexing roots in `tree`
952
+ * @returns The list of roots, the list itself must be freed with g_list_free(), the list elements are owned by @tree and should not be freed.
953
+ */
954
+ list_roots(): Gio.File[]
955
+ /**
956
+ * Signals either #TrackerIndexingTree::directory-updated or
957
+ * #TrackerIndexingTree::child-updated on the given file and
958
+ * returns #TRUE. If `file` is not indexed according to the
959
+ * #TrackerIndexingTree, #FALSE is returned.
960
+ *
961
+ * If `recursive` is #TRUE, #TrackerIndexingTree::directory-updated
962
+ * will be emitted on the indexing roots that are contained in `file`.
963
+ * @param file a #GFile
964
+ * @param recursive Whether contained indexing roots are affected by the update
965
+ * @returns #TRUE if a signal is emitted.
966
+ */
967
+ notify_update(file: Gio.File, recursive: boolean): boolean
968
+ /**
969
+ * returns %TRUE if `parent` should be indexed based on its contents.
970
+ * @param parent parent directory
971
+ * @param children children within `parent`
972
+ * @returns %TRUE if @parent should be indexed.
973
+ */
974
+ parent_is_indexable(parent: Gio.File, children: Gio.File[]): boolean
975
+ /**
976
+ * Removes `directory` from the indexing tree, note that
977
+ * only directories previously added with tracker_indexing_tree_add()
978
+ * can be effectively removed.
979
+ * @param directory #GFile pointing to a directory
980
+ */
981
+ remove(directory: Gio.File): void
982
+ /**
983
+ * Set the default `policy` (to allow or deny) for content in `tree`
984
+ * based on the type - in this case `filter`. Here, `filter` is a file
985
+ * or directory and there are some other options too.
986
+ *
987
+ * For example, you can (by default), disable indexing all directories
988
+ * using this function.
989
+ * @param filter a #TrackerFilterType
990
+ * @param policy a #TrackerFilterPolicy
991
+ */
992
+ set_default_policy(filter: FilterType, policy: FilterPolicy): void
993
+ /**
994
+ * When indexing content, sometimes it is preferable to ignore hidden
995
+ * content, for example, files prefixed with &quot;.&quot;. This is
996
+ * common for files in a home directory which are usually config
997
+ * files.
998
+ *
999
+ * Sets the indexing policy for `tree` with hidden files and content.
1000
+ * To ignore hidden files, `filter_hidden` should be %TRUE, otherwise
1001
+ * %FALSE.
1002
+ * @param filter_hidden a boolean
1003
+ */
1004
+ set_filter_hidden(filter_hidden: boolean): void
1005
+
1006
+ // Own virtual methods of TrackerMiner-1.0.TrackerMiner.IndexingTree
1007
+
1008
+ vfunc_child_updated(root: Gio.File, child: Gio.File): void
1009
+ vfunc_directory_added(directory: Gio.File): void
1010
+ vfunc_directory_removed(directory: Gio.File): void
1011
+ vfunc_directory_updated(directory: Gio.File): void
1012
+
1013
+ // Own signals of TrackerMiner-1.0.TrackerMiner.IndexingTree
1014
+
1015
+ connect(sigName: "child-updated", callback: IndexingTree.ChildUpdatedSignalCallback): number
1016
+ connect_after(sigName: "child-updated", callback: IndexingTree.ChildUpdatedSignalCallback): number
1017
+ emit(sigName: "child-updated", root: Gio.File, child: Gio.File, ...args: any[]): void
1018
+ connect(sigName: "directory-added", callback: IndexingTree.DirectoryAddedSignalCallback): number
1019
+ connect_after(sigName: "directory-added", callback: IndexingTree.DirectoryAddedSignalCallback): number
1020
+ emit(sigName: "directory-added", directory: Gio.File, ...args: any[]): void
1021
+ connect(sigName: "directory-removed", callback: IndexingTree.DirectoryRemovedSignalCallback): number
1022
+ connect_after(sigName: "directory-removed", callback: IndexingTree.DirectoryRemovedSignalCallback): number
1023
+ emit(sigName: "directory-removed", directory: Gio.File, ...args: any[]): void
1024
+ connect(sigName: "directory-updated", callback: IndexingTree.DirectoryUpdatedSignalCallback): number
1025
+ connect_after(sigName: "directory-updated", callback: IndexingTree.DirectoryUpdatedSignalCallback): number
1026
+ emit(sigName: "directory-updated", directory: Gio.File, ...args: any[]): void
1027
+
1028
+ // Class property signals of TrackerMiner-1.0.TrackerMiner.IndexingTree
1029
+
1030
+ connect(sigName: "notify::filter-hidden", callback: (($obj: IndexingTree, pspec: GObject.ParamSpec) => void)): number
1031
+ connect_after(sigName: "notify::filter-hidden", callback: (($obj: IndexingTree, pspec: GObject.ParamSpec) => void)): number
1032
+ emit(sigName: "notify::filter-hidden", ...args: any[]): void
1033
+ connect(sigName: "notify::root", callback: (($obj: IndexingTree, pspec: GObject.ParamSpec) => void)): number
1034
+ connect_after(sigName: "notify::root", callback: (($obj: IndexingTree, pspec: GObject.ParamSpec) => void)): number
1035
+ emit(sigName: "notify::root", ...args: any[]): void
1036
+ connect(sigName: string, callback: (...args: any[]) => void): number
1037
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
1038
+ emit(sigName: string, ...args: any[]): void
1039
+ disconnect(id: number): void
1040
+ }
1041
+
1042
+ /**
1043
+ * Base object used to configure indexing within #TrackerMinerFS items.
1044
+ * @class
1045
+ */
1046
+ export class IndexingTree extends GObject.Object {
1047
+
1048
+ // Own properties of TrackerMiner-1.0.TrackerMiner.IndexingTree
1049
+
1050
+ static name: string
1051
+ static $gtype: GObject.GType<IndexingTree>
1052
+
1053
+ // Constructors of TrackerMiner-1.0.TrackerMiner.IndexingTree
1054
+
1055
+ constructor(config?: IndexingTree.ConstructorProperties)
1056
+ /**
1057
+ * Returns a newly created #TrackerIndexingTree
1058
+ * @constructor
1059
+ * @returns a newly allocated #TrackerIndexingTree
1060
+ */
1061
+ constructor()
1062
+ /**
1063
+ * Returns a newly created #TrackerIndexingTree
1064
+ * @constructor
1065
+ * @returns a newly allocated #TrackerIndexingTree
1066
+ */
1067
+ static new(): IndexingTree
1068
+ /**
1069
+ * If `root` is %NULL, the default value is 'file:///'. Using %NULL
1070
+ * here is the equivalent to calling tracker_indexing_tree_new() which
1071
+ * takes no `root` argument.
1072
+ * @constructor
1073
+ * @param root The top level URL
1074
+ * @returns a newly allocated #TrackerIndexingTree
1075
+ */
1076
+ static new_with_root(root: Gio.File): IndexingTree
1077
+ _init(config?: IndexingTree.ConstructorProperties): void
1078
+ }
1079
+
1080
+ export module Miner {
1081
+
1082
+ // Signal callback interfaces
1083
+
1084
+ /**
1085
+ * Signal callback interface for `ignore-next-update`
1086
+ */
1087
+ export interface IgnoreNextUpdateSignalCallback {
1088
+ ($obj: Miner, urls: string[]): void
1089
+ }
1090
+
1091
+ /**
1092
+ * Signal callback interface for `paused`
1093
+ */
1094
+ export interface PausedSignalCallback {
1095
+ ($obj: Miner): void
1096
+ }
1097
+
1098
+ /**
1099
+ * Signal callback interface for `progress`
1100
+ */
1101
+ export interface ProgressSignalCallback {
1102
+ ($obj: Miner, status: string | null, progress: number, remaining_time: number): void
1103
+ }
1104
+
1105
+ /**
1106
+ * Signal callback interface for `resumed`
1107
+ */
1108
+ export interface ResumedSignalCallback {
1109
+ ($obj: Miner): void
1110
+ }
1111
+
1112
+ /**
1113
+ * Signal callback interface for `started`
1114
+ */
1115
+ export interface StartedSignalCallback {
1116
+ ($obj: Miner): void
1117
+ }
1118
+
1119
+ /**
1120
+ * Signal callback interface for `stopped`
1121
+ */
1122
+ export interface StoppedSignalCallback {
1123
+ ($obj: Miner): void
1124
+ }
1125
+
1126
+
1127
+ // Constructor properties interface
1128
+
1129
+ export interface ConstructorProperties extends Gio.Initable.ConstructorProperties, GObject.Object.ConstructorProperties {
1130
+
1131
+ // Own constructor properties of TrackerMiner-1.0.TrackerMiner.Miner
1132
+
1133
+ introspection_handler?: any | null
1134
+ introspection_xml?: string | null
1135
+ name?: string | null
1136
+ progress?: number | null
1137
+ remaining_time?: number | null
1138
+ status?: string | null
1139
+ }
1140
+
1141
+ }
1142
+
1143
+ export interface Miner extends Gio.Initable {
1144
+
1145
+ // Own properties of TrackerMiner-1.0.TrackerMiner.Miner
1146
+
1147
+ introspection_handler: any
1148
+ introspection_xml: string | null
1149
+ readonly name: string | null
1150
+ progress: number
1151
+ remaining_time: number
1152
+ status: string | null
1153
+
1154
+ // Own fields of TrackerMiner-1.0.TrackerMiner.Miner
1155
+
1156
+ parent_instance: GObject.Object
1157
+ priv: MinerPrivate
1158
+
1159
+ // Owm methods of TrackerMiner-1.0.TrackerMiner.Miner
1160
+
1161
+ /**
1162
+ * Gets the #TrackerSparqlConnection initialized by `miner`
1163
+ * @returns a #TrackerSparqlConnection.
1164
+ */
1165
+ get_connection(): Tracker.SparqlConnection
1166
+ /**
1167
+ * Gets the #GDBusConnection initialized by `miner`
1168
+ * @returns a #GDBusConnection.
1169
+ */
1170
+ get_dbus_connection(): Gio.DBusConnection
1171
+ /**
1172
+ * Gets the DBus name registered by `miner`
1173
+ * @returns a constant string which should not be modified by the caller.
1174
+ */
1175
+ get_dbus_full_name(): string | null
1176
+ /**
1177
+ * Gets the DBus path registered by `miner`
1178
+ * @returns a constant string which should not be modified by the caller.
1179
+ */
1180
+ get_dbus_full_path(): string | null
1181
+ /**
1182
+ * Returns the number of pause reasons holding `miner` from
1183
+ * indexing contents.
1184
+ * @returns The number of current pause reasons
1185
+ */
1186
+ get_n_pause_reasons(): number
1187
+ /**
1188
+ * Tells the miner to mark `urls` are to ignore on next update.
1189
+ * @param urls the urls to mark as to ignore on next update
1190
+ */
1191
+ ignore_next_update(urls: string[]): void
1192
+ /**
1193
+ * Returns #TRUE if the miner is paused.
1194
+ * @returns #TRUE if the miner is paused.
1195
+ */
1196
+ is_paused(): boolean
1197
+ /**
1198
+ * Returns #TRUE if the miner has been started.
1199
+ * @returns #TRUE if the miner is already started.
1200
+ */
1201
+ is_started(): boolean
1202
+ /**
1203
+ * Asks `miner` to pause. On success the cookie ID is returned,
1204
+ * this is what must be used in tracker_miner_resume() to resume
1205
+ * operations. On failure `error` will be set and -1 will be returned.
1206
+ * @param reason reason to pause
1207
+ * @returns The pause cookie ID.
1208
+ */
1209
+ pause(reason: string | null): number
1210
+ /**
1211
+ * Asks the miner to resume processing. The cookie must be something
1212
+ * returned by tracker_miner_pause(). The miner won't actually resume
1213
+ * operations until all pause requests have been resumed.
1214
+ * @param cookie pause cookie
1215
+ * @returns #TRUE if the cookie was valid.
1216
+ */
1217
+ resume(cookie: number): boolean
1218
+ /**
1219
+ * Tells the miner to start processing data.
1220
+ */
1221
+ start(): void
1222
+ /**
1223
+ * Tells the miner to stop processing data.
1224
+ */
1225
+ stop(): void
1226
+
1227
+ // Own virtual methods of TrackerMiner-1.0.TrackerMiner.Miner
1228
+
1229
+ /**
1230
+ * Tells the miner to mark `urls` are to ignore on next update.
1231
+ * @virtual
1232
+ * @param urls the urls to mark as to ignore on next update
1233
+ */
1234
+ vfunc_ignore_next_update(urls: string[]): void
1235
+ vfunc_paused(): void
1236
+ vfunc_progress(status: string | null, progress: number): void
1237
+ vfunc_resumed(): void
1238
+ vfunc_started(): void
1239
+ vfunc_stopped(): void
1240
+
1241
+ // Own signals of TrackerMiner-1.0.TrackerMiner.Miner
1242
+
1243
+ connect(sigName: "ignore-next-update", callback: Miner.IgnoreNextUpdateSignalCallback): number
1244
+ connect_after(sigName: "ignore-next-update", callback: Miner.IgnoreNextUpdateSignalCallback): number
1245
+ emit(sigName: "ignore-next-update", urls: string[], ...args: any[]): void
1246
+ connect(sigName: "paused", callback: Miner.PausedSignalCallback): number
1247
+ connect_after(sigName: "paused", callback: Miner.PausedSignalCallback): number
1248
+ emit(sigName: "paused", ...args: any[]): void
1249
+ connect(sigName: "progress", callback: Miner.ProgressSignalCallback): number
1250
+ connect_after(sigName: "progress", callback: Miner.ProgressSignalCallback): number
1251
+ emit(sigName: "progress", status: string | null, progress: number, remaining_time: number, ...args: any[]): void
1252
+ connect(sigName: "resumed", callback: Miner.ResumedSignalCallback): number
1253
+ connect_after(sigName: "resumed", callback: Miner.ResumedSignalCallback): number
1254
+ emit(sigName: "resumed", ...args: any[]): void
1255
+ connect(sigName: "started", callback: Miner.StartedSignalCallback): number
1256
+ connect_after(sigName: "started", callback: Miner.StartedSignalCallback): number
1257
+ emit(sigName: "started", ...args: any[]): void
1258
+ connect(sigName: "stopped", callback: Miner.StoppedSignalCallback): number
1259
+ connect_after(sigName: "stopped", callback: Miner.StoppedSignalCallback): number
1260
+ emit(sigName: "stopped", ...args: any[]): void
1261
+
1262
+ // Class property signals of TrackerMiner-1.0.TrackerMiner.Miner
1263
+
1264
+ connect(sigName: "notify::introspection-handler", callback: (($obj: Miner, pspec: GObject.ParamSpec) => void)): number
1265
+ connect_after(sigName: "notify::introspection-handler", callback: (($obj: Miner, pspec: GObject.ParamSpec) => void)): number
1266
+ emit(sigName: "notify::introspection-handler", ...args: any[]): void
1267
+ connect(sigName: "notify::introspection-xml", callback: (($obj: Miner, pspec: GObject.ParamSpec) => void)): number
1268
+ connect_after(sigName: "notify::introspection-xml", callback: (($obj: Miner, pspec: GObject.ParamSpec) => void)): number
1269
+ emit(sigName: "notify::introspection-xml", ...args: any[]): void
1270
+ connect(sigName: "notify::name", callback: (($obj: Miner, pspec: GObject.ParamSpec) => void)): number
1271
+ connect_after(sigName: "notify::name", callback: (($obj: Miner, pspec: GObject.ParamSpec) => void)): number
1272
+ emit(sigName: "notify::name", ...args: any[]): void
1273
+ connect(sigName: "notify::progress", callback: (($obj: Miner, pspec: GObject.ParamSpec) => void)): number
1274
+ connect_after(sigName: "notify::progress", callback: (($obj: Miner, pspec: GObject.ParamSpec) => void)): number
1275
+ emit(sigName: "notify::progress", ...args: any[]): void
1276
+ connect(sigName: "notify::remaining-time", callback: (($obj: Miner, pspec: GObject.ParamSpec) => void)): number
1277
+ connect_after(sigName: "notify::remaining-time", callback: (($obj: Miner, pspec: GObject.ParamSpec) => void)): number
1278
+ emit(sigName: "notify::remaining-time", ...args: any[]): void
1279
+ connect(sigName: "notify::status", callback: (($obj: Miner, pspec: GObject.ParamSpec) => void)): number
1280
+ connect_after(sigName: "notify::status", callback: (($obj: Miner, pspec: GObject.ParamSpec) => void)): number
1281
+ emit(sigName: "notify::status", ...args: any[]): void
1282
+ connect(sigName: string, callback: (...args: any[]) => void): number
1283
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
1284
+ emit(sigName: string, ...args: any[]): void
1285
+ disconnect(id: number): void
1286
+ }
1287
+
1288
+ /**
1289
+ * Abstract miner object.
1290
+ * @class
1291
+ */
1292
+ export class Miner extends GObject.Object {
1293
+
1294
+ // Own properties of TrackerMiner-1.0.TrackerMiner.Miner
1295
+
1296
+ static name: string
1297
+ static $gtype: GObject.GType<Miner>
1298
+
1299
+ // Constructors of TrackerMiner-1.0.TrackerMiner.Miner
1300
+
1301
+ constructor(config?: Miner.ConstructorProperties)
1302
+ _init(config?: Miner.ConstructorProperties): void
1303
+ /**
1304
+ * Gives the caller the #GQuark used to identify #TrackerMiner errors
1305
+ * in #GError structures. The #GQuark is used as the domain for the error.
1306
+ * @returns the #GQuark used for the domain of a #GError.
1307
+ */
1308
+ static error_quark(): GLib.Quark
1309
+ }
1310
+
1311
+ export module MinerFS {
1312
+
1313
+ // Signal callback interfaces
1314
+
1315
+ /**
1316
+ * Signal callback interface for `finished`
1317
+ */
1318
+ export interface FinishedSignalCallback {
1319
+ ($obj: MinerFS, elapsed: number, directories_found: number, directories_ignored: number, files_found: number, files_ignored: number): void
1320
+ }
1321
+
1322
+ /**
1323
+ * Signal callback interface for `finished-root`
1324
+ */
1325
+ export interface FinishedRootSignalCallback {
1326
+ ($obj: MinerFS, file: Gio.File): void
1327
+ }
1328
+
1329
+ /**
1330
+ * Signal callback interface for `ignore-next-update-file`
1331
+ */
1332
+ export interface IgnoreNextUpdateFileSignalCallback {
1333
+ ($obj: MinerFS, file: Gio.File, builder: Tracker.SparqlBuilder, cancellable: Gio.Cancellable | null): boolean
1334
+ }
1335
+
1336
+ /**
1337
+ * Signal callback interface for `process-file`
1338
+ */
1339
+ export interface ProcessFileSignalCallback {
1340
+ ($obj: MinerFS, file: Gio.File, builder: Tracker.SparqlBuilder, cancellable: Gio.Cancellable | null): boolean
1341
+ }
1342
+
1343
+ /**
1344
+ * Signal callback interface for `process-file-attributes`
1345
+ */
1346
+ export interface ProcessFileAttributesSignalCallback {
1347
+ ($obj: MinerFS, file: Gio.File, builder: Tracker.SparqlBuilder, cancellable: Gio.Cancellable | null): boolean
1348
+ }
1349
+
1350
+ /**
1351
+ * Signal callback interface for `remove-file`
1352
+ */
1353
+ export interface RemoveFileSignalCallback {
1354
+ ($obj: MinerFS, file: Gio.File, children_only: boolean, builder: Tracker.SparqlBuilder): boolean
1355
+ }
1356
+
1357
+ /**
1358
+ * Signal callback interface for `writeback-file`
1359
+ */
1360
+ export interface WritebackFileSignalCallback {
1361
+ ($obj: MinerFS, file: Gio.File, rdf_types: string[], results: any[], cancellable: Gio.Cancellable | null): boolean
1362
+ }
1363
+
1364
+
1365
+ // Constructor properties interface
1366
+
1367
+ export interface ConstructorProperties extends Gio.Initable.ConstructorProperties, Miner.ConstructorProperties {
1368
+
1369
+ // Own constructor properties of TrackerMiner-1.0.TrackerMiner.MinerFS
1370
+
1371
+ data_provider?: DataProvider | null
1372
+ initial_crawling?: boolean | null
1373
+ mtime_checking?: boolean | null
1374
+ processing_pool_ready_limit?: number | null
1375
+ processing_pool_wait_limit?: number | null
1376
+ root?: Gio.File | null
1377
+ throttle?: number | null
1378
+ }
1379
+
1380
+ }
1381
+
1382
+ export interface MinerFS extends Gio.Initable {
1383
+
1384
+ // Own properties of TrackerMiner-1.0.TrackerMiner.MinerFS
1385
+
1386
+ readonly data_provider: DataProvider
1387
+ initial_crawling: boolean
1388
+ mtime_checking: boolean
1389
+ processing_pool_ready_limit: number
1390
+ processing_pool_wait_limit: number
1391
+ readonly root: Gio.File
1392
+ throttle: number
1393
+
1394
+ // Own fields of TrackerMiner-1.0.TrackerMiner.MinerFS
1395
+
1396
+ parent: Miner
1397
+ priv: any
1398
+
1399
+ // Owm methods of TrackerMiner-1.0.TrackerMiner.MinerFS
1400
+
1401
+ /**
1402
+ * Tells the miner-fs that the given #GFile corresponds to a
1403
+ * directory which was created in the store without a specific
1404
+ * parent object. In this case, when regenerating internal
1405
+ * caches, an extra query will be done so that these elements
1406
+ * are taken into account.
1407
+ * @param file a #GFile
1408
+ */
1409
+ add_directory_without_parent(file: Gio.File): void
1410
+ /**
1411
+ * Tells the filesystem miner to check and index a directory,
1412
+ * this file must be part of the usual crawling directories
1413
+ * of #TrackerMinerFS. See tracker_miner_fs_directory_add().
1414
+ * @param file #GFile for the directory to check
1415
+ * @param check_parents whether to check parents and eligibility or not
1416
+ */
1417
+ check_directory(file: Gio.File, check_parents: boolean): void
1418
+ /**
1419
+ * Tells the filesystem miner to check and index a directory at
1420
+ * a given priority, this file must be part of the usual crawling
1421
+ * directories of #TrackerMinerFS. See tracker_miner_fs_directory_add().
1422
+ * @param file #GFile for the directory to check
1423
+ * @param priority the priority of the check task
1424
+ * @param check_parents whether to check parents and eligibility or not
1425
+ */
1426
+ check_directory_with_priority(file: Gio.File, priority: number, check_parents: boolean): void
1427
+ /**
1428
+ * Tells the filesystem miner to check and index a file,
1429
+ * this file must be part of the usual crawling directories
1430
+ * of #TrackerMinerFS. See tracker_miner_fs_directory_add().
1431
+ * @param file #GFile for the file to check
1432
+ * @param check_parents whether to check parents and eligibility or not
1433
+ */
1434
+ check_file(file: Gio.File, check_parents: boolean): void
1435
+ /**
1436
+ * Tells the filesystem miner to check and index a file at
1437
+ * a given priority, this file must be part of the usual
1438
+ * crawling directories of #TrackerMinerFS. See
1439
+ * tracker_miner_fs_directory_add().
1440
+ * @param file #GFile for the file to check
1441
+ * @param priority the priority of the check task
1442
+ * @param check_parents whether to check parents and eligibility or not
1443
+ */
1444
+ check_file_with_priority(file: Gio.File, priority: number, check_parents: boolean): void
1445
+ /**
1446
+ * Tells the filesystem miner to inspect a directory.
1447
+ * @param file #GFile for the directory to inspect
1448
+ * @param recurse whether the directory should be inspected recursively
1449
+ */
1450
+ directory_add(file: Gio.File, recurse: boolean): void
1451
+ /**
1452
+ * Removes a directory from being inspected by `fs`. Note that only directory
1453
+ * watches are removed.
1454
+ * @param file #GFile for the directory to be removed
1455
+ * @returns %TRUE if the directory was successfully removed.
1456
+ */
1457
+ directory_remove(file: Gio.File): boolean
1458
+ /**
1459
+ * Removes a directory from being inspected by `fs,` and removes all
1460
+ * associated metadata of the directory (and its contents) from the
1461
+ * store.
1462
+ * @param file #GFile for the directory to be removed
1463
+ * @returns %TRUE if the directory was successfully removed.
1464
+ */
1465
+ directory_remove_full(file: Gio.File): boolean
1466
+ /**
1467
+ * Notifies `fs` that all processing on `file` has been finished, if any error
1468
+ * happened during file data processing, it should be passed in `error,` else
1469
+ * that parameter will contain %NULL to reflect success.
1470
+ * @param file a #GFile
1471
+ * @param error a #GError with the error that happened during processing, or %NULL.
1472
+ */
1473
+ file_notify(file: Gio.File, error: GLib.Error): void
1474
+ /**
1475
+ * Tells `fs` to force mtime checking (regardless of the global mtime check
1476
+ * configuration) on the given `directory`.
1477
+ * @param directory a #GFile representing the directory
1478
+ */
1479
+ force_mtime_checking(directory: Gio.File): void
1480
+ force_recheck(): void
1481
+ /**
1482
+ * Returns the #TrackerDataProvider implementation, which is being used
1483
+ * to supply #GFile and #GFileInfo content to Tracker.
1484
+ * @returns The #TrackerDataProvider supplying content
1485
+ */
1486
+ get_data_provider(): DataProvider
1487
+ /**
1488
+ * Returns the #TrackerIndexingTree which determines
1489
+ * what files/directories are indexed by `fs`
1490
+ * @returns The #TrackerIndexingTree holding the indexing configuration
1491
+ */
1492
+ get_indexing_tree(): IndexingTree
1493
+ /**
1494
+ * Returns a boolean which indicates if the indexing tree is crawled
1495
+ * upon start up or not. This may be set to %FALSE if working
1496
+ * prodominently with cloud data where you can't perform these checks.
1497
+ * By default and for local file systems, this is enabled.
1498
+ * @returns %TRUE if a file system structure is crawled for new updates on start up, otherwise %FALSE.
1499
+ */
1500
+ get_initial_crawling(): boolean
1501
+ /**
1502
+ * Returns a boolean used to identify if file modification time checks
1503
+ * are performed when processing content. This may be set to %FALSE if
1504
+ * working prodominently with cloud data where you can't perform these
1505
+ * checks. By default and for local file systems, this is enabled.
1506
+ * @returns %TRUE if mtime checks for directories against the database are done when @fs crawls the file system, otherwise %FALSE.
1507
+ */
1508
+ get_mtime_checking(): boolean
1509
+ /**
1510
+ * If `file` is currently being processed by `fs,` this function
1511
+ * will return the parent folder URN if any. This function is
1512
+ * useful to set the nie:belongsToContainer relationship. The
1513
+ * processing order of #TrackerMinerFS guarantees that a folder
1514
+ * has been already fully processed for indexing before any
1515
+ * children is processed, so most usually this function should
1516
+ * return non-%NULL.
1517
+ * @param file a #GFile obtained in #TrackerMinerFS::process-file
1518
+ * @returns The parent folder URN, or %NULL.
1519
+ */
1520
+ get_parent_urn(file: Gio.File): string | null
1521
+ /**
1522
+ * Gets the current throttle value, see
1523
+ * tracker_miner_fs_set_throttle() for more details.
1524
+ * @returns a double representing a value between 0.0 and 1.0.
1525
+ */
1526
+ get_throttle(): number
1527
+ /**
1528
+ * If the item exists in the store, this function retrieves
1529
+ * the URN for a #GFile being currently processed.
1530
+ *
1531
+ * If `file` is not being currently processed by `fs,` or doesn't
1532
+ * exist in the store yet, %NULL will be returned.
1533
+ * @param file a #GFile obtained in #TrackerMinerFS::process-file
1534
+ * @returns The URN containing the data associated to @file, or %NULL.
1535
+ */
1536
+ get_urn(file: Gio.File): string | null
1537
+ /**
1538
+ * The `fs` keeps many priority queus for content it is processing.
1539
+ * This function returns %TRUE if the sum of all (or any) priority
1540
+ * queues is more than 0. This includes items deleted, created,
1541
+ * updated, moved or being written back.
1542
+ * @returns %TRUE if there are items to process in the internal queues, otherwise %FALSE.
1543
+ */
1544
+ has_items_to_process(): boolean
1545
+ /**
1546
+ * If the item exists in the store, this function retrieves
1547
+ * the URN of the given #GFile
1548
+ *
1549
+ * If `file` doesn't exist in the store yet, %NULL will be returned.
1550
+ * @param file a #GFile
1551
+ * @returns A newly allocated string with the URN containing the data associated to @file, or %NULL.
1552
+ */
1553
+ query_urn(file: Gio.File): string | null
1554
+ /**
1555
+ * Tells the `fs` that crawling the #TrackerIndexingTree should happen
1556
+ * initially. This is actually required to set up file system monitor
1557
+ * using technologies like inotify, etc.
1558
+ *
1559
+ * Setting this to #FALSE can dramatically improve the start up the
1560
+ * crawling of the `fs`.
1561
+ *
1562
+ * The down side is that using this consistently means that some files
1563
+ * on the disk may be out of date with files in the database.
1564
+ *
1565
+ * The main purpose of this function is for systems where a `fs` is
1566
+ * running the entire time and where it is very unlikely that a file
1567
+ * could be changed outside between startup and shutdown of the
1568
+ * process using this API.
1569
+ *
1570
+ * The default if not set directly is that `do_initial_crawling` is %TRUE.
1571
+ * @param do_initial_crawling a #gboolean
1572
+ */
1573
+ set_initial_crawling(do_initial_crawling: boolean): void
1574
+ /**
1575
+ * Tells the miner-fs that during the crawling phase, directory mtime
1576
+ * checks should or shouldn't be performed against the database to
1577
+ * make sure we have the most up to date version of the file being
1578
+ * checked at the time. Setting this to #FALSE can dramatically
1579
+ * improve the start up the crawling of the `fs`.
1580
+ *
1581
+ * The down side is that using this consistently means that some files
1582
+ * on the disk may be out of date with files in the database.
1583
+ *
1584
+ * The main purpose of this function is for systems where a `fs` is
1585
+ * running the entire time and where it is very unlikely that a file
1586
+ * could be changed outside between startup and shutdown of the
1587
+ * process using this API.
1588
+ *
1589
+ * The default if not set directly is that `mtime_checking` is %TRUE.
1590
+ * @param mtime_checking a #gboolean
1591
+ */
1592
+ set_mtime_checking(mtime_checking: boolean): void
1593
+ /**
1594
+ * Tells the filesystem miner to throttle its operations. A value of
1595
+ * 0.0 means no throttling at all, so the miner will perform
1596
+ * operations at full speed, 1.0 is the slowest value. With a value of
1597
+ * 1.0, the `fs` is typically waiting one full second before handling
1598
+ * the next batch of queued items to be processed.
1599
+ * @param throttle a double between 0.0 and 1.0
1600
+ */
1601
+ set_throttle(throttle: number): void
1602
+ /**
1603
+ * Tells the filesystem miner to writeback a file.
1604
+ * @param file #GFile for the file to check
1605
+ * @param rdf_types A #GStrv with rdf types
1606
+ * @param results A array of results from the preparation query
1607
+ */
1608
+ writeback_file(file: Gio.File, rdf_types: string[], results: any[]): void
1609
+ /**
1610
+ * Notifies `fs` that all writing back on `file` has been finished, if any error
1611
+ * happened during file data processing, it should be passed in `error,` else
1612
+ * that parameter will contain %NULL to reflect success.
1613
+ * @param file a #GFile
1614
+ * @param error a #GError with the error that happened during processing, or %NULL.
1615
+ */
1616
+ writeback_notify(file: Gio.File, error: GLib.Error): void
1617
+
1618
+ // Own virtual methods of TrackerMiner-1.0.TrackerMiner.MinerFS
1619
+
1620
+ vfunc_finished(elapsed: number, directories_found: number, directories_ignored: number, files_found: number, files_ignored: number): void
1621
+ vfunc_finished_root(root: Gio.File, directories_found: number, directories_ignored: number, files_found: number, files_ignored: number): void
1622
+ vfunc_ignore_next_update_file(file: Gio.File, builder: Tracker.SparqlBuilder, cancellable: Gio.Cancellable | null): boolean
1623
+ vfunc_process_file(file: Gio.File, builder: Tracker.SparqlBuilder, cancellable: Gio.Cancellable | null): boolean
1624
+ vfunc_process_file_attributes(file: Gio.File, builder: Tracker.SparqlBuilder, cancellable: Gio.Cancellable | null): boolean
1625
+ vfunc_remove_file(file: Gio.File, children_only: boolean, builder: Tracker.SparqlBuilder): boolean
1626
+
1627
+ // Own signals of TrackerMiner-1.0.TrackerMiner.MinerFS
1628
+
1629
+ connect(sigName: "finished", callback: MinerFS.FinishedSignalCallback): number
1630
+ connect_after(sigName: "finished", callback: MinerFS.FinishedSignalCallback): number
1631
+ emit(sigName: "finished", elapsed: number, directories_found: number, directories_ignored: number, files_found: number, files_ignored: number, ...args: any[]): void
1632
+ connect(sigName: "finished-root", callback: MinerFS.FinishedRootSignalCallback): number
1633
+ connect_after(sigName: "finished-root", callback: MinerFS.FinishedRootSignalCallback): number
1634
+ emit(sigName: "finished-root", file: Gio.File, ...args: any[]): void
1635
+ connect(sigName: "ignore-next-update-file", callback: MinerFS.IgnoreNextUpdateFileSignalCallback): number
1636
+ connect_after(sigName: "ignore-next-update-file", callback: MinerFS.IgnoreNextUpdateFileSignalCallback): number
1637
+ emit(sigName: "ignore-next-update-file", file: Gio.File, builder: Tracker.SparqlBuilder, cancellable: Gio.Cancellable | null, ...args: any[]): void
1638
+ connect(sigName: "process-file", callback: MinerFS.ProcessFileSignalCallback): number
1639
+ connect_after(sigName: "process-file", callback: MinerFS.ProcessFileSignalCallback): number
1640
+ emit(sigName: "process-file", file: Gio.File, builder: Tracker.SparqlBuilder, cancellable: Gio.Cancellable | null, ...args: any[]): void
1641
+ connect(sigName: "process-file-attributes", callback: MinerFS.ProcessFileAttributesSignalCallback): number
1642
+ connect_after(sigName: "process-file-attributes", callback: MinerFS.ProcessFileAttributesSignalCallback): number
1643
+ emit(sigName: "process-file-attributes", file: Gio.File, builder: Tracker.SparqlBuilder, cancellable: Gio.Cancellable | null, ...args: any[]): void
1644
+ connect(sigName: "remove-file", callback: MinerFS.RemoveFileSignalCallback): number
1645
+ connect_after(sigName: "remove-file", callback: MinerFS.RemoveFileSignalCallback): number
1646
+ emit(sigName: "remove-file", file: Gio.File, children_only: boolean, builder: Tracker.SparqlBuilder, ...args: any[]): void
1647
+ connect(sigName: "writeback-file", callback: MinerFS.WritebackFileSignalCallback): number
1648
+ connect_after(sigName: "writeback-file", callback: MinerFS.WritebackFileSignalCallback): number
1649
+ emit(sigName: "writeback-file", file: Gio.File, rdf_types: string[], results: any[], cancellable: Gio.Cancellable | null, ...args: any[]): void
1650
+
1651
+ // Class property signals of TrackerMiner-1.0.TrackerMiner.MinerFS
1652
+
1653
+ connect(sigName: "notify::data-provider", callback: (($obj: MinerFS, pspec: GObject.ParamSpec) => void)): number
1654
+ connect_after(sigName: "notify::data-provider", callback: (($obj: MinerFS, pspec: GObject.ParamSpec) => void)): number
1655
+ emit(sigName: "notify::data-provider", ...args: any[]): void
1656
+ connect(sigName: "notify::initial-crawling", callback: (($obj: MinerFS, pspec: GObject.ParamSpec) => void)): number
1657
+ connect_after(sigName: "notify::initial-crawling", callback: (($obj: MinerFS, pspec: GObject.ParamSpec) => void)): number
1658
+ emit(sigName: "notify::initial-crawling", ...args: any[]): void
1659
+ connect(sigName: "notify::mtime-checking", callback: (($obj: MinerFS, pspec: GObject.ParamSpec) => void)): number
1660
+ connect_after(sigName: "notify::mtime-checking", callback: (($obj: MinerFS, pspec: GObject.ParamSpec) => void)): number
1661
+ emit(sigName: "notify::mtime-checking", ...args: any[]): void
1662
+ connect(sigName: "notify::processing-pool-ready-limit", callback: (($obj: MinerFS, pspec: GObject.ParamSpec) => void)): number
1663
+ connect_after(sigName: "notify::processing-pool-ready-limit", callback: (($obj: MinerFS, pspec: GObject.ParamSpec) => void)): number
1664
+ emit(sigName: "notify::processing-pool-ready-limit", ...args: any[]): void
1665
+ connect(sigName: "notify::processing-pool-wait-limit", callback: (($obj: MinerFS, pspec: GObject.ParamSpec) => void)): number
1666
+ connect_after(sigName: "notify::processing-pool-wait-limit", callback: (($obj: MinerFS, pspec: GObject.ParamSpec) => void)): number
1667
+ emit(sigName: "notify::processing-pool-wait-limit", ...args: any[]): void
1668
+ connect(sigName: "notify::root", callback: (($obj: MinerFS, pspec: GObject.ParamSpec) => void)): number
1669
+ connect_after(sigName: "notify::root", callback: (($obj: MinerFS, pspec: GObject.ParamSpec) => void)): number
1670
+ emit(sigName: "notify::root", ...args: any[]): void
1671
+ connect(sigName: "notify::throttle", callback: (($obj: MinerFS, pspec: GObject.ParamSpec) => void)): number
1672
+ connect_after(sigName: "notify::throttle", callback: (($obj: MinerFS, pspec: GObject.ParamSpec) => void)): number
1673
+ emit(sigName: "notify::throttle", ...args: any[]): void
1674
+ connect(sigName: "notify::introspection-handler", callback: (($obj: MinerFS, pspec: GObject.ParamSpec) => void)): number
1675
+ connect_after(sigName: "notify::introspection-handler", callback: (($obj: MinerFS, pspec: GObject.ParamSpec) => void)): number
1676
+ emit(sigName: "notify::introspection-handler", ...args: any[]): void
1677
+ connect(sigName: "notify::introspection-xml", callback: (($obj: MinerFS, pspec: GObject.ParamSpec) => void)): number
1678
+ connect_after(sigName: "notify::introspection-xml", callback: (($obj: MinerFS, pspec: GObject.ParamSpec) => void)): number
1679
+ emit(sigName: "notify::introspection-xml", ...args: any[]): void
1680
+ connect(sigName: "notify::name", callback: (($obj: MinerFS, pspec: GObject.ParamSpec) => void)): number
1681
+ connect_after(sigName: "notify::name", callback: (($obj: MinerFS, pspec: GObject.ParamSpec) => void)): number
1682
+ emit(sigName: "notify::name", ...args: any[]): void
1683
+ connect(sigName: "notify::progress", callback: (($obj: MinerFS, pspec: GObject.ParamSpec) => void)): number
1684
+ connect_after(sigName: "notify::progress", callback: (($obj: MinerFS, pspec: GObject.ParamSpec) => void)): number
1685
+ emit(sigName: "notify::progress", ...args: any[]): void
1686
+ connect(sigName: "notify::remaining-time", callback: (($obj: MinerFS, pspec: GObject.ParamSpec) => void)): number
1687
+ connect_after(sigName: "notify::remaining-time", callback: (($obj: MinerFS, pspec: GObject.ParamSpec) => void)): number
1688
+ emit(sigName: "notify::remaining-time", ...args: any[]): void
1689
+ connect(sigName: "notify::status", callback: (($obj: MinerFS, pspec: GObject.ParamSpec) => void)): number
1690
+ connect_after(sigName: "notify::status", callback: (($obj: MinerFS, pspec: GObject.ParamSpec) => void)): number
1691
+ emit(sigName: "notify::status", ...args: any[]): void
1692
+ connect(sigName: string, callback: (...args: any[]) => void): number
1693
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
1694
+ emit(sigName: string, ...args: any[]): void
1695
+ disconnect(id: number): void
1696
+ }
1697
+
1698
+ /**
1699
+ * Abstract miner implementation to get data from the filesystem.
1700
+ * @class
1701
+ */
1702
+ export class MinerFS extends Miner {
1703
+
1704
+ // Own properties of TrackerMiner-1.0.TrackerMiner.MinerFS
1705
+
1706
+ static name: string
1707
+ static $gtype: GObject.GType<MinerFS>
1708
+
1709
+ // Constructors of TrackerMiner-1.0.TrackerMiner.MinerFS
1710
+
1711
+ constructor(config?: MinerFS.ConstructorProperties)
1712
+ _init(config?: MinerFS.ConstructorProperties): void
1713
+ /**
1714
+ * Gives the caller the #GQuark used to identify #TrackerMinerFS errors
1715
+ * in #GError structures. The #GQuark is used as the domain for the error.
1716
+ * @returns the #GQuark used for the domain of a #GError.
1717
+ */
1718
+ static error_quark(): GLib.Quark
1719
+ }
1720
+
1721
+ export module MinerOnline {
1722
+
1723
+ // Signal callback interfaces
1724
+
1725
+ /**
1726
+ * Signal callback interface for `connected`
1727
+ */
1728
+ export interface ConnectedSignalCallback {
1729
+ ($obj: MinerOnline, type: NetworkType): boolean
1730
+ }
1731
+
1732
+ /**
1733
+ * Signal callback interface for `disconnected`
1734
+ */
1735
+ export interface DisconnectedSignalCallback {
1736
+ ($obj: MinerOnline): void
1737
+ }
1738
+
1739
+
1740
+ // Constructor properties interface
1741
+
1742
+ export interface ConstructorProperties extends Gio.Initable.ConstructorProperties, Miner.ConstructorProperties {
1743
+ }
1744
+
1745
+ }
1746
+
1747
+ export interface MinerOnline extends Gio.Initable {
1748
+
1749
+ // Own properties of TrackerMiner-1.0.TrackerMiner.MinerOnline
1750
+
1751
+ readonly network_type: NetworkType
1752
+
1753
+ // Own fields of TrackerMiner-1.0.TrackerMiner.MinerOnline
1754
+
1755
+ parent_instance: Miner & GObject.Object
1756
+
1757
+ // Owm methods of TrackerMiner-1.0.TrackerMiner.MinerOnline
1758
+
1759
+ /**
1760
+ * Get the type of network this data `miner` uses to index content.
1761
+ * @returns a #TrackerNetworkType on success or #TRACKER_NETWORK_TYPE_NONE on error.
1762
+ */
1763
+ get_network_type(): NetworkType
1764
+
1765
+ // Own virtual methods of TrackerMiner-1.0.TrackerMiner.MinerOnline
1766
+
1767
+ vfunc_connected(network: NetworkType): boolean
1768
+ vfunc_disconnected(): void
1769
+
1770
+ // Own signals of TrackerMiner-1.0.TrackerMiner.MinerOnline
1771
+
1772
+ connect(sigName: "connected", callback: MinerOnline.ConnectedSignalCallback): number
1773
+ connect_after(sigName: "connected", callback: MinerOnline.ConnectedSignalCallback): number
1774
+ emit(sigName: "connected", type: NetworkType, ...args: any[]): void
1775
+ connect(sigName: "disconnected", callback: MinerOnline.DisconnectedSignalCallback): number
1776
+ connect_after(sigName: "disconnected", callback: MinerOnline.DisconnectedSignalCallback): number
1777
+ emit(sigName: "disconnected", ...args: any[]): void
1778
+
1779
+ // Class property signals of TrackerMiner-1.0.TrackerMiner.MinerOnline
1780
+
1781
+ connect(sigName: "notify::network-type", callback: (($obj: MinerOnline, pspec: GObject.ParamSpec) => void)): number
1782
+ connect_after(sigName: "notify::network-type", callback: (($obj: MinerOnline, pspec: GObject.ParamSpec) => void)): number
1783
+ emit(sigName: "notify::network-type", ...args: any[]): void
1784
+ connect(sigName: "notify::introspection-handler", callback: (($obj: MinerOnline, pspec: GObject.ParamSpec) => void)): number
1785
+ connect_after(sigName: "notify::introspection-handler", callback: (($obj: MinerOnline, pspec: GObject.ParamSpec) => void)): number
1786
+ emit(sigName: "notify::introspection-handler", ...args: any[]): void
1787
+ connect(sigName: "notify::introspection-xml", callback: (($obj: MinerOnline, pspec: GObject.ParamSpec) => void)): number
1788
+ connect_after(sigName: "notify::introspection-xml", callback: (($obj: MinerOnline, pspec: GObject.ParamSpec) => void)): number
1789
+ emit(sigName: "notify::introspection-xml", ...args: any[]): void
1790
+ connect(sigName: "notify::name", callback: (($obj: MinerOnline, pspec: GObject.ParamSpec) => void)): number
1791
+ connect_after(sigName: "notify::name", callback: (($obj: MinerOnline, pspec: GObject.ParamSpec) => void)): number
1792
+ emit(sigName: "notify::name", ...args: any[]): void
1793
+ connect(sigName: "notify::progress", callback: (($obj: MinerOnline, pspec: GObject.ParamSpec) => void)): number
1794
+ connect_after(sigName: "notify::progress", callback: (($obj: MinerOnline, pspec: GObject.ParamSpec) => void)): number
1795
+ emit(sigName: "notify::progress", ...args: any[]): void
1796
+ connect(sigName: "notify::remaining-time", callback: (($obj: MinerOnline, pspec: GObject.ParamSpec) => void)): number
1797
+ connect_after(sigName: "notify::remaining-time", callback: (($obj: MinerOnline, pspec: GObject.ParamSpec) => void)): number
1798
+ emit(sigName: "notify::remaining-time", ...args: any[]): void
1799
+ connect(sigName: "notify::status", callback: (($obj: MinerOnline, pspec: GObject.ParamSpec) => void)): number
1800
+ connect_after(sigName: "notify::status", callback: (($obj: MinerOnline, pspec: GObject.ParamSpec) => void)): number
1801
+ emit(sigName: "notify::status", ...args: any[]): void
1802
+ connect(sigName: string, callback: (...args: any[]) => void): number
1803
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
1804
+ emit(sigName: string, ...args: any[]): void
1805
+ disconnect(id: number): void
1806
+ }
1807
+
1808
+ /**
1809
+ * Abstract miner object for data requiring connectivity.
1810
+ * @class
1811
+ */
1812
+ export class MinerOnline extends Miner {
1813
+
1814
+ // Own properties of TrackerMiner-1.0.TrackerMiner.MinerOnline
1815
+
1816
+ static name: string
1817
+ static $gtype: GObject.GType<MinerOnline>
1818
+
1819
+ // Constructors of TrackerMiner-1.0.TrackerMiner.MinerOnline
1820
+
1821
+ constructor(config?: MinerOnline.ConstructorProperties)
1822
+ _init(config?: MinerOnline.ConstructorProperties): void
1823
+ }
1824
+
1825
+ export interface DataProviderIface {
1826
+
1827
+ // Own fields of TrackerMiner-1.0.TrackerMiner.DataProviderIface
1828
+
1829
+ /**
1830
+ * Parent interface type.
1831
+ * @field
1832
+ */
1833
+ g_iface: GObject.TypeInterface
1834
+ begin: (data_provider: DataProvider, url: Gio.File, attributes: string | null, flags: DirectoryFlags, cancellable: Gio.Cancellable | null) => Enumerator
1835
+ begin_async: (data_provider: DataProvider, url: Gio.File, attributes: string | null, flags: DirectoryFlags, io_priority: number, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback | null) => void
1836
+ begin_finish: (data_provider: DataProvider, result: Gio.AsyncResult) => Enumerator
1837
+ end: (data_provider: DataProvider, enumerator: Enumerator, cancellable: Gio.Cancellable | null) => boolean
1838
+ end_async: (data_provider: DataProvider, enumerator: Enumerator, io_priority: number, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback | null) => void
1839
+ end_finish: (data_provider: DataProvider, result: Gio.AsyncResult) => boolean
1840
+ }
1841
+
1842
+ /**
1843
+ * Virtual methods left to implement.
1844
+ * @record
1845
+ */
1846
+ export abstract class DataProviderIface {
1847
+
1848
+ // Own properties of TrackerMiner-1.0.TrackerMiner.DataProviderIface
1849
+
1850
+ static name: string
1851
+ }
1852
+
1853
+ export interface DecoratorClass {
1854
+
1855
+ // Own fields of TrackerMiner-1.0.TrackerMiner.DecoratorClass
1856
+
1857
+ /**
1858
+ * parent object class.
1859
+ * @field
1860
+ */
1861
+ parent_class: MinerClass
1862
+ items_available: (decorator: Decorator) => void
1863
+ finished: (decorator: Decorator) => void
1864
+ /**
1865
+ * Reserved for future API improvements.
1866
+ * @field
1867
+ */
1868
+ padding: any[]
1869
+ }
1870
+
1871
+ /**
1872
+ * An implementation that takes care of extracting extra metadata
1873
+ * specific to file types by talking to tracker-extract.
1874
+ *
1875
+ * Based on #TrackerMinerClass.
1876
+ * @record
1877
+ */
1878
+ export abstract class DecoratorClass {
1879
+
1880
+ // Own properties of TrackerMiner-1.0.TrackerMiner.DecoratorClass
1881
+
1882
+ static name: string
1883
+ }
1884
+
1885
+ export interface DecoratorFSClass {
1886
+
1887
+ // Own fields of TrackerMiner-1.0.TrackerMiner.DecoratorFSClass
1888
+
1889
+ /**
1890
+ * parent object class.
1891
+ * @field
1892
+ */
1893
+ parent_class: DecoratorClass
1894
+ /**
1895
+ * Reserved for future API improvements.
1896
+ * @field
1897
+ */
1898
+ padding: any[]
1899
+ }
1900
+
1901
+ /**
1902
+ * A class that takes care of resources on mount points added or
1903
+ * removed, this is based on #TrackerDecoratorClass.
1904
+ * @record
1905
+ */
1906
+ export abstract class DecoratorFSClass {
1907
+
1908
+ // Own properties of TrackerMiner-1.0.TrackerMiner.DecoratorFSClass
1909
+
1910
+ static name: string
1911
+ }
1912
+
1913
+ export interface DecoratorInfo {
1914
+
1915
+ // Owm methods of TrackerMiner-1.0.TrackerMiner.DecoratorInfo
1916
+
1917
+ /**
1918
+ * A MIME¹ type is a way of describing the content type of a file or
1919
+ * set of data. An example would be 'text/plain' for a clear text
1920
+ * document or file.
1921
+ *
1922
+ * ¹: http://en.wikipedia.org/wiki/MIME
1923
+ * @returns the MIME type for #TrackerDecoratorInfo on success or #NULL on error.
1924
+ */
1925
+ get_mimetype(): string | null
1926
+ /**
1927
+ * A #TrackerSparqlBuilder allows the caller to extract the final
1928
+ * SPARQL used to insert the extracted metadata into the database for
1929
+ * the resource being processed.
1930
+ *
1931
+ * This function calls g_task_get_task_data() on the return value of
1932
+ * tracker_decorator_info_get_task().
1933
+ * @returns a #TrackerSparqlBuilder on success or #NULL on error.
1934
+ */
1935
+ get_sparql(): Tracker.SparqlBuilder
1936
+ /**
1937
+ * Get the #GTask associated with retrieving extended metadata and
1938
+ * information for a URN in Tracker.
1939
+ *
1940
+ * The task object's data (accessible with g_task_get_task_data()) is the
1941
+ * #TrackerSparqlBuilder that you must populate with the results of the
1942
+ * metadata extraction. This can also be accessed with
1943
+ * tracker_decorator_info_get_sparql().
1944
+ * @returns the #GTask for #TrackerDecoratorInfo on success or #NULL if there is no existing #GTask.
1945
+ */
1946
+ get_task(): Gio.Task
1947
+ /**
1948
+ * A URL is a Uniform Resource Locator and should be a location associated
1949
+ * with a resource in the database. For example, 'file:///tmp/foo.txt'.
1950
+ * @returns the URL for #TrackerDecoratorInfo on success or #NULL on error.
1951
+ */
1952
+ get_url(): string | null
1953
+ /**
1954
+ * A URN is a Uniform Resource Name and should be a unique identifier
1955
+ * for a resource in the database.
1956
+ * @returns the URN for #TrackerDecoratorInfo on success or #NULL on error.
1957
+ */
1958
+ get_urn(): string | null
1959
+ /**
1960
+ * Increases the reference count of `info` by 1.
1961
+ * @returns the same @info passed in, or %NULL on error.
1962
+ */
1963
+ ref(): DecoratorInfo
1964
+ /**
1965
+ * Decreases the reference count of `info` by 1 and frees it when the
1966
+ * reference count reaches 0.
1967
+ */
1968
+ unref(): void
1969
+ }
1970
+
1971
+ export class DecoratorInfo {
1972
+
1973
+ // Own properties of TrackerMiner-1.0.TrackerMiner.DecoratorInfo
1974
+
1975
+ static name: string
1976
+ }
1977
+
1978
+ export interface EnumeratorIface {
1979
+
1980
+ // Own fields of TrackerMiner-1.0.TrackerMiner.EnumeratorIface
1981
+
1982
+ /**
1983
+ * Parent interface type.
1984
+ * @field
1985
+ */
1986
+ g_iface: GObject.TypeInterface
1987
+ next: (enumerator: Enumerator, cancellable: Gio.Cancellable | null) => any | null
1988
+ next_async: (enumerator: Enumerator, io_priority: number, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback | null) => void
1989
+ next_finish: (enumerator: Enumerator, result: Gio.AsyncResult) => any | null
1990
+ }
1991
+
1992
+ /**
1993
+ * Virtual methods left to implement.
1994
+ * @record
1995
+ */
1996
+ export abstract class EnumeratorIface {
1997
+
1998
+ // Own properties of TrackerMiner-1.0.TrackerMiner.EnumeratorIface
1999
+
2000
+ static name: string
2001
+ }
2002
+
2003
+ export interface IndexingTreeClass {
2004
+
2005
+ // Own fields of TrackerMiner-1.0.TrackerMiner.IndexingTreeClass
2006
+
2007
+ /**
2008
+ * parent object class
2009
+ * @field
2010
+ */
2011
+ parent_class: GObject.ObjectClass
2012
+ directory_added: (indexing_tree: IndexingTree, directory: Gio.File) => void
2013
+ directory_removed: (indexing_tree: IndexingTree, directory: Gio.File) => void
2014
+ directory_updated: (indexing_tree: IndexingTree, directory: Gio.File) => void
2015
+ child_updated: (indexing_tree: IndexingTree, root: Gio.File, child: Gio.File) => void
2016
+ /**
2017
+ * Reserved for future API improvements.
2018
+ * @field
2019
+ */
2020
+ padding: any[]
2021
+ }
2022
+
2023
+ /**
2024
+ * Class for the #TrackerIndexingTree.
2025
+ * @record
2026
+ */
2027
+ export abstract class IndexingTreeClass {
2028
+
2029
+ // Own properties of TrackerMiner-1.0.TrackerMiner.IndexingTreeClass
2030
+
2031
+ static name: string
2032
+ }
2033
+
2034
+ export interface MinerClass {
2035
+
2036
+ // Own fields of TrackerMiner-1.0.TrackerMiner.MinerClass
2037
+
2038
+ /**
2039
+ * parent object class.
2040
+ * @field
2041
+ */
2042
+ parent_class: GObject.ObjectClass
2043
+ started: (miner: Miner) => void
2044
+ stopped: (miner: Miner) => void
2045
+ paused: (miner: Miner) => void
2046
+ resumed: (miner: Miner) => void
2047
+ progress: (miner: Miner, status: string | null, progress: number) => void
2048
+ ignore_next_update: (miner: Miner, urls: string[]) => void
2049
+ /**
2050
+ * Reserved for future API improvements.
2051
+ * @field
2052
+ */
2053
+ padding: any[]
2054
+ }
2055
+
2056
+ /**
2057
+ * Virtual methods left to implement.
2058
+ * @record
2059
+ */
2060
+ export abstract class MinerClass {
2061
+
2062
+ // Own properties of TrackerMiner-1.0.TrackerMiner.MinerClass
2063
+
2064
+ static name: string
2065
+ }
2066
+
2067
+ export interface MinerFSClass {
2068
+
2069
+ // Own fields of TrackerMiner-1.0.TrackerMiner.MinerFSClass
2070
+
2071
+ /**
2072
+ * parent object class
2073
+ * @field
2074
+ */
2075
+ parent: MinerClass
2076
+ process_file: (fs: MinerFS, file: Gio.File, builder: Tracker.SparqlBuilder, cancellable: Gio.Cancellable | null) => boolean
2077
+ ignore_next_update_file: (fs: MinerFS, file: Gio.File, builder: Tracker.SparqlBuilder, cancellable: Gio.Cancellable | null) => boolean
2078
+ finished: (fs: MinerFS, elapsed: number, directories_found: number, directories_ignored: number, files_found: number, files_ignored: number) => void
2079
+ process_file_attributes: (fs: MinerFS, file: Gio.File, builder: Tracker.SparqlBuilder, cancellable: Gio.Cancellable | null) => boolean
2080
+ finished_root: (fs: MinerFS, root: Gio.File, directories_found: number, directories_ignored: number, files_found: number, files_ignored: number) => void
2081
+ remove_file: (fs: MinerFS, file: Gio.File, children_only: boolean, builder: Tracker.SparqlBuilder) => boolean
2082
+ /**
2083
+ * Reserved for future API improvements.
2084
+ * @field
2085
+ */
2086
+ padding: any[]
2087
+ }
2088
+
2089
+ /**
2090
+ * Prototype for the abstract class, `process_file` must be implemented
2091
+ * in the deriving class in order to actually extract data.
2092
+ * @record
2093
+ */
2094
+ export abstract class MinerFSClass {
2095
+
2096
+ // Own properties of TrackerMiner-1.0.TrackerMiner.MinerFSClass
2097
+
2098
+ static name: string
2099
+ }
2100
+
2101
+ export interface MinerFSPrivate {
2102
+ }
2103
+
2104
+ export class MinerFSPrivate {
2105
+
2106
+ // Own properties of TrackerMiner-1.0.TrackerMiner.MinerFSPrivate
2107
+
2108
+ static name: string
2109
+ }
2110
+
2111
+ export interface MinerOnlineClass {
2112
+
2113
+ // Own fields of TrackerMiner-1.0.TrackerMiner.MinerOnlineClass
2114
+
2115
+ /**
2116
+ * a #TrackerMinerClass
2117
+ * @field
2118
+ */
2119
+ parent_class: MinerClass
2120
+ connected: (miner: MinerOnline, network: NetworkType) => boolean
2121
+ disconnected: (miner: MinerOnline) => void
2122
+ /**
2123
+ * Reserved for future API improvements.
2124
+ * @field
2125
+ */
2126
+ padding: any[]
2127
+ }
2128
+
2129
+ /**
2130
+ * Virtual methods that can be overridden.
2131
+ * @record
2132
+ */
2133
+ export abstract class MinerOnlineClass {
2134
+
2135
+ // Own properties of TrackerMiner-1.0.TrackerMiner.MinerOnlineClass
2136
+
2137
+ static name: string
2138
+ }
2139
+
2140
+ export interface MinerPrivate {
2141
+ }
2142
+
2143
+ export class MinerPrivate {
2144
+
2145
+ // Own properties of TrackerMiner-1.0.TrackerMiner.MinerPrivate
2146
+
2147
+ static name: string
2148
+ }
2149
+
2150
+ /**
2151
+ * Name of the imported GIR library
2152
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
2153
+ */
2154
+ export const __name__: string
2155
+ /**
2156
+ * Version of the imported GIR library
2157
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
2158
+ */
2159
+ export const __version__: string
2160
+ // END