ModemManager.ModemLocation¶
| Subclasses: | None | 
|---|
Methods¶
| dup_assistance_data_servers() | |
| dup_path() | |
| dup_supl_server() | |
| get_3gpp(cancellable, callback, *user_data) | |
| get_3gpp_finish(res) | |
| get_3gpp_sync(cancellable) | |
| get_assistance_data_servers() | |
| get_capabilities() | |
| get_cdma_bs(cancellable, callback, *user_data) | |
| get_cdma_bs_finish(res) | |
| get_cdma_bs_sync(cancellable) | |
| get_enabled() | |
| get_full(cancellable, callback, *user_data) | |
| get_full_finish(res) | |
| get_full_sync(cancellable) | |
| get_gps_nmea(cancellable, callback, *user_data) | |
| get_gps_nmea_finish(res) | |
| get_gps_nmea_sync(cancellable) | |
| get_gps_raw(cancellable, callback, *user_data) | |
| get_gps_raw_finish(res) | |
| get_gps_raw_sync(cancellable) | |
| get_gps_refresh_rate() | |
| get_path() | |
| get_supl_server() | |
| get_supported_assistance_data() | |
| inject_assistance_data(data, cancellable, callback, *user_data) | |
| inject_assistance_data_finish(res) | |
| inject_assistance_data_sync(data, cancellable) | |
| set_gps_refresh_rate(rate, cancellable, callback, *user_data) | |
| set_gps_refresh_rate_finish(res) | |
| set_gps_refresh_rate_sync(rate, cancellable) | |
| set_supl_server(supl, cancellable, callback, *user_data) | |
| set_supl_server_finish(res) | |
| set_supl_server_sync(supl, cancellable) | |
| setup(sources, signal_location, cancellable, callback, *user_data) | |
| setup_finish(res) | |
| setup_sync(sources, signal_location, cancellable) | |
| signals_location() | 
Virtual Methods¶
| Inherited: | Gio.DBusProxy (2), GObject.Object (7), Gio.AsyncInitable (2), Gio.DBusInterface (3), Gio.Initable (1), ModemManager.GdbusModemLocation (5) | 
|---|
Properties¶
| Inherited: | Gio.DBusProxy (9), ModemManager.GdbusModemLocation (8) | 
|---|
Signals¶
| Inherited: | Gio.DBusProxy (2), GObject.Object (1), ModemManager.GdbusModemLocation (5) | 
|---|
Fields¶
| Inherited: | Gio.DBusProxy (2), GObject.Object (1), ModemManager.GdbusModemLocation (5) | 
|---|
| Name | Type | Access | Description | 
|---|---|---|---|
| parent | ModemManager.GdbusModemLocationProxy | r | |
| unused | object | r | 
Class Details¶
- 
class ModemManager.ModemLocation(**kwargs)¶
- Bases: - ModemManager.GdbusModemLocationProxy- Abstract: - No - Structure: - ModemManager.ModemLocationClass- The - ModemManager.ModemLocationstructure contains private data and should only be accessed using the provided API.- 
dup_assistance_data_servers()¶
- Returns: - a - None-terminated array of server addresses, or- Noneif none available. The returned value should be freed with- GLib.strfreev().- Return type: - [ - str]- Gets the list of assistance data servers. - New in version 1.10. 
 - 
dup_path()¶
- Returns: - The DBus path of the - ModemManager.Object. The returned value should be freed with- GLib.free().- Return type: - str- Gets a copy of the DBus path of the - ModemManager.Objectobject which implements this interface.- New in version 1.0. 
 - 
dup_supl_server()¶
- Returns: - The SUPL server address, or - Noneif none available. The returned value should be freed with- GLib.free().- Return type: - str- Gets the address of the SUPL server. - New in version 1.6. 
 - 
get_3gpp(cancellable, callback, *user_data)¶
- Parameters: - cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
- callback (Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
- user_data (objectorNone) – User data to pass to callback.
 - Asynchronously gets the current 3GPP location information. - When the operation is finished, callback will be invoked in the - thread-default main loopof the thread you are calling this method from. You can then call- ModemManager.ModemLocation.get_3gpp_finish() to get the result of the operation.- See - ModemManager.ModemLocation.get_3gpp_sync() for the synchronous, blocking version of this method.- New in version 1.0. 
- cancellable (
 - 
get_3gpp_finish(res)¶
- Parameters: - res ( - Gio.AsyncResult) – The- Gio.AsyncResultobtained from the- Gio.AsyncReadyCallbackpassed to- ModemManager.ModemLocation.get_3gpp().- Raises: - GLib.Error- Returns: - A - ModemManager.Location3gpp, or- Noneif not available. The returned value should be freed with- GObject.Object.unref().- Return type: - ModemManager.Location3gpp- Finishes an operation started with - ModemManager.ModemLocation.get_3gpp().- New in version 1.0. 
 - 
get_3gpp_sync(cancellable)¶
- Parameters: - cancellable ( - Gio.Cancellableor- None) – A- Gio.Cancellableor- None.- Raises: - GLib.Error- Returns: - A - ModemManager.Location3gpp, or- Noneif not available. The returned value should be freed with- GObject.Object.unref().- Return type: - ModemManager.Location3gpp- Synchronously gets the current 3GPP location information. - The calling thread is blocked until a reply is received. See - ModemManager.ModemLocation.get_3gpp() for the asynchronous version of this method.- New in version 1.0. 
 - 
get_assistance_data_servers()¶
- Returns: - a - None-terminated array of server addresses, or- Noneif none available. Do not free the returned value, it belongs to self.- Return type: - [ - str]- Gets the list of assistance data servers. - The returned value is only valid until the property changes so it is only safe to use this function on the thread where self was constructed. Use - ModemManager.ModemLocation.dup_assistance_data_servers() if on another thread.- New in version 1.10. 
 - 
get_capabilities()¶
- Returns: - A - ModemManager.ModemLocationSource.- Return type: - ModemManager.ModemLocationSource- Gets a bitmask of the location capabilities supported by this - ModemManager.ModemLocation.- New in version 1.0. 
 - 
get_cdma_bs(cancellable, callback, *user_data)¶
- Parameters: - cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
- callback (Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
- user_data (objectorNone) – User data to pass to callback.
 - Asynchronously gets the current CDMA base station location information. - When the operation is finished, callback will be invoked in the - thread-default main loopof the thread you are calling this method from. You can then call- ModemManager.ModemLocation.get_cdma_bs_finish() to get the result of the operation.- See - ModemManager.ModemLocation.get_cdma_bs_sync() for the synchronous, blocking version of this method.- New in version 1.0. 
- cancellable (
 - 
get_cdma_bs_finish(res)¶
- Parameters: - res ( - Gio.AsyncResult) – The- Gio.AsyncResultobtained from the- Gio.AsyncReadyCallbackpassed to- ModemManager.ModemLocation.get_cdma_bs().- Raises: - GLib.Error- Returns: - A - ModemManager.LocationCdmaBs, or- Noneif not available. The returned value should be freed with- GObject.Object.unref().- Return type: - ModemManager.LocationCdmaBs- Finishes an operation started with - ModemManager.ModemLocation.get_cdma_bs().- New in version 1.0. 
 - 
get_cdma_bs_sync(cancellable)¶
- Parameters: - cancellable ( - Gio.Cancellableor- None) – A- Gio.Cancellableor- None.- Raises: - GLib.Error- Returns: - A - ModemManager.LocationCdmaBs, or- Noneif not available. The returned value should be freed with- GObject.Object.unref().- Return type: - ModemManager.LocationCdmaBs- Synchronously gets the current CDMA base station location information. - The calling thread is blocked until a reply is received. See - ModemManager.ModemLocation.get_cdma_bs() for the asynchronous version of this method.- New in version 1.0. 
 - 
get_enabled()¶
- Returns: - A - ModemManager.ModemLocationSource.- Return type: - ModemManager.ModemLocationSource- Gets a bitmask of the location capabilities which are enabled in this - ModemManager.ModemLocation.- New in version 1.0. 
 - 
get_full(cancellable, callback, *user_data)¶
- Parameters: - cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
- callback (Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
- user_data (objectorNone) – User data to pass to callback.
 - Asynchronously gets the current location information. - When the operation is finished, callback will be invoked in the - thread-default main loopof the thread you are calling this method from. You can then call- ModemManager.ModemLocation.get_full_finish() to get the result of the operation.- See - ModemManager.ModemLocation.get_full_sync() for the synchronous, blocking version of this method.- New in version 1.0. 
- cancellable (
 - 
get_full_finish(res)¶
- Parameters: - res ( - Gio.AsyncResult) – The- Gio.AsyncResultobtained from the- Gio.AsyncReadyCallbackpassed to- ModemManager.ModemLocation.get_full().- Raises: - GLib.Error- Returns: - Trueif the retrieval was successful,- Falseif error is set.- location_3gpp: - Return location for a - ModemManager.Location3gppif 3GPP location is requested, or- Noneif not required. The returned value should be freed with- GObject.Object.unref().- location_gps_nmea: - Return location for a - ModemManager.LocationGpsNmeaif GPS NMEA location is requested, or- Noneif not required. The returned value should be freed with- GObject.Object.unref().- location_gps_raw: - Return location for a - ModemManager.LocationGpsRawif GPS raw location is requested, or- Noneif not required. The returned value should be freed with- GObject.Object.unref().- location_cdma_bs: - Return location for a - ModemManager.LocationCdmaBsif CDMA Base Station location is requested, or- Noneif not required. The returned value should be freed with- GObject.Object.unref().- Return type: - ( - bool, location_3gpp:- ModemManager.Location3gpp, location_gps_nmea:- ModemManager.LocationGpsNmea, location_gps_raw:- ModemManager.LocationGpsRaw, location_cdma_bs:- ModemManager.LocationCdmaBs)- Finishes an operation started with - ModemManager.ModemLocation.get_full().- New in version 1.0. 
 - 
get_full_sync(cancellable)¶
- Parameters: - cancellable ( - Gio.Cancellableor- None) – A- Gio.Cancellableor- None.- Raises: - GLib.Error- Returns: - Trueif the setup was successful,- Falseif error is set.- location_3gpp: - Return location for a - ModemManager.Location3gppif 3GPP location is requested, or- Noneif not required. The returned value should be freed with- GObject.Object.unref().- location_gps_nmea: - Return location for a - ModemManager.LocationGpsNmeaif GPS NMEA location is requested, or- Noneif not required. The returned value should be freed with- GObject.Object.unref().- location_gps_raw: - Return location for a - ModemManager.LocationGpsRawif GPS raw location is requested, or- Noneif not required. The returned value should be freed with- GObject.Object.unref().- location_cdma_bs: - Return location for a - ModemManager.LocationCdmaBsif CDMA Base Station location is requested, or- Noneif not required. The returned value should be freed with- GObject.Object.unref().- Return type: - ( - bool, location_3gpp:- ModemManager.Location3gpp, location_gps_nmea:- ModemManager.LocationGpsNmea, location_gps_raw:- ModemManager.LocationGpsRaw, location_cdma_bs:- ModemManager.LocationCdmaBs)- Synchronously gets the current location information. - The calling thread is blocked until a reply is received. See - ModemManager.ModemLocation.get_full() for the asynchronous version of this method.- New in version 1.0. 
 - 
get_gps_nmea(cancellable, callback, *user_data)¶
- Parameters: - cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
- callback (Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
- user_data (objectorNone) – User data to pass to callback.
 - Asynchronously gets the current GPS NMEA location information. - When the operation is finished, callback will be invoked in the - thread-default main loopof the thread you are calling this method from. You can then call- ModemManager.ModemLocation.get_gps_nmea_finish() to get the result of the operation.- See - ModemManager.ModemLocation.get_gps_nmea_sync() for the synchronous, blocking version of this method.- New in version 1.0. 
- cancellable (
 - 
get_gps_nmea_finish(res)¶
- Parameters: - res ( - Gio.AsyncResult) – The- Gio.AsyncResultobtained from the- Gio.AsyncReadyCallbackpassed to- ModemManager.ModemLocation.get_gps_nmea().- Raises: - GLib.Error- Returns: - A - ModemManager.LocationGpsNmea, or- Noneif not available. The returned value should be freed with- GObject.Object.unref().- Return type: - ModemManager.LocationGpsNmea- Finishes an operation started with - ModemManager.ModemLocation.get_gps_nmea().- New in version 1.0. 
 - 
get_gps_nmea_sync(cancellable)¶
- Parameters: - cancellable ( - Gio.Cancellableor- None) – A- Gio.Cancellableor- None.- Raises: - GLib.Error- Returns: - A - ModemManager.LocationGpsNmea, or- Noneif not available. The returned value should be freed with- GObject.Object.unref().- Return type: - ModemManager.LocationGpsNmea- Synchronously gets the current GPS NMEA location information. - The calling thread is blocked until a reply is received. See - ModemManager.ModemLocation.get_gps_nmea() for the asynchronous version of this method.- New in version 1.0. 
 - 
get_gps_raw(cancellable, callback, *user_data)¶
- Parameters: - cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
- callback (Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
- user_data (objectorNone) – User data to pass to callback.
 - Asynchronously gets the current GPS raw location information. - When the operation is finished, callback will be invoked in the - thread-default main loopof the thread you are calling this method from. You can then call- ModemManager.ModemLocation.get_gps_raw_finish() to get the result of the operation.- See - ModemManager.ModemLocation.get_gps_raw_sync() for the synchronous, blocking version of this method.- New in version 1.0. 
- cancellable (
 - 
get_gps_raw_finish(res)¶
- Parameters: - res ( - Gio.AsyncResult) – The- Gio.AsyncResultobtained from the- Gio.AsyncReadyCallbackpassed to- ModemManager.ModemLocation.get_gps_raw().- Raises: - GLib.Error- Returns: - A - ModemManager.LocationGpsRaw, or- Noneif not available. The returned value should be freed with- GObject.Object.unref().- Return type: - ModemManager.LocationGpsRaw- Finishes an operation started with - ModemManager.ModemLocation.get_gps_raw().- New in version 1.0. 
 - 
get_gps_raw_sync(cancellable)¶
- Parameters: - cancellable ( - Gio.Cancellableor- None) – A- Gio.Cancellableor- None.- Raises: - GLib.Error- Returns: - A - ModemManager.LocationGpsRaw, or- Noneif not available. The returned value should be freed with- GObject.Object.unref().- Return type: - ModemManager.LocationGpsRaw- Synchronously gets the current GPS raw location information. - The calling thread is blocked until a reply is received. See - ModemManager.ModemLocation.get_gps_raw() for the asynchronous version of this method.- New in version 1.0. 
 - 
get_gps_refresh_rate()¶
- Returns: - The GPS refresh rate, or 0 if no fixed rate is used. - Return type: - int- Gets the GPS refresh rate, in seconds. - New in version 1.0. 
 - 
get_path()¶
- Returns: - The DBus path of the - ModemManager.Objectobject.- Return type: - str- Gets the DBus path of the - ModemManager.Objectwhich implements this interface.- New in version 1.0. 
 - 
get_supl_server()¶
- Returns: - The SUPL server address, or - Noneif none available. Do not free the returned value, it belongs to self.- Return type: - str- Gets the address of the SUPL server. - The returned value is only valid until the property changes so it is only safe to use this function on the thread where self was constructed. Use - ModemManager.ModemLocation.dup_supl_server() if on another thread.- New in version 1.6. 
 - 
get_supported_assistance_data()¶
- Returns: - A - ModemManager.ModemLocationAssistanceDataType.- Return type: - ModemManager.ModemLocationAssistanceDataType- Gets a bitmask of the supported assistance data types. - New in version 1.10. 
 - 
inject_assistance_data(data, cancellable, callback, *user_data)¶
- Parameters: - data (bytes) – Data to inject.
- cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
- callback (Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
- user_data (objectorNone) – User data to pass to callback.
 - Aynchronously injects assistance data to the GNSS module. - When the operation is finished, callback will be invoked in the - thread-default main loopof the thread you are calling this method from. You can then call- ModemManager.ModemLocation.inject_assistance_data_finish() to get the result of the operation.- See - ModemManager.ModemLocation.inject_assistance_data_sync() for the synchronous, blocking version of this method.- New in version 1.10. 
- data (
 - 
inject_assistance_data_finish(res)¶
- Parameters: - res ( - Gio.AsyncResult) – The- Gio.AsyncResultobtained from the- Gio.AsyncReadyCallbackpassed to- ModemManager.ModemLocation.inject_assistance_data().- Raises: - GLib.Error- Returns: - Trueif the injection was successful,- Falseif error is set.- Return type: - bool- Finishes an operation started with - ModemManager.ModemLocation.inject_assistance_data().- New in version 1.10. 
 - 
inject_assistance_data_sync(data, cancellable)¶
- Parameters: - data (bytes) – Data to inject.
- cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
 - Raises: - Returns: - Trueif the injection was successful,- Falseif error is set.- Return type: - Synchronously injects assistance data to the GNSS module. - The calling thread is blocked until a reply is received. See - ModemManager.ModemLocation.inject_assistance_data() for the asynchronous version of this method.- New in version 1.10. 
- data (
 - 
set_gps_refresh_rate(rate, cancellable, callback, *user_data)¶
- Parameters: - rate (int) – The GPS refresh rate, in seconds.
- cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
- callback (Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
- user_data (objectorNone) – User data to pass to callback.
 - Asynchronously configures the GPS refresh rate. - If a 0 rate is used, the GPS location updates will be immediately propagated to the interface. - When the operation is finished, callback will be invoked in the - thread-default main loopof the thread you are calling this method from. You can then call- ModemManager.ModemLocation.set_gps_refresh_rate_finish() to get the result of the operation.- See - ModemManager.ModemLocation.set_gps_refresh_rate_sync() for the synchronous, blocking version of this method.- New in version 1.0. 
- rate (
 - 
set_gps_refresh_rate_finish(res)¶
- Parameters: - res ( - Gio.AsyncResult) – The- Gio.AsyncResultobtained from the- Gio.AsyncReadyCallbackpassed to- ModemManager.ModemLocation.set_gps_refresh_rate().- Raises: - GLib.Error- Returns: - Trueif setting the GPS refresh rate was successful,- Falseif error is set.- Return type: - bool- Finishes an operation started with - ModemManager.ModemLocation.set_gps_refresh_rate().- New in version 1.0. 
 - 
set_gps_refresh_rate_sync(rate, cancellable)¶
- Parameters: - rate (int) – The GPS refresh rate, in seconds.
- cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
 - Raises: - Returns: - Trueif setting the refresh rate was successful,- Falseif error is set.- Return type: - Synchronously configures the GPS refresh rate. - If a 0 rate is used, the GPS location updates will be immediately propagated to the interface. - The calling thread is blocked until a reply is received. See - ModemManager.ModemLocation.set_gps_refresh_rate() for the asynchronous version of this method.- New in version 1.0. 
- rate (
 - 
set_supl_server(supl, cancellable, callback, *user_data)¶
- Parameters: - supl (str) – The SUPL server address, given as IP:PORT or with a full URL.
- cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
- callback (Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
- user_data (objectorNone) – User data to pass to callback.
 - Asynchronously configures the address of the SUPL server for A-GPS operation. - When the operation is finished, callback will be invoked in the - thread-default main loopof the thread you are calling this method from. You can then call- ModemManager.ModemLocation.set_supl_server_finish() to get the result of the operation.- See - ModemManager.ModemLocation.set_supl_server_sync() for the synchronous, blocking version of this method.- New in version 1.6. 
- supl (
 - 
set_supl_server_finish(res)¶
- Parameters: - res ( - Gio.AsyncResult) – The- Gio.AsyncResultobtained from the- Gio.AsyncReadyCallbackpassed to- ModemManager.ModemLocation.set_supl_server().- Raises: - GLib.Error- Returns: - Trueif setting the SUPL server was successful,- Falseif error is set.- Return type: - bool- Finishes an operation started with - ModemManager.ModemLocation.set_supl_server().- New in version 1.6. 
 - 
set_supl_server_sync(supl, cancellable)¶
- Parameters: - supl (str) – The SUPL server address, given as IP:PORT or with a full URL.
- cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
 - Raises: - Returns: - Trueif setting the SUPL server was successful,- Falseif error is set.- Return type: - Synchronously configures the address of the SUPL server for A-GPS operation. - The calling thread is blocked until a reply is received. See - ModemManager.ModemLocation.set_supl_server() for the asynchronous version of this method.- New in version 1.6. 
- supl (
 - 
setup(sources, signal_location, cancellable, callback, *user_data)¶
- Parameters: - sources (ModemManager.ModemLocationSource) – Bitmask ofModemManager.ModemLocationSourcevalues specifying which locations should get enabled.
- signal_location (bool) – Flag to enable or disable location signaling.
- cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
- callback (Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
- user_data (objectorNone) – User data to pass to callback.
 - Asynchronously configures the location sources to use when gathering location information. Also enable or disable location information gathering. - When the operation is finished, callback will be invoked in the - thread-default main loopof the thread you are calling this method from. You can then call- ModemManager.ModemLocation.setup_finish() to get the result of the operation.- See - ModemManager.ModemLocation.setup_sync() for the synchronous, blocking version of this method.- New in version 1.0. 
- sources (
 - 
setup_finish(res)¶
- Parameters: - res ( - Gio.AsyncResult) – The- Gio.AsyncResultobtained from the- Gio.AsyncReadyCallbackpassed to- ModemManager.ModemLocation.setup().- Raises: - GLib.Error- Returns: - Trueif the setup was successful,- Falseif error is set.- Return type: - bool- Finishes an operation started with - ModemManager.ModemLocation.setup().- New in version 1.0. 
 - 
setup_sync(sources, signal_location, cancellable)¶
- Parameters: - sources (ModemManager.ModemLocationSource) – Bitmask ofModemManager.ModemLocationSourcevalues specifying which locations should get enabled.
- signal_location (bool) – Flag to enable or disable location signaling.
- cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
 - Raises: - Returns: - Return type: - Synchronously configures the location sources to use when gathering location information. Also enable or disable location information gathering. - The calling thread is blocked until a reply is received. See - ModemManager.ModemLocation.setup() for the asynchronous version of this method.- New in version 1.0. 
- sources (
 - 
signals_location()¶
- Returns: - Trueif location changes are signaled,- Falseotherwise.- Return type: - bool- Gets the status of the location signaling in the - ModemManager.ModemLocation.- New in version 1.0. 
 
-