Release 0.41.92
[vala-gnome.git] / vapi / geocode-glib-1.0.vapi
blob6b3e5a7c5caa2805e39adbe2b70a59fa9488cdd9
1 /* geocode-glib-1.0.vapi generated by vapigen, do not modify. */
3 [CCode (cprefix = "Geocode", gir_namespace = "GeocodeGlib", gir_version = "1.0", lower_case_cprefix = "geocode_")]
4 namespace Geocode {
5         namespace LocationAccuracy {
6                 [CCode (cheader_filename = "geocode-glib/geocode-glib.h", cname = "GEOCODE_LOCATION_ACCURACY_CITY")]
7                 public const int CITY;
8                 [CCode (cheader_filename = "geocode-glib/geocode-glib.h", cname = "GEOCODE_LOCATION_ACCURACY_CONTINENT")]
9                 public const int CONTINENT;
10                 [CCode (cheader_filename = "geocode-glib/geocode-glib.h", cname = "GEOCODE_LOCATION_ACCURACY_COUNTRY")]
11                 public const int COUNTRY;
12                 [CCode (cheader_filename = "geocode-glib/geocode-glib.h", cname = "GEOCODE_LOCATION_ACCURACY_REGION")]
13                 public const int REGION;
14                 [CCode (cheader_filename = "geocode-glib/geocode-glib.h", cname = "GEOCODE_LOCATION_ACCURACY_STREET")]
15                 public const int STREET;
16                 [CCode (cheader_filename = "geocode-glib/geocode-glib.h", cname = "GEOCODE_LOCATION_ACCURACY_UNKNOWN")]
17                 public const int UNKNOWN;
18         }
19         [CCode (cheader_filename = "geocode-glib/geocode-glib.h", type_id = "geocode_bounding_box_get_type ()")]
20         public class BoundingBox : GLib.Object {
21                 [CCode (has_construct_function = false)]
22                 public BoundingBox (double top, double bottom, double left, double right);
23                 [Version (since = "3.23.1")]
24                 public bool equal (Geocode.BoundingBox b);
25                 public double get_bottom ();
26                 public double get_left ();
27                 public double get_right ();
28                 public double get_top ();
29                 public double bottom { get; construct; }
30                 public double left { get; construct; }
31                 public double right { get; construct; }
32                 public double top { get; construct; }
33         }
34         [CCode (cheader_filename = "geocode-glib/geocode-glib.h", type_id = "geocode_forward_get_type ()")]
35         public class Forward : GLib.Object {
36                 [CCode (has_construct_function = false)]
37                 protected Forward ();
38                 [CCode (has_construct_function = false)]
39                 public Forward.for_params (GLib.HashTable<string,GLib.Value?> @params);
40                 [CCode (has_construct_function = false)]
41                 public Forward.for_string (string str);
42                 public uint get_answer_count ();
43                 public bool get_bounded ();
44                 public unowned Geocode.BoundingBox? get_search_area ();
45                 public GLib.List<Geocode.Place> search () throws GLib.Error;
46                 public async GLib.List<Geocode.Place> search_async (GLib.Cancellable? cancellable = null) throws GLib.Error;
47                 public void set_answer_count (uint count);
48                 [Version (since = "3.23.1")]
49                 public void set_backend (Geocode.Backend? backend);
50                 public void set_bounded (bool bounded);
51                 public void set_search_area (Geocode.BoundingBox box);
52                 public uint answer_count { get; set; }
53                 public bool bounded { get; set; }
54                 public Geocode.BoundingBox search_area { get; set; }
55         }
56         [CCode (cheader_filename = "geocode-glib/geocode-glib.h", type_id = "geocode_location_get_type ()")]
57         public class Location : GLib.Object {
58                 [CCode (has_construct_function = false)]
59                 public Location (double latitude, double longitude, double accuracy = LocationAccuracy.UNKNOWN);
60                 [Version (since = "3.23.1")]
61                 public bool equal (Geocode.Location b);
62                 public double get_accuracy ();
63                 public double get_altitude ();
64                 public Geocode.LocationCRS get_crs ();
65                 public unowned string get_description ();
66                 public double get_distance_from (Geocode.Location locb);
67                 public double get_latitude ();
68                 public double get_longitude ();
69                 public uint64 get_timestamp ();
70                 public void set_description (string description);
71                 public bool set_from_uri (string uri) throws GLib.Error;
72                 public string to_uri (Geocode.LocationURIScheme scheme);
73                 [CCode (has_construct_function = false)]
74                 public Location.with_description (double latitude, double longitude, double accuracy, string description);
75                 [NoAccessorMethod]
76                 public double accuracy { get; set; }
77                 [NoAccessorMethod]
78                 public double altitude { get; set; }
79                 public Geocode.LocationCRS crs { get; construct; }
80                 public string description { get; set; }
81                 [NoAccessorMethod]
82                 public double latitude { get; set; }
83                 [NoAccessorMethod]
84                 public double longitude { get; set; }
85                 public uint64 timestamp { get; construct; }
86         }
87         [CCode (cheader_filename = "geocode-glib/geocode-glib.h", type_id = "geocode_mock_backend_get_type ()")]
88         [Version (since = "3.23.1")]
89         public class MockBackend : GLib.Object, Geocode.Backend {
90                 [CCode (has_construct_function = false)]
91                 public MockBackend ();
92                 public void add_forward_result (GLib.HashTable<string,GLib.Value?> @params, GLib.List<Geocode.Place>? results, GLib.Error? error);
93                 public void add_reverse_result (GLib.HashTable<string,GLib.Value?> @params, GLib.List<Geocode.Place>? results, GLib.Error? error);
94                 public void clear ();
95                 public unowned GLib.GenericArray<Geocode.MockBackendQuery?> get_query_log ();
96         }
97         [CCode (cheader_filename = "geocode-glib/geocode-glib.h", type_id = "geocode_nominatim_get_type ()")]
98         [Version (since = "3.23.1")]
99         public class Nominatim : GLib.Object, Geocode.Backend {
100                 [CCode (has_construct_function = false)]
101                 public Nominatim (string base_url, string maintainer_email_address);
102                 public static Geocode.Nominatim get_gnome ();
103                 [NoWrapper]
104                 public virtual string query (string uri, GLib.Cancellable? cancellable = null) throws GLib.Error;
105                 [NoWrapper]
106                 public virtual async string query_async (string uri, GLib.Cancellable? cancellable) throws GLib.Error;
107                 [NoAccessorMethod]
108                 public string base_url { owned get; construct; }
109                 [NoAccessorMethod]
110                 public string maintainer_email_address { owned get; construct; }
111                 [NoAccessorMethod]
112                 public string user_agent { owned get; set; }
113         }
114         [CCode (cheader_filename = "geocode-glib/geocode-glib.h", type_id = "geocode_place_get_type ()")]
115         public class Place : GLib.Object {
116                 [CCode (has_construct_function = false)]
117                 public Place (string name, Geocode.PlaceType place_type);
118                 [Version (since = "3.23.1")]
119                 public bool equal (Geocode.Place b);
120                 public unowned string get_administrative_area ();
121                 public unowned string get_area ();
122                 public unowned Geocode.BoundingBox get_bounding_box ();
123                 public unowned string get_building ();
124                 public unowned string get_continent ();
125                 public unowned string get_country ();
126                 public unowned string get_country_code ();
127                 public unowned string get_county ();
128                 public unowned GLib.Icon get_icon ();
129                 public unowned Geocode.Location get_location ();
130                 public unowned string get_name ();
131                 public unowned string get_osm_id ();
132                 public Geocode.PlaceOsmType get_osm_type ();
133                 public Geocode.PlaceType get_place_type ();
134                 public unowned string get_postal_code ();
135                 public unowned string get_state ();
136                 public unowned string get_street ();
137                 public unowned string get_street_address ();
138                 public unowned string get_town ();
139                 public void set_administrative_area (string admin_area);
140                 public void set_area (string area);
141                 public void set_bounding_box (Geocode.BoundingBox bbox);
142                 public void set_building (string building);
143                 public void set_continent (string continent);
144                 public void set_country (string country);
145                 public void set_country_code (string country_code);
146                 public void set_county (string county);
147                 public void set_location (Geocode.Location location);
148                 public void set_name (string name);
149                 public void set_postal_code (string postal_code);
150                 public void set_state (string state);
151                 public void set_street (string street);
152                 public void set_street_address (string street_address);
153                 public void set_town (string town);
154                 [CCode (has_construct_function = false)]
155                 public Place.with_location (string name, Geocode.PlaceType place_type, Geocode.Location location);
156                 public string administrative_area { get; set; }
157                 public string area { get; set; }
158                 public Geocode.BoundingBox bounding_box { get; set; }
159                 public string building { get; set; }
160                 public string continent { get; set; }
161                 public string country { get; set; }
162                 public string country_code { get; set; }
163                 public string county { get; set; }
164                 public GLib.Icon icon { get; }
165                 public Geocode.Location location { get; set; }
166                 public string name { get; set; }
167                 [NoAccessorMethod]
168                 public string osm_id { owned get; set; }
169                 [NoAccessorMethod]
170                 public Geocode.PlaceOsmType osm_type { get; set; }
171                 public Geocode.PlaceType place_type { get; construct; }
172                 public string postal_code { get; set; }
173                 public string state { get; set; }
174                 public string street { get; set; }
175                 public string street_address { get; set; }
176                 public string town { get; set; }
177         }
178         [CCode (cheader_filename = "geocode-glib/geocode-glib.h", type_id = "geocode_reverse_get_type ()")]
179         public class Reverse : GLib.Object {
180                 [CCode (has_construct_function = false)]
181                 protected Reverse ();
182                 [CCode (has_construct_function = false)]
183                 public Reverse.for_location (Geocode.Location location);
184                 public Geocode.Place resolve () throws GLib.Error;
185                 public async Geocode.Place resolve_async (GLib.Cancellable? cancellable = null) throws GLib.Error;
186                 [Version (since = "3.23.1")]
187                 public void set_backend (Geocode.Backend? backend);
188         }
189         [CCode (cheader_filename = "geocode-glib/geocode-glib.h", type_cname = "GeocodeBackendInterface", type_id = "geocode_backend_get_type ()")]
190         [Version (since = "3.23.1")]
191         public interface Backend : GLib.Object {
192                 public abstract GLib.List<Geocode.Place> forward_search (GLib.HashTable<string,GLib.Value?> @params, GLib.Cancellable? cancellable = null) throws GLib.Error;
193                 public abstract async GLib.List<Geocode.Place> forward_search_async (GLib.HashTable<string,GLib.Value?> @params, GLib.Cancellable? cancellable) throws GLib.Error;
194                 public abstract GLib.List<Geocode.Place> reverse_resolve (GLib.HashTable<string,GLib.Value?> @params, GLib.Cancellable? cancellable = null) throws GLib.Error;
195                 public abstract async GLib.List<Geocode.Place> reverse_resolve_async (GLib.HashTable<string,GLib.Value?> @params, GLib.Cancellable? cancellable) throws GLib.Error;
196         }
197         [CCode (cheader_filename = "geocode-glib/geocode-glib.h", has_type_id = false)]
198         [Version (since = "3.23.1")]
199         public struct MockBackendQuery {
200                 public weak GLib.HashTable<void*,void*> @params;
201                 public bool is_forward;
202                 public weak GLib.List<Geocode.Place> results;
203                 public weak GLib.Error error;
204         }
205         [CCode (cheader_filename = "geocode-glib/geocode-glib.h", cprefix = "GEOCODE_LOCATION_CRS_", type_id = "geocode_location_crs_get_type ()")]
206         public enum LocationCRS {
207                 WGS84
208         }
209         [CCode (cheader_filename = "geocode-glib/geocode-glib.h", cprefix = "GEOCODE_LOCATION_URI_SCHEME_", type_id = "geocode_location_uri_scheme_get_type ()")]
210         public enum LocationURIScheme {
211                 GEO
212         }
213         [CCode (cheader_filename = "geocode-glib/geocode-glib.h", cprefix = "GEOCODE_PLACE_OSM_TYPE_", type_id = "geocode_place_osm_type_get_type ()")]
214         public enum PlaceOsmType {
215                 UNKNOWN,
216                 NODE,
217                 RELATION,
218                 WAY
219         }
220         [CCode (cheader_filename = "geocode-glib/geocode-glib.h", cprefix = "GEOCODE_PLACE_TYPE_", type_id = "geocode_place_type_get_type ()")]
221         public enum PlaceType {
222                 UNKNOWN,
223                 BUILDING,
224                 STREET,
225                 TOWN,
226                 STATE,
227                 COUNTY,
228                 LOCAL_ADMINISTRATIVE_AREA,
229                 POSTAL_CODE,
230                 COUNTRY,
231                 ISLAND,
232                 AIRPORT,
233                 RAILWAY_STATION,
234                 BUS_STOP,
235                 MOTORWAY,
236                 DRAINAGE,
237                 LAND_FEATURE,
238                 MISCELLANEOUS,
239                 SUPERNAME,
240                 POINT_OF_INTEREST,
241                 SUBURB,
242                 COLLOQUIAL,
243                 ZONE,
244                 HISTORICAL_STATE,
245                 HISTORICAL_COUNTY,
246                 CONTINENT,
247                 TIME_ZONE,
248                 ESTATE,
249                 HISTORICAL_TOWN,
250                 OCEAN,
251                 SEA,
252                 SCHOOL,
253                 PLACE_OF_WORSHIP,
254                 RESTAURANT,
255                 BAR,
256                 LIGHT_RAIL_STATION
257         }
258         [CCode (cheader_filename = "geocode-glib/geocode-glib.h", cprefix = "GEOCODE_ERROR_")]
259         public errordomain Error {
260                 PARSE,
261                 NOT_SUPPORTED,
262                 NO_MATCHES,
263                 INVALID_ARGUMENTS,
264                 INTERNAL_SERVER;
265                 public static GLib.Quark quark ();
266         }