@girs/trackercontrol-2.0 2.0.0-3.0.0-beta.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,33 @@
1
+
2
+ # TrackerControl-2.0
3
+
4
+ GJS TypeScript type definitions for TrackerControl-2.0, generated from library version 2.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gjs) v3.0.0-beta.12.
5
+
6
+ External control and monitoring of miners
7
+
8
+ ## Install
9
+
10
+ To use this type definitions, install them with NPM like this:
11
+ ```bash
12
+ npm install @girs/trackercontrol-2.0
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ You can import this package into your project like this:
18
+ ```ts
19
+ import TrackerControl from '@girs/trackercontrol-2.0';
20
+ ```
21
+
22
+ Or if you prefer CommonJS, you can also use this:
23
+ ```ts
24
+ const TrackerControl = require('@girs/trackercontrol-2.0');
25
+ ```
26
+
27
+ If you use [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules), you can also import this module like you would do this in JavaScript:
28
+
29
+ ```ts
30
+ import TrackerControl from 'gi://TrackerControl?version=2.0';
31
+ ```
32
+
33
+ Depending on your project configuration, it is recommended to use a bundler like [esbuild](https://esbuild.github.io/). You can find examples using different bundlers [here](https://github.com/gjsify/ts-for-gir/tree/main/examples).
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "@girs/trackercontrol-2.0",
3
+ "version": "2.0.0-3.0.0-beta.12",
4
+ "description": "GJS TypeScript type definitions for TrackerControl-2.0, generated from library version 2.0.0",
5
+ "type": "module",
6
+ "module": "trackercontrol-2.0.js",
7
+ "main": "trackercontrol-2.0.js",
8
+ "typedoc": {
9
+ "entryPoint": "./trackercontrol-2.0.d.ts",
10
+ "readmeFile": "./README.md",
11
+ "displayName": "TrackerControl-2.0",
12
+ "tsconfig": "./tsconfig.doc.json"
13
+ },
14
+ "exports": {
15
+ ".": {
16
+ "import": {
17
+ "types": "./trackercontrol-2.0.d.ts",
18
+ "default": "./trackercontrol-2.0.js"
19
+ },
20
+ "require": {
21
+ "types": "./trackercontrol-2.0.d.cts",
22
+ "default": "./trackercontrol-2.0.cjs"
23
+ }
24
+ }
25
+ },
26
+ "scripts": {
27
+ "test": "yarn test:esm && yarn test:cjs",
28
+ "test:esm": "tsc --noEmit trackercontrol-2.0.d.ts",
29
+ "test:cjs": "tsc --noEmit trackercontrol-2.0.d.cts"
30
+ },
31
+ "dependencies": {
32
+ "@girs/gio-2.0": "^2.75.1-3.0.0-beta.12",
33
+ "@girs/glib-2.0": "^2.75.1-3.0.0-beta.12",
34
+ "@girs/gobject-2.0": "^2.75.1-3.0.0-beta.12"
35
+ },
36
+ "devDependencies": {
37
+ "typescript": "^*"
38
+ },
39
+ "keywords": [
40
+ "Gir",
41
+ "TypeScript",
42
+ "TrackerControl-2.0"
43
+ ],
44
+ "author": "ts-for-gir",
45
+ "license": "Apache-2.0",
46
+ "repository": {
47
+ "type": "git",
48
+ "url": "git+https://github.com/gjsify/ts-for-gir.git"
49
+ },
50
+ "bugs": {
51
+ "url": "https://github.com/gjsify/ts-for-gir/issues"
52
+ },
53
+ "homepage": "https://github.com/gjsify/ts-for-gir#readme"
54
+ }
@@ -0,0 +1,9 @@
1
+
2
+
3
+ imports.gi.versions.TrackerControl = '2.0'
4
+ const TrackerControl = imports.gi.TrackerControl;
5
+
6
+ module.exports = TrackerControl;
7
+
8
+
9
+
@@ -0,0 +1,360 @@
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
+ * TrackerControl-2.0
10
+ */
11
+
12
+ import type Gio from '@girs/gio-2.0';
13
+ import type GObject from '@girs/gobject-2.0';
14
+ import type GLib from '@girs/glib-2.0';
15
+
16
+ /**
17
+ * Enumeration values used in errors returned by the
18
+ * #TrackerMinerManager API.
19
+ */
20
+ export enum MinerManagerError {
21
+ /**
22
+ * The miner in question
23
+ * is not active and can so can not be used.
24
+ */
25
+ NOT_AVAILABLE,
26
+ /**
27
+ * The resource that the
28
+ * miner is handling (for example a file or URI) does not exist.
29
+ */
30
+ NOENT,
31
+ }
32
+ export module MinerManager {
33
+
34
+ // Signal callback interfaces
35
+
36
+ /**
37
+ * Signal callback interface for `miner-activated`
38
+ */
39
+ export interface MinerActivatedSignalCallback {
40
+ ($obj: MinerManager, miner: string | null): void
41
+ }
42
+
43
+ /**
44
+ * Signal callback interface for `miner-deactivated`
45
+ */
46
+ export interface MinerDeactivatedSignalCallback {
47
+ ($obj: MinerManager, miner: string | null): void
48
+ }
49
+
50
+ /**
51
+ * Signal callback interface for `miner-paused`
52
+ */
53
+ export interface MinerPausedSignalCallback {
54
+ ($obj: MinerManager, miner: string | null): void
55
+ }
56
+
57
+ /**
58
+ * Signal callback interface for `miner-progress`
59
+ */
60
+ export interface MinerProgressSignalCallback {
61
+ ($obj: MinerManager, miner: string | null, status: string | null, progress: number, remaining_time: number): void
62
+ }
63
+
64
+ /**
65
+ * Signal callback interface for `miner-resumed`
66
+ */
67
+ export interface MinerResumedSignalCallback {
68
+ ($obj: MinerManager, miner: string | null): void
69
+ }
70
+
71
+
72
+ // Constructor properties interface
73
+
74
+ export interface ConstructorProperties extends Gio.Initable.ConstructorProperties, GObject.Object.ConstructorProperties {
75
+
76
+ // Own constructor properties of TrackerControl-2.0.TrackerControl.MinerManager
77
+
78
+ auto_start?: boolean | null
79
+ domain_ontology?: string | null
80
+ }
81
+
82
+ }
83
+
84
+ export interface MinerManager extends Gio.Initable {
85
+
86
+ // Own properties of TrackerControl-2.0.TrackerControl.MinerManager
87
+
88
+ readonly auto_start: boolean
89
+ readonly domain_ontology: string | null
90
+
91
+ // Own fields of TrackerControl-2.0.TrackerControl.MinerManager
92
+
93
+ parent_instance: GObject.Object
94
+
95
+ // Owm methods of TrackerControl-2.0.TrackerControl.MinerManager
96
+
97
+ /**
98
+ * Returns a list of references for all available miners. Available
99
+ * miners are miners which may or may not be running in a process at
100
+ * the current time.
101
+ * @returns a #GSList which must be freed with g_slist_free() and all contained data with g_free(). Otherwise %NULL is returned if there are no miners.
102
+ */
103
+ get_available(): string[] | null
104
+ /**
105
+ * Returns the description for the given `miner`.
106
+ * @param miner miner reference
107
+ * @returns A string which should not be freed or %NULL if none is specified.
108
+ */
109
+ get_description(miner: string | null): string | null
110
+ /**
111
+ * Returns a translated display name for `miner`.
112
+ * @param miner miner reference
113
+ * @returns A string which should not be freed or %NULL.
114
+ */
115
+ get_display_name(miner: string | null): string | null
116
+ /**
117
+ * Returns a list of references for all active miners. Active miners
118
+ * are miners which are running within a process.
119
+ * @returns a #GSList which must be freed with g_slist_free() and all contained data with g_free(). Otherwise %NULL is returned if there are no miners.
120
+ */
121
+ get_running(): string[] | null
122
+ /**
123
+ * Returns the current status, progress and remaining time for `miner`.
124
+ * `remaining_time` will be 0 if not possible to compute it yet,
125
+ * and less than zero if it is not applicable.
126
+ * @param miner miner reference
127
+ * @returns %TRUE if the status could be retrieved successfully, otherwise %FALSE
128
+ */
129
+ get_status(miner: string | null): [ /* returnType */ boolean, /* status */ string | null, /* progress */ number, /* remaining_time */ number ]
130
+ /**
131
+ * Tells the filesystem miner to start indexing the `file`.
132
+ *
133
+ * On failure `error` will be set.
134
+ * @param file a URL valid in GIO of a file to give to the miner for processing
135
+ * @param cancellable a #GCancellable, or %NULL
136
+ * @returns %TRUE on success, otherwise %FALSE.
137
+ */
138
+ index_file(file: Gio.File, cancellable: Gio.Cancellable | null): boolean
139
+ /**
140
+ * Tells the filesystem miner to start indexing the `file`. Once the message has been sent,
141
+ * `callback` will be called. You can then call tracker_miner_manager_index_file_finish()
142
+ * to get the result.
143
+ * @param file a URL valid in GIO of a file to give to the miner for processing
144
+ * @param cancellable a #GCancellable, or %NULL
145
+ * @param callback a #GAsyncReadyCallback to call when the request is satisfied
146
+ */
147
+ index_file_async(file: Gio.File, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
148
+ /**
149
+ * Finishes a request to index a file. See tracker_miner_manager_index_file_async()
150
+ *
151
+ * On failure `error` will be set.
152
+ * @param result a #GAsyncResult
153
+ * @returns %TRUE on success, otherwise %FALSE.
154
+ */
155
+ index_file_finish(result: Gio.AsyncResult): boolean
156
+ /**
157
+ * This function operates exactly the same way as
158
+ * tracker_miner_manager_index_file() with the exception that if the
159
+ * calling process dies, the indexing is cancelled. This API is useful
160
+ * for cases where the calling process wants to tie the indexing
161
+ * operation closely to its own lifetime.
162
+ *
163
+ * On failure `error` will be set.
164
+ * @param file a URL valid in GIO of a file to give to the miner for processing
165
+ * @param cancellable a #GCancellable, or %NULL
166
+ * @returns %TRUE on success, otherwise %FALSE.
167
+ */
168
+ index_file_for_process(file: Gio.File, cancellable: Gio.Cancellable | null): boolean
169
+ /**
170
+ * This function operates exactly the same way as
171
+ * tracker_miner_manager_index_file() with the exception that if the
172
+ * calling process dies, the indexing is cancelled. This API is useful
173
+ * for cases where the calling process wants to tie the indexing
174
+ * operation closely to its own lifetime.
175
+ *
176
+ * When the operation is finished, `callback` will be called. You can
177
+ * then call tracker_miner_manager_index_file_for_process_finish() to
178
+ * get the result of the operation.
179
+ * @param file a URL valid in GIO of a file to give to the miner for processing
180
+ * @param cancellable a #GCancellable, or %NULL
181
+ * @param callback a #GAsyncReadyCallback to call when the request is satisfied
182
+ */
183
+ index_file_for_process_async(file: Gio.File, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
184
+ /**
185
+ * Finishes a request to index a file. See tracker_miner_manager_index_file_for_process_async()
186
+ *
187
+ * On failure `error` will be set.
188
+ * @param result a #GAsyncResult
189
+ * @returns %TRUE on success, otherwise %FALSE.
190
+ */
191
+ index_file_for_process_finish(result: Gio.AsyncResult): boolean
192
+ /**
193
+ * Returns the miner's current activity.
194
+ * @param miner miner reference
195
+ * @returns %TRUE if the @miner is active, otherwise %FALSE.
196
+ */
197
+ is_active(miner: string | null): boolean
198
+ /**
199
+ * This function either returns %FALSE if the miner is not paused,
200
+ * or returns %TRUE and fills in `applications` and `reasons` with
201
+ * the pause reasons and the applications that asked for it. Both
202
+ * arrays will have the same lengh, and will be sorted so the
203
+ * application/pause reason pairs have the same index.
204
+ * @param miner miner reference
205
+ * @returns %TRUE if @miner is paused, otherwise %FALSE.
206
+ */
207
+ is_paused(miner: string | null): [ /* returnType */ boolean, /* applications */ string[], /* reasons */ string[] ]
208
+ /**
209
+ * Asks `miner` to pause. a miner could be paused by
210
+ * several reasons, and its activity won't be resumed
211
+ * until all pause requests have been resumed.
212
+ * @param miner miner reference
213
+ * @param reason reason to pause
214
+ * @returns %TRUE if the miner was paused successfully, otherwise %FALSE.
215
+ */
216
+ pause(miner: string | null, reason: string | null): [ /* returnType */ boolean, /* cookie */ number ]
217
+ /**
218
+ * This function operates exactly the same way as
219
+ * tracker_miner_manager_pause() with the exception that if the calling
220
+ * process dies, the pause is resumed. This API is useful for cases
221
+ * where the calling process has a risk of crashing without resuming
222
+ * the pause.
223
+ *
224
+ * NOTE: If you call g_object_unref() on the `manager` before you
225
+ * intend to resume the pause and it finalizes, it will automatically
226
+ * resume.
227
+ * @param miner miner reference
228
+ * @param reason reason to pause
229
+ * @returns %TRUE if the miner was paused successfully, otherwise %FALSE.
230
+ */
231
+ pause_for_process(miner: string | null, reason: string | null): [ /* returnType */ boolean, /* cookie */ number ]
232
+ /**
233
+ * Tells the filesystem miner to reindex any file with a mimetype in
234
+ * the `mimetypes` list.
235
+ *
236
+ * On failure `error` will be set.
237
+ * @param mimetypes an array of mimetypes (E.G. "text/plain"). All items with a mimetype in that list will be reindexed.
238
+ * @returns %TRUE on success, otherwise %FALSE.
239
+ */
240
+ reindex_by_mimetype(mimetypes: string[]): boolean
241
+ /**
242
+ * Tells `miner` to resume activity. The miner won't actually resume
243
+ * operations until all pause requests have been resumed.
244
+ * @param miner miner reference
245
+ * @param cookie pause cookie
246
+ * @returns %TRUE if the miner was successfully resumed, otherwise %FALSE.
247
+ */
248
+ resume(miner: string | null, cookie: number): boolean
249
+
250
+ // Own virtual methods of TrackerControl-2.0.TrackerControl.MinerManager
251
+
252
+ vfunc_miner_activated(miner_name: string | null): void
253
+ vfunc_miner_deactivated(miner_name: string | null): void
254
+ vfunc_miner_paused(miner_name: string | null): void
255
+ vfunc_miner_progress(miner_name: string | null, status: string | null, progress: number): void
256
+ vfunc_miner_resumed(miner_name: string | null): void
257
+
258
+ // Own signals of TrackerControl-2.0.TrackerControl.MinerManager
259
+
260
+ connect(sigName: "miner-activated", callback: MinerManager.MinerActivatedSignalCallback): number
261
+ connect_after(sigName: "miner-activated", callback: MinerManager.MinerActivatedSignalCallback): number
262
+ emit(sigName: "miner-activated", miner: string | null, ...args: any[]): void
263
+ connect(sigName: "miner-deactivated", callback: MinerManager.MinerDeactivatedSignalCallback): number
264
+ connect_after(sigName: "miner-deactivated", callback: MinerManager.MinerDeactivatedSignalCallback): number
265
+ emit(sigName: "miner-deactivated", miner: string | null, ...args: any[]): void
266
+ connect(sigName: "miner-paused", callback: MinerManager.MinerPausedSignalCallback): number
267
+ connect_after(sigName: "miner-paused", callback: MinerManager.MinerPausedSignalCallback): number
268
+ emit(sigName: "miner-paused", miner: string | null, ...args: any[]): void
269
+ connect(sigName: "miner-progress", callback: MinerManager.MinerProgressSignalCallback): number
270
+ connect_after(sigName: "miner-progress", callback: MinerManager.MinerProgressSignalCallback): number
271
+ emit(sigName: "miner-progress", miner: string | null, status: string | null, progress: number, remaining_time: number, ...args: any[]): void
272
+ connect(sigName: "miner-resumed", callback: MinerManager.MinerResumedSignalCallback): number
273
+ connect_after(sigName: "miner-resumed", callback: MinerManager.MinerResumedSignalCallback): number
274
+ emit(sigName: "miner-resumed", miner: string | null, ...args: any[]): void
275
+
276
+ // Class property signals of TrackerControl-2.0.TrackerControl.MinerManager
277
+
278
+ connect(sigName: "notify::auto-start", callback: (($obj: MinerManager, pspec: GObject.ParamSpec) => void)): number
279
+ connect_after(sigName: "notify::auto-start", callback: (($obj: MinerManager, pspec: GObject.ParamSpec) => void)): number
280
+ emit(sigName: "notify::auto-start", ...args: any[]): void
281
+ connect(sigName: "notify::domain-ontology", callback: (($obj: MinerManager, pspec: GObject.ParamSpec) => void)): number
282
+ connect_after(sigName: "notify::domain-ontology", callback: (($obj: MinerManager, pspec: GObject.ParamSpec) => void)): number
283
+ emit(sigName: "notify::domain-ontology", ...args: any[]): void
284
+ connect(sigName: string, callback: (...args: any[]) => void): number
285
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
286
+ emit(sigName: string, ...args: any[]): void
287
+ disconnect(id: number): void
288
+ }
289
+
290
+ /**
291
+ * Object to query and control miners.
292
+ * @class
293
+ */
294
+ export class MinerManager extends GObject.Object {
295
+
296
+ // Own properties of TrackerControl-2.0.TrackerControl.MinerManager
297
+
298
+ static name: string
299
+ static $gtype: GObject.GType<MinerManager>
300
+
301
+ // Constructors of TrackerControl-2.0.TrackerControl.MinerManager
302
+
303
+ constructor(config?: MinerManager.ConstructorProperties)
304
+ /**
305
+ * Creates a new #TrackerMinerManager instance.
306
+ *
307
+ * Note: Auto-starting miners when querying status will be enabled.
308
+ * @constructor
309
+ * @returns a #TrackerMinerManager or #NULL if an error happened.
310
+ */
311
+ constructor()
312
+ /**
313
+ * Creates a new #TrackerMinerManager instance.
314
+ *
315
+ * Note: Auto-starting miners when querying status will be enabled.
316
+ * @constructor
317
+ * @returns a #TrackerMinerManager or #NULL if an error happened.
318
+ */
319
+ static new(): MinerManager
320
+ /**
321
+ * Creates a new #TrackerMinerManager.
322
+ * @constructor
323
+ * @param auto_start Flag to disable auto-starting the miners when querying status
324
+ * @returns a #TrackerMinerManager. On error, #NULL is returned and @error is set accordingly.
325
+ */
326
+ static new_full(auto_start: boolean): MinerManager
327
+ _init(config?: MinerManager.ConstructorProperties): void
328
+ static error_quark(): GLib.Quark
329
+ }
330
+
331
+ export interface MinerManagerClass {
332
+
333
+ // Own fields of TrackerControl-2.0.TrackerControl.MinerManagerClass
334
+
335
+ parent_class: GObject.ObjectClass
336
+ miner_progress: (manager: MinerManager, miner_name: string | null, status: string | null, progress: number) => void
337
+ miner_paused: (manager: MinerManager, miner_name: string | null) => void
338
+ miner_resumed: (manager: MinerManager, miner_name: string | null) => void
339
+ miner_activated: (manager: MinerManager, miner_name: string | null) => void
340
+ miner_deactivated: (manager: MinerManager, miner_name: string | null) => void
341
+ }
342
+
343
+ export abstract class MinerManagerClass {
344
+
345
+ // Own properties of TrackerControl-2.0.TrackerControl.MinerManagerClass
346
+
347
+ static name: string
348
+ }
349
+
350
+ /**
351
+ * Name of the imported GIR library
352
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
353
+ */
354
+ export const __name__: string
355
+ /**
356
+ * Version of the imported GIR library
357
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
358
+ */
359
+ export const __version__: string
360
+ // END
@@ -0,0 +1,365 @@
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
+ * TrackerControl-2.0
10
+ */
11
+
12
+ import type Gio from '@girs/gio-2.0';
13
+ import type GObject from '@girs/gobject-2.0';
14
+ import type GLib from '@girs/glib-2.0';
15
+
16
+ export namespace TrackerControl {
17
+
18
+ /**
19
+ * Enumeration values used in errors returned by the
20
+ * #TrackerMinerManager API.
21
+ */
22
+ enum MinerManagerError {
23
+ /**
24
+ * The miner in question
25
+ * is not active and can so can not be used.
26
+ */
27
+ NOT_AVAILABLE,
28
+ /**
29
+ * The resource that the
30
+ * miner is handling (for example a file or URI) does not exist.
31
+ */
32
+ NOENT,
33
+ }
34
+ module MinerManager {
35
+
36
+ // Signal callback interfaces
37
+
38
+ /**
39
+ * Signal callback interface for `miner-activated`
40
+ */
41
+ interface MinerActivatedSignalCallback {
42
+ ($obj: MinerManager, miner: string | null): void
43
+ }
44
+
45
+ /**
46
+ * Signal callback interface for `miner-deactivated`
47
+ */
48
+ interface MinerDeactivatedSignalCallback {
49
+ ($obj: MinerManager, miner: string | null): void
50
+ }
51
+
52
+ /**
53
+ * Signal callback interface for `miner-paused`
54
+ */
55
+ interface MinerPausedSignalCallback {
56
+ ($obj: MinerManager, miner: string | null): void
57
+ }
58
+
59
+ /**
60
+ * Signal callback interface for `miner-progress`
61
+ */
62
+ interface MinerProgressSignalCallback {
63
+ ($obj: MinerManager, miner: string | null, status: string | null, progress: number, remaining_time: number): void
64
+ }
65
+
66
+ /**
67
+ * Signal callback interface for `miner-resumed`
68
+ */
69
+ interface MinerResumedSignalCallback {
70
+ ($obj: MinerManager, miner: string | null): void
71
+ }
72
+
73
+
74
+ // Constructor properties interface
75
+
76
+ interface ConstructorProperties extends Gio.Initable.ConstructorProperties, GObject.Object.ConstructorProperties {
77
+
78
+ // Own constructor properties of TrackerControl-2.0.TrackerControl.MinerManager
79
+
80
+ auto_start?: boolean | null
81
+ domain_ontology?: string | null
82
+ }
83
+
84
+ }
85
+
86
+ interface MinerManager extends Gio.Initable {
87
+
88
+ // Own properties of TrackerControl-2.0.TrackerControl.MinerManager
89
+
90
+ readonly auto_start: boolean
91
+ readonly domain_ontology: string | null
92
+
93
+ // Own fields of TrackerControl-2.0.TrackerControl.MinerManager
94
+
95
+ parent_instance: GObject.Object
96
+
97
+ // Owm methods of TrackerControl-2.0.TrackerControl.MinerManager
98
+
99
+ /**
100
+ * Returns a list of references for all available miners. Available
101
+ * miners are miners which may or may not be running in a process at
102
+ * the current time.
103
+ * @returns a #GSList which must be freed with g_slist_free() and all contained data with g_free(). Otherwise %NULL is returned if there are no miners.
104
+ */
105
+ get_available(): string[] | null
106
+ /**
107
+ * Returns the description for the given `miner`.
108
+ * @param miner miner reference
109
+ * @returns A string which should not be freed or %NULL if none is specified.
110
+ */
111
+ get_description(miner: string | null): string | null
112
+ /**
113
+ * Returns a translated display name for `miner`.
114
+ * @param miner miner reference
115
+ * @returns A string which should not be freed or %NULL.
116
+ */
117
+ get_display_name(miner: string | null): string | null
118
+ /**
119
+ * Returns a list of references for all active miners. Active miners
120
+ * are miners which are running within a process.
121
+ * @returns a #GSList which must be freed with g_slist_free() and all contained data with g_free(). Otherwise %NULL is returned if there are no miners.
122
+ */
123
+ get_running(): string[] | null
124
+ /**
125
+ * Returns the current status, progress and remaining time for `miner`.
126
+ * `remaining_time` will be 0 if not possible to compute it yet,
127
+ * and less than zero if it is not applicable.
128
+ * @param miner miner reference
129
+ * @returns %TRUE if the status could be retrieved successfully, otherwise %FALSE
130
+ */
131
+ get_status(miner: string | null): [ /* returnType */ boolean, /* status */ string | null, /* progress */ number, /* remaining_time */ number ]
132
+ /**
133
+ * Tells the filesystem miner to start indexing the `file`.
134
+ *
135
+ * On failure `error` will be set.
136
+ * @param file a URL valid in GIO of a file to give to the miner for processing
137
+ * @param cancellable a #GCancellable, or %NULL
138
+ * @returns %TRUE on success, otherwise %FALSE.
139
+ */
140
+ index_file(file: Gio.File, cancellable: Gio.Cancellable | null): boolean
141
+ /**
142
+ * Tells the filesystem miner to start indexing the `file`. Once the message has been sent,
143
+ * `callback` will be called. You can then call tracker_miner_manager_index_file_finish()
144
+ * to get the result.
145
+ * @param file a URL valid in GIO of a file to give to the miner for processing
146
+ * @param cancellable a #GCancellable, or %NULL
147
+ * @param callback a #GAsyncReadyCallback to call when the request is satisfied
148
+ */
149
+ index_file_async(file: Gio.File, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
150
+ /**
151
+ * Finishes a request to index a file. See tracker_miner_manager_index_file_async()
152
+ *
153
+ * On failure `error` will be set.
154
+ * @param result a #GAsyncResult
155
+ * @returns %TRUE on success, otherwise %FALSE.
156
+ */
157
+ index_file_finish(result: Gio.AsyncResult): boolean
158
+ /**
159
+ * This function operates exactly the same way as
160
+ * tracker_miner_manager_index_file() with the exception that if the
161
+ * calling process dies, the indexing is cancelled. This API is useful
162
+ * for cases where the calling process wants to tie the indexing
163
+ * operation closely to its own lifetime.
164
+ *
165
+ * On failure `error` will be set.
166
+ * @param file a URL valid in GIO of a file to give to the miner for processing
167
+ * @param cancellable a #GCancellable, or %NULL
168
+ * @returns %TRUE on success, otherwise %FALSE.
169
+ */
170
+ index_file_for_process(file: Gio.File, cancellable: Gio.Cancellable | null): boolean
171
+ /**
172
+ * This function operates exactly the same way as
173
+ * tracker_miner_manager_index_file() with the exception that if the
174
+ * calling process dies, the indexing is cancelled. This API is useful
175
+ * for cases where the calling process wants to tie the indexing
176
+ * operation closely to its own lifetime.
177
+ *
178
+ * When the operation is finished, `callback` will be called. You can
179
+ * then call tracker_miner_manager_index_file_for_process_finish() to
180
+ * get the result of the operation.
181
+ * @param file a URL valid in GIO of a file to give to the miner for processing
182
+ * @param cancellable a #GCancellable, or %NULL
183
+ * @param callback a #GAsyncReadyCallback to call when the request is satisfied
184
+ */
185
+ index_file_for_process_async(file: Gio.File, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
186
+ /**
187
+ * Finishes a request to index a file. See tracker_miner_manager_index_file_for_process_async()
188
+ *
189
+ * On failure `error` will be set.
190
+ * @param result a #GAsyncResult
191
+ * @returns %TRUE on success, otherwise %FALSE.
192
+ */
193
+ index_file_for_process_finish(result: Gio.AsyncResult): boolean
194
+ /**
195
+ * Returns the miner's current activity.
196
+ * @param miner miner reference
197
+ * @returns %TRUE if the @miner is active, otherwise %FALSE.
198
+ */
199
+ is_active(miner: string | null): boolean
200
+ /**
201
+ * This function either returns %FALSE if the miner is not paused,
202
+ * or returns %TRUE and fills in `applications` and `reasons` with
203
+ * the pause reasons and the applications that asked for it. Both
204
+ * arrays will have the same lengh, and will be sorted so the
205
+ * application/pause reason pairs have the same index.
206
+ * @param miner miner reference
207
+ * @returns %TRUE if @miner is paused, otherwise %FALSE.
208
+ */
209
+ is_paused(miner: string | null): [ /* returnType */ boolean, /* applications */ string[], /* reasons */ string[] ]
210
+ /**
211
+ * Asks `miner` to pause. a miner could be paused by
212
+ * several reasons, and its activity won't be resumed
213
+ * until all pause requests have been resumed.
214
+ * @param miner miner reference
215
+ * @param reason reason to pause
216
+ * @returns %TRUE if the miner was paused successfully, otherwise %FALSE.
217
+ */
218
+ pause(miner: string | null, reason: string | null): [ /* returnType */ boolean, /* cookie */ number ]
219
+ /**
220
+ * This function operates exactly the same way as
221
+ * tracker_miner_manager_pause() with the exception that if the calling
222
+ * process dies, the pause is resumed. This API is useful for cases
223
+ * where the calling process has a risk of crashing without resuming
224
+ * the pause.
225
+ *
226
+ * NOTE: If you call g_object_unref() on the `manager` before you
227
+ * intend to resume the pause and it finalizes, it will automatically
228
+ * resume.
229
+ * @param miner miner reference
230
+ * @param reason reason to pause
231
+ * @returns %TRUE if the miner was paused successfully, otherwise %FALSE.
232
+ */
233
+ pause_for_process(miner: string | null, reason: string | null): [ /* returnType */ boolean, /* cookie */ number ]
234
+ /**
235
+ * Tells the filesystem miner to reindex any file with a mimetype in
236
+ * the `mimetypes` list.
237
+ *
238
+ * On failure `error` will be set.
239
+ * @param mimetypes an array of mimetypes (E.G. "text/plain"). All items with a mimetype in that list will be reindexed.
240
+ * @returns %TRUE on success, otherwise %FALSE.
241
+ */
242
+ reindex_by_mimetype(mimetypes: string[]): boolean
243
+ /**
244
+ * Tells `miner` to resume activity. The miner won't actually resume
245
+ * operations until all pause requests have been resumed.
246
+ * @param miner miner reference
247
+ * @param cookie pause cookie
248
+ * @returns %TRUE if the miner was successfully resumed, otherwise %FALSE.
249
+ */
250
+ resume(miner: string | null, cookie: number): boolean
251
+
252
+ // Own virtual methods of TrackerControl-2.0.TrackerControl.MinerManager
253
+
254
+ vfunc_miner_activated(miner_name: string | null): void
255
+ vfunc_miner_deactivated(miner_name: string | null): void
256
+ vfunc_miner_paused(miner_name: string | null): void
257
+ vfunc_miner_progress(miner_name: string | null, status: string | null, progress: number): void
258
+ vfunc_miner_resumed(miner_name: string | null): void
259
+
260
+ // Own signals of TrackerControl-2.0.TrackerControl.MinerManager
261
+
262
+ connect(sigName: "miner-activated", callback: MinerManager.MinerActivatedSignalCallback): number
263
+ connect_after(sigName: "miner-activated", callback: MinerManager.MinerActivatedSignalCallback): number
264
+ emit(sigName: "miner-activated", miner: string | null, ...args: any[]): void
265
+ connect(sigName: "miner-deactivated", callback: MinerManager.MinerDeactivatedSignalCallback): number
266
+ connect_after(sigName: "miner-deactivated", callback: MinerManager.MinerDeactivatedSignalCallback): number
267
+ emit(sigName: "miner-deactivated", miner: string | null, ...args: any[]): void
268
+ connect(sigName: "miner-paused", callback: MinerManager.MinerPausedSignalCallback): number
269
+ connect_after(sigName: "miner-paused", callback: MinerManager.MinerPausedSignalCallback): number
270
+ emit(sigName: "miner-paused", miner: string | null, ...args: any[]): void
271
+ connect(sigName: "miner-progress", callback: MinerManager.MinerProgressSignalCallback): number
272
+ connect_after(sigName: "miner-progress", callback: MinerManager.MinerProgressSignalCallback): number
273
+ emit(sigName: "miner-progress", miner: string | null, status: string | null, progress: number, remaining_time: number, ...args: any[]): void
274
+ connect(sigName: "miner-resumed", callback: MinerManager.MinerResumedSignalCallback): number
275
+ connect_after(sigName: "miner-resumed", callback: MinerManager.MinerResumedSignalCallback): number
276
+ emit(sigName: "miner-resumed", miner: string | null, ...args: any[]): void
277
+
278
+ // Class property signals of TrackerControl-2.0.TrackerControl.MinerManager
279
+
280
+ connect(sigName: "notify::auto-start", callback: (($obj: MinerManager, pspec: GObject.ParamSpec) => void)): number
281
+ connect_after(sigName: "notify::auto-start", callback: (($obj: MinerManager, pspec: GObject.ParamSpec) => void)): number
282
+ emit(sigName: "notify::auto-start", ...args: any[]): void
283
+ connect(sigName: "notify::domain-ontology", callback: (($obj: MinerManager, pspec: GObject.ParamSpec) => void)): number
284
+ connect_after(sigName: "notify::domain-ontology", callback: (($obj: MinerManager, pspec: GObject.ParamSpec) => void)): number
285
+ emit(sigName: "notify::domain-ontology", ...args: any[]): void
286
+ connect(sigName: string, callback: (...args: any[]) => void): number
287
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
288
+ emit(sigName: string, ...args: any[]): void
289
+ disconnect(id: number): void
290
+ }
291
+
292
+ /**
293
+ * Object to query and control miners.
294
+ * @class
295
+ */
296
+ class MinerManager extends GObject.Object {
297
+
298
+ // Own properties of TrackerControl-2.0.TrackerControl.MinerManager
299
+
300
+ static name: string
301
+ static $gtype: GObject.GType<MinerManager>
302
+
303
+ // Constructors of TrackerControl-2.0.TrackerControl.MinerManager
304
+
305
+ constructor(config?: MinerManager.ConstructorProperties)
306
+ /**
307
+ * Creates a new #TrackerMinerManager instance.
308
+ *
309
+ * Note: Auto-starting miners when querying status will be enabled.
310
+ * @constructor
311
+ * @returns a #TrackerMinerManager or #NULL if an error happened.
312
+ */
313
+ constructor()
314
+ /**
315
+ * Creates a new #TrackerMinerManager instance.
316
+ *
317
+ * Note: Auto-starting miners when querying status will be enabled.
318
+ * @constructor
319
+ * @returns a #TrackerMinerManager or #NULL if an error happened.
320
+ */
321
+ static new(): MinerManager
322
+ /**
323
+ * Creates a new #TrackerMinerManager.
324
+ * @constructor
325
+ * @param auto_start Flag to disable auto-starting the miners when querying status
326
+ * @returns a #TrackerMinerManager. On error, #NULL is returned and @error is set accordingly.
327
+ */
328
+ static new_full(auto_start: boolean): MinerManager
329
+ _init(config?: MinerManager.ConstructorProperties): void
330
+ static error_quark(): GLib.Quark
331
+ }
332
+
333
+ interface MinerManagerClass {
334
+
335
+ // Own fields of TrackerControl-2.0.TrackerControl.MinerManagerClass
336
+
337
+ parent_class: GObject.ObjectClass
338
+ miner_progress: (manager: MinerManager, miner_name: string | null, status: string | null, progress: number) => void
339
+ miner_paused: (manager: MinerManager, miner_name: string | null) => void
340
+ miner_resumed: (manager: MinerManager, miner_name: string | null) => void
341
+ miner_activated: (manager: MinerManager, miner_name: string | null) => void
342
+ miner_deactivated: (manager: MinerManager, miner_name: string | null) => void
343
+ }
344
+
345
+ abstract class MinerManagerClass {
346
+
347
+ // Own properties of TrackerControl-2.0.TrackerControl.MinerManagerClass
348
+
349
+ static name: string
350
+ }
351
+
352
+ /**
353
+ * Name of the imported GIR library
354
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
355
+ */
356
+ const __name__: string
357
+ /**
358
+ * Version of the imported GIR library
359
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
360
+ */
361
+ const __version__: string
362
+ }
363
+
364
+ export default TrackerControl;
365
+ // END
@@ -0,0 +1,8 @@
1
+
2
+
3
+ // @ts-expect-error
4
+ import TrackerControl from 'gi://TrackerControl?version=2.0';
5
+ export { TrackerControl };
6
+ export default TrackerControl;
7
+
8
+
@@ -0,0 +1,19 @@
1
+ {
2
+ "compilerOptions": {
3
+ // General settings for code interpretation
4
+ "target": "ESNext",
5
+ "module": "ESNext",
6
+ "experimentalDecorators": true,
7
+ "moduleResolution": "node",
8
+ "noEmit": true,
9
+ "noEmitOnError": false,
10
+ "baseUrl": "./",
11
+ "rootDir": ".",
12
+ // General settings for code generation
13
+ "removeComments": false,
14
+ "inlineSourceMap": false,
15
+ "inlineSources": false,
16
+ "newLine": "LF"
17
+ },
18
+ "include": ["./trackercontrol-2.0.d.ts"]
19
+ }