GeocodeGlib.Backend¶
- Implementations:
Methods¶
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
|
|
|
|
|
|
|
|
|
|
|
Properties¶
None
Signals¶
None
Fields¶
None
Class Details¶
- class GeocodeGlib.Backend¶
- Bases:
- Structure:
All the fields in the
GeocodeGlib.Backend
structure are private and should never be accessed directly.New in version 3.23.1.
- forward_search(params, cancellable)¶
- Parameters:
params ({
str
:GObject.Value
}) – aGLib.HashTable
with string keys, andGObject.Value
values.cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
,None
to ignore.
- Raises:
- Returns:
A list of places or
None
in case of errors. Free the returned instances withGObject.Object.unref
() and the list with g_list_free() when done.- Return type:
Gets the result of a forward geocoding query using the self.
If no results are found, a
GeocodeGlib.Error.NO_MATCHES
error is returned.This is a synchronous function, which means it may block on network requests. In most situations, the asynchronous version (
GeocodeGlib.Backend.forward_search_async
()) is more appropriate. See its documentation for more information on usage.New in version 3.23.1.
- forward_search_async(params, cancellable, callback, *user_data)¶
- Parameters:
params ({
str
:GObject.Value
}) – aGLib.HashTable
with string keys, andGObject.Value
values.cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
,None
to ignore.callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – the data to pass to the callback function
Asynchronously performs a forward geocoding query using the self. Use
GeocodeGlib.Backend.forward_search
() to do the same thing synchronously.The params hash table is in the format used by Telepathy, and documented in the Telepathy specification.
See also: XEP-0080 specification.
When the operation is finished, callback will be called. You can then call
GeocodeGlib.Backend.forward_search_finish
() to get the result of the operation.New in version 3.23.1.
- forward_search_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
.- Raises:
- Returns:
A list of places or
None
in case of errors. Free the returned instances withGObject.Object.unref
() and the list with g_list_free() when done.- Return type:
Finishes a forward geocoding operation. See
GeocodeGlib.Backend.forward_search_async
().New in version 3.23.1.
- reverse_resolve(params, cancellable)¶
- Parameters:
params ({
str
:GObject.Value
}) – aGLib.HashTable
with string keys, andGObject.Value
values.cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object,None
to ignore.
- Raises:
- Returns:
A list of
GeocodeGlib.Place
instances, orNone
in case of errors. The list is ordered by relevance, with most relevant results first. Free the returned instances withGObject.Object.unref
() and the list with g_list_free() when done.- Return type:
Gets the result of a reverse geocoding query using the self.
If no result could be found, a
GeocodeGlib.Error.NOT_SUPPORTED
error will be returned. This typically happens if the coordinates to geocode are in the middle of the ocean.This is a synchronous function, which means it may block on network requests. In most situations, the asynchronous version,
GeocodeGlib.Backend.forward_search_async
(), is more appropriate. See its documentation for more information on usage.New in version 3.23.1.
- reverse_resolve_async(params, cancellable, callback, *user_data)¶
- Parameters:
params ({
str
:GObject.Value
}) – aGLib.HashTable
with string keys, andGObject.Value
values.cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object,None
to ignore.callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfied.user_data (
object
orNone
) – the data to pass to callback function.
Asynchronously gets the result of a reverse geocoding query using the backend.
Typically, a single result will be returned representing the place at a given latitude and longitude (the
lat
andlon
keys to params); but in some cases the results will be ambiguous and *multiple* results will be returned. They will be returned in order of relevance, with the most relevant result first in the list.The params hash table is in the format used by Telepathy, and documented in the Telepathy specification.
See also: XEP-0080 specification.
Use
GeocodeGlib.Backend.reverse_resolve
() to do the same thing synchronously.When the operation is finished, callback will be called. You can then call
GeocodeGlib.Backend.reverse_resolve_finish
() to get the result of the operation.New in version 3.23.1.
- reverse_resolve_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
.- Raises:
- Returns:
A list of
GeocodeGlib.Place
instances, orNone
in case of errors. The list is ordered by relevance, with most relevant results first. Free the returned instances withGObject.Object.unref
() and the list with g_list_free() when done.- Return type:
Finishes a reverse geocoding operation. See
GeocodeGlib.Backend.reverse_resolve_async
().New in version 3.23.1.
- do_forward_search(params, cancellable) virtual¶
- Parameters:
params ({
str
:GObject.Value
}) – aGLib.HashTable
with string keys, andGObject.Value
values.cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
,None
to ignore.
- Returns:
A list of places or
None
in case of errors. Free the returned instances withGObject.Object.unref
() and the list with g_list_free() when done.- Return type:
Gets the result of a forward geocoding query using the backend.
If no results are found, a
GeocodeGlib.Error.NO_MATCHES
error is returned.This is a synchronous function, which means it may block on network requests. In most situations, the asynchronous version (
GeocodeGlib.Backend.forward_search_async
()) is more appropriate. See its documentation for more information on usage.New in version 3.23.1.
- do_forward_search_async(params, cancellable, callback, *user_data) virtual¶
- Parameters:
params ({
str
:GObject.Value
}) – aGLib.HashTable
with string keys, andGObject.Value
values.cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
,None
to ignore.callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – the data to pass to the callback function
Asynchronously performs a forward geocoding query using the backend. Use
GeocodeGlib.Backend.forward_search
() to do the same thing synchronously.The params hash table is in the format used by Telepathy, and documented in the Telepathy specification.
See also: XEP-0080 specification.
When the operation is finished, callback will be called. You can then call
GeocodeGlib.Backend.forward_search_finish
() to get the result of the operation.New in version 3.23.1.
- do_forward_search_finish(result) virtual¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
.- Returns:
A list of places or
None
in case of errors. Free the returned instances withGObject.Object.unref
() and the list with g_list_free() when done.- Return type:
Finishes a forward geocoding operation. See
GeocodeGlib.Backend.forward_search_async
().New in version 3.23.1.
- do_reverse_resolve(params, cancellable) virtual¶
- Parameters:
params ({
str
:GObject.Value
}) – aGLib.HashTable
with string keys, andGObject.Value
values.cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object,None
to ignore.
- Returns:
A list of
GeocodeGlib.Place
instances, orNone
in case of errors. The list is ordered by relevance, with most relevant results first. Free the returned instances withGObject.Object.unref
() and the list with g_list_free() when done.- Return type:
Gets the result of a reverse geocoding query using the backend.
If no result could be found, a
GeocodeGlib.Error.NOT_SUPPORTED
error will be returned. This typically happens if the coordinates to geocode are in the middle of the ocean.This is a synchronous function, which means it may block on network requests. In most situations, the asynchronous version,
GeocodeGlib.Backend.forward_search_async
(), is more appropriate. See its documentation for more information on usage.New in version 3.23.1.
- do_reverse_resolve_async(params, cancellable, callback, *user_data) virtual¶
- Parameters:
params ({
str
:GObject.Value
}) – aGLib.HashTable
with string keys, andGObject.Value
values.cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object,None
to ignore.callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfied.user_data (
object
orNone
) – the data to pass to callback function.
Asynchronously gets the result of a reverse geocoding query using the backend.
Typically, a single result will be returned representing the place at a given latitude and longitude (the
lat
andlon
keys to params); but in some cases the results will be ambiguous and *multiple* results will be returned. They will be returned in order of relevance, with the most relevant result first in the list.The params hash table is in the format used by Telepathy, and documented in the Telepathy specification.
See also: XEP-0080 specification.
Use
GeocodeGlib.Backend.reverse_resolve
() to do the same thing synchronously.When the operation is finished, callback will be called. You can then call
GeocodeGlib.Backend.reverse_resolve_finish
() to get the result of the operation.New in version 3.23.1.
- do_reverse_resolve_finish(result) virtual¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
.- Returns:
A list of
GeocodeGlib.Place
instances, orNone
in case of errors. The list is ordered by relevance, with most relevant results first. Free the returned instances withGObject.Object.unref
() and the list with g_list_free() when done.- Return type:
Finishes a reverse geocoding operation. See
GeocodeGlib.Backend.reverse_resolve_async
().New in version 3.23.1.