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