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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2067 @@
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
+ * GeocodeGlib-1.0
10
+ */
11
+
12
+ import type Soup from '@girs/soup-2.4';
13
+ import type Gio from '@girs/gio-2.0';
14
+ import type GObject from '@girs/gobject-2.0';
15
+ import type GLib from '@girs/glib-2.0';
16
+ import type Json from '@girs/json-1.0';
17
+
18
+ export namespace GeocodeGlib {
19
+
20
+ /**
21
+ * Error codes returned by geocode-glib functions.
22
+ */
23
+ enum Error {
24
+ /**
25
+ * An error occured parsing the response from the web service.
26
+ */
27
+ PARSE,
28
+ /**
29
+ * The request made was not supported.
30
+ */
31
+ NOT_SUPPORTED,
32
+ /**
33
+ * The requests made didn't have any matches.
34
+ */
35
+ NO_MATCHES,
36
+ /**
37
+ * The request made contained invalid arguments.
38
+ */
39
+ INVALID_ARGUMENTS,
40
+ /**
41
+ * The server encountered an (possibly unrecoverable) internal error.
42
+ */
43
+ INTERNAL_SERVER,
44
+ }
45
+ /**
46
+ * Coordinate Reference System Identification for a location.
47
+ */
48
+ enum LocationCRS {
49
+ /**
50
+ * CRS is World Geodetic System, standard for Earth.
51
+ */
52
+ WGS84,
53
+ }
54
+ /**
55
+ * The URI scheme for this location.
56
+ */
57
+ enum LocationURIScheme {
58
+ /**
59
+ * The 'geo' URI scheme, RFC 5870
60
+ */
61
+ GEO,
62
+ }
63
+ /**
64
+ * Osm type of the place.
65
+ */
66
+ enum PlaceOsmType {
67
+ /**
68
+ * Unknown type
69
+ */
70
+ UNKNOWN,
71
+ /**
72
+ * Defines a point in space.
73
+ */
74
+ NODE,
75
+ /**
76
+ * Used to explain how other elements work together.
77
+ */
78
+ RELATION,
79
+ /**
80
+ * Defines a linear feature and area boundaries.
81
+ */
82
+ WAY,
83
+ }
84
+ /**
85
+ * Type of the place.
86
+ */
87
+ enum PlaceType {
88
+ /**
89
+ * Type is unknown for this place.
90
+ */
91
+ UNKNOWN,
92
+ /**
93
+ * A building or house.
94
+ */
95
+ BUILDING,
96
+ /**
97
+ * A street.
98
+ */
99
+ STREET,
100
+ /**
101
+ * A populated settlement such as a city, town, village.
102
+ */
103
+ TOWN,
104
+ /**
105
+ * One of the primary administrative areas within a country.
106
+ */
107
+ STATE,
108
+ /**
109
+ * One of the secondary administrative areas within a country.
110
+ */
111
+ COUNTY,
112
+ /**
113
+ * One of the tertiary administrative areas within a country.
114
+ */
115
+ LOCAL_ADMINISTRATIVE_AREA,
116
+ /**
117
+ * A partial or full postal code.
118
+ */
119
+ POSTAL_CODE,
120
+ /**
121
+ * One of the countries or dependent territories defined by the ISO 3166-1 standard.
122
+ */
123
+ COUNTRY,
124
+ /**
125
+ * An island.
126
+ */
127
+ ISLAND,
128
+ /**
129
+ * An airport.
130
+ */
131
+ AIRPORT,
132
+ /**
133
+ * A railway station.
134
+ */
135
+ RAILWAY_STATION,
136
+ /**
137
+ * A bus stop.
138
+ */
139
+ BUS_STOP,
140
+ /**
141
+ * A high capacity highways designed to safely carry fast motor traffic.
142
+ */
143
+ MOTORWAY,
144
+ /**
145
+ * A water feature such as a river, canal, lake, bay or ocean.
146
+ */
147
+ DRAINAGE,
148
+ /**
149
+ * A land feature such as a park, mountain or beach.
150
+ */
151
+ LAND_FEATURE,
152
+ /**
153
+ * A uncategorized place.
154
+ */
155
+ MISCELLANEOUS,
156
+ /**
157
+ * An area covering multiple countries.
158
+ */
159
+ SUPERNAME,
160
+ /**
161
+ * A point of interest such as a school, hospital or tourist attraction.
162
+ */
163
+ POINT_OF_INTEREST,
164
+ /**
165
+ * A subdivision of a town such as a suburb or neighborhood.
166
+ */
167
+ SUBURB,
168
+ /**
169
+ * A place known by a colloquial name.
170
+ */
171
+ COLLOQUIAL,
172
+ /**
173
+ * An area known within a specific context such as MSA or area code.
174
+ */
175
+ ZONE,
176
+ /**
177
+ * A historical primary administrative area within a country.
178
+ */
179
+ HISTORICAL_STATE,
180
+ /**
181
+ * A historical secondary administrative area within a country.
182
+ */
183
+ HISTORICAL_COUNTY,
184
+ /**
185
+ * One of the major land masses on the Earth.
186
+ */
187
+ CONTINENT,
188
+ /**
189
+ * An area defined by the Olson standard (tz database).
190
+ */
191
+ TIME_ZONE,
192
+ /**
193
+ * A housing development or subdivision known by name.
194
+ */
195
+ ESTATE,
196
+ /**
197
+ * A historical populated settlement that is no longer known by its original name.
198
+ */
199
+ HISTORICAL_TOWN,
200
+ /**
201
+ * One of the five major bodies of water on the Earth.
202
+ */
203
+ OCEAN,
204
+ /**
205
+ * An area of open water smaller than an ocean.
206
+ */
207
+ SEA,
208
+ /**
209
+ * Institution designed for learning under the supervision of teachers.
210
+ */
211
+ SCHOOL,
212
+ /**
213
+ * All places of worship independently of the religion or denomination.
214
+ */
215
+ PLACE_OF_WORSHIP,
216
+ /**
217
+ * Generally formal place with sit-down facilities selling full meals served by waiters.
218
+ */
219
+ RESTAURANT,
220
+ /**
221
+ * A bar or pub.
222
+ */
223
+ BAR,
224
+ /**
225
+ * A light rail station or tram stop.
226
+ */
227
+ LIGHT_RAIL_STATION,
228
+ }
229
+ /**
230
+ * Constant representing city-level accuracy.
231
+ */
232
+ const LOCATION_ACCURACY_CITY: number
233
+ /**
234
+ * Constant representing continent-level accuracy.
235
+ */
236
+ const LOCATION_ACCURACY_CONTINENT: number
237
+ /**
238
+ * Constant representing country-level accuracy.
239
+ */
240
+ const LOCATION_ACCURACY_COUNTRY: number
241
+ /**
242
+ * Constant representing region-level accuracy.
243
+ */
244
+ const LOCATION_ACCURACY_REGION: number
245
+ /**
246
+ * Constant representing street-level accuracy.
247
+ */
248
+ const LOCATION_ACCURACY_STREET: number
249
+ /**
250
+ * Constant representing unknown accuracy.
251
+ */
252
+ const LOCATION_ACCURACY_UNKNOWN: number
253
+ /**
254
+ * Gets the geocode-glib error quark.
255
+ * @returns a #GQuark.
256
+ */
257
+ function error_quark(): GLib.Quark
258
+ module Backend {
259
+
260
+ // Constructor properties interface
261
+
262
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
263
+ }
264
+
265
+ }
266
+
267
+ interface Backend {
268
+
269
+ // Owm methods of GeocodeGlib-1.0.GeocodeGlib.Backend
270
+
271
+ /**
272
+ * Gets the result of a forward geocoding query using the `backend`.
273
+ *
274
+ * If no results are found, a %GEOCODE_ERROR_NO_MATCHES error is returned.
275
+ *
276
+ * This is a synchronous function, which means it may block on network requests.
277
+ * In most situations, the asynchronous version
278
+ * (geocode_backend_forward_search_async()) is more appropriate. See its
279
+ * documentation for more information on usage.
280
+ * @param params a #GHashTable with string keys, and #GValue values.
281
+ * @param cancellable optional #GCancellable, %NULL to ignore.
282
+ * @returns A list of places or %NULL in case of errors. Free the returned instances with g_object_unref() and the list with g_list_free() when done.
283
+ */
284
+ forward_search(params: GLib.HashTable, cancellable: Gio.Cancellable | null): Place[]
285
+ /**
286
+ * Asynchronously performs a forward geocoding query using the `backend`. Use
287
+ * geocode_backend_forward_search() to do the same thing synchronously.
288
+ *
289
+ * The `params` hash table is in the format used by Telepathy, and documented
290
+ * in the [Telepathy specification](http://telepathy.freedesktop.org/spec/Connection_Interface_Location.html#Mapping:Location).
291
+ *
292
+ * See also: [XEP-0080 specification](http://xmpp.org/extensions/xep-0080.html).
293
+ *
294
+ * When the operation is finished, `callback` will be called. You can then call
295
+ * geocode_backend_forward_search_finish() to get the result of the operation.
296
+ * @param params a #GHashTable with string keys, and #GValue values.
297
+ * @param cancellable optional #GCancellable, %NULL to ignore.
298
+ * @param callback a #GAsyncReadyCallback to call when the request is satisfied
299
+ */
300
+ forward_search_async(params: GLib.HashTable, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
301
+ /**
302
+ * Finishes a forward geocoding operation. See
303
+ * geocode_backend_forward_search_async().
304
+ * @param result a #GAsyncResult.
305
+ * @returns A list of places or %NULL in case of errors. Free the returned instances with g_object_unref() and the list with g_list_free() when done.
306
+ */
307
+ forward_search_finish(result: Gio.AsyncResult): Place[]
308
+ /**
309
+ * Gets the result of a reverse geocoding query using the `backend`.
310
+ *
311
+ * If no result could be found, a %GEOCODE_ERROR_NOT_SUPPORTED error will be
312
+ * returned. This typically happens if the coordinates to geocode are in the
313
+ * middle of the ocean.
314
+ *
315
+ * This is a synchronous function, which means it may block on network requests.
316
+ * In most situations, the asynchronous version,
317
+ * geocode_backend_forward_search_async(), is more appropriate. See its
318
+ * documentation for more information on usage.
319
+ * @param params a #GHashTable with string keys, and #GValue values.
320
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
321
+ * @returns A list of #GeocodePlace instances, or %NULL in case of errors. The list is ordered by relevance, with most relevant results first. Free the returned instances with g_object_unref() and the list with g_list_free() when done.
322
+ */
323
+ reverse_resolve(params: GLib.HashTable, cancellable: Gio.Cancellable | null): Place[]
324
+ /**
325
+ * Asynchronously gets the result of a reverse geocoding query using the
326
+ * backend.
327
+ *
328
+ * Typically, a single result will be returned representing the place at a
329
+ * given latitude and longitude (the `lat` and `lon` keys to `params)`; but in
330
+ * some cases the results will be ambiguous and *multiple* results will be
331
+ * returned. They will be returned in order of relevance, with the most
332
+ * relevant result first in the list.
333
+ *
334
+ * The `params` hash table is in the format used by Telepathy, and documented
335
+ * in the [Telepathy specification](http://telepathy.freedesktop.org/spec/Connection_Interface_Location.html#Mapping:Location).
336
+ *
337
+ * See also: [XEP-0080 specification](http://xmpp.org/extensions/xep-0080.html).
338
+ *
339
+ * Use geocode_backend_reverse_resolve() to do the same thing synchronously.
340
+ *
341
+ * When the operation is finished, `callback` will be called. You can then call
342
+ * geocode_backend_reverse_resolve_finish() to get the result of the operation.
343
+ * @param params a #GHashTable with string keys, and #GValue values.
344
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
345
+ * @param callback a #GAsyncReadyCallback to call when the request is satisfied.
346
+ */
347
+ reverse_resolve_async(params: GLib.HashTable, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
348
+ /**
349
+ * Finishes a reverse geocoding operation. See geocode_backend_reverse_resolve_async().
350
+ * @param result a #GAsyncResult.
351
+ * @returns A list of #GeocodePlace instances, or %NULL in case of errors. The list is ordered by relevance, with most relevant results first. Free the returned instances with g_object_unref() and the list with g_list_free() when done.
352
+ */
353
+ reverse_resolve_finish(result: Gio.AsyncResult): Place[]
354
+
355
+ // Own virtual methods of GeocodeGlib-1.0.GeocodeGlib.Backend
356
+
357
+ /**
358
+ * Gets the result of a forward geocoding query using the `backend`.
359
+ *
360
+ * If no results are found, a %GEOCODE_ERROR_NO_MATCHES error is returned.
361
+ *
362
+ * This is a synchronous function, which means it may block on network requests.
363
+ * In most situations, the asynchronous version
364
+ * (geocode_backend_forward_search_async()) is more appropriate. See its
365
+ * documentation for more information on usage.
366
+ * @virtual
367
+ * @param params a #GHashTable with string keys, and #GValue values.
368
+ * @param cancellable optional #GCancellable, %NULL to ignore.
369
+ * @returns A list of places or %NULL in case of errors. Free the returned instances with g_object_unref() and the list with g_list_free() when done.
370
+ */
371
+ vfunc_forward_search(params: GLib.HashTable, cancellable: Gio.Cancellable | null): Place[]
372
+ /**
373
+ * Asynchronously performs a forward geocoding query using the `backend`. Use
374
+ * geocode_backend_forward_search() to do the same thing synchronously.
375
+ *
376
+ * The `params` hash table is in the format used by Telepathy, and documented
377
+ * in the [Telepathy specification](http://telepathy.freedesktop.org/spec/Connection_Interface_Location.html#Mapping:Location).
378
+ *
379
+ * See also: [XEP-0080 specification](http://xmpp.org/extensions/xep-0080.html).
380
+ *
381
+ * When the operation is finished, `callback` will be called. You can then call
382
+ * geocode_backend_forward_search_finish() to get the result of the operation.
383
+ * @virtual
384
+ * @param params a #GHashTable with string keys, and #GValue values.
385
+ * @param cancellable optional #GCancellable, %NULL to ignore.
386
+ * @param callback a #GAsyncReadyCallback to call when the request is satisfied
387
+ */
388
+ vfunc_forward_search_async(params: GLib.HashTable, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
389
+ /**
390
+ * Finishes a forward geocoding operation. See
391
+ * geocode_backend_forward_search_async().
392
+ * @virtual
393
+ * @param result a #GAsyncResult.
394
+ * @returns A list of places or %NULL in case of errors. Free the returned instances with g_object_unref() and the list with g_list_free() when done.
395
+ */
396
+ vfunc_forward_search_finish(result: Gio.AsyncResult): Place[]
397
+ /**
398
+ * Gets the result of a reverse geocoding query using the `backend`.
399
+ *
400
+ * If no result could be found, a %GEOCODE_ERROR_NOT_SUPPORTED error will be
401
+ * returned. This typically happens if the coordinates to geocode are in the
402
+ * middle of the ocean.
403
+ *
404
+ * This is a synchronous function, which means it may block on network requests.
405
+ * In most situations, the asynchronous version,
406
+ * geocode_backend_forward_search_async(), is more appropriate. See its
407
+ * documentation for more information on usage.
408
+ * @virtual
409
+ * @param params a #GHashTable with string keys, and #GValue values.
410
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
411
+ * @returns A list of #GeocodePlace instances, or %NULL in case of errors. The list is ordered by relevance, with most relevant results first. Free the returned instances with g_object_unref() and the list with g_list_free() when done.
412
+ */
413
+ vfunc_reverse_resolve(params: GLib.HashTable, cancellable: Gio.Cancellable | null): Place[]
414
+ /**
415
+ * Asynchronously gets the result of a reverse geocoding query using the
416
+ * backend.
417
+ *
418
+ * Typically, a single result will be returned representing the place at a
419
+ * given latitude and longitude (the `lat` and `lon` keys to `params)`; but in
420
+ * some cases the results will be ambiguous and *multiple* results will be
421
+ * returned. They will be returned in order of relevance, with the most
422
+ * relevant result first in the list.
423
+ *
424
+ * The `params` hash table is in the format used by Telepathy, and documented
425
+ * in the [Telepathy specification](http://telepathy.freedesktop.org/spec/Connection_Interface_Location.html#Mapping:Location).
426
+ *
427
+ * See also: [XEP-0080 specification](http://xmpp.org/extensions/xep-0080.html).
428
+ *
429
+ * Use geocode_backend_reverse_resolve() to do the same thing synchronously.
430
+ *
431
+ * When the operation is finished, `callback` will be called. You can then call
432
+ * geocode_backend_reverse_resolve_finish() to get the result of the operation.
433
+ * @virtual
434
+ * @param params a #GHashTable with string keys, and #GValue values.
435
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
436
+ * @param callback a #GAsyncReadyCallback to call when the request is satisfied.
437
+ */
438
+ vfunc_reverse_resolve_async(params: GLib.HashTable, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
439
+ /**
440
+ * Finishes a reverse geocoding operation. See geocode_backend_reverse_resolve_async().
441
+ * @virtual
442
+ * @param result a #GAsyncResult.
443
+ * @returns A list of #GeocodePlace instances, or %NULL in case of errors. The list is ordered by relevance, with most relevant results first. Free the returned instances with g_object_unref() and the list with g_list_free() when done.
444
+ */
445
+ vfunc_reverse_resolve_finish(result: Gio.AsyncResult): Place[]
446
+
447
+ // Class property signals of GeocodeGlib-1.0.GeocodeGlib.Backend
448
+
449
+ connect(sigName: string, callback: (...args: any[]) => void): number
450
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
451
+ emit(sigName: string, ...args: any[]): void
452
+ disconnect(id: number): void
453
+ }
454
+
455
+ /**
456
+ * All the fields in the #GeocodeBackend structure are private and should
457
+ * never be accessed directly.
458
+ * @interface
459
+ */
460
+ class Backend extends GObject.Object {
461
+
462
+ // Own properties of GeocodeGlib-1.0.GeocodeGlib.Backend
463
+
464
+ static name: string
465
+ static $gtype: GObject.GType<Backend>
466
+
467
+ // Constructors of GeocodeGlib-1.0.GeocodeGlib.Backend
468
+
469
+ constructor(config?: Backend.ConstructorProperties)
470
+ _init(config?: Backend.ConstructorProperties): void
471
+ }
472
+
473
+ module BoundingBox {
474
+
475
+ // Constructor properties interface
476
+
477
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
478
+
479
+ // Own constructor properties of GeocodeGlib-1.0.GeocodeGlib.BoundingBox
480
+
481
+ /**
482
+ * Bottom coordinate.
483
+ */
484
+ bottom?: number | null
485
+ /**
486
+ * Left coordinate.
487
+ */
488
+ left?: number | null
489
+ /**
490
+ * Right coordinate.
491
+ */
492
+ right?: number | null
493
+ /**
494
+ * Top coordinate.
495
+ */
496
+ top?: number | null
497
+ }
498
+
499
+ }
500
+
501
+ interface BoundingBox {
502
+
503
+ // Own properties of GeocodeGlib-1.0.GeocodeGlib.BoundingBox
504
+
505
+ /**
506
+ * Bottom coordinate.
507
+ */
508
+ readonly bottom: number
509
+ /**
510
+ * Left coordinate.
511
+ */
512
+ readonly left: number
513
+ /**
514
+ * Right coordinate.
515
+ */
516
+ readonly right: number
517
+ /**
518
+ * Top coordinate.
519
+ */
520
+ readonly top: number
521
+
522
+ // Owm methods of GeocodeGlib-1.0.GeocodeGlib.BoundingBox
523
+
524
+ /**
525
+ * Compare two #GeocodeBoundingBox instances for equality. This compares all
526
+ * fields and only returns %TRUE if the instances are exactly equal.
527
+ *
528
+ * Both instances must be non-%NULL.
529
+ * @param b another bounding box
530
+ * @returns %TRUE if the instances are equal, %FALSE otherwise
531
+ */
532
+ equal(b: BoundingBox): boolean
533
+ /**
534
+ * Gets the bottom coordinate of `bbox`.
535
+ * @returns the bottom coordinate of @bbox.
536
+ */
537
+ get_bottom(): number
538
+ /**
539
+ * Gets the left coordinate of `bbox`.
540
+ * @returns the left coordinate of @bbox.
541
+ */
542
+ get_left(): number
543
+ /**
544
+ * Gets the right coordinate of `bbox`.
545
+ * @returns the right coordinate of @bbox.
546
+ */
547
+ get_right(): number
548
+ /**
549
+ * Gets the top coordinate of `bbox`.
550
+ * @returns the top coordinate of @bbox.
551
+ */
552
+ get_top(): number
553
+
554
+ // Class property signals of GeocodeGlib-1.0.GeocodeGlib.BoundingBox
555
+
556
+ connect(sigName: "notify::bottom", callback: (($obj: BoundingBox, pspec: GObject.ParamSpec) => void)): number
557
+ connect_after(sigName: "notify::bottom", callback: (($obj: BoundingBox, pspec: GObject.ParamSpec) => void)): number
558
+ emit(sigName: "notify::bottom", ...args: any[]): void
559
+ connect(sigName: "notify::left", callback: (($obj: BoundingBox, pspec: GObject.ParamSpec) => void)): number
560
+ connect_after(sigName: "notify::left", callback: (($obj: BoundingBox, pspec: GObject.ParamSpec) => void)): number
561
+ emit(sigName: "notify::left", ...args: any[]): void
562
+ connect(sigName: "notify::right", callback: (($obj: BoundingBox, pspec: GObject.ParamSpec) => void)): number
563
+ connect_after(sigName: "notify::right", callback: (($obj: BoundingBox, pspec: GObject.ParamSpec) => void)): number
564
+ emit(sigName: "notify::right", ...args: any[]): void
565
+ connect(sigName: "notify::top", callback: (($obj: BoundingBox, pspec: GObject.ParamSpec) => void)): number
566
+ connect_after(sigName: "notify::top", callback: (($obj: BoundingBox, pspec: GObject.ParamSpec) => void)): number
567
+ emit(sigName: "notify::top", ...args: any[]): void
568
+ connect(sigName: string, callback: (...args: any[]) => void): number
569
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
570
+ emit(sigName: string, ...args: any[]): void
571
+ disconnect(id: number): void
572
+ }
573
+
574
+ /**
575
+ * All the fields in the #GeocodeLocation structure are private and should
576
+ * never be accessed directly.
577
+ * @class
578
+ */
579
+ class BoundingBox extends GObject.Object {
580
+
581
+ // Own properties of GeocodeGlib-1.0.GeocodeGlib.BoundingBox
582
+
583
+ static name: string
584
+ static $gtype: GObject.GType<BoundingBox>
585
+
586
+ // Constructors of GeocodeGlib-1.0.GeocodeGlib.BoundingBox
587
+
588
+ constructor(config?: BoundingBox.ConstructorProperties)
589
+ /**
590
+ * Creates a new #GeocodeBoundingBox object.
591
+ * @constructor
592
+ * @param top The left coordinate
593
+ * @param bottom The bottom coordinate
594
+ * @param left The left coordinate
595
+ * @param right The right coordinate
596
+ * @returns a new #GeocodeBoundingBox object. Use g_object_unref() when done.
597
+ */
598
+ constructor(top: number, bottom: number, left: number, right: number)
599
+ /**
600
+ * Creates a new #GeocodeBoundingBox object.
601
+ * @constructor
602
+ * @param top The left coordinate
603
+ * @param bottom The bottom coordinate
604
+ * @param left The left coordinate
605
+ * @param right The right coordinate
606
+ * @returns a new #GeocodeBoundingBox object. Use g_object_unref() when done.
607
+ */
608
+ static new(top: number, bottom: number, left: number, right: number): BoundingBox
609
+ _init(config?: BoundingBox.ConstructorProperties): void
610
+ }
611
+
612
+ module Forward {
613
+
614
+ // Constructor properties interface
615
+
616
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
617
+
618
+ // Own constructor properties of GeocodeGlib-1.0.GeocodeGlib.Forward
619
+
620
+ /**
621
+ * The number of requested results to a search query.
622
+ */
623
+ answer_count?: number | null
624
+ /**
625
+ * If set to #TRUE then only results in the #GeocodeForward:search-area
626
+ * bounding box are returned.
627
+ * If set to #FALSE the #GeocodeForward:search-area is treated like a
628
+ * preferred area for results.
629
+ */
630
+ bounded?: boolean | null
631
+ /**
632
+ * The bounding box that limits the search area.
633
+ * If #GeocodeForward:bounded property is set to #TRUE only results from
634
+ * this area is returned.
635
+ */
636
+ search_area?: BoundingBox | null
637
+ }
638
+
639
+ }
640
+
641
+ interface Forward {
642
+
643
+ // Own properties of GeocodeGlib-1.0.GeocodeGlib.Forward
644
+
645
+ /**
646
+ * The number of requested results to a search query.
647
+ */
648
+ answer_count: number
649
+ /**
650
+ * If set to #TRUE then only results in the #GeocodeForward:search-area
651
+ * bounding box are returned.
652
+ * If set to #FALSE the #GeocodeForward:search-area is treated like a
653
+ * preferred area for results.
654
+ */
655
+ bounded: boolean
656
+ /**
657
+ * The bounding box that limits the search area.
658
+ * If #GeocodeForward:bounded property is set to #TRUE only results from
659
+ * this area is returned.
660
+ */
661
+ search_area: BoundingBox
662
+
663
+ // Owm methods of GeocodeGlib-1.0.GeocodeGlib.Forward
664
+
665
+ /**
666
+ * Gets the number of requested results for searches.
667
+ */
668
+ get_answer_count(): number
669
+ /**
670
+ * Gets the #GeocodeForward:bounded property that regulates whether the
671
+ * #GeocodeForward:search-area property acts restricting or not.
672
+ */
673
+ get_bounded(): boolean
674
+ /**
675
+ * Gets the area to limit searches within.
676
+ * @returns the search area, or %NULL if none is set
677
+ */
678
+ get_search_area(): BoundingBox | null
679
+ /**
680
+ * Gets the result of a forward geocoding
681
+ * query using the current backend (see geocode_forward_set_backend()). By
682
+ * default the GNOME Nominatim server is used. See #GeocodeBackend for more
683
+ * information.
684
+ *
685
+ * If no results are found, a %GEOCODE_ERROR_NO_MATCHES error is returned.
686
+ * @returns A list of places or %NULL in case of errors. Free the returned instances with g_object_unref() and the list with g_list_free() when done.
687
+ */
688
+ search(): Place[]
689
+ /**
690
+ * Asynchronously performs a forward geocoding
691
+ * query using a web service. Use geocode_forward_search() to do the same
692
+ * thing synchronously.
693
+ *
694
+ * When the operation is finished, `callback` will be called. You can then call
695
+ * geocode_forward_search_finish() to get the result of the operation.
696
+ * @param cancellable optional #GCancellable forward, %NULL to ignore.
697
+ * @param callback a #GAsyncReadyCallback to call when the request is satisfied
698
+ */
699
+ search_async(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
700
+ /**
701
+ * Finishes a forward geocoding operation. See geocode_forward_search_async().
702
+ * @param res a #GAsyncResult.
703
+ * @returns A list of places or %NULL in case of errors. Free the returned instances with g_object_unref() and the list with g_list_free() when done.
704
+ */
705
+ search_finish(res: Gio.AsyncResult): Place[]
706
+ /**
707
+ * Sets the number of requested results to `count`.
708
+ * @param count the number of requested results, which must be greater than zero
709
+ */
710
+ set_answer_count(count: number): void
711
+ /**
712
+ * Specifies the backend to use in the forward geocoding operation.
713
+ *
714
+ * If none is given, the default GNOME Nominatim server is used.
715
+ * @param backend a #GeocodeBackend, or %NULL to use the default one.
716
+ */
717
+ set_backend(backend: Backend | null): void
718
+ /**
719
+ * Set the #GeocodeForward:bounded property that regulates whether the
720
+ * #GeocodeForward:search-area property acts restricting or not.
721
+ * @param bounded #TRUE to restrict results to only items contained within the #GeocodeForward:search-area bounding box.
722
+ */
723
+ set_bounded(bounded: boolean): void
724
+ /**
725
+ * Sets the area to limit searches within.
726
+ * @param box a bounding box to limit the search area.
727
+ */
728
+ set_search_area(box: BoundingBox): void
729
+
730
+ // Class property signals of GeocodeGlib-1.0.GeocodeGlib.Forward
731
+
732
+ connect(sigName: "notify::answer-count", callback: (($obj: Forward, pspec: GObject.ParamSpec) => void)): number
733
+ connect_after(sigName: "notify::answer-count", callback: (($obj: Forward, pspec: GObject.ParamSpec) => void)): number
734
+ emit(sigName: "notify::answer-count", ...args: any[]): void
735
+ connect(sigName: "notify::bounded", callback: (($obj: Forward, pspec: GObject.ParamSpec) => void)): number
736
+ connect_after(sigName: "notify::bounded", callback: (($obj: Forward, pspec: GObject.ParamSpec) => void)): number
737
+ emit(sigName: "notify::bounded", ...args: any[]): void
738
+ connect(sigName: "notify::search-area", callback: (($obj: Forward, pspec: GObject.ParamSpec) => void)): number
739
+ connect_after(sigName: "notify::search-area", callback: (($obj: Forward, pspec: GObject.ParamSpec) => void)): number
740
+ emit(sigName: "notify::search-area", ...args: any[]): void
741
+ connect(sigName: string, callback: (...args: any[]) => void): number
742
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
743
+ emit(sigName: string, ...args: any[]): void
744
+ disconnect(id: number): void
745
+ }
746
+
747
+ /**
748
+ * All the fields in the #GeocodeForward structure are private and should never be accessed directly.
749
+ * @class
750
+ */
751
+ class Forward extends GObject.Object {
752
+
753
+ // Own properties of GeocodeGlib-1.0.GeocodeGlib.Forward
754
+
755
+ static name: string
756
+ static $gtype: GObject.GType<Forward>
757
+
758
+ // Constructors of GeocodeGlib-1.0.GeocodeGlib.Forward
759
+
760
+ constructor(config?: Forward.ConstructorProperties)
761
+ /**
762
+ * Creates a new #GeocodeForward to perform geocoding with. The
763
+ * #GHashTable is in the format used by Telepathy, and documented
764
+ * on <ulink url="http://telepathy.freedesktop.org/spec/Connection_Interface_Location.html#Mapping:Location">Telepathy's specification site</ulink>.
765
+ *
766
+ * See also: <ulink url="http://xmpp.org/extensions/xep-0080.html">XEP-0080 specification</ulink>.
767
+ * @constructor
768
+ * @param params a #GHashTable with string keys, and #GValue values.
769
+ * @returns a new #GeocodeForward. Use g_object_unref() when done.
770
+ */
771
+ static new_for_params(params: GLib.HashTable): Forward
772
+ /**
773
+ * Creates a new #GeocodeForward to perform forward geocoding with. The
774
+ * string is in free-form format.
775
+ * @constructor
776
+ * @param str a string containing a free-form description of the location
777
+ * @returns a new #GeocodeForward. Use g_object_unref() when done.
778
+ */
779
+ static new_for_string(str: string | null): Forward
780
+ _init(config?: Forward.ConstructorProperties): void
781
+ }
782
+
783
+ module Location {
784
+
785
+ // Constructor properties interface
786
+
787
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
788
+
789
+ // Own constructor properties of GeocodeGlib-1.0.GeocodeGlib.Location
790
+
791
+ /**
792
+ * The accuracy of this location in meters.
793
+ */
794
+ accuracy?: number | null
795
+ /**
796
+ * The altitude of this location in meters.
797
+ */
798
+ altitude?: number | null
799
+ /**
800
+ * The Coordinate Reference System Identification of this location.
801
+ * Only the value 'wgs84' is currently valid.
802
+ */
803
+ crs?: LocationCRS | null
804
+ /**
805
+ * The description of this location.
806
+ */
807
+ description?: string | null
808
+ /**
809
+ * The latitude of this location in degrees.
810
+ */
811
+ latitude?: number | null
812
+ /**
813
+ * The longitude of this location in degrees.
814
+ */
815
+ longitude?: number | null
816
+ /**
817
+ * A timestamp in seconds since
818
+ * <ulink url="http://en.wikipedia.org/wiki/Unix_epoch">Epoch</ulink>,
819
+ * giving when the location was resolved from an address.
820
+ *
821
+ * A value of 0 (zero) will be interpreted as the current time.
822
+ */
823
+ timestamp?: number | null
824
+ }
825
+
826
+ }
827
+
828
+ interface Location {
829
+
830
+ // Own properties of GeocodeGlib-1.0.GeocodeGlib.Location
831
+
832
+ /**
833
+ * The accuracy of this location in meters.
834
+ */
835
+ accuracy: number
836
+ /**
837
+ * The altitude of this location in meters.
838
+ */
839
+ altitude: number
840
+ /**
841
+ * The Coordinate Reference System Identification of this location.
842
+ * Only the value 'wgs84' is currently valid.
843
+ */
844
+ readonly crs: LocationCRS
845
+ /**
846
+ * The description of this location.
847
+ */
848
+ description: string | null
849
+ /**
850
+ * The latitude of this location in degrees.
851
+ */
852
+ latitude: number
853
+ /**
854
+ * The longitude of this location in degrees.
855
+ */
856
+ longitude: number
857
+ /**
858
+ * A timestamp in seconds since
859
+ * <ulink url="http://en.wikipedia.org/wiki/Unix_epoch">Epoch</ulink>,
860
+ * giving when the location was resolved from an address.
861
+ *
862
+ * A value of 0 (zero) will be interpreted as the current time.
863
+ */
864
+ readonly timestamp: number
865
+
866
+ // Owm methods of GeocodeGlib-1.0.GeocodeGlib.Location
867
+
868
+ /**
869
+ * Compare two #GeocodeLocation instances for equality. This compares all fields
870
+ * and only returns %TRUE if the instances are exactly equal. For example, if
871
+ * both locations have the same physical coordinates, but one location has its
872
+ * #GeocodeLocation:description property set and the other does not, %FALSE
873
+ * will be returned. Similarly, if both locations have the same
874
+ * #GeocodeLocation:latitude, #GeocodeLocation:longitude and
875
+ * #GeocodeLocation:altitude, but a different #GeocodeLocation:accuracy or
876
+ * #GeocodeLocation:timestamp, %FALSE will be returned. Or if both locations
877
+ * have the same#GeocodeLocation:latitude and #GeocodeLocation:longitude but a
878
+ * different #GeocodeLocation:altitude, %FALSE will be returned.
879
+ *
880
+ * Both instances must be non-%NULL.
881
+ * @param b another location
882
+ * @returns %TRUE if the instances are equal, %FALSE otherwise
883
+ */
884
+ equal(b: Location): boolean
885
+ /**
886
+ * Gets the accuracy (in meters) of location `loc`.
887
+ * @returns The accuracy of location @loc.
888
+ */
889
+ get_accuracy(): number
890
+ /**
891
+ * Gets the altitude of location `loc`.
892
+ * @returns The altitude of location @loc.
893
+ */
894
+ get_altitude(): number
895
+ /**
896
+ * Gets the Coordinate Reference System Identification of location `loc`.
897
+ * @returns The CRS of location @loc.
898
+ */
899
+ get_crs(): LocationCRS
900
+ /**
901
+ * Gets the description of location `loc`.
902
+ * @returns The description of location @loc.
903
+ */
904
+ get_description(): string | null
905
+ /**
906
+ * Calculates the distance in km, along the curvature of the Earth,
907
+ * between 2 locations. Note that altitude changes are not
908
+ * taken into account.
909
+ * @param locb a #GeocodeLocation
910
+ * @returns a distance in km.
911
+ */
912
+ get_distance_from(locb: Location): number
913
+ /**
914
+ * Gets the latitude of location `loc`.
915
+ * @returns The latitude of location @loc.
916
+ */
917
+ get_latitude(): number
918
+ /**
919
+ * Gets the longitude of location `loc`.
920
+ * @returns The longitude of location @loc.
921
+ */
922
+ get_longitude(): number
923
+ /**
924
+ * Gets the timestamp (in seconds since the Epoch) of location `loc`. See
925
+ * #GeocodeLocation:timestamp.
926
+ * @returns The timestamp of location @loc.
927
+ */
928
+ get_timestamp(): number
929
+ /**
930
+ * Sets the description of `loc` to `description`.
931
+ * @param description a description for the location
932
+ */
933
+ set_description(description: string | null): void
934
+ /**
935
+ * Initialize a #GeocodeLocation object with the given `uri`.
936
+ *
937
+ * The URI should be in the geo scheme (RFC 5870) which in its simplest form
938
+ * looks like:
939
+ *
940
+ * - geo:latitude,longitude
941
+ *
942
+ * An <ulink
943
+ * url="http://developer.android.com/guide/components/intents-common.html#Maps">
944
+ * Android extension</ulink> to set a description is also supported in the form of:
945
+ *
946
+ * - geo:0,0?q=latitude,longitude(description)
947
+ * @param uri a URI mapping out a location
948
+ * @returns %TRUE on success and %FALSE on error.
949
+ */
950
+ set_from_uri(uri: string | null): boolean
951
+ /**
952
+ * Creates a URI representing `loc` in the scheme specified in `scheme`.
953
+ * @param scheme the scheme of the requested URI
954
+ * @returns a URI representing the location. The returned string should be freed with g_free() when no longer needed.
955
+ */
956
+ to_uri(scheme: LocationURIScheme): string | null
957
+
958
+ // Class property signals of GeocodeGlib-1.0.GeocodeGlib.Location
959
+
960
+ connect(sigName: "notify::accuracy", callback: (($obj: Location, pspec: GObject.ParamSpec) => void)): number
961
+ connect_after(sigName: "notify::accuracy", callback: (($obj: Location, pspec: GObject.ParamSpec) => void)): number
962
+ emit(sigName: "notify::accuracy", ...args: any[]): void
963
+ connect(sigName: "notify::altitude", callback: (($obj: Location, pspec: GObject.ParamSpec) => void)): number
964
+ connect_after(sigName: "notify::altitude", callback: (($obj: Location, pspec: GObject.ParamSpec) => void)): number
965
+ emit(sigName: "notify::altitude", ...args: any[]): void
966
+ connect(sigName: "notify::crs", callback: (($obj: Location, pspec: GObject.ParamSpec) => void)): number
967
+ connect_after(sigName: "notify::crs", callback: (($obj: Location, pspec: GObject.ParamSpec) => void)): number
968
+ emit(sigName: "notify::crs", ...args: any[]): void
969
+ connect(sigName: "notify::description", callback: (($obj: Location, pspec: GObject.ParamSpec) => void)): number
970
+ connect_after(sigName: "notify::description", callback: (($obj: Location, pspec: GObject.ParamSpec) => void)): number
971
+ emit(sigName: "notify::description", ...args: any[]): void
972
+ connect(sigName: "notify::latitude", callback: (($obj: Location, pspec: GObject.ParamSpec) => void)): number
973
+ connect_after(sigName: "notify::latitude", callback: (($obj: Location, pspec: GObject.ParamSpec) => void)): number
974
+ emit(sigName: "notify::latitude", ...args: any[]): void
975
+ connect(sigName: "notify::longitude", callback: (($obj: Location, pspec: GObject.ParamSpec) => void)): number
976
+ connect_after(sigName: "notify::longitude", callback: (($obj: Location, pspec: GObject.ParamSpec) => void)): number
977
+ emit(sigName: "notify::longitude", ...args: any[]): void
978
+ connect(sigName: "notify::timestamp", callback: (($obj: Location, pspec: GObject.ParamSpec) => void)): number
979
+ connect_after(sigName: "notify::timestamp", callback: (($obj: Location, pspec: GObject.ParamSpec) => void)): number
980
+ emit(sigName: "notify::timestamp", ...args: any[]): void
981
+ connect(sigName: string, callback: (...args: any[]) => void): number
982
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
983
+ emit(sigName: string, ...args: any[]): void
984
+ disconnect(id: number): void
985
+ }
986
+
987
+ /**
988
+ * All the fields in the #GeocodeLocation structure are private and should never be accessed directly.
989
+ * @class
990
+ */
991
+ class Location extends GObject.Object {
992
+
993
+ // Own properties of GeocodeGlib-1.0.GeocodeGlib.Location
994
+
995
+ static name: string
996
+ static $gtype: GObject.GType<Location>
997
+
998
+ // Constructors of GeocodeGlib-1.0.GeocodeGlib.Location
999
+
1000
+ constructor(config?: Location.ConstructorProperties)
1001
+ /**
1002
+ * Creates a new #GeocodeLocation object.
1003
+ * @constructor
1004
+ * @param latitude a valid latitude
1005
+ * @param longitude a valid longitude
1006
+ * @param accuracy accuracy of location in meters
1007
+ * @returns a new #GeocodeLocation object. Use g_object_unref() when done.
1008
+ */
1009
+ constructor(latitude: number, longitude: number, accuracy: number)
1010
+ /**
1011
+ * Creates a new #GeocodeLocation object.
1012
+ * @constructor
1013
+ * @param latitude a valid latitude
1014
+ * @param longitude a valid longitude
1015
+ * @param accuracy accuracy of location in meters
1016
+ * @returns a new #GeocodeLocation object. Use g_object_unref() when done.
1017
+ */
1018
+ static new(latitude: number, longitude: number, accuracy: number): Location
1019
+ /**
1020
+ * Creates a new #GeocodeLocation object.
1021
+ * @constructor
1022
+ * @param latitude a valid latitude
1023
+ * @param longitude a valid longitude
1024
+ * @param accuracy accuracy of location in meters
1025
+ * @param description a description for the location
1026
+ * @returns a new #GeocodeLocation object. Use g_object_unref() when done.
1027
+ */
1028
+ static new_with_description(latitude: number, longitude: number, accuracy: number, description: string | null): Location
1029
+ _init(config?: Location.ConstructorProperties): void
1030
+ }
1031
+
1032
+ module MockBackend {
1033
+
1034
+ // Constructor properties interface
1035
+
1036
+ interface ConstructorProperties extends Backend.ConstructorProperties, GObject.Object.ConstructorProperties {
1037
+ }
1038
+
1039
+ }
1040
+
1041
+ interface MockBackend extends Backend {
1042
+
1043
+ // Owm methods of GeocodeGlib-1.0.GeocodeGlib.MockBackend
1044
+
1045
+ /**
1046
+ * Add a query and corresponding result (or error) to the mock backend, meaning
1047
+ * that if it receives a forward search for `params` through
1048
+ * geocode_backend_forward_search() (or its asynchronous variants), the mock
1049
+ * backend will return the given `results` or `error` to the caller.
1050
+ *
1051
+ * If a set of `params` is added to the backend multiple times, the most
1052
+ * recently provided `results` and `error` will be used.
1053
+ *
1054
+ * Exactly one of `results` and `error` must be set. Empty result sets are
1055
+ * represented as a %GEOCODE_ERROR_NO_MATCHES error.
1056
+ * @param params query parameters to respond to, in the same format as accepted by geocode_forward_search()
1057
+ * @param results result set to return for the query, or %NULL if `error` is non-%NULL; result sets must be in the same format as returned by geocode_forward_search()
1058
+ * @param error error to return for the query, or %NULL if `results` should be returned instead; errors must match those returned by geocode_forward_search()
1059
+ */
1060
+ add_forward_result(params: GLib.HashTable, results: Place[] | null, error: GLib.Error | null): void
1061
+ /**
1062
+ * Add a query and corresponding result (or error) to the mock backend, meaning
1063
+ * that if it receives a reverse search for `params` through
1064
+ * geocode_backend_reverse_resolve() (or its asynchronous variants), the mock
1065
+ * backend will return the given `results` or `error` to the caller.
1066
+ *
1067
+ * If a set of `params` is added to the backend multiple times, the most
1068
+ * recently provided `results` and `error` will be used.
1069
+ *
1070
+ * Exactly one of `results` and `error` must be set. Empty result sets are
1071
+ * represented as a %GEOCODE_ERROR_NOT_SUPPORTED error.
1072
+ * @param params query parameters to respond to, in the same format as accepted by geocode_reverse_resolve()
1073
+ * @param results result set to return for the query, or %NULL if `error` is non-%NULL; result sets must be in the same format as returned by geocode_reverse_resolve()
1074
+ * @param error error to return for the query, or %NULL if `results` should be returned instead; errors must match those returned by geocode_reverse_resolve()
1075
+ */
1076
+ add_reverse_result(params: GLib.HashTable, results: Place[] | null, error: GLib.Error | null): void
1077
+ /**
1078
+ * Clear the set of stored results in the mock backend which have been added
1079
+ * using geocode_mock_backend_add_forward_result() and
1080
+ * geocode_mock_backend_add_reverse_result(). Additionally, clear the query log
1081
+ * so far (see geocode_mock_backend_get_query_log()).
1082
+ *
1083
+ * This effectively resets the mock backend to its initial state.
1084
+ */
1085
+ clear(): void
1086
+ /**
1087
+ * Get the details of the forward and reverse queries which have been requested
1088
+ * of the mock backend since the most recent call to
1089
+ * geocode_mock_backend_clear(). The query details are provided as
1090
+ * #GeocodeMockBackendQuery structures, which map the query parameters to
1091
+ * either the result set or the error which geocode_backend_forward_search()
1092
+ * or geocode_backend_reverse_resolve() (or their asynchronous variants)
1093
+ * returned to the caller.
1094
+ *
1095
+ * The results are provided in the order in which calls were made to
1096
+ * geocode_backend_forward_search() and geocode_backend_reverse_resolve().
1097
+ * Results for forward and reverse queries may be interleaved.
1098
+ * @returns potentially empty sequence of forward and reverse query details
1099
+ */
1100
+ get_query_log(): MockBackendQuery[]
1101
+
1102
+ // Class property signals of GeocodeGlib-1.0.GeocodeGlib.MockBackend
1103
+
1104
+ connect(sigName: string, callback: (...args: any[]) => void): number
1105
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
1106
+ emit(sigName: string, ...args: any[]): void
1107
+ disconnect(id: number): void
1108
+ }
1109
+
1110
+ /**
1111
+ * All the fields in the #GeocodeMockBackend structure are private and should
1112
+ * never be accessed directly.
1113
+ * @class
1114
+ */
1115
+ class MockBackend extends GObject.Object {
1116
+
1117
+ // Own properties of GeocodeGlib-1.0.GeocodeGlib.MockBackend
1118
+
1119
+ static name: string
1120
+ static $gtype: GObject.GType<MockBackend>
1121
+
1122
+ // Constructors of GeocodeGlib-1.0.GeocodeGlib.MockBackend
1123
+
1124
+ constructor(config?: MockBackend.ConstructorProperties)
1125
+ /**
1126
+ * Creates a new mock backend implementation with no initial forward or reverse
1127
+ * query results (so it will return an empty result set for all queries).
1128
+ * @constructor
1129
+ * @returns a new #GeocodeMockBackend
1130
+ */
1131
+ constructor()
1132
+ /**
1133
+ * Creates a new mock backend implementation with no initial forward or reverse
1134
+ * query results (so it will return an empty result set for all queries).
1135
+ * @constructor
1136
+ * @returns a new #GeocodeMockBackend
1137
+ */
1138
+ static new(): MockBackend
1139
+ _init(config?: MockBackend.ConstructorProperties): void
1140
+ }
1141
+
1142
+ module Nominatim {
1143
+
1144
+ // Constructor properties interface
1145
+
1146
+ interface ConstructorProperties extends Backend.ConstructorProperties, GObject.Object.ConstructorProperties {
1147
+
1148
+ // Own constructor properties of GeocodeGlib-1.0.GeocodeGlib.Nominatim
1149
+
1150
+ /**
1151
+ * The base URL of the Nominatim service, for example
1152
+ * `https://nominatim.example.org`.
1153
+ */
1154
+ base_url?: string | null
1155
+ /**
1156
+ * E-mail address of the maintainer of the software making the
1157
+ * geocoding requests to the Nominatim server. This is used to contact
1158
+ * them in the event of a problem with their usage. See
1159
+ * [the Nominatim API](http://wiki.openstreetmap.org/wiki/Nominatim).
1160
+ */
1161
+ maintainer_email_address?: string | null
1162
+ /**
1163
+ * User-Agent string to send with HTTP(S) requests, or %NULL to use the
1164
+ * default user agent, which is derived from the geocode-glib version
1165
+ * and #GApplication:id, for example: `geocode-glib/3.20 (MyAppId)`.
1166
+ *
1167
+ * As per the
1168
+ * [Nominatim usage policy](http://wiki.openstreetmap.org/wiki/Nominatim_usage_policy),
1169
+ * it should be set to a string which identifies the application which
1170
+ * is using geocode-glib, and must be a valid
1171
+ * [user agent](https://tools.ietf.org/html/rfc7231#section-5.5.3)
1172
+ * string.
1173
+ */
1174
+ user_agent?: string | null
1175
+ }
1176
+
1177
+ }
1178
+
1179
+ interface Nominatim extends Backend {
1180
+
1181
+ // Own properties of GeocodeGlib-1.0.GeocodeGlib.Nominatim
1182
+
1183
+ /**
1184
+ * The base URL of the Nominatim service, for example
1185
+ * `https://nominatim.example.org`.
1186
+ */
1187
+ readonly base_url: string | null
1188
+ /**
1189
+ * E-mail address of the maintainer of the software making the
1190
+ * geocoding requests to the Nominatim server. This is used to contact
1191
+ * them in the event of a problem with their usage. See
1192
+ * [the Nominatim API](http://wiki.openstreetmap.org/wiki/Nominatim).
1193
+ */
1194
+ readonly maintainer_email_address: string | null
1195
+ /**
1196
+ * User-Agent string to send with HTTP(S) requests, or %NULL to use the
1197
+ * default user agent, which is derived from the geocode-glib version
1198
+ * and #GApplication:id, for example: `geocode-glib/3.20 (MyAppId)`.
1199
+ *
1200
+ * As per the
1201
+ * [Nominatim usage policy](http://wiki.openstreetmap.org/wiki/Nominatim_usage_policy),
1202
+ * it should be set to a string which identifies the application which
1203
+ * is using geocode-glib, and must be a valid
1204
+ * [user agent](https://tools.ietf.org/html/rfc7231#section-5.5.3)
1205
+ * string.
1206
+ */
1207
+ user_agent: string | null
1208
+
1209
+ // Own fields of GeocodeGlib-1.0.GeocodeGlib.Nominatim
1210
+
1211
+ parent_instance: GObject.Object
1212
+
1213
+ // Own virtual methods of GeocodeGlib-1.0.GeocodeGlib.Nominatim
1214
+
1215
+ vfunc_query(uri: string | null, cancellable: Gio.Cancellable | null): string | null
1216
+ vfunc_query_async(uri: string | null, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
1217
+ vfunc_query_finish(res: Gio.AsyncResult): string | null
1218
+
1219
+ // Class property signals of GeocodeGlib-1.0.GeocodeGlib.Nominatim
1220
+
1221
+ connect(sigName: "notify::base-url", callback: (($obj: Nominatim, pspec: GObject.ParamSpec) => void)): number
1222
+ connect_after(sigName: "notify::base-url", callback: (($obj: Nominatim, pspec: GObject.ParamSpec) => void)): number
1223
+ emit(sigName: "notify::base-url", ...args: any[]): void
1224
+ connect(sigName: "notify::maintainer-email-address", callback: (($obj: Nominatim, pspec: GObject.ParamSpec) => void)): number
1225
+ connect_after(sigName: "notify::maintainer-email-address", callback: (($obj: Nominatim, pspec: GObject.ParamSpec) => void)): number
1226
+ emit(sigName: "notify::maintainer-email-address", ...args: any[]): void
1227
+ connect(sigName: "notify::user-agent", callback: (($obj: Nominatim, pspec: GObject.ParamSpec) => void)): number
1228
+ connect_after(sigName: "notify::user-agent", callback: (($obj: Nominatim, pspec: GObject.ParamSpec) => void)): number
1229
+ emit(sigName: "notify::user-agent", ...args: any[]): void
1230
+ connect(sigName: string, callback: (...args: any[]) => void): number
1231
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
1232
+ emit(sigName: string, ...args: any[]): void
1233
+ disconnect(id: number): void
1234
+ }
1235
+
1236
+ /**
1237
+ * All the fields in the #GeocodeNominatim structure are private and should
1238
+ * never be accessed directly.
1239
+ * @class
1240
+ */
1241
+ class Nominatim extends GObject.Object {
1242
+
1243
+ // Own properties of GeocodeGlib-1.0.GeocodeGlib.Nominatim
1244
+
1245
+ static name: string
1246
+ static $gtype: GObject.GType<Nominatim>
1247
+
1248
+ // Constructors of GeocodeGlib-1.0.GeocodeGlib.Nominatim
1249
+
1250
+ constructor(config?: Nominatim.ConstructorProperties)
1251
+ /**
1252
+ * Creates a new backend implementation for an online Nominatim server. See
1253
+ * the documentation for #GeocodeNominatim:base-url and
1254
+ * #GeocodeNominatim:maintainer-email-address.
1255
+ * @constructor
1256
+ * @param base_url a the base URL of the Nominatim server.
1257
+ * @param maintainer_email_address the email address of the software maintainer.
1258
+ * @returns a new #GeocodeNominatim. Use g_object_unref() when done.
1259
+ */
1260
+ constructor(base_url: string | null, maintainer_email_address: string | null)
1261
+ /**
1262
+ * Creates a new backend implementation for an online Nominatim server. See
1263
+ * the documentation for #GeocodeNominatim:base-url and
1264
+ * #GeocodeNominatim:maintainer-email-address.
1265
+ * @constructor
1266
+ * @param base_url a the base URL of the Nominatim server.
1267
+ * @param maintainer_email_address the email address of the software maintainer.
1268
+ * @returns a new #GeocodeNominatim. Use g_object_unref() when done.
1269
+ */
1270
+ static new(base_url: string | null, maintainer_email_address: string | null): Nominatim
1271
+ _init(config?: Nominatim.ConstructorProperties): void
1272
+ /**
1273
+ * Gets a reference to the default Nominatim server on nominatim.gnome.org.
1274
+ *
1275
+ * This function is thread-safe.
1276
+ * @returns a new #GeocodeNominatim. Use g_object_unref() when done.
1277
+ */
1278
+ static get_gnome(): Nominatim
1279
+ }
1280
+
1281
+ module Place {
1282
+
1283
+ // Constructor properties interface
1284
+
1285
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
1286
+
1287
+ // Own constructor properties of GeocodeGlib-1.0.GeocodeGlib.Place
1288
+
1289
+ /**
1290
+ * The local administrative area.
1291
+ */
1292
+ administrative_area?: string | null
1293
+ /**
1294
+ * A named area such as a campus or neighborhood.
1295
+ */
1296
+ area?: string | null
1297
+ /**
1298
+ * The bounding box for the place.
1299
+ */
1300
+ bounding_box?: BoundingBox | null
1301
+ /**
1302
+ * A specific building on a street or in an area.
1303
+ */
1304
+ building?: string | null
1305
+ /**
1306
+ * The continent.
1307
+ */
1308
+ continent?: string | null
1309
+ /**
1310
+ * The country.
1311
+ */
1312
+ country?: string | null
1313
+ /**
1314
+ * The country code.
1315
+ */
1316
+ country_code?: string | null
1317
+ /**
1318
+ * The county.
1319
+ */
1320
+ county?: string | null
1321
+ /**
1322
+ * The location info for the place.
1323
+ */
1324
+ location?: Location | null
1325
+ /**
1326
+ * The name of the place.
1327
+ */
1328
+ name?: string | null
1329
+ /**
1330
+ * The OpenStreetMap id of the place.
1331
+ */
1332
+ osm_id?: string | null
1333
+ /**
1334
+ * The OpenStreetMap type of the place.
1335
+ */
1336
+ osm_type?: PlaceOsmType | null
1337
+ /**
1338
+ * The type of the place.
1339
+ */
1340
+ place_type?: PlaceType | null
1341
+ /**
1342
+ * The postal code.
1343
+ */
1344
+ postal_code?: string | null
1345
+ /**
1346
+ * The state.
1347
+ */
1348
+ state?: string | null
1349
+ /**
1350
+ * The street name.
1351
+ */
1352
+ street?: string | null
1353
+ /**
1354
+ * The street address.
1355
+ */
1356
+ street_address?: string | null
1357
+ /**
1358
+ * The town.
1359
+ */
1360
+ town?: string | null
1361
+ }
1362
+
1363
+ }
1364
+
1365
+ interface Place {
1366
+
1367
+ // Own properties of GeocodeGlib-1.0.GeocodeGlib.Place
1368
+
1369
+ /**
1370
+ * The local administrative area.
1371
+ */
1372
+ administrative_area: string | null
1373
+ /**
1374
+ * A named area such as a campus or neighborhood.
1375
+ */
1376
+ area: string | null
1377
+ /**
1378
+ * The bounding box for the place.
1379
+ */
1380
+ bounding_box: BoundingBox
1381
+ /**
1382
+ * A specific building on a street or in an area.
1383
+ */
1384
+ building: string | null
1385
+ /**
1386
+ * The continent.
1387
+ */
1388
+ continent: string | null
1389
+ /**
1390
+ * The country.
1391
+ */
1392
+ country: string | null
1393
+ /**
1394
+ * The country code.
1395
+ */
1396
+ country_code: string | null
1397
+ /**
1398
+ * The county.
1399
+ */
1400
+ county: string | null
1401
+ /**
1402
+ * #GIcon representing the `GeocodePlace`.
1403
+ */
1404
+ readonly icon: Gio.Icon
1405
+ /**
1406
+ * The location info for the place.
1407
+ */
1408
+ location: Location
1409
+ /**
1410
+ * The name of the place.
1411
+ */
1412
+ name: string | null
1413
+ /**
1414
+ * The OpenStreetMap id of the place.
1415
+ */
1416
+ osm_id: string | null
1417
+ /**
1418
+ * The OpenStreetMap type of the place.
1419
+ */
1420
+ osm_type: PlaceOsmType
1421
+ /**
1422
+ * The type of the place.
1423
+ */
1424
+ readonly place_type: PlaceType
1425
+ /**
1426
+ * The postal code.
1427
+ */
1428
+ postal_code: string | null
1429
+ /**
1430
+ * The state.
1431
+ */
1432
+ state: string | null
1433
+ /**
1434
+ * The street name.
1435
+ */
1436
+ street: string | null
1437
+ /**
1438
+ * The street address.
1439
+ */
1440
+ street_address: string | null
1441
+ /**
1442
+ * The town.
1443
+ */
1444
+ town: string | null
1445
+
1446
+ // Owm methods of GeocodeGlib-1.0.GeocodeGlib.Place
1447
+
1448
+ /**
1449
+ * Compare two #GeocodePlace instances for equality. This compares all fields
1450
+ * and only returns %TRUE if the instances are exactly equal. For example, if
1451
+ * both places have the same #GeocodePlace:location, but place `b` has its
1452
+ * #GeocodePlace:continent property set and place `a` does not, %FALSE will be
1453
+ * returned.
1454
+ *
1455
+ * Both instances must be non-%NULL.
1456
+ * @param b another place
1457
+ * @returns %TRUE if the instances are equal, %FALSE otherwise
1458
+ */
1459
+ equal(b: Place): boolean
1460
+ /**
1461
+ * Gets the local administrative area of the `place`.
1462
+ * @returns The local administrative area of the @place.
1463
+ */
1464
+ get_administrative_area(): string | null
1465
+ /**
1466
+ * Gets the area of the `place`.
1467
+ * @returns The area of the @place.
1468
+ */
1469
+ get_area(): string | null
1470
+ /**
1471
+ * Gets the bounding box for the place `place`.
1472
+ * @returns A #GeocodeBoundingBox, or NULL if boundaries are unknown.
1473
+ */
1474
+ get_bounding_box(): BoundingBox
1475
+ /**
1476
+ * Gets the building of the `place`.
1477
+ * @returns The building of the @place.
1478
+ */
1479
+ get_building(): string | null
1480
+ /**
1481
+ * Gets the continent of the `place`.
1482
+ * @returns The continent of the @place.
1483
+ */
1484
+ get_continent(): string | null
1485
+ /**
1486
+ * Gets the country of the `place`.
1487
+ * @returns The country of the @place.
1488
+ */
1489
+ get_country(): string | null
1490
+ /**
1491
+ * Gets the ISO-3166 country code of the `place`.
1492
+ * @returns The ISO-3166 country code of the @place, in upper case.
1493
+ */
1494
+ get_country_code(): string | null
1495
+ /**
1496
+ * Gets the county of the `place`.
1497
+ * @returns The country of the @place.
1498
+ */
1499
+ get_county(): string | null
1500
+ /**
1501
+ * Gets the #GIcon representing the `place`.
1502
+ * @returns The #GIcon representing the @place.
1503
+ */
1504
+ get_icon(): Gio.Icon
1505
+ /**
1506
+ * Gets the associated location object.
1507
+ * @returns The associated location object.
1508
+ */
1509
+ get_location(): Location
1510
+ /**
1511
+ * Gets the name of the `place`.
1512
+ * @returns The name of the @place.
1513
+ */
1514
+ get_name(): string | null
1515
+ /**
1516
+ * Gets the OpenStreetMap ID of the `place`.
1517
+ * @returns The osm ID of the @place.
1518
+ */
1519
+ get_osm_id(): string | null
1520
+ /**
1521
+ * Gets the OpenStreetMap type of the `place`.
1522
+ * @returns The osm type of the @place.
1523
+ */
1524
+ get_osm_type(): PlaceOsmType
1525
+ /**
1526
+ * Gets the type of the `place`.
1527
+ * @returns The type of the @place.
1528
+ */
1529
+ get_place_type(): PlaceType
1530
+ /**
1531
+ * Gets the postal code of the `place`.
1532
+ * @returns The postal code of the @place.
1533
+ */
1534
+ get_postal_code(): string | null
1535
+ /**
1536
+ * Gets the state of the `place`.
1537
+ * @returns The state of the @place.
1538
+ */
1539
+ get_state(): string | null
1540
+ /**
1541
+ * Gets the street of the `place`.
1542
+ * @returns The street of the @place.
1543
+ */
1544
+ get_street(): string | null
1545
+ /**
1546
+ * Gets the street address of the `place`.
1547
+ * @returns The street address of the @place.
1548
+ */
1549
+ get_street_address(): string | null
1550
+ /**
1551
+ * Gets the town of the `place`.
1552
+ * @returns The town of the @place.
1553
+ */
1554
+ get_town(): string | null
1555
+ /**
1556
+ * Sets the local administrative area of `place` to `admin_area`.
1557
+ * @param admin_area an administrative area for the place
1558
+ */
1559
+ set_administrative_area(admin_area: string | null): void
1560
+ /**
1561
+ * Sets the area of `place` to `area`.
1562
+ * @param area a area
1563
+ */
1564
+ set_area(area: string | null): void
1565
+ /**
1566
+ * Sets the #GeocodeBoundingBox for the place `place`.
1567
+ * @param bbox A #GeocodeBoundingBox for the place
1568
+ */
1569
+ set_bounding_box(bbox: BoundingBox): void
1570
+ /**
1571
+ * Sets the building of `place` to `building`.
1572
+ * @param building a building
1573
+ */
1574
+ set_building(building: string | null): void
1575
+ /**
1576
+ * Sets the continent of `place` to `continent`.
1577
+ * @param continent a continent for the place
1578
+ */
1579
+ set_continent(continent: string | null): void
1580
+ /**
1581
+ * Sets the country of `place` to `country`.
1582
+ * @param country a country for the place
1583
+ */
1584
+ set_country(country: string | null): void
1585
+ /**
1586
+ * Sets the ISO country code of `place` to `country_code`.
1587
+ * @param country_code an ISO country code for the place
1588
+ */
1589
+ set_country_code(country_code: string | null): void
1590
+ /**
1591
+ * Sets the county of `place` to `county`.
1592
+ * @param county a county for the place
1593
+ */
1594
+ set_county(county: string | null): void
1595
+ /**
1596
+ * Sets the location of `place` to `location`.
1597
+ * @param location A location
1598
+ */
1599
+ set_location(location: Location): void
1600
+ /**
1601
+ * Sets the name of the `place` to `name`.
1602
+ * @param name the name of place
1603
+ */
1604
+ set_name(name: string | null): void
1605
+ /**
1606
+ * Sets the postal code of `place` to `postal_code`.
1607
+ * @param postal_code a postal code for the place
1608
+ */
1609
+ set_postal_code(postal_code: string | null): void
1610
+ /**
1611
+ * Sets the state of `place` to `state`.
1612
+ * @param state a state for the place
1613
+ */
1614
+ set_state(state: string | null): void
1615
+ /**
1616
+ * Sets the street of `place` to `street`.
1617
+ * @param street a street
1618
+ */
1619
+ set_street(street: string | null): void
1620
+ /**
1621
+ * Sets the street address of `place` to `street_address`.
1622
+ * @param street_address a street address for the place
1623
+ */
1624
+ set_street_address(street_address: string | null): void
1625
+ /**
1626
+ * Sets the town of `place` to `town`.
1627
+ * @param town a town for the place
1628
+ */
1629
+ set_town(town: string | null): void
1630
+
1631
+ // Class property signals of GeocodeGlib-1.0.GeocodeGlib.Place
1632
+
1633
+ connect(sigName: "notify::administrative-area", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1634
+ connect_after(sigName: "notify::administrative-area", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1635
+ emit(sigName: "notify::administrative-area", ...args: any[]): void
1636
+ connect(sigName: "notify::area", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1637
+ connect_after(sigName: "notify::area", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1638
+ emit(sigName: "notify::area", ...args: any[]): void
1639
+ connect(sigName: "notify::bounding-box", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1640
+ connect_after(sigName: "notify::bounding-box", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1641
+ emit(sigName: "notify::bounding-box", ...args: any[]): void
1642
+ connect(sigName: "notify::building", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1643
+ connect_after(sigName: "notify::building", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1644
+ emit(sigName: "notify::building", ...args: any[]): void
1645
+ connect(sigName: "notify::continent", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1646
+ connect_after(sigName: "notify::continent", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1647
+ emit(sigName: "notify::continent", ...args: any[]): void
1648
+ connect(sigName: "notify::country", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1649
+ connect_after(sigName: "notify::country", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1650
+ emit(sigName: "notify::country", ...args: any[]): void
1651
+ connect(sigName: "notify::country-code", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1652
+ connect_after(sigName: "notify::country-code", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1653
+ emit(sigName: "notify::country-code", ...args: any[]): void
1654
+ connect(sigName: "notify::county", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1655
+ connect_after(sigName: "notify::county", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1656
+ emit(sigName: "notify::county", ...args: any[]): void
1657
+ connect(sigName: "notify::icon", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1658
+ connect_after(sigName: "notify::icon", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1659
+ emit(sigName: "notify::icon", ...args: any[]): void
1660
+ connect(sigName: "notify::location", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1661
+ connect_after(sigName: "notify::location", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1662
+ emit(sigName: "notify::location", ...args: any[]): void
1663
+ connect(sigName: "notify::name", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1664
+ connect_after(sigName: "notify::name", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1665
+ emit(sigName: "notify::name", ...args: any[]): void
1666
+ connect(sigName: "notify::osm-id", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1667
+ connect_after(sigName: "notify::osm-id", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1668
+ emit(sigName: "notify::osm-id", ...args: any[]): void
1669
+ connect(sigName: "notify::osm-type", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1670
+ connect_after(sigName: "notify::osm-type", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1671
+ emit(sigName: "notify::osm-type", ...args: any[]): void
1672
+ connect(sigName: "notify::place-type", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1673
+ connect_after(sigName: "notify::place-type", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1674
+ emit(sigName: "notify::place-type", ...args: any[]): void
1675
+ connect(sigName: "notify::postal-code", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1676
+ connect_after(sigName: "notify::postal-code", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1677
+ emit(sigName: "notify::postal-code", ...args: any[]): void
1678
+ connect(sigName: "notify::state", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1679
+ connect_after(sigName: "notify::state", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1680
+ emit(sigName: "notify::state", ...args: any[]): void
1681
+ connect(sigName: "notify::street", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1682
+ connect_after(sigName: "notify::street", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1683
+ emit(sigName: "notify::street", ...args: any[]): void
1684
+ connect(sigName: "notify::street-address", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1685
+ connect_after(sigName: "notify::street-address", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1686
+ emit(sigName: "notify::street-address", ...args: any[]): void
1687
+ connect(sigName: "notify::town", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1688
+ connect_after(sigName: "notify::town", callback: (($obj: Place, pspec: GObject.ParamSpec) => void)): number
1689
+ emit(sigName: "notify::town", ...args: any[]): void
1690
+ connect(sigName: string, callback: (...args: any[]) => void): number
1691
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
1692
+ emit(sigName: string, ...args: any[]): void
1693
+ disconnect(id: number): void
1694
+ }
1695
+
1696
+ /**
1697
+ * All the fields in the #GeocodePlace structure are private and should never be accessed directly.
1698
+ * @class
1699
+ */
1700
+ class Place extends GObject.Object {
1701
+
1702
+ // Own properties of GeocodeGlib-1.0.GeocodeGlib.Place
1703
+
1704
+ static name: string
1705
+ static $gtype: GObject.GType<Place>
1706
+
1707
+ // Constructors of GeocodeGlib-1.0.GeocodeGlib.Place
1708
+
1709
+ constructor(config?: Place.ConstructorProperties)
1710
+ /**
1711
+ * Creates a new #GeocodePlace object.
1712
+ * @constructor
1713
+ * @param name the name of place
1714
+ * @param place_type the type of place
1715
+ * @returns a new #GeocodePlace object. Use g_object_unref() when done.
1716
+ */
1717
+ constructor(name: string | null, place_type: PlaceType)
1718
+ /**
1719
+ * Creates a new #GeocodePlace object.
1720
+ * @constructor
1721
+ * @param name the name of place
1722
+ * @param place_type the type of place
1723
+ * @returns a new #GeocodePlace object. Use g_object_unref() when done.
1724
+ */
1725
+ static new(name: string | null, place_type: PlaceType): Place
1726
+ /**
1727
+ * Creates a new #GeocodePlace object.
1728
+ * @constructor
1729
+ * @param name the name of place
1730
+ * @param place_type the type of place
1731
+ * @param location the location info for the place
1732
+ * @returns a new #GeocodePlace object. Use g_object_unref() when done.
1733
+ */
1734
+ static new_with_location(name: string | null, place_type: PlaceType, location: Location): Place
1735
+ _init(config?: Place.ConstructorProperties): void
1736
+ }
1737
+
1738
+ module Reverse {
1739
+
1740
+ // Constructor properties interface
1741
+
1742
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
1743
+ }
1744
+
1745
+ }
1746
+
1747
+ interface Reverse {
1748
+
1749
+ // Owm methods of GeocodeGlib-1.0.GeocodeGlib.Reverse
1750
+
1751
+ /**
1752
+ * Gets the result of a reverse geocoding
1753
+ * query using the current backend (see geocode_reverse_set_backend()). By
1754
+ * default the GNOME Nominatim server is used. See #GeocodeBackend for more
1755
+ * information.
1756
+ *
1757
+ * If no result could be found, a %GEOCODE_ERROR_NOT_SUPPORTED error will be
1758
+ * returned. This typically happens if the coordinates to geocode are in the
1759
+ * middle of the ocean.
1760
+ * @returns A #GeocodePlace instance, or %NULL in case of errors. Free the returned instance with #g_object_unref() when done.
1761
+ */
1762
+ resolve(): Place
1763
+ /**
1764
+ * Asynchronously gets the result of a reverse geocoding
1765
+ * query using a web service. Use geocode_reverse_resolve() to do the same
1766
+ * thing synchronously.
1767
+ *
1768
+ * When the operation is finished, `callback` will be called. You can then call
1769
+ * geocode_reverse_resolve_finish() to get the result of the operation.
1770
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
1771
+ * @param callback a #GAsyncReadyCallback to call when the request is satisfied
1772
+ */
1773
+ resolve_async(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
1774
+ /**
1775
+ * Finishes a reverse geocoding operation. See geocode_reverse_resolve_async().
1776
+ * @param res a #GAsyncResult.
1777
+ * @returns A #GeocodePlace instance, or %NULL in case of errors. Free the returned instance with #g_object_unref() when done.
1778
+ */
1779
+ resolve_finish(res: Gio.AsyncResult): Place
1780
+ /**
1781
+ * Specifies the backend to use in the reverse geocoding operation.
1782
+ *
1783
+ * If none is given, the default GNOME Nominatim server is used.
1784
+ * @param backend a #GeocodeBackend, or %NULL to use the default one.
1785
+ */
1786
+ set_backend(backend: Backend | null): void
1787
+
1788
+ // Class property signals of GeocodeGlib-1.0.GeocodeGlib.Reverse
1789
+
1790
+ connect(sigName: string, callback: (...args: any[]) => void): number
1791
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
1792
+ emit(sigName: string, ...args: any[]): void
1793
+ disconnect(id: number): void
1794
+ }
1795
+
1796
+ /**
1797
+ * All the fields in the #GeocodeReverse structure are private and should never be accessed directly.
1798
+ * @class
1799
+ */
1800
+ class Reverse extends GObject.Object {
1801
+
1802
+ // Own properties of GeocodeGlib-1.0.GeocodeGlib.Reverse
1803
+
1804
+ static name: string
1805
+ static $gtype: GObject.GType<Reverse>
1806
+
1807
+ // Constructors of GeocodeGlib-1.0.GeocodeGlib.Reverse
1808
+
1809
+ constructor(config?: Reverse.ConstructorProperties)
1810
+ /**
1811
+ * Creates a new #GeocodeReverse to perform reverse geocoding with.
1812
+ * Use geocode_reverse_resolve_async() to perform the resolution.
1813
+ * @constructor
1814
+ * @param location a #GeocodeLocation object
1815
+ * @returns a new #GeocodeReverse. Use g_object_unref() when done.
1816
+ */
1817
+ static new_for_location(location: Location): Reverse
1818
+ _init(config?: Reverse.ConstructorProperties): void
1819
+ }
1820
+
1821
+ interface BackendInterface {
1822
+
1823
+ // Own fields of GeocodeGlib-1.0.GeocodeGlib.BackendInterface
1824
+
1825
+ forward_search: (backend: Backend, params: GLib.HashTable, cancellable: Gio.Cancellable | null) => Place[]
1826
+ forward_search_async: (backend: Backend, params: GLib.HashTable, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback | null) => void
1827
+ forward_search_finish: (backend: Backend, result: Gio.AsyncResult) => Place[]
1828
+ reverse_resolve: (backend: Backend, params: GLib.HashTable, cancellable: Gio.Cancellable | null) => Place[]
1829
+ reverse_resolve_async: (backend: Backend, params: GLib.HashTable, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback | null) => void
1830
+ reverse_resolve_finish: (backend: Backend, result: Gio.AsyncResult) => Place[]
1831
+ }
1832
+
1833
+ /**
1834
+ * Interface which defines the basic operations for geocoding.
1835
+ * @record
1836
+ */
1837
+ abstract class BackendInterface {
1838
+
1839
+ // Own properties of GeocodeGlib-1.0.GeocodeGlib.BackendInterface
1840
+
1841
+ static name: string
1842
+ }
1843
+
1844
+ interface BoundingBoxClass {
1845
+ }
1846
+
1847
+ /**
1848
+ * All the fields in the #GeocodeBoundingBoxClass structure are private and
1849
+ * should never be accessed directly.
1850
+ * @record
1851
+ */
1852
+ abstract class BoundingBoxClass {
1853
+
1854
+ // Own properties of GeocodeGlib-1.0.GeocodeGlib.BoundingBoxClass
1855
+
1856
+ static name: string
1857
+ }
1858
+
1859
+ interface BoundingBoxPrivate {
1860
+ }
1861
+
1862
+ class BoundingBoxPrivate {
1863
+
1864
+ // Own properties of GeocodeGlib-1.0.GeocodeGlib.BoundingBoxPrivate
1865
+
1866
+ static name: string
1867
+ }
1868
+
1869
+ interface ForwardClass {
1870
+ }
1871
+
1872
+ /**
1873
+ * All the fields in the #GeocodeForwardClass structure are private and should never be accessed directly.
1874
+ * @record
1875
+ */
1876
+ abstract class ForwardClass {
1877
+
1878
+ // Own properties of GeocodeGlib-1.0.GeocodeGlib.ForwardClass
1879
+
1880
+ static name: string
1881
+ }
1882
+
1883
+ interface ForwardPrivate {
1884
+ }
1885
+
1886
+ class ForwardPrivate {
1887
+
1888
+ // Own properties of GeocodeGlib-1.0.GeocodeGlib.ForwardPrivate
1889
+
1890
+ static name: string
1891
+ }
1892
+
1893
+ interface LocationClass {
1894
+ }
1895
+
1896
+ /**
1897
+ * All the fields in the #GeocodeLocationClass structure are private and should never be accessed directly.
1898
+ * @record
1899
+ */
1900
+ abstract class LocationClass {
1901
+
1902
+ // Own properties of GeocodeGlib-1.0.GeocodeGlib.LocationClass
1903
+
1904
+ static name: string
1905
+ }
1906
+
1907
+ interface LocationPrivate {
1908
+ }
1909
+
1910
+ class LocationPrivate {
1911
+
1912
+ // Own properties of GeocodeGlib-1.0.GeocodeGlib.LocationPrivate
1913
+
1914
+ static name: string
1915
+ }
1916
+
1917
+ interface MockBackendClass {
1918
+
1919
+ // Own fields of GeocodeGlib-1.0.GeocodeGlib.MockBackendClass
1920
+
1921
+ parent_class: GObject.ObjectClass
1922
+ }
1923
+
1924
+ abstract class MockBackendClass {
1925
+
1926
+ // Own properties of GeocodeGlib-1.0.GeocodeGlib.MockBackendClass
1927
+
1928
+ static name: string
1929
+ }
1930
+
1931
+ interface MockBackendQuery {
1932
+
1933
+ // Own fields of GeocodeGlib-1.0.GeocodeGlib.MockBackendQuery
1934
+
1935
+ /**
1936
+ * query parameters, in the format accepted by geocode_forward_search()
1937
+ * (if `is_forward` is %TRUE) or geocode_reverse_resolve() (otherwise)
1938
+ * @field
1939
+ */
1940
+ params: GLib.HashTable
1941
+ /**
1942
+ * %TRUE if this represents a call to geocode_forward_search();
1943
+ * %FALSE if it represents a call to geocode_reverse_resolve()
1944
+ * @field
1945
+ */
1946
+ is_forward: boolean
1947
+ /**
1948
+ * results returned by the
1949
+ * query, or %NULL if an error was returned
1950
+ * @field
1951
+ */
1952
+ results: Place[]
1953
+ /**
1954
+ * error returned by the query, or %NULL if a result set
1955
+ * was returned
1956
+ * @field
1957
+ */
1958
+ error: GLib.Error
1959
+ }
1960
+
1961
+ /**
1962
+ * The details of a forward or reverse query which was performed on a
1963
+ * #GeocodeMockBackend by application code. This includes the input (`params,`
1964
+ * `is_forward)`, and the output which was returned (`results` or `error)`.
1965
+ *
1966
+ * Empty result sets are represented by the %GEOCODE_ERROR_NO_MATCHES error
1967
+ * (for forward queries) or the %GEOCODE_ERROR_NOT_SUPPORTED error (for reverse
1968
+ * queries), rather than an empty `results` list.
1969
+ * @record
1970
+ */
1971
+ class MockBackendQuery {
1972
+
1973
+ // Own properties of GeocodeGlib-1.0.GeocodeGlib.MockBackendQuery
1974
+
1975
+ static name: string
1976
+ }
1977
+
1978
+ interface NominatimClass {
1979
+
1980
+ // Own fields of GeocodeGlib-1.0.GeocodeGlib.NominatimClass
1981
+
1982
+ parent_class: GObject.ObjectClass
1983
+ query: (self: Nominatim, uri: string | null, cancellable: Gio.Cancellable | null) => string | null
1984
+ query_async: (self: Nominatim, uri: string | null, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback | null) => void
1985
+ query_finish: (self: Nominatim, res: Gio.AsyncResult) => string | null
1986
+ }
1987
+
1988
+ /**
1989
+ * #GeocodeNominatim allows derived classes to override its query functions,
1990
+ * which are called for each network request the Nominatim client makes. All
1991
+ * network requests are `GET`s with no request body; just a URI. The default
1992
+ * implementation makes the requests internally, but derived classes may want
1993
+ * to override these queries to check the URIs for testing, for example.
1994
+ *
1995
+ * Applications should not normally have to derive #GeocodeNominatim; these
1996
+ * virtual methods are mainly intended for testing.
1997
+ * @record
1998
+ */
1999
+ abstract class NominatimClass {
2000
+
2001
+ // Own properties of GeocodeGlib-1.0.GeocodeGlib.NominatimClass
2002
+
2003
+ static name: string
2004
+ }
2005
+
2006
+ interface PlaceClass {
2007
+ }
2008
+
2009
+ /**
2010
+ * All the fields in the #GeocodePlaceClass structure are private and should never be accessed directly.
2011
+ * @record
2012
+ */
2013
+ abstract class PlaceClass {
2014
+
2015
+ // Own properties of GeocodeGlib-1.0.GeocodeGlib.PlaceClass
2016
+
2017
+ static name: string
2018
+ }
2019
+
2020
+ interface PlacePrivate {
2021
+ }
2022
+
2023
+ class PlacePrivate {
2024
+
2025
+ // Own properties of GeocodeGlib-1.0.GeocodeGlib.PlacePrivate
2026
+
2027
+ static name: string
2028
+ }
2029
+
2030
+ interface ReverseClass {
2031
+ }
2032
+
2033
+ /**
2034
+ * All the fields in the #GeocodeReverseClass structure are private and should never be accessed directly.
2035
+ * @record
2036
+ */
2037
+ abstract class ReverseClass {
2038
+
2039
+ // Own properties of GeocodeGlib-1.0.GeocodeGlib.ReverseClass
2040
+
2041
+ static name: string
2042
+ }
2043
+
2044
+ interface ReversePrivate {
2045
+ }
2046
+
2047
+ class ReversePrivate {
2048
+
2049
+ // Own properties of GeocodeGlib-1.0.GeocodeGlib.ReversePrivate
2050
+
2051
+ static name: string
2052
+ }
2053
+
2054
+ /**
2055
+ * Name of the imported GIR library
2056
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
2057
+ */
2058
+ const __name__: string
2059
+ /**
2060
+ * Version of the imported GIR library
2061
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
2062
+ */
2063
+ const __version__: string
2064
+ }
2065
+
2066
+ export default GeocodeGlib;
2067
+ // END