@girs/tracker-3.0 3.0.0-3.0.0-beta.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -0
- package/package.json +54 -0
- package/tracker-3.0.cjs +9 -0
- package/tracker-3.0.d.cts +2195 -0
- package/tracker-3.0.d.ts +2200 -0
- package/tracker-3.0.js +8 -0
- package/tsconfig.doc.json +19 -0
|
@@ -0,0 +1,2195 @@
|
|
|
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
|
+
* Tracker-3.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
|
+
* Flags affecting deserialization of RDF.
|
|
18
|
+
*/
|
|
19
|
+
export enum DeserializeFlags {
|
|
20
|
+
/**
|
|
21
|
+
* No flags.
|
|
22
|
+
*/
|
|
23
|
+
DESERIALIZE_FLAGS_NONE,
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Notifier event types.
|
|
27
|
+
*/
|
|
28
|
+
export enum NotifierEventType {
|
|
29
|
+
/**
|
|
30
|
+
* An element was created.
|
|
31
|
+
*/
|
|
32
|
+
CREATE,
|
|
33
|
+
/**
|
|
34
|
+
* An element was deleted.
|
|
35
|
+
*/
|
|
36
|
+
DELETE,
|
|
37
|
+
/**
|
|
38
|
+
* An element was updated.
|
|
39
|
+
*/
|
|
40
|
+
UPDATE,
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Describes a RDF format to be used in data exchange.
|
|
44
|
+
*/
|
|
45
|
+
export enum RdfFormat {
|
|
46
|
+
/**
|
|
47
|
+
* Turtle format
|
|
48
|
+
* ([http://www.w3.org/ns/formats/Turtle](http://www.w3.org/ns/formats/Turtle))
|
|
49
|
+
*/
|
|
50
|
+
TURTLE,
|
|
51
|
+
/**
|
|
52
|
+
* Trig format
|
|
53
|
+
* ([http://www.w3.org/ns/formats/Trig](http://www.w3.org/ns/formats/Trig))
|
|
54
|
+
*/
|
|
55
|
+
TRIG,
|
|
56
|
+
/**
|
|
57
|
+
* JSON-LD format
|
|
58
|
+
* ([http://www.w3.org/ns/formats/JSON-LD](http://www.w3.org/ns/formats/JSON-LD)).
|
|
59
|
+
* This value was added in version 3.5.
|
|
60
|
+
*/
|
|
61
|
+
JSON_LD,
|
|
62
|
+
/**
|
|
63
|
+
* The total number of RDF formats
|
|
64
|
+
*/
|
|
65
|
+
LAST,
|
|
66
|
+
}
|
|
67
|
+
export enum SerializeFlags {
|
|
68
|
+
SERIALIZE_FLAGS_NONE,
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Error domain for Tracker Sparql. Errors in this domain will be from the
|
|
72
|
+
* #TrackerSparqlError enumeration. See #GError for more information on error
|
|
73
|
+
* domains.
|
|
74
|
+
*/
|
|
75
|
+
export enum SparqlError {
|
|
76
|
+
/**
|
|
77
|
+
* Subject is not in the domain of a property or
|
|
78
|
+
* trying to set multiple values for a single valued
|
|
79
|
+
* property.
|
|
80
|
+
*/
|
|
81
|
+
CONSTRAINT,
|
|
82
|
+
/**
|
|
83
|
+
* Internal error.
|
|
84
|
+
*/
|
|
85
|
+
INTERNAL,
|
|
86
|
+
/**
|
|
87
|
+
* There was no disk space available to perform the request.
|
|
88
|
+
*/
|
|
89
|
+
NO_SPACE,
|
|
90
|
+
/**
|
|
91
|
+
* The specified ontology wasn't found.
|
|
92
|
+
*/
|
|
93
|
+
ONTOLOGY_NOT_FOUND,
|
|
94
|
+
/**
|
|
95
|
+
* Problem encountered while opening the database.
|
|
96
|
+
*/
|
|
97
|
+
OPEN_ERROR,
|
|
98
|
+
/**
|
|
99
|
+
* Error parsing the SPARQL string.
|
|
100
|
+
*/
|
|
101
|
+
PARSE,
|
|
102
|
+
/**
|
|
103
|
+
* Problem while executing the query.
|
|
104
|
+
*/
|
|
105
|
+
QUERY_FAILED,
|
|
106
|
+
/**
|
|
107
|
+
* Type constraint failed when trying to insert data.
|
|
108
|
+
*/
|
|
109
|
+
TYPE,
|
|
110
|
+
/**
|
|
111
|
+
* Unknown class.
|
|
112
|
+
*/
|
|
113
|
+
UNKNOWN_CLASS,
|
|
114
|
+
/**
|
|
115
|
+
* Unknown graph.
|
|
116
|
+
*/
|
|
117
|
+
UNKNOWN_GRAPH,
|
|
118
|
+
/**
|
|
119
|
+
* Unknown property.
|
|
120
|
+
*/
|
|
121
|
+
UNKNOWN_PROPERTY,
|
|
122
|
+
/**
|
|
123
|
+
* Unsupported feature or method.
|
|
124
|
+
*/
|
|
125
|
+
UNSUPPORTED,
|
|
126
|
+
/**
|
|
127
|
+
* The ontology doesn't contain nrl:lastModified header
|
|
128
|
+
*/
|
|
129
|
+
MISSING_LAST_MODIFIED_HEADER,
|
|
130
|
+
/**
|
|
131
|
+
* The property is not completely defined.
|
|
132
|
+
*/
|
|
133
|
+
INCOMPLETE_PROPERTY_DEFINITION,
|
|
134
|
+
/**
|
|
135
|
+
* A soft/hard corruption was found in the database during operation.
|
|
136
|
+
*/
|
|
137
|
+
CORRUPT,
|
|
138
|
+
/**
|
|
139
|
+
* The total number of error codes.
|
|
140
|
+
*/
|
|
141
|
+
LAST,
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Enumeration with the possible types of the cursor's cells
|
|
145
|
+
*/
|
|
146
|
+
export enum SparqlValueType {
|
|
147
|
+
/**
|
|
148
|
+
* Unbound value type
|
|
149
|
+
*/
|
|
150
|
+
UNBOUND,
|
|
151
|
+
/**
|
|
152
|
+
* Uri value type, rdfs:Resource
|
|
153
|
+
*/
|
|
154
|
+
URI,
|
|
155
|
+
/**
|
|
156
|
+
* String value type, xsd:string
|
|
157
|
+
*/
|
|
158
|
+
STRING,
|
|
159
|
+
/**
|
|
160
|
+
* Integer value type, xsd:integer
|
|
161
|
+
*/
|
|
162
|
+
INTEGER,
|
|
163
|
+
/**
|
|
164
|
+
* Double value type, xsd:double
|
|
165
|
+
*/
|
|
166
|
+
DOUBLE,
|
|
167
|
+
/**
|
|
168
|
+
* Datetime value type, xsd:dateTime
|
|
169
|
+
*/
|
|
170
|
+
DATETIME,
|
|
171
|
+
/**
|
|
172
|
+
* Blank node value type
|
|
173
|
+
*/
|
|
174
|
+
BLANK_NODE,
|
|
175
|
+
/**
|
|
176
|
+
* Boolean value type, xsd:boolean
|
|
177
|
+
*/
|
|
178
|
+
BOOLEAN,
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Connection flags to modify #TrackerSparqlConnection behavior.
|
|
182
|
+
* @bitfield
|
|
183
|
+
*/
|
|
184
|
+
export enum SparqlConnectionFlags {
|
|
185
|
+
/**
|
|
186
|
+
* No flags.
|
|
187
|
+
*/
|
|
188
|
+
NONE,
|
|
189
|
+
/**
|
|
190
|
+
* Connection is readonly.
|
|
191
|
+
*/
|
|
192
|
+
READONLY,
|
|
193
|
+
/**
|
|
194
|
+
* Word stemming is applied to FTS search terms.
|
|
195
|
+
*/
|
|
196
|
+
FTS_ENABLE_STEMMER,
|
|
197
|
+
/**
|
|
198
|
+
* Unaccenting is applied to FTS search terms.
|
|
199
|
+
*/
|
|
200
|
+
FTS_ENABLE_UNACCENT,
|
|
201
|
+
/**
|
|
202
|
+
* FTS Search terms are filtered through a stop word list.
|
|
203
|
+
*/
|
|
204
|
+
FTS_ENABLE_STOP_WORDS,
|
|
205
|
+
/**
|
|
206
|
+
* Ignore numbers in FTS search terms.
|
|
207
|
+
*/
|
|
208
|
+
FTS_IGNORE_NUMBERS,
|
|
209
|
+
/**
|
|
210
|
+
* Treat blank nodes as specified in
|
|
211
|
+
* SPARQL 1.1 syntax. Namely, they cannot be used as URIs. This flag is available since Tracker 3.3.
|
|
212
|
+
*/
|
|
213
|
+
ANONYMOUS_BNODES,
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* The Prefix of the DC (Dublin Core) namespace
|
|
217
|
+
*/
|
|
218
|
+
export const PREFIX_DC: string | null
|
|
219
|
+
/**
|
|
220
|
+
* The Prefix of the MFO namespace
|
|
221
|
+
*/
|
|
222
|
+
export const PREFIX_MFO: string | null
|
|
223
|
+
/**
|
|
224
|
+
* The Prefix of the NAO namespace
|
|
225
|
+
*/
|
|
226
|
+
export const PREFIX_NAO: string | null
|
|
227
|
+
/**
|
|
228
|
+
* The Prefix of the NCO namespace
|
|
229
|
+
*/
|
|
230
|
+
export const PREFIX_NCO: string | null
|
|
231
|
+
/**
|
|
232
|
+
* The Prefix of the NFO namespace
|
|
233
|
+
*/
|
|
234
|
+
export const PREFIX_NFO: string | null
|
|
235
|
+
/**
|
|
236
|
+
* The Prefix of the NIE namespace
|
|
237
|
+
*/
|
|
238
|
+
export const PREFIX_NIE: string | null
|
|
239
|
+
/**
|
|
240
|
+
* The Prefix of the RDF namespace
|
|
241
|
+
*/
|
|
242
|
+
export const PREFIX_NMM: string | null
|
|
243
|
+
/**
|
|
244
|
+
* The Prefix of the NRL namespace
|
|
245
|
+
*/
|
|
246
|
+
export const PREFIX_NRL: string | null
|
|
247
|
+
/**
|
|
248
|
+
* The Prefix of the Osinfo namespace
|
|
249
|
+
*/
|
|
250
|
+
export const PREFIX_OSINFO: string | null
|
|
251
|
+
/**
|
|
252
|
+
* The Prefix of the RDF namespace
|
|
253
|
+
*/
|
|
254
|
+
export const PREFIX_RDF: string | null
|
|
255
|
+
/**
|
|
256
|
+
* The Prefix of the RDFS namespace
|
|
257
|
+
*/
|
|
258
|
+
export const PREFIX_RDFS: string | null
|
|
259
|
+
/**
|
|
260
|
+
* The Prefix of the SLO namespace
|
|
261
|
+
*/
|
|
262
|
+
export const PREFIX_SLO: string | null
|
|
263
|
+
/**
|
|
264
|
+
* The Prefix of the Tracker namespace
|
|
265
|
+
*/
|
|
266
|
+
export const PREFIX_TRACKER: string | null
|
|
267
|
+
/**
|
|
268
|
+
* The Prefix of the XSD namespace
|
|
269
|
+
*/
|
|
270
|
+
export const PREFIX_XSD: string | null
|
|
271
|
+
/**
|
|
272
|
+
* Checks that the Tracker library in use is compatible with the
|
|
273
|
+
* given version. Generally you would pass in the constants
|
|
274
|
+
* #TRACKER_MAJOR_VERSION, #TRACKER_MINOR_VERSION, #TRACKER_MICRO_VERSION
|
|
275
|
+
* as the three arguments to this function; that produces
|
|
276
|
+
* a check that the library in use is compatible with
|
|
277
|
+
* the version of Tracker the application or module was compiled
|
|
278
|
+
* against.
|
|
279
|
+
*
|
|
280
|
+
* Compatibility is defined by two things: first the version
|
|
281
|
+
* of the running library is newer than the version
|
|
282
|
+
* `required_major`.required_minor.`required_micro`. Second
|
|
283
|
+
* the running library must be binary compatible with the
|
|
284
|
+
* version `required_major`.required_minor.`required_micro`
|
|
285
|
+
* (same major version.)
|
|
286
|
+
* @param required_major the required major version.
|
|
287
|
+
* @param required_minor the required minor version.
|
|
288
|
+
* @param required_micro the required micro version.
|
|
289
|
+
* @returns %NULL if the Tracker library is compatible with the given version, or a string describing the version mismatch. The returned string is owned by Tracker and must not be modified or freed.
|
|
290
|
+
*/
|
|
291
|
+
export function check_version(required_major: number, required_minor: number, required_micro: number): string | null
|
|
292
|
+
export function sparql_error_quark(): GLib.Quark
|
|
293
|
+
/**
|
|
294
|
+
* Escapes `literal` so it is suitable for insertion in
|
|
295
|
+
* SPARQL queries as string literals. Manual construction
|
|
296
|
+
* of query strings based user input is best avoided at
|
|
297
|
+
* all cost, use of #TrackerSparqlStatement is recommended
|
|
298
|
+
* instead.
|
|
299
|
+
* @param literal a string to escape
|
|
300
|
+
* @returns the escaped string
|
|
301
|
+
*/
|
|
302
|
+
export function sparql_escape_string(literal: string | null): string | null
|
|
303
|
+
/**
|
|
304
|
+
* Calls tracker_sparql_escape_uri_printf().
|
|
305
|
+
* @param uri a string to be escaped, following the tracker sparql rules
|
|
306
|
+
* @returns a newly-allocated string holding the result. The returned string should be freed with g_free() when no longer needed.
|
|
307
|
+
*/
|
|
308
|
+
export function sparql_escape_uri(uri: string | null): string | null
|
|
309
|
+
/**
|
|
310
|
+
* Returns a path to the built-in Nepomuk ontologies.
|
|
311
|
+
* @returns a #GFile instance.
|
|
312
|
+
*/
|
|
313
|
+
export function sparql_get_ontology_nepomuk(): Gio.File
|
|
314
|
+
/**
|
|
315
|
+
* Creates a fresh UUID-based URN.
|
|
316
|
+
* @returns A newly generated UUID URN.
|
|
317
|
+
*/
|
|
318
|
+
export function sparql_get_uuid_urn(): string | null
|
|
319
|
+
export module Batch {
|
|
320
|
+
|
|
321
|
+
// Constructor properties interface
|
|
322
|
+
|
|
323
|
+
export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
|
|
324
|
+
|
|
325
|
+
// Own constructor properties of Tracker-3.0.Tracker.Batch
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* The #TrackerSparqlConnection the batch belongs to.
|
|
329
|
+
*/
|
|
330
|
+
connection?: SparqlConnection | null
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
export interface Batch {
|
|
336
|
+
|
|
337
|
+
// Own properties of Tracker-3.0.Tracker.Batch
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* The #TrackerSparqlConnection the batch belongs to.
|
|
341
|
+
*/
|
|
342
|
+
readonly connection: SparqlConnection
|
|
343
|
+
|
|
344
|
+
// Own fields of Tracker-3.0.Tracker.Batch
|
|
345
|
+
|
|
346
|
+
parent_instance: GObject.Object
|
|
347
|
+
|
|
348
|
+
// Owm methods of Tracker-3.0.Tracker.Batch
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Adds the RDF represented by `resource` to `batch`.
|
|
352
|
+
* @param graph RDF graph to insert the resource to
|
|
353
|
+
* @param resource a #TrackerResource
|
|
354
|
+
*/
|
|
355
|
+
add_resource(graph: string | null, resource: Resource): void
|
|
356
|
+
/**
|
|
357
|
+
* Adds an SPARQL update string to `batch`.
|
|
358
|
+
* @param sparql a SPARQL update string
|
|
359
|
+
*/
|
|
360
|
+
add_sparql(sparql: string | null): void
|
|
361
|
+
/**
|
|
362
|
+
* Adds a #TrackerSparqlStatement containing an SPARQL update. The statement will
|
|
363
|
+
* be executed once in the batch, with the values bound as specified by `variable_names`
|
|
364
|
+
* and `values`.
|
|
365
|
+
*
|
|
366
|
+
* For example, for a statement that has a single `~name` parameter,
|
|
367
|
+
* it could be given a value for execution with the given code:
|
|
368
|
+
*
|
|
369
|
+
* <div class="gi-lang-c"><pre><code class="language-c">
|
|
370
|
+
*
|
|
371
|
+
* ```
|
|
372
|
+
* const char *names = { "name" };
|
|
373
|
+
* const GValue values[G_N_ELEMENTS (names)] = { 0, };
|
|
374
|
+
*
|
|
375
|
+
* g_value_init (&values[0], G_TYPE_STRING);
|
|
376
|
+
* g_value_set_string (&values[0], "John Smith");
|
|
377
|
+
* tracker_batch_add_statementv (batch, stmt,
|
|
378
|
+
* G_N_ELEMENTS (names),
|
|
379
|
+
* names, values);
|
|
380
|
+
* ```
|
|
381
|
+
* </code></pre></div>
|
|
382
|
+
*
|
|
383
|
+
* <div class="gi-lang-python"><pre><code class="language-python">
|
|
384
|
+
*
|
|
385
|
+
* ```
|
|
386
|
+
* batch.add_statement(stmt, ['name'], ['John Smith']);
|
|
387
|
+
* ```
|
|
388
|
+
* </code></pre></div>
|
|
389
|
+
*
|
|
390
|
+
* <div class="gi-lang-javascript"><pre><code class="language-javascript">
|
|
391
|
+
*
|
|
392
|
+
* ```
|
|
393
|
+
* batch.add_statement(stmt, ['name'], ['John Smith']);
|
|
394
|
+
* ```
|
|
395
|
+
* </code></pre></div>
|
|
396
|
+
*
|
|
397
|
+
* The #TrackerSparqlStatement may be used on multiple tracker_batch_add_statement()
|
|
398
|
+
* calls with the same or different values, on the same or different #TrackerBatch
|
|
399
|
+
* objects.
|
|
400
|
+
*
|
|
401
|
+
* This function should only be called on #TrackerSparqlStatement objects
|
|
402
|
+
* obtained through tracker_sparql_connection_update_statement() or
|
|
403
|
+
* update statements loaded through tracker_sparql_connection_load_statement_from_gresource().
|
|
404
|
+
* @param stmt a #TrackerSparqlStatement containing a SPARQL update
|
|
405
|
+
* @param variable_names the names of each bound parameter
|
|
406
|
+
* @param values the values of each bound parameter
|
|
407
|
+
*/
|
|
408
|
+
add_statement(stmt: SparqlStatement, variable_names: string[], values: any[]): void
|
|
409
|
+
/**
|
|
410
|
+
* Executes the batch. This operations happens synchronously.
|
|
411
|
+
* @param cancellable a #GCancellable, or %NULL
|
|
412
|
+
* @returns %TRUE of there were no errors, %FALSE otherwise
|
|
413
|
+
*/
|
|
414
|
+
execute(cancellable: Gio.Cancellable | null): boolean
|
|
415
|
+
/**
|
|
416
|
+
* Executes the batch. This operation happens asynchronously, when
|
|
417
|
+
* finished `callback` will be executed.
|
|
418
|
+
* @param cancellable a #GCancellable, or %NULL
|
|
419
|
+
* @param callback user-defined #GAsyncReadyCallback to be called when asynchronous operation is finished.
|
|
420
|
+
*/
|
|
421
|
+
execute_async(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
|
|
422
|
+
/**
|
|
423
|
+
* Finishes the operation started with tracker_batch_execute_async().
|
|
424
|
+
* @param res a #GAsyncResult with the result of the operation
|
|
425
|
+
* @returns %TRUE of there were no errors, %FALSE otherwise
|
|
426
|
+
*/
|
|
427
|
+
execute_finish(res: Gio.AsyncResult): boolean
|
|
428
|
+
/**
|
|
429
|
+
* Returns the #TrackerSparqlConnection that this batch was created from.
|
|
430
|
+
* @returns The SPARQL connection of this batch.
|
|
431
|
+
*/
|
|
432
|
+
get_connection(): SparqlConnection
|
|
433
|
+
|
|
434
|
+
// Class property signals of Tracker-3.0.Tracker.Batch
|
|
435
|
+
|
|
436
|
+
connect(sigName: "notify::connection", callback: (($obj: Batch, pspec: GObject.ParamSpec) => void)): number
|
|
437
|
+
connect_after(sigName: "notify::connection", callback: (($obj: Batch, pspec: GObject.ParamSpec) => void)): number
|
|
438
|
+
emit(sigName: "notify::connection", ...args: any[]): void
|
|
439
|
+
connect(sigName: string, callback: (...args: any[]) => void): number
|
|
440
|
+
connect_after(sigName: string, callback: (...args: any[]) => void): number
|
|
441
|
+
emit(sigName: string, ...args: any[]): void
|
|
442
|
+
disconnect(id: number): void
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
export class Batch extends GObject.Object {
|
|
446
|
+
|
|
447
|
+
// Own properties of Tracker-3.0.Tracker.Batch
|
|
448
|
+
|
|
449
|
+
static name: string
|
|
450
|
+
static $gtype: GObject.GType<Batch>
|
|
451
|
+
|
|
452
|
+
// Constructors of Tracker-3.0.Tracker.Batch
|
|
453
|
+
|
|
454
|
+
constructor(config?: Batch.ConstructorProperties)
|
|
455
|
+
_init(config?: Batch.ConstructorProperties): void
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
export module Endpoint {
|
|
459
|
+
|
|
460
|
+
// Constructor properties interface
|
|
461
|
+
|
|
462
|
+
export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
|
|
463
|
+
|
|
464
|
+
// Own constructor properties of Tracker-3.0.Tracker.Endpoint
|
|
465
|
+
|
|
466
|
+
sparql_connection?: SparqlConnection | null
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
export interface Endpoint {
|
|
472
|
+
|
|
473
|
+
// Own properties of Tracker-3.0.Tracker.Endpoint
|
|
474
|
+
|
|
475
|
+
readonly sparql_connection: SparqlConnection
|
|
476
|
+
|
|
477
|
+
// Own fields of Tracker-3.0.Tracker.Endpoint
|
|
478
|
+
|
|
479
|
+
parent_instance: GObject.Object
|
|
480
|
+
|
|
481
|
+
// Owm methods of Tracker-3.0.Tracker.Endpoint
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* Returns the #TrackerSparqlConnection that this endpoint proxies.
|
|
485
|
+
* @returns The proxied SPARQL connection
|
|
486
|
+
*/
|
|
487
|
+
get_sparql_connection(): SparqlConnection
|
|
488
|
+
|
|
489
|
+
// Class property signals of Tracker-3.0.Tracker.Endpoint
|
|
490
|
+
|
|
491
|
+
connect(sigName: "notify::sparql-connection", callback: (($obj: Endpoint, pspec: GObject.ParamSpec) => void)): number
|
|
492
|
+
connect_after(sigName: "notify::sparql-connection", callback: (($obj: Endpoint, pspec: GObject.ParamSpec) => void)): number
|
|
493
|
+
emit(sigName: "notify::sparql-connection", ...args: any[]): void
|
|
494
|
+
connect(sigName: string, callback: (...args: any[]) => void): number
|
|
495
|
+
connect_after(sigName: string, callback: (...args: any[]) => void): number
|
|
496
|
+
emit(sigName: string, ...args: any[]): void
|
|
497
|
+
disconnect(id: number): void
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* The <structname>TrackerEndpoint</structname> object represents a public
|
|
502
|
+
* connection to a #TrackerSparqlConnection.
|
|
503
|
+
* @class
|
|
504
|
+
*/
|
|
505
|
+
export class Endpoint extends GObject.Object {
|
|
506
|
+
|
|
507
|
+
// Own properties of Tracker-3.0.Tracker.Endpoint
|
|
508
|
+
|
|
509
|
+
static name: string
|
|
510
|
+
static $gtype: GObject.GType<Endpoint>
|
|
511
|
+
|
|
512
|
+
// Constructors of Tracker-3.0.Tracker.Endpoint
|
|
513
|
+
|
|
514
|
+
constructor(config?: Endpoint.ConstructorProperties)
|
|
515
|
+
_init(config?: Endpoint.ConstructorProperties): void
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
export module EndpointDBus {
|
|
519
|
+
|
|
520
|
+
// Constructor properties interface
|
|
521
|
+
|
|
522
|
+
export interface ConstructorProperties extends Gio.Initable.ConstructorProperties, Endpoint.ConstructorProperties {
|
|
523
|
+
|
|
524
|
+
// Own constructor properties of Tracker-3.0.Tracker.EndpointDBus
|
|
525
|
+
|
|
526
|
+
dbus_connection?: Gio.DBusConnection | null
|
|
527
|
+
object_path?: string | null
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
export interface EndpointDBus extends Gio.Initable {
|
|
533
|
+
|
|
534
|
+
// Own properties of Tracker-3.0.Tracker.EndpointDBus
|
|
535
|
+
|
|
536
|
+
readonly dbus_connection: Gio.DBusConnection
|
|
537
|
+
readonly object_path: string | null
|
|
538
|
+
|
|
539
|
+
// Class property signals of Tracker-3.0.Tracker.EndpointDBus
|
|
540
|
+
|
|
541
|
+
connect(sigName: "notify::dbus-connection", callback: (($obj: EndpointDBus, pspec: GObject.ParamSpec) => void)): number
|
|
542
|
+
connect_after(sigName: "notify::dbus-connection", callback: (($obj: EndpointDBus, pspec: GObject.ParamSpec) => void)): number
|
|
543
|
+
emit(sigName: "notify::dbus-connection", ...args: any[]): void
|
|
544
|
+
connect(sigName: "notify::object-path", callback: (($obj: EndpointDBus, pspec: GObject.ParamSpec) => void)): number
|
|
545
|
+
connect_after(sigName: "notify::object-path", callback: (($obj: EndpointDBus, pspec: GObject.ParamSpec) => void)): number
|
|
546
|
+
emit(sigName: "notify::object-path", ...args: any[]): void
|
|
547
|
+
connect(sigName: "notify::sparql-connection", callback: (($obj: EndpointDBus, pspec: GObject.ParamSpec) => void)): number
|
|
548
|
+
connect_after(sigName: "notify::sparql-connection", callback: (($obj: EndpointDBus, pspec: GObject.ParamSpec) => void)): number
|
|
549
|
+
emit(sigName: "notify::sparql-connection", ...args: any[]): void
|
|
550
|
+
connect(sigName: string, callback: (...args: any[]) => void): number
|
|
551
|
+
connect_after(sigName: string, callback: (...args: any[]) => void): number
|
|
552
|
+
emit(sigName: string, ...args: any[]): void
|
|
553
|
+
disconnect(id: number): void
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
/**
|
|
557
|
+
* The <structname>TrackerEndpointDBus</structname> object represents a public
|
|
558
|
+
* connection to a #TrackerSparqlConnection on a DBus object path.
|
|
559
|
+
* @class
|
|
560
|
+
*/
|
|
561
|
+
export class EndpointDBus extends Endpoint {
|
|
562
|
+
|
|
563
|
+
// Own properties of Tracker-3.0.Tracker.EndpointDBus
|
|
564
|
+
|
|
565
|
+
static name: string
|
|
566
|
+
static $gtype: GObject.GType<EndpointDBus>
|
|
567
|
+
|
|
568
|
+
// Constructors of Tracker-3.0.Tracker.EndpointDBus
|
|
569
|
+
|
|
570
|
+
constructor(config?: EndpointDBus.ConstructorProperties)
|
|
571
|
+
/**
|
|
572
|
+
* Registers a Tracker endpoint object at `object_path` on `dbus_connection`.
|
|
573
|
+
* The default object path is "/org/freedesktop/Tracker3/Endpoint".
|
|
574
|
+
* @constructor
|
|
575
|
+
* @param sparql_connection a #TrackerSparqlConnection
|
|
576
|
+
* @param dbus_connection a #GDBusConnection
|
|
577
|
+
* @param object_path the object path to use, or %NULL for the default
|
|
578
|
+
* @param cancellable a #GCancellable, or %NULL
|
|
579
|
+
* @returns a #TrackerEndpointDBus object.
|
|
580
|
+
*/
|
|
581
|
+
constructor(sparql_connection: SparqlConnection, dbus_connection: Gio.DBusConnection, object_path: string | null, cancellable: Gio.Cancellable | null)
|
|
582
|
+
/**
|
|
583
|
+
* Registers a Tracker endpoint object at `object_path` on `dbus_connection`.
|
|
584
|
+
* The default object path is "/org/freedesktop/Tracker3/Endpoint".
|
|
585
|
+
* @constructor
|
|
586
|
+
* @param sparql_connection a #TrackerSparqlConnection
|
|
587
|
+
* @param dbus_connection a #GDBusConnection
|
|
588
|
+
* @param object_path the object path to use, or %NULL for the default
|
|
589
|
+
* @param cancellable a #GCancellable, or %NULL
|
|
590
|
+
* @returns a #TrackerEndpointDBus object.
|
|
591
|
+
*/
|
|
592
|
+
static new(sparql_connection: SparqlConnection, dbus_connection: Gio.DBusConnection, object_path: string | null, cancellable: Gio.Cancellable | null): EndpointDBus
|
|
593
|
+
_init(config?: EndpointDBus.ConstructorProperties): void
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
export module EndpointHttp {
|
|
597
|
+
|
|
598
|
+
// Signal callback interfaces
|
|
599
|
+
|
|
600
|
+
/**
|
|
601
|
+
* Signal callback interface for `block-remote-address`
|
|
602
|
+
*/
|
|
603
|
+
export interface BlockRemoteAddressSignalCallback {
|
|
604
|
+
($obj: EndpointHttp, address: Gio.SocketAddress): boolean
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
// Constructor properties interface
|
|
609
|
+
|
|
610
|
+
export interface ConstructorProperties extends Gio.Initable.ConstructorProperties, Endpoint.ConstructorProperties {
|
|
611
|
+
|
|
612
|
+
// Own constructor properties of Tracker-3.0.Tracker.EndpointHttp
|
|
613
|
+
|
|
614
|
+
http_certificate?: Gio.TlsCertificate | null
|
|
615
|
+
http_port?: number | null
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
export interface EndpointHttp extends Gio.Initable {
|
|
621
|
+
|
|
622
|
+
// Own properties of Tracker-3.0.Tracker.EndpointHttp
|
|
623
|
+
|
|
624
|
+
readonly http_certificate: Gio.TlsCertificate
|
|
625
|
+
readonly http_port: number
|
|
626
|
+
|
|
627
|
+
// Own signals of Tracker-3.0.Tracker.EndpointHttp
|
|
628
|
+
|
|
629
|
+
connect(sigName: "block-remote-address", callback: EndpointHttp.BlockRemoteAddressSignalCallback): number
|
|
630
|
+
connect_after(sigName: "block-remote-address", callback: EndpointHttp.BlockRemoteAddressSignalCallback): number
|
|
631
|
+
emit(sigName: "block-remote-address", address: Gio.SocketAddress, ...args: any[]): void
|
|
632
|
+
|
|
633
|
+
// Class property signals of Tracker-3.0.Tracker.EndpointHttp
|
|
634
|
+
|
|
635
|
+
connect(sigName: "notify::http-certificate", callback: (($obj: EndpointHttp, pspec: GObject.ParamSpec) => void)): number
|
|
636
|
+
connect_after(sigName: "notify::http-certificate", callback: (($obj: EndpointHttp, pspec: GObject.ParamSpec) => void)): number
|
|
637
|
+
emit(sigName: "notify::http-certificate", ...args: any[]): void
|
|
638
|
+
connect(sigName: "notify::http-port", callback: (($obj: EndpointHttp, pspec: GObject.ParamSpec) => void)): number
|
|
639
|
+
connect_after(sigName: "notify::http-port", callback: (($obj: EndpointHttp, pspec: GObject.ParamSpec) => void)): number
|
|
640
|
+
emit(sigName: "notify::http-port", ...args: any[]): void
|
|
641
|
+
connect(sigName: "notify::sparql-connection", callback: (($obj: EndpointHttp, pspec: GObject.ParamSpec) => void)): number
|
|
642
|
+
connect_after(sigName: "notify::sparql-connection", callback: (($obj: EndpointHttp, pspec: GObject.ParamSpec) => void)): number
|
|
643
|
+
emit(sigName: "notify::sparql-connection", ...args: any[]): void
|
|
644
|
+
connect(sigName: string, callback: (...args: any[]) => void): number
|
|
645
|
+
connect_after(sigName: string, callback: (...args: any[]) => void): number
|
|
646
|
+
emit(sigName: string, ...args: any[]): void
|
|
647
|
+
disconnect(id: number): void
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
/**
|
|
651
|
+
* The <structname>TrackerEndpointHttp</structname> object represents a public
|
|
652
|
+
* connection to a #TrackerSparqlConnection on a HTTP port.
|
|
653
|
+
* @class
|
|
654
|
+
*/
|
|
655
|
+
export class EndpointHttp extends Endpoint {
|
|
656
|
+
|
|
657
|
+
// Own properties of Tracker-3.0.Tracker.EndpointHttp
|
|
658
|
+
|
|
659
|
+
static name: string
|
|
660
|
+
static $gtype: GObject.GType<EndpointHttp>
|
|
661
|
+
|
|
662
|
+
// Constructors of Tracker-3.0.Tracker.EndpointHttp
|
|
663
|
+
|
|
664
|
+
constructor(config?: EndpointHttp.ConstructorProperties)
|
|
665
|
+
/**
|
|
666
|
+
* Sets up a Tracker endpoint to listen via HTTP, in the given `port`.
|
|
667
|
+
* If `certificate` is not %NULL, HTTPS may be used to connect to the
|
|
668
|
+
* endpoint.
|
|
669
|
+
* @constructor
|
|
670
|
+
* @param sparql_connection a #TrackerSparqlConnection
|
|
671
|
+
* @param port HTTP port to listen to
|
|
672
|
+
* @param certificate certificate to use for encription, or %NULL
|
|
673
|
+
* @param cancellable a #GCancellable, or %NULL
|
|
674
|
+
* @returns a #TrackerEndpointDBus object.
|
|
675
|
+
*/
|
|
676
|
+
constructor(sparql_connection: SparqlConnection, port: number, certificate: Gio.TlsCertificate | null, cancellable: Gio.Cancellable | null)
|
|
677
|
+
/**
|
|
678
|
+
* Sets up a Tracker endpoint to listen via HTTP, in the given `port`.
|
|
679
|
+
* If `certificate` is not %NULL, HTTPS may be used to connect to the
|
|
680
|
+
* endpoint.
|
|
681
|
+
* @constructor
|
|
682
|
+
* @param sparql_connection a #TrackerSparqlConnection
|
|
683
|
+
* @param port HTTP port to listen to
|
|
684
|
+
* @param certificate certificate to use for encription, or %NULL
|
|
685
|
+
* @param cancellable a #GCancellable, or %NULL
|
|
686
|
+
* @returns a #TrackerEndpointDBus object.
|
|
687
|
+
*/
|
|
688
|
+
static new(sparql_connection: SparqlConnection, port: number, certificate: Gio.TlsCertificate | null, cancellable: Gio.Cancellable | null): EndpointHttp
|
|
689
|
+
_init(config?: EndpointHttp.ConstructorProperties): void
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
export module NamespaceManager {
|
|
693
|
+
|
|
694
|
+
// Constructor properties interface
|
|
695
|
+
|
|
696
|
+
export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
export interface NamespaceManager {
|
|
702
|
+
|
|
703
|
+
// Owm methods of Tracker-3.0.Tracker.NamespaceManager
|
|
704
|
+
|
|
705
|
+
/**
|
|
706
|
+
* Adds `prefix` as the recognised abbreviaton of `namespace`.
|
|
707
|
+
*
|
|
708
|
+
* Only one prefix is allowed for a given namespace, and all prefixes must
|
|
709
|
+
* be unique.
|
|
710
|
+
*
|
|
711
|
+
* Since 3.3, This function may not be used on #TrackerNamespaceManager
|
|
712
|
+
* instances that were obtained through
|
|
713
|
+
* tracker_sparql_connection_get_namespace_manager().
|
|
714
|
+
* @param prefix a short, unique prefix to identify `namespace`
|
|
715
|
+
* @param ns the URL of the given namespace
|
|
716
|
+
*/
|
|
717
|
+
add_prefix(prefix: string | null, ns: string | null): void
|
|
718
|
+
/**
|
|
719
|
+
* If `uri` begins with one of the namespaces known to this
|
|
720
|
+
* #TrackerNamespaceManager, then the return value will be the
|
|
721
|
+
* compressed URI. Otherwise, %NULL will be returned.
|
|
722
|
+
* @param uri a URI or compact URI
|
|
723
|
+
* @returns (nullable): the compressed URI
|
|
724
|
+
*/
|
|
725
|
+
compress_uri(uri: string | null): string | null
|
|
726
|
+
/**
|
|
727
|
+
* If `compact_uri` begins with one of the prefixes known to this
|
|
728
|
+
* #TrackerNamespaceManager, then the return value will be the
|
|
729
|
+
* expanded URI. Otherwise, a copy of `compact_uri` will be returned.
|
|
730
|
+
* @param compact_uri a URI or compact URI
|
|
731
|
+
* @returns a newly-allocated string
|
|
732
|
+
*/
|
|
733
|
+
expand_uri(compact_uri: string | null): string | null
|
|
734
|
+
/**
|
|
735
|
+
* Calls `func` for each known prefix / URI pair.
|
|
736
|
+
* @param func the function to call for each prefix / URI pair
|
|
737
|
+
*/
|
|
738
|
+
foreach(func: GLib.HFunc): void
|
|
739
|
+
/**
|
|
740
|
+
* Returns whether `prefix` is known.
|
|
741
|
+
* @param prefix a string
|
|
742
|
+
* @returns %TRUE if the #TrackerNamespaceManager knows about @prefix, %FALSE otherwise
|
|
743
|
+
*/
|
|
744
|
+
has_prefix(prefix: string | null): boolean
|
|
745
|
+
/**
|
|
746
|
+
* Looks up the namespace URI corresponding to `prefix,` or %NULL if the prefix
|
|
747
|
+
* is not known.
|
|
748
|
+
* @param prefix a string
|
|
749
|
+
* @returns a string owned by the #TrackerNamespaceManager, or %NULL
|
|
750
|
+
*/
|
|
751
|
+
lookup_prefix(prefix: string | null): string | null
|
|
752
|
+
/**
|
|
753
|
+
* Writes out all namespaces as Turtle `prefix` statements.
|
|
754
|
+
* @returns a newly-allocated string
|
|
755
|
+
*/
|
|
756
|
+
print_turtle(): string | null
|
|
757
|
+
|
|
758
|
+
// Class property signals of Tracker-3.0.Tracker.NamespaceManager
|
|
759
|
+
|
|
760
|
+
connect(sigName: string, callback: (...args: any[]) => void): number
|
|
761
|
+
connect_after(sigName: string, callback: (...args: any[]) => void): number
|
|
762
|
+
emit(sigName: string, ...args: any[]): void
|
|
763
|
+
disconnect(id: number): void
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
/**
|
|
767
|
+
* The <structname>TrackerNamespaceManager</structname> object represents a
|
|
768
|
+
* mapping of prefixes and namespaces.
|
|
769
|
+
* @class
|
|
770
|
+
*/
|
|
771
|
+
export class NamespaceManager extends GObject.Object {
|
|
772
|
+
|
|
773
|
+
// Own properties of Tracker-3.0.Tracker.NamespaceManager
|
|
774
|
+
|
|
775
|
+
static name: string
|
|
776
|
+
static $gtype: GObject.GType<NamespaceManager>
|
|
777
|
+
|
|
778
|
+
// Constructors of Tracker-3.0.Tracker.NamespaceManager
|
|
779
|
+
|
|
780
|
+
constructor(config?: NamespaceManager.ConstructorProperties)
|
|
781
|
+
/**
|
|
782
|
+
* Creates a new #TrackerNamespaceManager instance.
|
|
783
|
+
* @constructor
|
|
784
|
+
* @returns a new #TrackerNamespaceManager instance
|
|
785
|
+
*/
|
|
786
|
+
constructor()
|
|
787
|
+
/**
|
|
788
|
+
* Creates a new #TrackerNamespaceManager instance.
|
|
789
|
+
* @constructor
|
|
790
|
+
* @returns a new #TrackerNamespaceManager instance
|
|
791
|
+
*/
|
|
792
|
+
static new(): NamespaceManager
|
|
793
|
+
_init(config?: NamespaceManager.ConstructorProperties): void
|
|
794
|
+
/**
|
|
795
|
+
* Returns the global #TrackerNamespaceManager that contains a set of well-known
|
|
796
|
+
* namespaces and prefixes, such as rdf:, rdfs:, nie:, tracker:, etc.
|
|
797
|
+
*
|
|
798
|
+
* Note that the list of prefixes and namespaces is hardcoded in
|
|
799
|
+
* libtracker-sparql. It may not correspond with the installed set of
|
|
800
|
+
* ontologies, if they have been modified since they were installed.
|
|
801
|
+
* @returns a global, shared #TrackerNamespaceManager instance
|
|
802
|
+
*/
|
|
803
|
+
static get_default(): NamespaceManager
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
export module Notifier {
|
|
807
|
+
|
|
808
|
+
// Signal callback interfaces
|
|
809
|
+
|
|
810
|
+
/**
|
|
811
|
+
* Signal callback interface for `events`
|
|
812
|
+
*/
|
|
813
|
+
export interface EventsSignalCallback {
|
|
814
|
+
($obj: Notifier, service: string | null, graph: string | null, events: NotifierEvent[]): void
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
|
|
818
|
+
// Constructor properties interface
|
|
819
|
+
|
|
820
|
+
export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
|
|
821
|
+
|
|
822
|
+
// Own constructor properties of Tracker-3.0.Tracker.Notifier
|
|
823
|
+
|
|
824
|
+
/**
|
|
825
|
+
* SPARQL connection to listen to.
|
|
826
|
+
*/
|
|
827
|
+
connection?: SparqlConnection | null
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
export interface Notifier {
|
|
833
|
+
|
|
834
|
+
// Own properties of Tracker-3.0.Tracker.Notifier
|
|
835
|
+
|
|
836
|
+
/**
|
|
837
|
+
* SPARQL connection to listen to.
|
|
838
|
+
*/
|
|
839
|
+
readonly connection: SparqlConnection
|
|
840
|
+
|
|
841
|
+
// Own fields of Tracker-3.0.Tracker.Notifier
|
|
842
|
+
|
|
843
|
+
parent_instance: GObject.Object
|
|
844
|
+
|
|
845
|
+
// Owm methods of Tracker-3.0.Tracker.Notifier
|
|
846
|
+
|
|
847
|
+
/**
|
|
848
|
+
* Listens to notification events from a remote SPARQL endpoint as a DBus
|
|
849
|
+
* service (see #TrackerEndpointDBus). If the `object_path` argument is
|
|
850
|
+
* %NULL, the default "/org/freedesktop/Tracker3/Endpoint" path will be
|
|
851
|
+
* used. If `graph` is %NULL, all graphs will be listened for.
|
|
852
|
+
*
|
|
853
|
+
* The signal subscription can be removed with
|
|
854
|
+
* tracker_notifier_signal_unsubscribe().
|
|
855
|
+
* @param connection a #GDBusConnection
|
|
856
|
+
* @param service DBus service name to subscribe to events for
|
|
857
|
+
* @param object_path DBus object path to subscribe to events for, or %NULL
|
|
858
|
+
* @param graph graph to listen events for, or %NULL
|
|
859
|
+
* @returns An ID for this subscription
|
|
860
|
+
*/
|
|
861
|
+
signal_subscribe(connection: Gio.DBusConnection, service: string | null, object_path: string | null, graph: string | null): number
|
|
862
|
+
/**
|
|
863
|
+
* Undoes a DBus signal subscription, the `handler_id` argument was previously
|
|
864
|
+
* obtained with a tracker_notifier_signal_subscribe() call.
|
|
865
|
+
* @param handler_id a handler ID obtained with tracker_notifier_signal_subscribe()
|
|
866
|
+
*/
|
|
867
|
+
signal_unsubscribe(handler_id: number): void
|
|
868
|
+
|
|
869
|
+
// Own signals of Tracker-3.0.Tracker.Notifier
|
|
870
|
+
|
|
871
|
+
connect(sigName: "events", callback: Notifier.EventsSignalCallback): number
|
|
872
|
+
connect_after(sigName: "events", callback: Notifier.EventsSignalCallback): number
|
|
873
|
+
emit(sigName: "events", service: string | null, graph: string | null, events: NotifierEvent[], ...args: any[]): void
|
|
874
|
+
|
|
875
|
+
// Class property signals of Tracker-3.0.Tracker.Notifier
|
|
876
|
+
|
|
877
|
+
connect(sigName: "notify::connection", callback: (($obj: Notifier, pspec: GObject.ParamSpec) => void)): number
|
|
878
|
+
connect_after(sigName: "notify::connection", callback: (($obj: Notifier, pspec: GObject.ParamSpec) => void)): number
|
|
879
|
+
emit(sigName: "notify::connection", ...args: any[]): void
|
|
880
|
+
connect(sigName: string, callback: (...args: any[]) => void): number
|
|
881
|
+
connect_after(sigName: string, callback: (...args: any[]) => void): number
|
|
882
|
+
emit(sigName: string, ...args: any[]): void
|
|
883
|
+
disconnect(id: number): void
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
/**
|
|
887
|
+
* The <structname>TrackerNotifier</structname> object allows subscribing
|
|
888
|
+
* to changes in the stored data.
|
|
889
|
+
* @class
|
|
890
|
+
*/
|
|
891
|
+
export class Notifier extends GObject.Object {
|
|
892
|
+
|
|
893
|
+
// Own properties of Tracker-3.0.Tracker.Notifier
|
|
894
|
+
|
|
895
|
+
static name: string
|
|
896
|
+
static $gtype: GObject.GType<Notifier>
|
|
897
|
+
|
|
898
|
+
// Constructors of Tracker-3.0.Tracker.Notifier
|
|
899
|
+
|
|
900
|
+
constructor(config?: Notifier.ConstructorProperties)
|
|
901
|
+
_init(config?: Notifier.ConstructorProperties): void
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
export module Resource {
|
|
905
|
+
|
|
906
|
+
// Constructor properties interface
|
|
907
|
+
|
|
908
|
+
export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
|
|
909
|
+
|
|
910
|
+
// Own constructor properties of Tracker-3.0.Tracker.Resource
|
|
911
|
+
|
|
912
|
+
/**
|
|
913
|
+
* The URI identifier for this class, or %NULL for a
|
|
914
|
+
* blank node.
|
|
915
|
+
*/
|
|
916
|
+
identifier?: string | null
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
export interface Resource {
|
|
922
|
+
|
|
923
|
+
// Own properties of Tracker-3.0.Tracker.Resource
|
|
924
|
+
|
|
925
|
+
/**
|
|
926
|
+
* The URI identifier for this class, or %NULL for a
|
|
927
|
+
* blank node.
|
|
928
|
+
*/
|
|
929
|
+
identifier: string | null
|
|
930
|
+
|
|
931
|
+
// Own fields of Tracker-3.0.Tracker.Resource
|
|
932
|
+
|
|
933
|
+
parent_instance: GObject.Object
|
|
934
|
+
|
|
935
|
+
// Owm methods of Tracker-3.0.Tracker.Resource
|
|
936
|
+
|
|
937
|
+
/**
|
|
938
|
+
* Adds a boolean object to a multi-valued property.
|
|
939
|
+
* @param property_uri a string identifying the property to modify
|
|
940
|
+
* @param value the property object
|
|
941
|
+
*/
|
|
942
|
+
add_boolean(property_uri: string | null, value: boolean): void
|
|
943
|
+
/**
|
|
944
|
+
* Adds GDateTime object to the multi-valued property.
|
|
945
|
+
* @param property_uri a string identifying the property to modify
|
|
946
|
+
* @param value the property object
|
|
947
|
+
*/
|
|
948
|
+
add_datetime(property_uri: string | null, value: GLib.DateTime): void
|
|
949
|
+
/**
|
|
950
|
+
* Adds a double object to a multi-valued property.
|
|
951
|
+
* @param property_uri a string identifying the property to modify
|
|
952
|
+
* @param value the property object
|
|
953
|
+
*/
|
|
954
|
+
add_double(property_uri: string | null, value: number): void
|
|
955
|
+
/**
|
|
956
|
+
* Add 'value' to the list of values for given property.
|
|
957
|
+
*
|
|
958
|
+
* You can pass any kind of GValue for `value,` but serialization functions will
|
|
959
|
+
* normally only be able to serialize URIs/relationships and fundamental value
|
|
960
|
+
* types (string, int, etc.).
|
|
961
|
+
* @param property_uri a string identifying the property to set
|
|
962
|
+
* @param value an initialised #GValue
|
|
963
|
+
*/
|
|
964
|
+
add_gvalue(property_uri: string | null, value: any): void
|
|
965
|
+
/**
|
|
966
|
+
* Adds an integer object to a multi-valued property.
|
|
967
|
+
* @param property_uri a string identifying the property to modify
|
|
968
|
+
* @param value the property object
|
|
969
|
+
*/
|
|
970
|
+
add_int(property_uri: string | null, value: number): void
|
|
971
|
+
/**
|
|
972
|
+
* Adds an integer object to a multi-valued property.
|
|
973
|
+
* @param property_uri a string identifying the property to modify
|
|
974
|
+
* @param value the property object
|
|
975
|
+
*/
|
|
976
|
+
add_int64(property_uri: string | null, value: number): void
|
|
977
|
+
/**
|
|
978
|
+
* Adds a resource object to a multi-valued property. This
|
|
979
|
+
* function produces similar RDF to tracker_resource_add_uri(),
|
|
980
|
+
* although in this function the URI will depend on the identifier
|
|
981
|
+
* set on `resource`.
|
|
982
|
+
* @param property_uri a string identifying the property to modify
|
|
983
|
+
* @param resource the property object
|
|
984
|
+
*/
|
|
985
|
+
add_relation(property_uri: string | null, resource: Resource): void
|
|
986
|
+
/**
|
|
987
|
+
* Adds a string object to a multi-valued property.
|
|
988
|
+
* @param property_uri a string identifying the property to modify
|
|
989
|
+
* @param value the property object
|
|
990
|
+
*/
|
|
991
|
+
add_string(property_uri: string | null, value: string | null): void
|
|
992
|
+
/**
|
|
993
|
+
* Adds a resource object to a multi-valued property. This
|
|
994
|
+
* function produces similar RDF to tracker_resource_add_uri(),
|
|
995
|
+
* although in this function the URI will depend on the identifier
|
|
996
|
+
* set on `resource`. This function takes ownership of `resource`.
|
|
997
|
+
* @param property_uri a string identifying the property to modify
|
|
998
|
+
* @param resource the property object
|
|
999
|
+
*/
|
|
1000
|
+
add_take_relation(property_uri: string | null, resource: Resource): void
|
|
1001
|
+
/**
|
|
1002
|
+
* Adds a resource object to a multi-valued property. This function
|
|
1003
|
+
* produces similar RDF to tracker_resource_add_relation(), although
|
|
1004
|
+
* it requires that the URI is previously known.
|
|
1005
|
+
* @param property_uri a string identifying the property to modify
|
|
1006
|
+
* @param value the property object
|
|
1007
|
+
*/
|
|
1008
|
+
add_uri(property_uri: string | null, value: string | null): void
|
|
1009
|
+
/**
|
|
1010
|
+
* Returns the first boolean object previously assigned to a property.
|
|
1011
|
+
* @param property_uri a string identifying the property to look up
|
|
1012
|
+
* @returns the first boolean object
|
|
1013
|
+
*/
|
|
1014
|
+
get_first_boolean(property_uri: string | null): boolean
|
|
1015
|
+
/**
|
|
1016
|
+
* Returns the first resource object previously assigned to a property.
|
|
1017
|
+
* @param property_uri a string identifying the property to look up
|
|
1018
|
+
* @returns the first GDateTime object
|
|
1019
|
+
*/
|
|
1020
|
+
get_first_datetime(property_uri: string | null): GLib.DateTime | null
|
|
1021
|
+
/**
|
|
1022
|
+
* Returns the first double object previously assigned to a property.
|
|
1023
|
+
* @param property_uri a string identifying the property to look up
|
|
1024
|
+
* @returns the first double object
|
|
1025
|
+
*/
|
|
1026
|
+
get_first_double(property_uri: string | null): number
|
|
1027
|
+
/**
|
|
1028
|
+
* Returns the first integer object previously assigned to a property.
|
|
1029
|
+
* @param property_uri a string identifying the property to look up
|
|
1030
|
+
* @returns the first integer object
|
|
1031
|
+
*/
|
|
1032
|
+
get_first_int(property_uri: string | null): number
|
|
1033
|
+
/**
|
|
1034
|
+
* Returns the first integer object previously assigned to a property.
|
|
1035
|
+
* @param property_uri a string identifying the property to look up
|
|
1036
|
+
* @returns the first integer object
|
|
1037
|
+
*/
|
|
1038
|
+
get_first_int64(property_uri: string | null): number
|
|
1039
|
+
/**
|
|
1040
|
+
* Returns the first resource object previously assigned to a property.
|
|
1041
|
+
* @param property_uri a string identifying the property to look up
|
|
1042
|
+
* @returns the first resource object
|
|
1043
|
+
*/
|
|
1044
|
+
get_first_relation(property_uri: string | null): Resource | null
|
|
1045
|
+
/**
|
|
1046
|
+
* Returns the first string object previously assigned to a property.
|
|
1047
|
+
* @param property_uri a string identifying the property to look up
|
|
1048
|
+
* @returns the first string object
|
|
1049
|
+
*/
|
|
1050
|
+
get_first_string(property_uri: string | null): string | null
|
|
1051
|
+
/**
|
|
1052
|
+
* Returns the first resource object previously assigned to a property.
|
|
1053
|
+
* @param property_uri a string identifying the property to look up
|
|
1054
|
+
* @returns the first resource object as an URI.
|
|
1055
|
+
*/
|
|
1056
|
+
get_first_uri(property_uri: string | null): string | null
|
|
1057
|
+
/**
|
|
1058
|
+
* Returns the identifier of a resource.
|
|
1059
|
+
*
|
|
1060
|
+
* If the identifier was set to NULL, the identifier returned will be a unique
|
|
1061
|
+
* SPARQL blank node identifier, such as "_:123".
|
|
1062
|
+
* @returns a string owned by the resource
|
|
1063
|
+
*/
|
|
1064
|
+
get_identifier(): string | null
|
|
1065
|
+
/**
|
|
1066
|
+
* Gets the list of properties defined in `resource`
|
|
1067
|
+
* @returns The list of properties. The list should be freed with g_list_free().
|
|
1068
|
+
*/
|
|
1069
|
+
get_properties(): string[]
|
|
1070
|
+
/**
|
|
1071
|
+
* Returns whether the prior values for this property would be deleted
|
|
1072
|
+
* in the SPARQL issued by `resource`.
|
|
1073
|
+
* @param property_uri a string identifying the property to query
|
|
1074
|
+
* @returns #TRUE if the property would be overwritten
|
|
1075
|
+
*/
|
|
1076
|
+
get_property_overwrite(property_uri: string | null): boolean
|
|
1077
|
+
/**
|
|
1078
|
+
* Returns the list of all known values of the given property.
|
|
1079
|
+
* @param property_uri a string identifying the property to look up
|
|
1080
|
+
* @returns a #GList of #GValue instances. The list should be freed with g_list_free()
|
|
1081
|
+
*/
|
|
1082
|
+
get_values(property_uri: string | null): any[] | null
|
|
1083
|
+
/**
|
|
1084
|
+
* A helper function that compares a #TrackerResource by its identifier
|
|
1085
|
+
* string.
|
|
1086
|
+
* @param identifier a string identifying the resource
|
|
1087
|
+
* @returns an integer less than, equal to, or greater than zero, if the resource identifier is <, == or > than @identifier
|
|
1088
|
+
*/
|
|
1089
|
+
identifier_compare_func(identifier: string | null): number
|
|
1090
|
+
/**
|
|
1091
|
+
* Serialize all the information in `resource` as a JSON-LD document.
|
|
1092
|
+
*
|
|
1093
|
+
* See <http://www.jsonld.org/> for more information on the JSON-LD
|
|
1094
|
+
* serialization format.
|
|
1095
|
+
*
|
|
1096
|
+
* The `namespaces` object is used to expand any compact URI values. In most
|
|
1097
|
+
* cases you should pass the one returned by tracker_sparql_connection_get_namespace_manager()
|
|
1098
|
+
* from the connection that is the intended recipient of this data.
|
|
1099
|
+
* @param namespaces a set of prefixed URLs, or %NULL to use the Nepomuk set
|
|
1100
|
+
* @returns a newly-allocated string containing JSON-LD data.
|
|
1101
|
+
*/
|
|
1102
|
+
print_jsonld(namespaces: NamespaceManager | null): string | null
|
|
1103
|
+
/**
|
|
1104
|
+
* Serialize all the information in `resource` into the selected RDF format.
|
|
1105
|
+
*
|
|
1106
|
+
* The `namespaces` object is used to expand any compact URI values. In most
|
|
1107
|
+
* cases you should pass the one returned by tracker_sparql_connection_get_namespace_manager()
|
|
1108
|
+
* from the connection that is the intended recipient of this data.
|
|
1109
|
+
* @param namespaces a set of prefixed URLs
|
|
1110
|
+
* @param format RDF format of the printed string
|
|
1111
|
+
* @param graph target graph of the resource RDF, or %NULL for the default graph
|
|
1112
|
+
* @returns a newly-allocated string containing RDF data in the requested format.
|
|
1113
|
+
*/
|
|
1114
|
+
print_rdf(namespaces: NamespaceManager, format: RdfFormat, graph: string | null): string | null
|
|
1115
|
+
/**
|
|
1116
|
+
* Generates a SPARQL command to update a database with the information
|
|
1117
|
+
* stored in `resource`.
|
|
1118
|
+
*
|
|
1119
|
+
* The `namespaces` object is used to expand any compact URI values. In most
|
|
1120
|
+
* cases you should pass the one returned by tracker_sparql_connection_get_namespace_manager()
|
|
1121
|
+
* from the connection that is the intended recipient of this data.
|
|
1122
|
+
* @param namespaces a set of prefixed URLs, or %NULL to use the Nepomuk set
|
|
1123
|
+
* @param graph_id the URN of the graph the data should be added to, or %NULL
|
|
1124
|
+
* @returns a newly-allocated string containing a SPARQL update command.
|
|
1125
|
+
*/
|
|
1126
|
+
print_sparql_update(namespaces: NamespaceManager | null, graph_id: string | null): string | null
|
|
1127
|
+
/**
|
|
1128
|
+
* Serialize all the information in `resource` as a Turtle document.
|
|
1129
|
+
*
|
|
1130
|
+
* The generated Turtle should correspond to this standard:
|
|
1131
|
+
* <https://www.w3.org/TR/2014/REC-turtle-20140225/>
|
|
1132
|
+
*
|
|
1133
|
+
* The `namespaces` object is used to expand any compact URI values. In most
|
|
1134
|
+
* cases you should pass the one returned by tracker_sparql_connection_get_namespace_manager()
|
|
1135
|
+
* from the connection that is the intended recipient of this data.
|
|
1136
|
+
* @param namespaces a set of prefixed URLs, or %NULL to use the Nepomuk set
|
|
1137
|
+
* @returns a newly-allocated string
|
|
1138
|
+
*/
|
|
1139
|
+
print_turtle(namespaces: NamespaceManager | null): string | null
|
|
1140
|
+
/**
|
|
1141
|
+
* Serializes a #TrackerResource to a #GVariant in a lossless way.
|
|
1142
|
+
* All child resources are subsequently serialized. It is implied
|
|
1143
|
+
* that both ends use a common #TrackerNamespaceManager.
|
|
1144
|
+
* @returns A variant describing the resource, the reference is floating.
|
|
1145
|
+
*/
|
|
1146
|
+
serialize(): GLib.Variant | null
|
|
1147
|
+
/**
|
|
1148
|
+
* Sets a single-valued boolean object.
|
|
1149
|
+
* @param property_uri a string identifying the property to modify
|
|
1150
|
+
* @param value the property object
|
|
1151
|
+
*/
|
|
1152
|
+
set_boolean(property_uri: string | null, value: boolean): void
|
|
1153
|
+
/**
|
|
1154
|
+
* Sets a single-valued GDateTime as a #TrackerResource
|
|
1155
|
+
* @param property_uri a string identifying the property to modify
|
|
1156
|
+
* @param value the property object
|
|
1157
|
+
*/
|
|
1158
|
+
set_datetime(property_uri: string | null, value: GLib.DateTime): void
|
|
1159
|
+
/**
|
|
1160
|
+
* Sets a single-valued double object.
|
|
1161
|
+
* @param property_uri a string identifying the property to modify
|
|
1162
|
+
* @param value the property object
|
|
1163
|
+
*/
|
|
1164
|
+
set_double(property_uri: string | null, value: number): void
|
|
1165
|
+
/**
|
|
1166
|
+
* State that the only value for the given property is 'value'. Any existing
|
|
1167
|
+
* values for 'property' will be removed.
|
|
1168
|
+
*
|
|
1169
|
+
* When serialising to SPARQL, any properties that were set with this function
|
|
1170
|
+
* will get a corresponding DELETE statement to remove any existing values in
|
|
1171
|
+
* the database.
|
|
1172
|
+
*
|
|
1173
|
+
* You can pass any kind of GValue for `value,` but serialization functions will
|
|
1174
|
+
* normally only be able to serialize URIs/relationships and fundamental value
|
|
1175
|
+
* types (string, int, etc.).
|
|
1176
|
+
* @param property_uri a string identifying the property to set
|
|
1177
|
+
* @param value an initialised #GValue
|
|
1178
|
+
*/
|
|
1179
|
+
set_gvalue(property_uri: string | null, value: any): void
|
|
1180
|
+
/**
|
|
1181
|
+
* Changes the identifier of a #TrackerResource. The identifier should be a
|
|
1182
|
+
* URI or compact URI, but this is not necessarily enforced. Invalid
|
|
1183
|
+
* identifiers may cause errors when serializing the resource or trying to
|
|
1184
|
+
* insert the results in a database.
|
|
1185
|
+
*
|
|
1186
|
+
* If the identifier is set to %NULL, a SPARQL blank node identifier such as
|
|
1187
|
+
* "_:123" is assigned to the resource.
|
|
1188
|
+
* @param identifier a string identifying the resource
|
|
1189
|
+
*/
|
|
1190
|
+
set_identifier(identifier: string | null): void
|
|
1191
|
+
/**
|
|
1192
|
+
* Sets a single-valued integer object.
|
|
1193
|
+
* @param property_uri a string identifying the property to modify
|
|
1194
|
+
* @param value the property object
|
|
1195
|
+
*/
|
|
1196
|
+
set_int(property_uri: string | null, value: number): void
|
|
1197
|
+
/**
|
|
1198
|
+
* Sets a single-valued integer object.
|
|
1199
|
+
* @param property_uri a string identifying the property to modify
|
|
1200
|
+
* @param value the property object
|
|
1201
|
+
*/
|
|
1202
|
+
set_int64(property_uri: string | null, value: number): void
|
|
1203
|
+
/**
|
|
1204
|
+
* Sets a single-valued resource object as a #TrackerResource. This
|
|
1205
|
+
* function produces similar RDF to tracker_resource_set_uri(),
|
|
1206
|
+
* although in this function the URI will depend on the identifier
|
|
1207
|
+
* set on `resource`.
|
|
1208
|
+
* @param property_uri a string identifying the property to modify
|
|
1209
|
+
* @param resource the property object
|
|
1210
|
+
*/
|
|
1211
|
+
set_relation(property_uri: string | null, resource: Resource): void
|
|
1212
|
+
/**
|
|
1213
|
+
* Sets a single-valued string object.
|
|
1214
|
+
* @param property_uri a string identifying the property to modify
|
|
1215
|
+
* @param value the property object
|
|
1216
|
+
*/
|
|
1217
|
+
set_string(property_uri: string | null, value: string | null): void
|
|
1218
|
+
/**
|
|
1219
|
+
* Sets a single-valued resource object as a #TrackerResource. This
|
|
1220
|
+
* function produces similar RDF to tracker_resource_set_uri(),
|
|
1221
|
+
* although in this function the URI will depend on the identifier
|
|
1222
|
+
* set on `resource`. This function takes ownership of `resource`.
|
|
1223
|
+
* @param property_uri a string identifying the property to modify
|
|
1224
|
+
* @param resource the property object
|
|
1225
|
+
*/
|
|
1226
|
+
set_take_relation(property_uri: string | null, resource: Resource): void
|
|
1227
|
+
/**
|
|
1228
|
+
* Sets a single-valued resource object as a string URI. This function
|
|
1229
|
+
* produces similar RDF to tracker_resource_set_relation(), although
|
|
1230
|
+
* it requires that the URI is previously known.
|
|
1231
|
+
* @param property_uri a string identifying the property to modify
|
|
1232
|
+
* @param value the property object
|
|
1233
|
+
*/
|
|
1234
|
+
set_uri(property_uri: string | null, value: string | null): void
|
|
1235
|
+
|
|
1236
|
+
// Class property signals of Tracker-3.0.Tracker.Resource
|
|
1237
|
+
|
|
1238
|
+
connect(sigName: "notify::identifier", callback: (($obj: Resource, pspec: GObject.ParamSpec) => void)): number
|
|
1239
|
+
connect_after(sigName: "notify::identifier", callback: (($obj: Resource, pspec: GObject.ParamSpec) => void)): number
|
|
1240
|
+
emit(sigName: "notify::identifier", ...args: any[]): void
|
|
1241
|
+
connect(sigName: string, callback: (...args: any[]) => void): number
|
|
1242
|
+
connect_after(sigName: string, callback: (...args: any[]) => void): number
|
|
1243
|
+
emit(sigName: string, ...args: any[]): void
|
|
1244
|
+
disconnect(id: number): void
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
/**
|
|
1248
|
+
* The <structname>TrackerResource</structname> object represents information
|
|
1249
|
+
* about a given resource.
|
|
1250
|
+
* @class
|
|
1251
|
+
*/
|
|
1252
|
+
export class Resource extends GObject.Object {
|
|
1253
|
+
|
|
1254
|
+
// Own properties of Tracker-3.0.Tracker.Resource
|
|
1255
|
+
|
|
1256
|
+
static name: string
|
|
1257
|
+
static $gtype: GObject.GType<Resource>
|
|
1258
|
+
|
|
1259
|
+
// Constructors of Tracker-3.0.Tracker.Resource
|
|
1260
|
+
|
|
1261
|
+
constructor(config?: Resource.ConstructorProperties)
|
|
1262
|
+
/**
|
|
1263
|
+
* Creates a TrackerResource instance.
|
|
1264
|
+
* @constructor
|
|
1265
|
+
* @param identifier A string containing a URI, or %NULL.
|
|
1266
|
+
* @returns a newly created #TrackerResource. Free with g_object_unref() when done
|
|
1267
|
+
*/
|
|
1268
|
+
constructor(identifier: string | null)
|
|
1269
|
+
/**
|
|
1270
|
+
* Creates a TrackerResource instance.
|
|
1271
|
+
* @constructor
|
|
1272
|
+
* @param identifier A string containing a URI, or %NULL.
|
|
1273
|
+
* @returns a newly created #TrackerResource. Free with g_object_unref() when done
|
|
1274
|
+
*/
|
|
1275
|
+
static new(identifier: string | null): Resource
|
|
1276
|
+
_init(config?: Resource.ConstructorProperties): void
|
|
1277
|
+
/**
|
|
1278
|
+
* Deserializes a #TrackerResource previously serialized with
|
|
1279
|
+
* tracker_resource_serialize(). It is implied that both ends
|
|
1280
|
+
* use a common #TrackerNamespaceManager.
|
|
1281
|
+
* @param variant a #GVariant
|
|
1282
|
+
* @returns A TrackerResource, or %NULL if deserialization fails.
|
|
1283
|
+
*/
|
|
1284
|
+
static deserialize(variant: GLib.Variant): Resource | null
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
export module SparqlConnection {
|
|
1288
|
+
|
|
1289
|
+
// Constructor properties interface
|
|
1290
|
+
|
|
1291
|
+
export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
export interface SparqlConnection {
|
|
1297
|
+
|
|
1298
|
+
// Own fields of Tracker-3.0.Tracker.SparqlConnection
|
|
1299
|
+
|
|
1300
|
+
parent_instance: GObject.Object
|
|
1301
|
+
|
|
1302
|
+
// Owm methods of Tracker-3.0.Tracker.SparqlConnection
|
|
1303
|
+
|
|
1304
|
+
/**
|
|
1305
|
+
* Closes a SPARQL connection. No other API calls than g_object_unref()
|
|
1306
|
+
* should happen after this call.
|
|
1307
|
+
*
|
|
1308
|
+
* This call is blocking. All pending updates will be flushed, and the
|
|
1309
|
+
* store databases will be closed orderly. All ongoing SELECT queries
|
|
1310
|
+
* will be cancelled. Notifiers will no longer emit events.
|
|
1311
|
+
*/
|
|
1312
|
+
close(): void
|
|
1313
|
+
/**
|
|
1314
|
+
* Closes a connection asynchronously. No other API calls than g_object_unref()
|
|
1315
|
+
* should happen after this call. See tracker_sparql_connection_close() for more
|
|
1316
|
+
* information.
|
|
1317
|
+
* @param cancellable a #GCancellable, or %NULL
|
|
1318
|
+
* @param callback user-defined #GAsyncReadyCallback to be called when asynchronous operation is finished.
|
|
1319
|
+
*/
|
|
1320
|
+
close_async(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
|
|
1321
|
+
/**
|
|
1322
|
+
* Finishes the asynchronous connection close.
|
|
1323
|
+
* @param res the #GAsyncResult
|
|
1324
|
+
* @returns %FALSE if some error occurred, %TRUE otherwise
|
|
1325
|
+
*/
|
|
1326
|
+
close_finish(res: Gio.AsyncResult): boolean
|
|
1327
|
+
/**
|
|
1328
|
+
* Creates a new batch to store and execute update commands. If the connection
|
|
1329
|
+
* is readonly or cannot issue SPARQL updates, %NULL will be returned.
|
|
1330
|
+
* @returns (nullable): A new #TrackerBatch
|
|
1331
|
+
*/
|
|
1332
|
+
create_batch(): Batch
|
|
1333
|
+
/**
|
|
1334
|
+
* Creates a new #TrackerNotifier to notify about changes in `connection`.
|
|
1335
|
+
* See #TrackerNotifier documentation for information about how to use this
|
|
1336
|
+
* object.
|
|
1337
|
+
* @returns a newly created notifier. Free with g_object_unref() when no longer needed.
|
|
1338
|
+
*/
|
|
1339
|
+
create_notifier(): Notifier
|
|
1340
|
+
/**
|
|
1341
|
+
* Incorporates the contents of the RDF data contained in `stream` into the
|
|
1342
|
+
* data stored by `connection`. This is an asynchronous operation,
|
|
1343
|
+
* `callback` will be invoked when the data has been fully inserted to
|
|
1344
|
+
* `connection`.
|
|
1345
|
+
*
|
|
1346
|
+
* RDF data will be inserted in the given `default_graph` if one is provided,
|
|
1347
|
+
* or the default graph if `default_graph` is %NULL. Any RDF data that has a
|
|
1348
|
+
* graph specified (e.g. using the `GRAPH` clause in the Trig format) will
|
|
1349
|
+
* be inserted in the specified graph instead of `default_graph`.
|
|
1350
|
+
*
|
|
1351
|
+
* The `flags` argument is reserved for future expansions, currently
|
|
1352
|
+
* %TRACKER_DESERIALIZE_FLAGS_NONE must be passed.
|
|
1353
|
+
* @param flags deserialization flags
|
|
1354
|
+
* @param format RDF format of data in stream
|
|
1355
|
+
* @param default_graph default graph that will receive the RDF data
|
|
1356
|
+
* @param stream input stream with RDF data
|
|
1357
|
+
* @param cancellable a #GCancellable
|
|
1358
|
+
* @param callback the #GAsyncReadyCallback called when the operation completes
|
|
1359
|
+
*/
|
|
1360
|
+
deserialize_async(flags: DeserializeFlags, format: RdfFormat, default_graph: string | null, stream: Gio.InputStream, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
|
|
1361
|
+
/**
|
|
1362
|
+
* Finishes a tracker_sparql_connection_deserialize_async() operation.
|
|
1363
|
+
* In case of error, %NULL will be returned and `error` will be set.
|
|
1364
|
+
* @param result the #GAsyncResult
|
|
1365
|
+
* @returns %TRUE if all data was inserted successfully.
|
|
1366
|
+
*/
|
|
1367
|
+
deserialize_finish(result: Gio.AsyncResult): boolean
|
|
1368
|
+
/**
|
|
1369
|
+
* Retrieves a #TrackerNamespaceManager that contains all
|
|
1370
|
+
* prefixes in the ontology of `connection`.
|
|
1371
|
+
* @returns a #TrackerNamespaceManager for this connection. This object is owned by @connection and must not be freed.
|
|
1372
|
+
*/
|
|
1373
|
+
get_namespace_manager(): NamespaceManager
|
|
1374
|
+
/**
|
|
1375
|
+
* Prepares a #TrackerSparqlStatement for the SPARQL query contained as a resource
|
|
1376
|
+
* file at `resource_path`. SPARQL Query files typically have the .rq extension.
|
|
1377
|
+
* @param resource_path the resource path of the file to parse.
|
|
1378
|
+
* @param cancellable a #GCancellable, or %NULL
|
|
1379
|
+
* @returns a prepared statement
|
|
1380
|
+
*/
|
|
1381
|
+
load_statement_from_gresource(resource_path: string | null, cancellable: Gio.Cancellable | null): SparqlStatement | null
|
|
1382
|
+
/**
|
|
1383
|
+
* Maps `service_connection` so it is available as a "private:`handle_name"` URI
|
|
1384
|
+
* in `connection`. This can be accessed via the SERVICE SPARQL syntax in
|
|
1385
|
+
* queries from `connection`. E.g.:
|
|
1386
|
+
*
|
|
1387
|
+
* ```sparql
|
|
1388
|
+
* SELECT ?u {
|
|
1389
|
+
* SERVICE <private:other-connection> {
|
|
1390
|
+
* ?u a rdfs:Resource
|
|
1391
|
+
* }
|
|
1392
|
+
* }
|
|
1393
|
+
* ```
|
|
1394
|
+
*
|
|
1395
|
+
* This is useful to interrelate data from multiple
|
|
1396
|
+
* #TrackerSparqlConnection instances maintained by the same process,
|
|
1397
|
+
* without creating a public endpoint for `service_connection`.
|
|
1398
|
+
*
|
|
1399
|
+
* `connection` may only be a #TrackerSparqlConnection created via
|
|
1400
|
+
* tracker_sparql_connection_new() and tracker_sparql_connection_new_async().
|
|
1401
|
+
* @param handle_name handle name for `service_connection`
|
|
1402
|
+
* @param service_connection a #TrackerSparqlConnection to use from `connection`
|
|
1403
|
+
*/
|
|
1404
|
+
map_connection(handle_name: string | null, service_connection: SparqlConnection): void
|
|
1405
|
+
/**
|
|
1406
|
+
* Executes a SPARQL query on. The API call is completely synchronous, so
|
|
1407
|
+
* it may block.
|
|
1408
|
+
*
|
|
1409
|
+
* The `sparql` query should be built with #TrackerResource, or
|
|
1410
|
+
* its parts correctly escaped using tracker_sparql_escape_string(),
|
|
1411
|
+
* otherwise SPARQL injection is possible.
|
|
1412
|
+
* @param sparql string containing the SPARQL query
|
|
1413
|
+
* @param cancellable a #GCancellable used to cancel the operation
|
|
1414
|
+
* @returns a #TrackerSparqlCursor if results were found. On error, #NULL is returned and the @error is set accordingly. Call g_object_unref() on the returned cursor when no longer needed.
|
|
1415
|
+
*/
|
|
1416
|
+
query(sparql: string | null, cancellable: Gio.Cancellable | null): SparqlCursor
|
|
1417
|
+
/**
|
|
1418
|
+
* Executes asynchronously a SPARQL query.
|
|
1419
|
+
* @param sparql string containing the SPARQL query
|
|
1420
|
+
* @param cancellable a #GCancellable used to cancel the operation
|
|
1421
|
+
* @param callback user-defined #GAsyncReadyCallback to be called when asynchronous operation is finished.
|
|
1422
|
+
*/
|
|
1423
|
+
query_async(sparql: string | null, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
|
|
1424
|
+
/**
|
|
1425
|
+
* Finishes the asynchronous SPARQL query operation.
|
|
1426
|
+
* @param res a #GAsyncResult with the result of the operation
|
|
1427
|
+
* @returns a #TrackerSparqlCursor if results were found. On error, #NULL is returned and the @error is set accordingly. Call g_object_unref() on the returned cursor when no longer needed.
|
|
1428
|
+
*/
|
|
1429
|
+
query_finish(res: Gio.AsyncResult): SparqlCursor
|
|
1430
|
+
/**
|
|
1431
|
+
* Prepares the given SELECT/DESCRIBE/CONSTRUCT `sparql` as a #TrackerSparqlStatement.
|
|
1432
|
+
* This prepared statement can be executed through tracker_sparql_statement_execute()
|
|
1433
|
+
* or tracker_sparql_statement_serialize_async() families of functions.
|
|
1434
|
+
* @param sparql the SPARQL query
|
|
1435
|
+
* @param cancellable a #GCancellable used to cancel the operation, or %NULL
|
|
1436
|
+
* @returns a prepared statement
|
|
1437
|
+
*/
|
|
1438
|
+
query_statement(sparql: string | null, cancellable: Gio.Cancellable | null): SparqlStatement | null
|
|
1439
|
+
/**
|
|
1440
|
+
* Serializes data into the specified RDF format. `query` must be either a
|
|
1441
|
+
* `DESCRIBE` or `CONSTRUCT` query. This is an asynchronous operation,
|
|
1442
|
+
* `callback` will be invoked when the data is available for reading.
|
|
1443
|
+
*
|
|
1444
|
+
* The SPARQL endpoint may not support the specified format, in that case
|
|
1445
|
+
* an error will be raised.
|
|
1446
|
+
*
|
|
1447
|
+
* The `flags` argument is reserved for future expansions, currently
|
|
1448
|
+
* %TRACKER_SERIALIZE_FLAGS_NONE must be passed.
|
|
1449
|
+
* @param flags serialization flags
|
|
1450
|
+
* @param format output RDF format
|
|
1451
|
+
* @param query SPARQL query
|
|
1452
|
+
* @param cancellable a #GCancellable
|
|
1453
|
+
* @param callback the #GAsyncReadyCallback called when the operation completes
|
|
1454
|
+
*/
|
|
1455
|
+
serialize_async(flags: SerializeFlags, format: RdfFormat, query: string | null, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
|
|
1456
|
+
/**
|
|
1457
|
+
* Finishes a tracker_sparql_connection_serialize_async() operation.
|
|
1458
|
+
* In case of error, %NULL will be returned and `error` will be set.
|
|
1459
|
+
* @param result the #GAsyncResult
|
|
1460
|
+
* @returns a #GInputStream to read RDF content.
|
|
1461
|
+
*/
|
|
1462
|
+
serialize_finish(result: Gio.AsyncResult): Gio.InputStream
|
|
1463
|
+
/**
|
|
1464
|
+
* Executes a SPARQL update. The API call is completely
|
|
1465
|
+
* synchronous, so it may block.
|
|
1466
|
+
*
|
|
1467
|
+
* The `sparql` query should be built with #TrackerResource, or
|
|
1468
|
+
* its parts correctly escaped using tracker_sparql_escape_string(),
|
|
1469
|
+
* otherwise SPARQL injection is possible.
|
|
1470
|
+
* @param sparql string containing the SPARQL update query
|
|
1471
|
+
* @param cancellable a #GCancellable used to cancel the operation
|
|
1472
|
+
*/
|
|
1473
|
+
update(sparql: string | null, cancellable: Gio.Cancellable | null): void
|
|
1474
|
+
/**
|
|
1475
|
+
* Executes asynchronously an array of SPARQL updates. All updates in the
|
|
1476
|
+
* array are handled within a single transaction.
|
|
1477
|
+
* @param sparql an array of strings containing the SPARQL update queries
|
|
1478
|
+
* @param sparql_length the amount of strings you pass as `sparql`
|
|
1479
|
+
* @param cancellable a #GCancellable used to cancel the operation
|
|
1480
|
+
* @param callback user-defined #GAsyncReadyCallback to be called when asynchronous operation is finished.
|
|
1481
|
+
*/
|
|
1482
|
+
update_array_async(sparql: string | null, sparql_length: number, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
|
|
1483
|
+
/**
|
|
1484
|
+
* Finishes the asynchronous SPARQL update_array operation.
|
|
1485
|
+
* @param res a #GAsyncResult with the result of the operation
|
|
1486
|
+
* @returns #TRUE if there were no errors.
|
|
1487
|
+
*/
|
|
1488
|
+
update_array_finish(res: Gio.AsyncResult): boolean
|
|
1489
|
+
/**
|
|
1490
|
+
* Executes asynchronously a SPARQL update.
|
|
1491
|
+
* @param sparql string containing the SPARQL update query
|
|
1492
|
+
* @param cancellable a #GCancellable used to cancel the operation
|
|
1493
|
+
* @param callback user-defined #GAsyncReadyCallback to be called when asynchronous operation is finished.
|
|
1494
|
+
*/
|
|
1495
|
+
update_async(sparql: string | null, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
|
|
1496
|
+
/**
|
|
1497
|
+
* Executes a SPARQL update and returns the URNs of the generated nodes,
|
|
1498
|
+
* if any. The API call is completely synchronous, so it may block.
|
|
1499
|
+
*
|
|
1500
|
+
* The `sparql` query should be built with #TrackerResource, or
|
|
1501
|
+
* its parts correctly escaped using tracker_sparql_escape_string(),
|
|
1502
|
+
* otherwise SPARQL injection is possible.
|
|
1503
|
+
*
|
|
1504
|
+
* The format string of the `GVariant` is `aaa{ss}` (an array of an array
|
|
1505
|
+
* of dictionaries). The first array represents each INSERT that may exist in
|
|
1506
|
+
* the SPARQL string. The second array represents each new node for a given
|
|
1507
|
+
* WHERE clause. The last array holds a string pair with the blank node name
|
|
1508
|
+
* (e.g. `foo` for the blank node `_:foo`) and the URN that was generated for
|
|
1509
|
+
* it. For most updates the first two outer arrays will only contain one item.
|
|
1510
|
+
* @param sparql string containing the SPARQL update query
|
|
1511
|
+
* @param cancellable a #GCancellable used to cancel the operation
|
|
1512
|
+
* @returns a #GVariant with the generated URNs, which should be freed with g_variant_unref() when no longer used.
|
|
1513
|
+
*/
|
|
1514
|
+
update_blank(sparql: string | null, cancellable: Gio.Cancellable | null): GLib.Variant
|
|
1515
|
+
/**
|
|
1516
|
+
* Executes asynchronously a SPARQL update with blank nodes. See
|
|
1517
|
+
* the tracker_sparql_connection_update_blank() documentation to
|
|
1518
|
+
* see the differences with tracker_sparql_connection_update().
|
|
1519
|
+
* @param sparql string containing the SPARQL update query
|
|
1520
|
+
* @param cancellable a #GCancellable used to cancel the operation
|
|
1521
|
+
* @param callback user-defined #GAsyncReadyCallback to be called when asynchronous operation is finished.
|
|
1522
|
+
*/
|
|
1523
|
+
update_blank_async(sparql: string | null, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
|
|
1524
|
+
/**
|
|
1525
|
+
* Finishes the asynchronous SPARQL update operation, and returns
|
|
1526
|
+
* the URNs of the generated nodes, if any. See the
|
|
1527
|
+
* tracker_sparql_connection_update_blank() documentation for the interpretation
|
|
1528
|
+
* of the returned #GVariant.
|
|
1529
|
+
* @param res a #GAsyncResult with the result of the operation
|
|
1530
|
+
* @returns a #GVariant with the generated URNs, which should be freed with g_variant_unref() when no longer used.
|
|
1531
|
+
*/
|
|
1532
|
+
update_blank_finish(res: Gio.AsyncResult): GLib.Variant
|
|
1533
|
+
/**
|
|
1534
|
+
* Finishes the asynchronous SPARQL update operation.
|
|
1535
|
+
* @param res a #GAsyncResult with the result of the operation
|
|
1536
|
+
*/
|
|
1537
|
+
update_finish(res: Gio.AsyncResult): void
|
|
1538
|
+
/**
|
|
1539
|
+
* Inserts a resource as described by `resource,` on the graph described by `graph`.
|
|
1540
|
+
* This operation blocks until done.
|
|
1541
|
+
* @param graph RDF graph where the resource should be inserted/updated, or %NULL for the default graph
|
|
1542
|
+
* @param resource a #TrackerResource
|
|
1543
|
+
* @param cancellable a #GCancellable, or %NULL
|
|
1544
|
+
* @returns #TRUE if there were no errors.
|
|
1545
|
+
*/
|
|
1546
|
+
update_resource(graph: string | null, resource: Resource, cancellable: Gio.Cancellable | null): boolean
|
|
1547
|
+
/**
|
|
1548
|
+
* Inserts a resource as described by `resource,` on the graph described by `graph`.
|
|
1549
|
+
* This operation is executed asynchronously, when finished `callback` will be
|
|
1550
|
+
* executed.
|
|
1551
|
+
* @param graph RDF graph where the resource should be inserted/updated, or %NULL for the default graph
|
|
1552
|
+
* @param resource a #TrackerResource
|
|
1553
|
+
* @param cancellable a #GCancellable, or %NULL
|
|
1554
|
+
* @param callback the #GAsyncReadyCallback called when the operation completes
|
|
1555
|
+
*/
|
|
1556
|
+
update_resource_async(graph: string | null, resource: Resource, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
|
|
1557
|
+
/**
|
|
1558
|
+
* Finishes a tracker_sparql_connection_update_resource_async() operation.
|
|
1559
|
+
* @param res a #GAsyncResult with the result of the operation
|
|
1560
|
+
* @returns #TRUE if there were no errors.
|
|
1561
|
+
*/
|
|
1562
|
+
update_resource_finish(res: Gio.AsyncResult): boolean
|
|
1563
|
+
/**
|
|
1564
|
+
* Prepares the given INSERT/DELETE/LOAD/CLEAR/DROP/ADD/MOVE/COPY/CREATE `sparql`
|
|
1565
|
+
* as a #TrackerSparqlStatement. This prepared statement can be executed through
|
|
1566
|
+
* the tracker_sparql_statement_update() family of functions.
|
|
1567
|
+
* @param sparql the SPARQL update
|
|
1568
|
+
* @param cancellable a #GCancellable used to cancel the operation, or %NULL
|
|
1569
|
+
* @returns a prepared statement
|
|
1570
|
+
*/
|
|
1571
|
+
update_statement(sparql: string | null, cancellable: Gio.Cancellable | null): SparqlStatement | null
|
|
1572
|
+
|
|
1573
|
+
// Class property signals of Tracker-3.0.Tracker.SparqlConnection
|
|
1574
|
+
|
|
1575
|
+
connect(sigName: string, callback: (...args: any[]) => void): number
|
|
1576
|
+
connect_after(sigName: string, callback: (...args: any[]) => void): number
|
|
1577
|
+
emit(sigName: string, ...args: any[]): void
|
|
1578
|
+
disconnect(id: number): void
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
/**
|
|
1582
|
+
* The <structname>TrackerSparqlConnection</structname> object represents a
|
|
1583
|
+
* SPARQL connection.
|
|
1584
|
+
* @class
|
|
1585
|
+
*/
|
|
1586
|
+
export class SparqlConnection extends GObject.Object {
|
|
1587
|
+
|
|
1588
|
+
// Own properties of Tracker-3.0.Tracker.SparqlConnection
|
|
1589
|
+
|
|
1590
|
+
static name: string
|
|
1591
|
+
static $gtype: GObject.GType<SparqlConnection>
|
|
1592
|
+
|
|
1593
|
+
// Constructors of Tracker-3.0.Tracker.SparqlConnection
|
|
1594
|
+
|
|
1595
|
+
constructor(config?: SparqlConnection.ConstructorProperties)
|
|
1596
|
+
/**
|
|
1597
|
+
* Connects to a database owned by another process on the
|
|
1598
|
+
* local machine.
|
|
1599
|
+
* @constructor
|
|
1600
|
+
* @param service_name The name of the D-Bus service to connect to.
|
|
1601
|
+
* @param object_path The path to the object, or %NULL to use the default.
|
|
1602
|
+
* @param dbus_connection The #GDBusConnection to use, or %NULL to use the session bus
|
|
1603
|
+
* @returns a new #TrackerSparqlConnection. Call g_object_unref() on the object when no longer used.
|
|
1604
|
+
*/
|
|
1605
|
+
static bus_new(service_name: string | null, object_path: string | null, dbus_connection: Gio.DBusConnection | null): SparqlConnection
|
|
1606
|
+
/**
|
|
1607
|
+
* Completion function for tracker_sparql_connection_bus_new_async().
|
|
1608
|
+
* @constructor
|
|
1609
|
+
* @param result the #GAsyncResult
|
|
1610
|
+
* @returns a new #TrackerSparqlConnection. Call g_object_unref() on the object when no longer used.
|
|
1611
|
+
*/
|
|
1612
|
+
static bus_new_finish(result: Gio.AsyncResult): SparqlConnection
|
|
1613
|
+
/**
|
|
1614
|
+
* Creates or opens a database.
|
|
1615
|
+
*
|
|
1616
|
+
* This method should only be used for databases owned by the current process.
|
|
1617
|
+
* To connect to databases managed by other processes, use
|
|
1618
|
+
* tracker_sparql_connection_bus_new().
|
|
1619
|
+
*
|
|
1620
|
+
* If `store` is %NULL, the database will be created in memory.
|
|
1621
|
+
*
|
|
1622
|
+
* The `ontologies` parameter must point to a location containing suitable
|
|
1623
|
+
* `.ontology` files in Turtle format. These control the database schema that
|
|
1624
|
+
* is used. You can use the default Nepomuk ontologies by calling
|
|
1625
|
+
* tracker_sparql_get_ontology_nepomuk ().
|
|
1626
|
+
*
|
|
1627
|
+
* If you open an existing database using a different `ontology` to the one it
|
|
1628
|
+
* was created with, Tracker will attempt to migrate the existing data to the
|
|
1629
|
+
* new schema. This may raise an error. In particular, not all migrations are
|
|
1630
|
+
* possible without causing data loss and Tracker will refuse to delete data
|
|
1631
|
+
* during a migration.
|
|
1632
|
+
*
|
|
1633
|
+
* You can also pass %NULL for `ontologies` to mean "use the ontologies that the
|
|
1634
|
+
* database was created with". This will fail if the database doesn't already
|
|
1635
|
+
* exist.
|
|
1636
|
+
* @constructor
|
|
1637
|
+
* @param flags values from #TrackerSparqlConnectionFlags
|
|
1638
|
+
* @param store the directory that contains the database as a #GFile, or %NULL
|
|
1639
|
+
* @param ontology the directory that contains the database schemas as a #GFile, or %NULL
|
|
1640
|
+
* @param cancellable a #GCancellable, or %NULL
|
|
1641
|
+
* @returns a new #TrackerSparqlConnection. Call g_object_unref() on the object when no longer used.
|
|
1642
|
+
*/
|
|
1643
|
+
constructor(flags: SparqlConnectionFlags, store: Gio.File | null, ontology: Gio.File | null, cancellable: Gio.Cancellable | null)
|
|
1644
|
+
/**
|
|
1645
|
+
* Creates or opens a database.
|
|
1646
|
+
*
|
|
1647
|
+
* This method should only be used for databases owned by the current process.
|
|
1648
|
+
* To connect to databases managed by other processes, use
|
|
1649
|
+
* tracker_sparql_connection_bus_new().
|
|
1650
|
+
*
|
|
1651
|
+
* If `store` is %NULL, the database will be created in memory.
|
|
1652
|
+
*
|
|
1653
|
+
* The `ontologies` parameter must point to a location containing suitable
|
|
1654
|
+
* `.ontology` files in Turtle format. These control the database schema that
|
|
1655
|
+
* is used. You can use the default Nepomuk ontologies by calling
|
|
1656
|
+
* tracker_sparql_get_ontology_nepomuk ().
|
|
1657
|
+
*
|
|
1658
|
+
* If you open an existing database using a different `ontology` to the one it
|
|
1659
|
+
* was created with, Tracker will attempt to migrate the existing data to the
|
|
1660
|
+
* new schema. This may raise an error. In particular, not all migrations are
|
|
1661
|
+
* possible without causing data loss and Tracker will refuse to delete data
|
|
1662
|
+
* during a migration.
|
|
1663
|
+
*
|
|
1664
|
+
* You can also pass %NULL for `ontologies` to mean "use the ontologies that the
|
|
1665
|
+
* database was created with". This will fail if the database doesn't already
|
|
1666
|
+
* exist.
|
|
1667
|
+
* @constructor
|
|
1668
|
+
* @param flags values from #TrackerSparqlConnectionFlags
|
|
1669
|
+
* @param store the directory that contains the database as a #GFile, or %NULL
|
|
1670
|
+
* @param ontology the directory that contains the database schemas as a #GFile, or %NULL
|
|
1671
|
+
* @param cancellable a #GCancellable, or %NULL
|
|
1672
|
+
* @returns a new #TrackerSparqlConnection. Call g_object_unref() on the object when no longer used.
|
|
1673
|
+
*/
|
|
1674
|
+
static new(flags: SparqlConnectionFlags, store: Gio.File | null, ontology: Gio.File | null, cancellable: Gio.Cancellable | null): SparqlConnection
|
|
1675
|
+
/**
|
|
1676
|
+
* Completion function for tracker_sparql_connection_new_async().
|
|
1677
|
+
* @constructor
|
|
1678
|
+
* @param result the #GAsyncResult
|
|
1679
|
+
*/
|
|
1680
|
+
static new_finish(result: Gio.AsyncResult): SparqlConnection
|
|
1681
|
+
/**
|
|
1682
|
+
* Connects to a remote SPARQL endpoint. The connection is made using the libsoup
|
|
1683
|
+
* HTTP library. The connection will normally use the http:// or https:// protocol.
|
|
1684
|
+
* @constructor
|
|
1685
|
+
* @param uri_base Base URI of the remote connection
|
|
1686
|
+
* @returns a new remote #TrackerSparqlConnection. Call g_object_unref() on the object when no longer used.
|
|
1687
|
+
*/
|
|
1688
|
+
static remote_new(uri_base: string | null): SparqlConnection
|
|
1689
|
+
_init(config?: SparqlConnection.ConstructorProperties): void
|
|
1690
|
+
/**
|
|
1691
|
+
* Asynchronous version of tracker_sparql_connection_new().
|
|
1692
|
+
* @param flags values from #TrackerSparqlConnectionFlags
|
|
1693
|
+
* @param store the directory that contains the database as a #GFile, or %NULL
|
|
1694
|
+
* @param ontology the directory that contains the database schemas as a #GFile, or %NULL
|
|
1695
|
+
* @param cancellable a #GCancellable, or %NULL
|
|
1696
|
+
* @param callback the #GAsyncReadyCallback called when the operation completes
|
|
1697
|
+
*/
|
|
1698
|
+
static new_async(flags: SparqlConnectionFlags, store: Gio.File | null, ontology: Gio.File | null, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<SparqlConnection> | null): void
|
|
1699
|
+
/**
|
|
1700
|
+
* Connects to a database owned by another process on the
|
|
1701
|
+
* local machine. This is an asynchronous operation.
|
|
1702
|
+
* @param service_name The name of the D-Bus service to connect to.
|
|
1703
|
+
* @param object_path The path to the object, or %NULL to use the default.
|
|
1704
|
+
* @param dbus_connection The #GDBusConnection to use, or %NULL to use the session bus
|
|
1705
|
+
* @param cancellable a #GCancellable, or %NULL
|
|
1706
|
+
* @param callback the #GAsyncReadyCallback called when the operation completes
|
|
1707
|
+
*/
|
|
1708
|
+
static bus_new_async(service_name: string | null, object_path: string | null, dbus_connection: Gio.DBusConnection | null, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<SparqlConnection> | null): void
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
export module SparqlCursor {
|
|
1712
|
+
|
|
1713
|
+
// Constructor properties interface
|
|
1714
|
+
|
|
1715
|
+
export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
|
|
1716
|
+
|
|
1717
|
+
// Own constructor properties of Tracker-3.0.Tracker.SparqlCursor
|
|
1718
|
+
|
|
1719
|
+
/**
|
|
1720
|
+
* The #TrackerSparqlConnection used to retrieve the results.
|
|
1721
|
+
*/
|
|
1722
|
+
connection?: SparqlConnection | null
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
}
|
|
1726
|
+
|
|
1727
|
+
export interface SparqlCursor {
|
|
1728
|
+
|
|
1729
|
+
// Own properties of Tracker-3.0.Tracker.SparqlCursor
|
|
1730
|
+
|
|
1731
|
+
/**
|
|
1732
|
+
* The #TrackerSparqlConnection used to retrieve the results.
|
|
1733
|
+
*/
|
|
1734
|
+
readonly connection: SparqlConnection
|
|
1735
|
+
readonly n_columns: number
|
|
1736
|
+
|
|
1737
|
+
// Own fields of Tracker-3.0.Tracker.SparqlCursor
|
|
1738
|
+
|
|
1739
|
+
parent_instance: GObject.Object
|
|
1740
|
+
|
|
1741
|
+
// Owm methods of Tracker-3.0.Tracker.SparqlCursor
|
|
1742
|
+
|
|
1743
|
+
/**
|
|
1744
|
+
* Closes the iterator, making it invalid.
|
|
1745
|
+
*/
|
|
1746
|
+
close(): void
|
|
1747
|
+
/**
|
|
1748
|
+
* Retrieve a boolean for the current row in `column`.
|
|
1749
|
+
* @param column column number to retrieve (first one is 0)
|
|
1750
|
+
* @returns a #gboolean.
|
|
1751
|
+
*/
|
|
1752
|
+
get_boolean(column: number): boolean
|
|
1753
|
+
/**
|
|
1754
|
+
* Returns the #TrackerSparqlConnection associated with this
|
|
1755
|
+
* #TrackerSparqlCursor.
|
|
1756
|
+
* @returns the cursor #TrackerSparqlConnection. The returned object must not be unreferenced by the caller.
|
|
1757
|
+
*/
|
|
1758
|
+
get_connection(): SparqlConnection
|
|
1759
|
+
/**
|
|
1760
|
+
* Retrieve an GDateTime pointer for the current row in `column`.
|
|
1761
|
+
* @param column column number to retrieve (first one is 0)
|
|
1762
|
+
* @returns #GDateTime object, or %NULL if the given column does not contain a xsd:date or xsd:dateTime
|
|
1763
|
+
*/
|
|
1764
|
+
get_datetime(column: number): GLib.DateTime | null
|
|
1765
|
+
/**
|
|
1766
|
+
* Retrieve a double for the current row in `column`.
|
|
1767
|
+
* @param column column number to retrieve (first one is 0)
|
|
1768
|
+
* @returns a double.
|
|
1769
|
+
*/
|
|
1770
|
+
get_double(column: number): number
|
|
1771
|
+
/**
|
|
1772
|
+
* Retrieve an integer for the current row in `column`.
|
|
1773
|
+
* @param column column number to retrieve (first one is 0)
|
|
1774
|
+
* @returns a #gint64.
|
|
1775
|
+
*/
|
|
1776
|
+
get_integer(column: number): number
|
|
1777
|
+
/**
|
|
1778
|
+
* This method should only be called after a successful
|
|
1779
|
+
* tracker_sparql_cursor_next(); otherwise its return value
|
|
1780
|
+
* will be undefined.
|
|
1781
|
+
* @returns a #gint representing the number of columns available in the results to iterate.
|
|
1782
|
+
*/
|
|
1783
|
+
get_n_columns(): number
|
|
1784
|
+
/**
|
|
1785
|
+
* Retrieves a string representation of the data in the current
|
|
1786
|
+
* row in `column`.
|
|
1787
|
+
* @param column column number to retrieve (first one is 0)
|
|
1788
|
+
* @returns a string which must not be freed. %NULL is returned if the column is not in the [0,#n_columns] range.
|
|
1789
|
+
*/
|
|
1790
|
+
get_string(column: number): [ /* returnType */ string | null, /* length */ number | null ]
|
|
1791
|
+
/**
|
|
1792
|
+
* The data type bound to the current row in `column` is returned.
|
|
1793
|
+
* @param column column number to retrieve (first one is 0)
|
|
1794
|
+
* @returns a #TrackerSparqlValueType.
|
|
1795
|
+
*/
|
|
1796
|
+
get_value_type(column: number): SparqlValueType
|
|
1797
|
+
/**
|
|
1798
|
+
* Retrieves the variable name for the current row in `column`.
|
|
1799
|
+
* @param column column number to retrieve (first one is 0)
|
|
1800
|
+
* @returns a string which must not be freed.
|
|
1801
|
+
*/
|
|
1802
|
+
get_variable_name(column: number): string | null
|
|
1803
|
+
/**
|
|
1804
|
+
* If the current row and `column` are bound to a value, %TRUE is returned.
|
|
1805
|
+
* @param column column number to retrieve (first one is 0)
|
|
1806
|
+
* @returns a %TRUE or %FALSE.
|
|
1807
|
+
*/
|
|
1808
|
+
is_bound(column: number): boolean
|
|
1809
|
+
/**
|
|
1810
|
+
* Iterates to the next result. This is completely synchronous and
|
|
1811
|
+
* it may block.
|
|
1812
|
+
* @param cancellable a #GCancellable used to cancel the operation
|
|
1813
|
+
* @returns %FALSE if no more results found, otherwise %TRUE.
|
|
1814
|
+
*/
|
|
1815
|
+
next(cancellable: Gio.Cancellable | null): boolean
|
|
1816
|
+
/**
|
|
1817
|
+
* Iterates, asynchronously, to the next result.
|
|
1818
|
+
* @param cancellable a #GCancellable used to cancel the operation
|
|
1819
|
+
* @param callback user-defined #GAsyncReadyCallback to be called when asynchronous operation is finished.
|
|
1820
|
+
*/
|
|
1821
|
+
next_async(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
|
|
1822
|
+
/**
|
|
1823
|
+
* Finishes the asynchronous iteration to the next result.
|
|
1824
|
+
* @param res a #GAsyncResult with the result of the operation
|
|
1825
|
+
* @returns %FALSE if no more results found, otherwise %TRUE.
|
|
1826
|
+
*/
|
|
1827
|
+
next_finish(res: Gio.AsyncResult): boolean
|
|
1828
|
+
/**
|
|
1829
|
+
* Resets the iterator to point back to the first result.
|
|
1830
|
+
*/
|
|
1831
|
+
rewind(): void
|
|
1832
|
+
|
|
1833
|
+
// Class property signals of Tracker-3.0.Tracker.SparqlCursor
|
|
1834
|
+
|
|
1835
|
+
connect(sigName: "notify::connection", callback: (($obj: SparqlCursor, pspec: GObject.ParamSpec) => void)): number
|
|
1836
|
+
connect_after(sigName: "notify::connection", callback: (($obj: SparqlCursor, pspec: GObject.ParamSpec) => void)): number
|
|
1837
|
+
emit(sigName: "notify::connection", ...args: any[]): void
|
|
1838
|
+
connect(sigName: "notify::n-columns", callback: (($obj: SparqlCursor, pspec: GObject.ParamSpec) => void)): number
|
|
1839
|
+
connect_after(sigName: "notify::n-columns", callback: (($obj: SparqlCursor, pspec: GObject.ParamSpec) => void)): number
|
|
1840
|
+
emit(sigName: "notify::n-columns", ...args: any[]): void
|
|
1841
|
+
connect(sigName: string, callback: (...args: any[]) => void): number
|
|
1842
|
+
connect_after(sigName: string, callback: (...args: any[]) => void): number
|
|
1843
|
+
emit(sigName: string, ...args: any[]): void
|
|
1844
|
+
disconnect(id: number): void
|
|
1845
|
+
}
|
|
1846
|
+
|
|
1847
|
+
/**
|
|
1848
|
+
* The <structname>TrackerSparqlCursor</structname> object represents an
|
|
1849
|
+
* iterator of results.
|
|
1850
|
+
* @class
|
|
1851
|
+
*/
|
|
1852
|
+
export class SparqlCursor extends GObject.Object {
|
|
1853
|
+
|
|
1854
|
+
// Own properties of Tracker-3.0.Tracker.SparqlCursor
|
|
1855
|
+
|
|
1856
|
+
static name: string
|
|
1857
|
+
static $gtype: GObject.GType<SparqlCursor>
|
|
1858
|
+
|
|
1859
|
+
// Constructors of Tracker-3.0.Tracker.SparqlCursor
|
|
1860
|
+
|
|
1861
|
+
constructor(config?: SparqlCursor.ConstructorProperties)
|
|
1862
|
+
_init(config?: SparqlCursor.ConstructorProperties): void
|
|
1863
|
+
}
|
|
1864
|
+
|
|
1865
|
+
export module SparqlStatement {
|
|
1866
|
+
|
|
1867
|
+
// Constructor properties interface
|
|
1868
|
+
|
|
1869
|
+
export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
|
|
1870
|
+
|
|
1871
|
+
// Own constructor properties of Tracker-3.0.Tracker.SparqlStatement
|
|
1872
|
+
|
|
1873
|
+
/**
|
|
1874
|
+
* The #TrackerSparqlConnection used to perform the query.
|
|
1875
|
+
*/
|
|
1876
|
+
connection?: SparqlConnection | null
|
|
1877
|
+
/**
|
|
1878
|
+
* SPARQL query stored in this statement.
|
|
1879
|
+
*/
|
|
1880
|
+
sparql?: string | null
|
|
1881
|
+
}
|
|
1882
|
+
|
|
1883
|
+
}
|
|
1884
|
+
|
|
1885
|
+
export interface SparqlStatement {
|
|
1886
|
+
|
|
1887
|
+
// Own properties of Tracker-3.0.Tracker.SparqlStatement
|
|
1888
|
+
|
|
1889
|
+
/**
|
|
1890
|
+
* The #TrackerSparqlConnection used to perform the query.
|
|
1891
|
+
*/
|
|
1892
|
+
readonly connection: SparqlConnection
|
|
1893
|
+
/**
|
|
1894
|
+
* SPARQL query stored in this statement.
|
|
1895
|
+
*/
|
|
1896
|
+
readonly sparql: string | null
|
|
1897
|
+
|
|
1898
|
+
// Own fields of Tracker-3.0.Tracker.SparqlStatement
|
|
1899
|
+
|
|
1900
|
+
parent_instance: GObject.Object
|
|
1901
|
+
|
|
1902
|
+
// Owm methods of Tracker-3.0.Tracker.SparqlStatement
|
|
1903
|
+
|
|
1904
|
+
/**
|
|
1905
|
+
* Binds the boolean `value` to variable `name`.
|
|
1906
|
+
* @param name variable name
|
|
1907
|
+
* @param value value
|
|
1908
|
+
*/
|
|
1909
|
+
bind_boolean(name: string | null, value: boolean): void
|
|
1910
|
+
/**
|
|
1911
|
+
* Binds the GDateTime `value` to variable `name`.
|
|
1912
|
+
* @param name variable name
|
|
1913
|
+
* @param value value
|
|
1914
|
+
*/
|
|
1915
|
+
bind_datetime(name: string | null, value: GLib.DateTime): void
|
|
1916
|
+
/**
|
|
1917
|
+
* Binds the double `value` to variable `name`.
|
|
1918
|
+
* @param name variable name
|
|
1919
|
+
* @param value value
|
|
1920
|
+
*/
|
|
1921
|
+
bind_double(name: string | null, value: number): void
|
|
1922
|
+
/**
|
|
1923
|
+
* Binds the integer `value` to variable `name`.
|
|
1924
|
+
* @param name variable name
|
|
1925
|
+
* @param value value
|
|
1926
|
+
*/
|
|
1927
|
+
bind_int(name: string | null, value: number): void
|
|
1928
|
+
/**
|
|
1929
|
+
* Binds the string `value` to variable `name`.
|
|
1930
|
+
* @param name variable name
|
|
1931
|
+
* @param value value
|
|
1932
|
+
*/
|
|
1933
|
+
bind_string(name: string | null, value: string | null): void
|
|
1934
|
+
/**
|
|
1935
|
+
* Clears all boolean/string/integer/double bindings.
|
|
1936
|
+
*/
|
|
1937
|
+
clear_bindings(): void
|
|
1938
|
+
/**
|
|
1939
|
+
* Executes the SPARQL query with the currently bound values.
|
|
1940
|
+
*
|
|
1941
|
+
* This function should only be called on #TrackerSparqlStatement objects
|
|
1942
|
+
* obtained through tracker_sparql_connection_query_statement() or
|
|
1943
|
+
* SELECT/CONSTRUCT/DESCRIBE statements loaded through
|
|
1944
|
+
* tracker_sparql_connection_load_statement_from_gresource().
|
|
1945
|
+
* @param cancellable a #GCancellable used to cancel the operation
|
|
1946
|
+
* @returns A #TrackerSparqlCursor
|
|
1947
|
+
*/
|
|
1948
|
+
execute(cancellable: Gio.Cancellable | null): SparqlCursor
|
|
1949
|
+
/**
|
|
1950
|
+
* Asynchronously executes the SPARQL query with the currently bound values.
|
|
1951
|
+
*
|
|
1952
|
+
* This function should only be called on #TrackerSparqlStatement objects
|
|
1953
|
+
* obtained through tracker_sparql_connection_query_statement() or
|
|
1954
|
+
* SELECT/CONSTRUCT/DESCRIBE statements loaded through
|
|
1955
|
+
* tracker_sparql_connection_load_statement_from_gresource().
|
|
1956
|
+
* @param cancellable a #GCancellable used to cancel the operation
|
|
1957
|
+
* @param callback user-defined #GAsyncReadyCallback to be called when asynchronous operation is finished.
|
|
1958
|
+
*/
|
|
1959
|
+
execute_async(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
|
|
1960
|
+
/**
|
|
1961
|
+
* Finishes the asynchronous operation started through
|
|
1962
|
+
* tracker_sparql_statement_execute_async().
|
|
1963
|
+
* @param res The #GAsyncResult from the callback used to return the #TrackerSparqlCursor
|
|
1964
|
+
* @returns A #TrackerSparqlCursor
|
|
1965
|
+
*/
|
|
1966
|
+
execute_finish(res: Gio.AsyncResult): SparqlCursor
|
|
1967
|
+
/**
|
|
1968
|
+
* Returns the #TrackerSparqlConnection that this statement was created from.
|
|
1969
|
+
* @returns The SPARQL connection of this statement.
|
|
1970
|
+
*/
|
|
1971
|
+
get_connection(): SparqlConnection
|
|
1972
|
+
/**
|
|
1973
|
+
* Returns the SPARQL string that this prepared statement holds.
|
|
1974
|
+
* @returns The contained SPARQL query
|
|
1975
|
+
*/
|
|
1976
|
+
get_sparql(): string | null
|
|
1977
|
+
/**
|
|
1978
|
+
* Serializes data into the specified RDF format. The query `stmt` was
|
|
1979
|
+
* created from must be either a `DESCRIBE` or `CONSTRUCT` query, an
|
|
1980
|
+
* error will be raised otherwise.
|
|
1981
|
+
*
|
|
1982
|
+
* This is an asynchronous operation, `callback` will be invoked when the
|
|
1983
|
+
* data is available for reading.
|
|
1984
|
+
*
|
|
1985
|
+
* The SPARQL endpoint may not support the specified format, in that case
|
|
1986
|
+
* an error will be raised.
|
|
1987
|
+
*
|
|
1988
|
+
* The `flags` argument is reserved for future expansions, currently
|
|
1989
|
+
* %TRACKER_SERIALIZE_FLAGS_NONE must be passed.
|
|
1990
|
+
* @param flags serialization flags
|
|
1991
|
+
* @param format RDF format of the serialized data
|
|
1992
|
+
* @param cancellable a #GCancellable used to cancel the operation
|
|
1993
|
+
* @param callback user-defined #GAsyncReadyCallback to be called when asynchronous operation is finished.
|
|
1994
|
+
*/
|
|
1995
|
+
serialize_async(flags: SerializeFlags, format: RdfFormat, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
|
|
1996
|
+
/**
|
|
1997
|
+
* Finishes a tracker_sparql_statement_serialize_async() operation.
|
|
1998
|
+
* In case of error, %NULL will be returned and `error` will be set.
|
|
1999
|
+
* @param result the #GAsyncResult
|
|
2000
|
+
* @returns a #GInputStream to read RDF content.
|
|
2001
|
+
*/
|
|
2002
|
+
serialize_finish(result: Gio.AsyncResult): Gio.InputStream
|
|
2003
|
+
/**
|
|
2004
|
+
* Executes the SPARQL update with the currently bound values.
|
|
2005
|
+
*
|
|
2006
|
+
* This function should only be called on #TrackerSparqlStatement objects
|
|
2007
|
+
* obtained through tracker_sparql_connection_update_statement() or
|
|
2008
|
+
* update statements loaded through tracker_sparql_connection_load_statement_from_gresource().
|
|
2009
|
+
* @param cancellable a #GCancellable used to cancel the operation
|
|
2010
|
+
* @returns %TRUE if the update finished with no errors, %FALSE otherwise
|
|
2011
|
+
*/
|
|
2012
|
+
update(cancellable: Gio.Cancellable | null): boolean
|
|
2013
|
+
/**
|
|
2014
|
+
* Asynchronously executes the SPARQL update query with the currently bound values.
|
|
2015
|
+
*
|
|
2016
|
+
* This function should only be called on #TrackerSparqlStatement objects
|
|
2017
|
+
* obtained through tracker_sparql_connection_update_statement() or
|
|
2018
|
+
* update statements loaded through tracker_sparql_connection_load_statement_from_gresource().
|
|
2019
|
+
* @param cancellable a #GCancellable used to cancel the operation
|
|
2020
|
+
* @param callback user-defined #GAsyncReadyCallback to be called when asynchronous operation is finished.
|
|
2021
|
+
*/
|
|
2022
|
+
update_async(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
|
|
2023
|
+
/**
|
|
2024
|
+
* Finishes the asynchronous update started through
|
|
2025
|
+
* tracker_sparql_statement_update_async().
|
|
2026
|
+
* @param result The #GAsyncResult from the callback used to return the #TrackerSparqlCursor
|
|
2027
|
+
* @returns %TRUE if the update finished with no errors, %FALSE otherwise
|
|
2028
|
+
*/
|
|
2029
|
+
update_finish(result: Gio.AsyncResult): boolean
|
|
2030
|
+
|
|
2031
|
+
// Class property signals of Tracker-3.0.Tracker.SparqlStatement
|
|
2032
|
+
|
|
2033
|
+
connect(sigName: "notify::connection", callback: (($obj: SparqlStatement, pspec: GObject.ParamSpec) => void)): number
|
|
2034
|
+
connect_after(sigName: "notify::connection", callback: (($obj: SparqlStatement, pspec: GObject.ParamSpec) => void)): number
|
|
2035
|
+
emit(sigName: "notify::connection", ...args: any[]): void
|
|
2036
|
+
connect(sigName: "notify::sparql", callback: (($obj: SparqlStatement, pspec: GObject.ParamSpec) => void)): number
|
|
2037
|
+
connect_after(sigName: "notify::sparql", callback: (($obj: SparqlStatement, pspec: GObject.ParamSpec) => void)): number
|
|
2038
|
+
emit(sigName: "notify::sparql", ...args: any[]): void
|
|
2039
|
+
connect(sigName: string, callback: (...args: any[]) => void): number
|
|
2040
|
+
connect_after(sigName: string, callback: (...args: any[]) => void): number
|
|
2041
|
+
emit(sigName: string, ...args: any[]): void
|
|
2042
|
+
disconnect(id: number): void
|
|
2043
|
+
}
|
|
2044
|
+
|
|
2045
|
+
/**
|
|
2046
|
+
* The <structname>TrackerSparqlStatement</structname> object represents
|
|
2047
|
+
* a prepared query statement.
|
|
2048
|
+
* @class
|
|
2049
|
+
*/
|
|
2050
|
+
export class SparqlStatement extends GObject.Object {
|
|
2051
|
+
|
|
2052
|
+
// Own properties of Tracker-3.0.Tracker.SparqlStatement
|
|
2053
|
+
|
|
2054
|
+
static name: string
|
|
2055
|
+
static $gtype: GObject.GType<SparqlStatement>
|
|
2056
|
+
|
|
2057
|
+
// Constructors of Tracker-3.0.Tracker.SparqlStatement
|
|
2058
|
+
|
|
2059
|
+
constructor(config?: SparqlStatement.ConstructorProperties)
|
|
2060
|
+
_init(config?: SparqlStatement.ConstructorProperties): void
|
|
2061
|
+
}
|
|
2062
|
+
|
|
2063
|
+
export interface BatchClass {
|
|
2064
|
+
}
|
|
2065
|
+
|
|
2066
|
+
export abstract class BatchClass {
|
|
2067
|
+
|
|
2068
|
+
// Own properties of Tracker-3.0.Tracker.BatchClass
|
|
2069
|
+
|
|
2070
|
+
static name: string
|
|
2071
|
+
}
|
|
2072
|
+
|
|
2073
|
+
export interface EndpointClass {
|
|
2074
|
+
}
|
|
2075
|
+
|
|
2076
|
+
export abstract class EndpointClass {
|
|
2077
|
+
|
|
2078
|
+
// Own properties of Tracker-3.0.Tracker.EndpointClass
|
|
2079
|
+
|
|
2080
|
+
static name: string
|
|
2081
|
+
}
|
|
2082
|
+
|
|
2083
|
+
export interface NamespaceManagerClass {
|
|
2084
|
+
|
|
2085
|
+
// Own fields of Tracker-3.0.Tracker.NamespaceManagerClass
|
|
2086
|
+
|
|
2087
|
+
parent_class: GObject.ObjectClass
|
|
2088
|
+
}
|
|
2089
|
+
|
|
2090
|
+
export abstract class NamespaceManagerClass {
|
|
2091
|
+
|
|
2092
|
+
// Own properties of Tracker-3.0.Tracker.NamespaceManagerClass
|
|
2093
|
+
|
|
2094
|
+
static name: string
|
|
2095
|
+
}
|
|
2096
|
+
|
|
2097
|
+
export interface NotifierClass {
|
|
2098
|
+
}
|
|
2099
|
+
|
|
2100
|
+
export abstract class NotifierClass {
|
|
2101
|
+
|
|
2102
|
+
// Own properties of Tracker-3.0.Tracker.NotifierClass
|
|
2103
|
+
|
|
2104
|
+
static name: string
|
|
2105
|
+
}
|
|
2106
|
+
|
|
2107
|
+
export interface NotifierEvent {
|
|
2108
|
+
|
|
2109
|
+
// Owm methods of Tracker-3.0.Tracker.NotifierEvent
|
|
2110
|
+
|
|
2111
|
+
/**
|
|
2112
|
+
* Returns the event type.
|
|
2113
|
+
* @returns The event type
|
|
2114
|
+
*/
|
|
2115
|
+
get_event_type(): NotifierEventType
|
|
2116
|
+
/**
|
|
2117
|
+
* Returns the tracker:id of the element being notified upon. This is a #gint64
|
|
2118
|
+
* which is used as efficient internal identifier for the resource.
|
|
2119
|
+
* @returns the resource ID
|
|
2120
|
+
*/
|
|
2121
|
+
get_id(): number
|
|
2122
|
+
/**
|
|
2123
|
+
* Returns the Uniform Resource Name of the element. This is Tracker's
|
|
2124
|
+
* public identifier for the resource.
|
|
2125
|
+
*
|
|
2126
|
+
* This URN is an unique string identifier for the resource being
|
|
2127
|
+
* notified upon, typically of the form "urn:uuid:...".
|
|
2128
|
+
* @returns The element URN
|
|
2129
|
+
*/
|
|
2130
|
+
get_urn(): string | null
|
|
2131
|
+
}
|
|
2132
|
+
|
|
2133
|
+
/**
|
|
2134
|
+
* The <structname>TrackerNotifierEvent</structname> struct represents a
|
|
2135
|
+
* change event in the stored data.
|
|
2136
|
+
* @record
|
|
2137
|
+
*/
|
|
2138
|
+
export class NotifierEvent {
|
|
2139
|
+
|
|
2140
|
+
// Own properties of Tracker-3.0.Tracker.NotifierEvent
|
|
2141
|
+
|
|
2142
|
+
static name: string
|
|
2143
|
+
}
|
|
2144
|
+
|
|
2145
|
+
export interface ResourceClass {
|
|
2146
|
+
}
|
|
2147
|
+
|
|
2148
|
+
export abstract class ResourceClass {
|
|
2149
|
+
|
|
2150
|
+
// Own properties of Tracker-3.0.Tracker.ResourceClass
|
|
2151
|
+
|
|
2152
|
+
static name: string
|
|
2153
|
+
}
|
|
2154
|
+
|
|
2155
|
+
export interface SparqlConnectionClass {
|
|
2156
|
+
}
|
|
2157
|
+
|
|
2158
|
+
export abstract class SparqlConnectionClass {
|
|
2159
|
+
|
|
2160
|
+
// Own properties of Tracker-3.0.Tracker.SparqlConnectionClass
|
|
2161
|
+
|
|
2162
|
+
static name: string
|
|
2163
|
+
}
|
|
2164
|
+
|
|
2165
|
+
export interface SparqlCursorClass {
|
|
2166
|
+
}
|
|
2167
|
+
|
|
2168
|
+
export abstract class SparqlCursorClass {
|
|
2169
|
+
|
|
2170
|
+
// Own properties of Tracker-3.0.Tracker.SparqlCursorClass
|
|
2171
|
+
|
|
2172
|
+
static name: string
|
|
2173
|
+
}
|
|
2174
|
+
|
|
2175
|
+
export interface SparqlStatementClass {
|
|
2176
|
+
}
|
|
2177
|
+
|
|
2178
|
+
export abstract class SparqlStatementClass {
|
|
2179
|
+
|
|
2180
|
+
// Own properties of Tracker-3.0.Tracker.SparqlStatementClass
|
|
2181
|
+
|
|
2182
|
+
static name: string
|
|
2183
|
+
}
|
|
2184
|
+
|
|
2185
|
+
/**
|
|
2186
|
+
* Name of the imported GIR library
|
|
2187
|
+
* @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
|
|
2188
|
+
*/
|
|
2189
|
+
export const __name__: string
|
|
2190
|
+
/**
|
|
2191
|
+
* Version of the imported GIR library
|
|
2192
|
+
* @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
|
|
2193
|
+
*/
|
|
2194
|
+
export const __version__: string
|
|
2195
|
+
// END
|