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