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