MMModemLocation

MMModemLocation — The Location interface

Functions

const gchar * mm_modem_location_get_path ()
gchar * mm_modem_location_dup_path ()
MMModemLocationSource mm_modem_location_get_capabilities ()
MMModemLocationSource mm_modem_location_get_enabled ()
guint mm_modem_location_get_gps_refresh_rate ()
gboolean mm_modem_location_signals_location ()
gchar * mm_modem_location_dup_supl_server ()
const gchar * mm_modem_location_get_supl_server ()
MMModemLocationAssistanceDataType mm_modem_location_get_supported_assistance_data ()
gchar ** mm_modem_location_dup_assistance_data_servers ()
const gchar ** mm_modem_location_get_assistance_data_servers ()
void mm_modem_location_setup ()
gboolean mm_modem_location_setup_finish ()
gboolean mm_modem_location_setup_sync ()
void mm_modem_location_set_supl_server ()
gboolean mm_modem_location_set_supl_server_finish ()
gboolean mm_modem_location_set_supl_server_sync ()
void mm_modem_location_inject_assistance_data ()
gboolean mm_modem_location_inject_assistance_data_finish ()
gboolean mm_modem_location_inject_assistance_data_sync ()
void mm_modem_location_set_gps_refresh_rate ()
gboolean mm_modem_location_set_gps_refresh_rate_finish ()
gboolean mm_modem_location_set_gps_refresh_rate_sync ()
void mm_modem_location_get_3gpp ()
MMLocation3gpp * mm_modem_location_get_3gpp_finish ()
MMLocation3gpp * mm_modem_location_get_3gpp_sync ()
MMLocation3gpp * mm_modem_location_peek_signaled_3gpp ()
MMLocation3gpp * mm_modem_location_get_signaled_3gpp ()
void mm_modem_location_get_gps_nmea ()
MMLocationGpsNmea * mm_modem_location_get_gps_nmea_finish ()
MMLocationGpsNmea * mm_modem_location_get_gps_nmea_sync ()
MMLocationGpsNmea * mm_modem_location_peek_signaled_gps_nmea ()
MMLocationGpsNmea * mm_modem_location_get_signaled_gps_nmea ()
void mm_modem_location_get_gps_raw ()
MMLocationGpsRaw * mm_modem_location_get_gps_raw_finish ()
MMLocationGpsRaw * mm_modem_location_get_gps_raw_sync ()
MMLocationGpsRaw * mm_modem_location_peek_signaled_gps_raw ()
MMLocationGpsRaw * mm_modem_location_get_signaled_gps_raw ()
void mm_modem_location_get_cdma_bs ()
MMLocationCdmaBs * mm_modem_location_get_cdma_bs_finish ()
MMLocationCdmaBs * mm_modem_location_get_cdma_bs_sync ()
MMLocationCdmaBs * mm_modem_location_peek_signaled_cdma_bs ()
MMLocationCdmaBs * mm_modem_location_get_signaled_cdma_bs ()
void mm_modem_location_get_full ()
gboolean mm_modem_location_get_full_finish ()
gboolean mm_modem_location_get_full_sync ()

Types and Values

Object Hierarchy

    GObject
    ╰── GDBusProxy
        ╰── MmGdbusModemLocationProxy
            ╰── MMModemLocation

Implemented Interfaces

MMModemLocation implements GDBusInterface, GInitable, GAsyncInitable and MmGdbusModemLocation.

Description

The MMModemLocation is an object providing access to the methods, signals and properties of the Location interface.

The Location interface is exposed whenever a modem has location capabilities.

Functions

mm_modem_location_get_path ()

const gchar *
mm_modem_location_get_path (MMModemLocation *self);

Gets the DBus path of the MMObject which implements this interface.

Parameters

self

A MMModemLocation.

 

Returns

The DBus path of the MMObject object.

[transfer none]

Since: 1.0


mm_modem_location_dup_path ()

gchar *
mm_modem_location_dup_path (MMModemLocation *self);

Gets a copy of the DBus path of the MMObject object which implements this interface.

Parameters

self

A MMModemLocation.

 

Returns

The DBus path of the MMObject. The returned value should be freed with g_free().

[transfer full]

Since: 1.0


mm_modem_location_get_capabilities ()

MMModemLocationSource
mm_modem_location_get_capabilities (MMModemLocation *self);

Gets a bitmask of the location capabilities supported by this MMModemLocation.

Parameters

self

A MMModemLocation.

 

Since: 1.0


mm_modem_location_get_enabled ()

MMModemLocationSource
mm_modem_location_get_enabled (MMModemLocation *self);

Gets a bitmask of the location capabilities which are enabled in this MMModemLocation.

Parameters

self

A MMModemLocation.

 

Since: 1.0


mm_modem_location_get_gps_refresh_rate ()

guint
mm_modem_location_get_gps_refresh_rate
                               (MMModemLocation *self);

Gets the GPS refresh rate, in seconds.

Parameters

self

A MMModemLocation.

 

Returns

The GPS refresh rate, or 0 if no fixed rate is used.

Since: 1.0


mm_modem_location_signals_location ()

gboolean
mm_modem_location_signals_location (MMModemLocation *self);

Gets the status of the location signaling in the MMModemLocation.

Parameters

self

A MMModemLocation.

 

Returns

TRUE if location changes are signaled, FALSE otherwise.

Since: 1.0


mm_modem_location_dup_supl_server ()

gchar *
mm_modem_location_dup_supl_server (MMModemLocation *self);

Gets the address of the SUPL server.

Parameters

self

A MMModemLocation.

 

Returns

The SUPL server address, or NULL if none available. The returned value should be freed with g_free().

[transfer full]

Since: 1.6


mm_modem_location_get_supl_server ()

const gchar *
mm_modem_location_get_supl_server (MMModemLocation *self);

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 mm_modem_location_dup_supl_server() if on another thread.

Parameters

self

A MMModemLocation.

 

Returns

The SUPL server address, or NULL if none available. Do not free the returned value, it belongs to self .

[transfer none]

Since: 1.6


mm_modem_location_get_supported_assistance_data ()

MMModemLocationAssistanceDataType
mm_modem_location_get_supported_assistance_data
                               (MMModemLocation *self);

Gets a bitmask of the supported assistance data types.

Parameters

self

A MMModemLocation.

 

Since: 1.10


mm_modem_location_dup_assistance_data_servers ()

gchar **
mm_modem_location_dup_assistance_data_servers
                               (MMModemLocation *self);

Gets the list of assistance data servers.

Parameters

self

A MMModemLocation.

 

Returns

a NULL-terminated array of server addresses, or NULL if none available. The returned value should be freed with g_strfreev().

[transfer full]

Since: 1.10


mm_modem_location_get_assistance_data_servers ()

const gchar **
mm_modem_location_get_assistance_data_servers
                               (MMModemLocation *self);

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 mm_modem_location_dup_assistance_data_servers() if on another thread.

Parameters

self

A MMModemLocation.

 

Returns

a NULL-terminated array of server addresses, or NULL if none available. Do not free the returned value, it belongs to self .

[transfer none]

Since: 1.10


mm_modem_location_setup ()

void
mm_modem_location_setup (MMModemLocation *self,
                         MMModemLocationSource sources,
                         gboolean signal_location,
                         GCancellable *cancellable,
                         GAsyncReadyCallback callback,
                         gpointer user_data);

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 loop

of the thread you are calling this method from. You can then call mm_modem_location_setup_finish() to get the result of the operation.

See mm_modem_location_setup_sync() for the synchronous, blocking version of this method.

Parameters

self

A MMModemLocation.

 

sources

Bitmask of MMModemLocationSource values specifying which locations should get enabled.

 

signal_location

Flag to enable or disable location signaling.

 

cancellable

A GCancellable or NULL.

[allow-none]

callback

A GAsyncReadyCallback to call when the request is satisfied or NULL.

 

user_data

User data to pass to callback .

 

Since: 1.0


mm_modem_location_setup_finish ()

gboolean
mm_modem_location_setup_finish (MMModemLocation *self,
                                GAsyncResult *res,
                                GError **error);

Finishes an operation started with mm_modem_location_setup().

Parameters

self

A MMModemLocation.

 

res

The GAsyncResult obtained from the GAsyncReadyCallback passed to mm_modem_location_setup().

 

error

Return location for error or NULL.

 

Returns

TRUE if the setup was successful, FALSE if error is set.

Since: 1.0


mm_modem_location_setup_sync ()

gboolean
mm_modem_location_setup_sync (MMModemLocation *self,
                              MMModemLocationSource sources,
                              gboolean signal_location,
                              GCancellable *cancellable,
                              GError **error);

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 mm_modem_location_setup() for the asynchronous version of this method.

Parameters

self

A MMModemLocation.

 

sources

Bitmask of MMModemLocationSource values specifying which locations should get enabled.

 

signal_location

Flag to enable or disable location signaling.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

TRUE if the setup was successful, FALSE if error is set.

Since: 1.0


mm_modem_location_set_supl_server ()

void
mm_modem_location_set_supl_server (MMModemLocation *self,
                                   const gchar *supl,
                                   GCancellable *cancellable,
                                   GAsyncReadyCallback callback,
                                   gpointer user_data);

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 loop

of the thread you are calling this method from. You can then call mm_modem_location_set_supl_server_finish() to get the result of the operation.

See mm_modem_location_set_supl_server_sync() for the synchronous, blocking version of this method.

Parameters

self

A MMModemLocation.

 

supl

The SUPL server address, given as IP:PORT or with a full URL.

 

cancellable

A GCancellable or NULL.

[allow-none]

callback

A GAsyncReadyCallback to call when the request is satisfied or NULL.

 

user_data

User data to pass to callback .

 

Since: 1.6


mm_modem_location_set_supl_server_finish ()

gboolean
mm_modem_location_set_supl_server_finish
                               (MMModemLocation *self,
                                GAsyncResult *res,
                                GError **error);

Finishes an operation started with mm_modem_location_set_supl_server().

Parameters

self

A MMModemLocation.

 

res

The GAsyncResult obtained from the GAsyncReadyCallback passed to mm_modem_location_set_supl_server().

 

error

Return location for error or NULL.

 

Returns

TRUE if setting the SUPL server was successful, FALSE if error is set.

Since: 1.6


mm_modem_location_set_supl_server_sync ()

gboolean
mm_modem_location_set_supl_server_sync
                               (MMModemLocation *self,
                                const gchar *supl,
                                GCancellable *cancellable,
                                GError **error);

Synchronously configures the address of the SUPL server for A-GPS operation.

The calling thread is blocked until a reply is received. See mm_modem_location_set_supl_server() for the asynchronous version of this method.

Parameters

self

A MMModemLocation.

 

supl

The SUPL server address, given as IP:PORT or with a full URL.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

TRUE if setting the SUPL server was successful, FALSE if error is set.

Since: 1.6


mm_modem_location_inject_assistance_data ()

void
mm_modem_location_inject_assistance_data
                               (MMModemLocation *self,
                                const guint8 *data,
                                gsize data_size,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

Aynchronously injects assistance data to the GNSS module.

When the operation is finished, callback will be invoked in the

thread-default main loop

of the thread you are calling this method from. You can then call mm_modem_location_inject_assistance_data_finish() to get the result of the operation.

See mm_modem_location_inject_assistance_data_sync() for the synchronous, blocking version of this method.

Parameters

self

A MMModemLocation.

 

data

Data to inject.

[array length=data_size]

data_size

size of data .

 

cancellable

A GCancellable or NULL.

[allow-none]

callback

A GAsyncReadyCallback to call when the request is satisfied or NULL.

 

user_data

User data to pass to callback .

 

Since: 1.10


mm_modem_location_inject_assistance_data_finish ()

gboolean
mm_modem_location_inject_assistance_data_finish
                               (MMModemLocation *self,
                                GAsyncResult *res,
                                GError **error);

Finishes an operation started with mm_modem_location_inject_assistance_data().

Parameters

self

A MMModemLocation.

 

res

The GAsyncResult obtained from the GAsyncReadyCallback passed to mm_modem_location_inject_assistance_data().

 

error

Return location for error or NULL.

 

Returns

TRUE if the injection was successful, FALSE if error is set.

Since: 1.10


mm_modem_location_inject_assistance_data_sync ()

gboolean
mm_modem_location_inject_assistance_data_sync
                               (MMModemLocation *self,
                                const guint8 *data,
                                gsize data_size,
                                GCancellable *cancellable,
                                GError **error);

Synchronously injects assistance data to the GNSS module.

The calling thread is blocked until a reply is received. See mm_modem_location_inject_assistance_data() for the asynchronous version of this method.

Parameters

self

A MMModemLocation.

 

data

Data to inject.

[array length=data_size]

data_size

size of data .

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

TRUE if the injection was successful, FALSE if error is set.

Since: 1.10


mm_modem_location_set_gps_refresh_rate ()

void
mm_modem_location_set_gps_refresh_rate
                               (MMModemLocation *self,
                                guint rate,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

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 loop

of the thread you are calling this method from. You can then call mm_modem_location_set_gps_refresh_rate_finish() to get the result of the operation.

See mm_modem_location_set_gps_refresh_rate_sync() for the synchronous, blocking version of this method.

Parameters

self

A MMModemLocation.

 

rate

The GPS refresh rate, in seconds.

 

cancellable

A GCancellable or NULL.

[allow-none]

callback

A GAsyncReadyCallback to call when the request is satisfied or NULL.

 

user_data

User data to pass to callback .

 

Since: 1.0


mm_modem_location_set_gps_refresh_rate_finish ()

gboolean
mm_modem_location_set_gps_refresh_rate_finish
                               (MMModemLocation *self,
                                GAsyncResult *res,
                                GError **error);

Finishes an operation started with mm_modem_location_set_gps_refresh_rate().

Parameters

self

A MMModemLocation.

 

res

The GAsyncResult obtained from the GAsyncReadyCallback passed to mm_modem_location_set_gps_refresh_rate().

 

error

Return location for error or NULL.

 

Returns

TRUE if setting the GPS refresh rate was successful, FALSE if error is set.

Since: 1.0


mm_modem_location_set_gps_refresh_rate_sync ()

gboolean
mm_modem_location_set_gps_refresh_rate_sync
                               (MMModemLocation *self,
                                guint rate,
                                GCancellable *cancellable,
                                GError **error);

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 mm_modem_location_set_gps_refresh_rate() for the asynchronous version of this method.

Parameters

self

A MMModemLocation.

 

rate

The GPS refresh rate, in seconds.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

TRUE if setting the refresh rate was successful, FALSE if error is set.

Since: 1.0


mm_modem_location_get_3gpp ()

void
mm_modem_location_get_3gpp (MMModemLocation *self,
                            GCancellable *cancellable,
                            GAsyncReadyCallback callback,
                            gpointer user_data);

Asynchronously gets the current 3GPP location information.

When the operation is finished, callback will be invoked in the

thread-default main loop

of the thread you are calling this method from. You can then call mm_modem_location_get_3gpp_finish() to get the result of the operation.

See mm_modem_location_get_3gpp_sync() for the synchronous, blocking version of this method.

Parameters

self

A MMModemLocation.

 

cancellable

A GCancellable or NULL.

[allow-none]

callback

A GAsyncReadyCallback to call when the request is satisfied or NULL.

 

user_data

User data to pass to callback .

 

Since: 1.0


mm_modem_location_get_3gpp_finish ()

MMLocation3gpp *
mm_modem_location_get_3gpp_finish (MMModemLocation *self,
                                   GAsyncResult *res,
                                   GError **error);

Finishes an operation started with mm_modem_location_get_3gpp().

Parameters

self

A MMModemLocation.

 

res

The GAsyncResult obtained from the GAsyncReadyCallback passed to mm_modem_location_get_3gpp().

 

error

Return location for error or NULL.

 

Returns

A MMLocation3gpp, or NULL if not available. The returned value should be freed with g_object_unref().

[transfer full]

Since: 1.0


mm_modem_location_get_3gpp_sync ()

MMLocation3gpp *
mm_modem_location_get_3gpp_sync (MMModemLocation *self,
                                 GCancellable *cancellable,
                                 GError **error);

Synchronously gets the current 3GPP location information.

The calling thread is blocked until a reply is received. See mm_modem_location_get_3gpp() for the asynchronous version of this method.

Parameters

self

A MMModemLocation.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

A MMLocation3gpp, or NULL if not available. The returned value should be freed with g_object_unref().

[transfer full]

Since: 1.0


mm_modem_location_peek_signaled_3gpp ()

MMLocation3gpp *
mm_modem_location_peek_signaled_3gpp (MMModemLocation *self);

Gets a MMLocation3gpp object with the current 3GPP location information.

Unlike mm_modem_location_get_3gpp() or mm_modem_location_get_3gpp_sync(), this method does not perform an explicit query. Instead, this method will return the location information that may have been signaled by the modem. Therefore, this method will only succeed if location signaling is enabled (e.g. with mm_modem_location_setup() in the MMModemLocation).

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 mm_modem_location_get_signaled_3gpp() if on another thread.

Parameters

self

A MMModemLocation.

 

Returns

A MMLocation3gpp, or NULL if none available. Do not free the returned value, it belongs to self .

[transfer none]

Since: 1.18


mm_modem_location_get_signaled_3gpp ()

MMLocation3gpp *
mm_modem_location_get_signaled_3gpp (MMModemLocation *self);

Gets a MMLocation3gpp object with the current 3GPP location information.

Unlike mm_modem_location_get_3gpp() or mm_modem_location_get_3gpp_sync(), this method does not perform an explicit query. Instead, this method will return the location information that may have been signaled by the modem. Therefore, this method will only succeed if location signaling is enabled (e.g. with mm_modem_location_setup() in the MMModemLocation).

The values reported by self are not updated when the values in the interface change. Instead, the client is expected to call mm_modem_location_get_signaled_3gpp() again to get a new MMLocation3gpp with the new values.

Parameters

self

A MMModemLocation.

 

Returns

A MMLocation3gpp that must be freed with g_object_unref() or NULL if none available.

[transfer full]

Since: 1.18


mm_modem_location_get_gps_nmea ()

void
mm_modem_location_get_gps_nmea (MMModemLocation *self,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

Asynchronously gets the current GPS NMEA location information.

When the operation is finished, callback will be invoked in the

thread-default main loop

of the thread you are calling this method from. You can then call mm_modem_location_get_gps_nmea_finish() to get the result of the operation.

See mm_modem_location_get_gps_nmea_sync() for the synchronous, blocking version of this method.

Parameters

self

A MMModemLocation.

 

cancellable

A GCancellable or NULL.

[allow-none]

callback

A GAsyncReadyCallback to call when the request is satisfied or NULL.

 

user_data

User data to pass to callback .

 

Since: 1.0


mm_modem_location_get_gps_nmea_finish ()

MMLocationGpsNmea *
mm_modem_location_get_gps_nmea_finish (MMModemLocation *self,
                                       GAsyncResult *res,
                                       GError **error);

Finishes an operation started with mm_modem_location_get_gps_nmea().

Parameters

self

A MMModemLocation.

 

res

The GAsyncResult obtained from the GAsyncReadyCallback passed to mm_modem_location_get_gps_nmea().

 

error

Return location for error or NULL.

 

Returns

A MMLocationGpsNmea, or NULL if not available. The returned value should be freed with g_object_unref().

[transfer full]

Since: 1.0


mm_modem_location_get_gps_nmea_sync ()

MMLocationGpsNmea *
mm_modem_location_get_gps_nmea_sync (MMModemLocation *self,
                                     GCancellable *cancellable,
                                     GError **error);

Synchronously gets the current GPS NMEA location information.

The calling thread is blocked until a reply is received. See mm_modem_location_get_gps_nmea() for the asynchronous version of this method.

Parameters

self

A MMModemLocation.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

A MMLocationGpsNmea, or NULL if not available. The returned value should be freed with g_object_unref().

[transfer full]

Since: 1.0


mm_modem_location_peek_signaled_gps_nmea ()

MMLocationGpsNmea *
mm_modem_location_peek_signaled_gps_nmea
                               (MMModemLocation *self);

Gets a MMLocationGpsNmea object with the current GPS NMEA location information.

Unlike mm_modem_location_get_gps_nmea() or mm_modem_location_get_gps_nmea_sync(), this method does not perform an explicit query. Instead, this method will return the location information that may have been signaled by the modem. Therefore, this method will only succeed if location signaling is enabled (e.g. with mm_modem_location_setup() in the MMModemLocation).

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 mm_modem_location_get_signaled_gps_nmea() if on another thread.

Parameters

self

A MMModemLocation.

 

Returns

A MMLocationGpsNmea, or NULL if none available. Do not free the returned value, it belongs to self .

[transfer none]

Since: 1.18


mm_modem_location_get_signaled_gps_nmea ()

MMLocationGpsNmea *
mm_modem_location_get_signaled_gps_nmea
                               (MMModemLocation *self);

Gets a MMLocationGpsNmea object with the current GPS NMEA location information.

Unlike mm_modem_location_get_gps_nmea() or mm_modem_location_get_gps_nmea_sync(), this method does not perform an explicit query. Instead, this method will return the location information that may have been signaled by the modem. Therefore, this method will only succeed if location signaling is enabled (e.g. with mm_modem_location_setup() in the MMModemLocation).

The values reported by self are not updated when the values in the interface change. Instead, the client is expected to call mm_modem_location_get_signaled_gps_nmea() again to get a new MMLocationGpsNmea with the new values.

Parameters

self

A MMModemLocation.

 

Returns

A MMLocationGpsNmea that must be freed with g_object_unref() or NULL if none available.

[transfer full]

Since: 1.18


mm_modem_location_get_gps_raw ()

void
mm_modem_location_get_gps_raw (MMModemLocation *self,
                               GCancellable *cancellable,
                               GAsyncReadyCallback callback,
                               gpointer user_data);

Asynchronously gets the current GPS raw location information.

When the operation is finished, callback will be invoked in the

thread-default main loop

of the thread you are calling this method from. You can then call mm_modem_location_get_gps_raw_finish() to get the result of the operation.

See mm_modem_location_get_gps_raw_sync() for the synchronous, blocking version of this method.

Parameters

self

A MMModemLocation.

 

cancellable

A GCancellable or NULL.

[allow-none]

callback

A GAsyncReadyCallback to call when the request is satisfied or NULL.

 

user_data

User data to pass to callback .

 

Since: 1.0


mm_modem_location_get_gps_raw_finish ()

MMLocationGpsRaw *
mm_modem_location_get_gps_raw_finish (MMModemLocation *self,
                                      GAsyncResult *res,
                                      GError **error);

Finishes an operation started with mm_modem_location_get_gps_raw().

Parameters

self

A MMModemLocation.

 

res

The GAsyncResult obtained from the GAsyncReadyCallback passed to mm_modem_location_get_gps_raw().

 

error

Return location for error or NULL.

 

Returns

A MMLocationGpsRaw, or NULL if not available. The returned value should be freed with g_object_unref().

[transfer full]

Since: 1.0


mm_modem_location_get_gps_raw_sync ()

MMLocationGpsRaw *
mm_modem_location_get_gps_raw_sync (MMModemLocation *self,
                                    GCancellable *cancellable,
                                    GError **error);

Synchronously gets the current GPS raw location information.

The calling thread is blocked until a reply is received. See mm_modem_location_get_gps_raw() for the asynchronous version of this method.

Parameters

self

A MMModemLocation.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

A MMLocationGpsRaw, or NULL if not available. The returned value should be freed with g_object_unref().

[transfer full]

Since: 1.0


mm_modem_location_peek_signaled_gps_raw ()

MMLocationGpsRaw *
mm_modem_location_peek_signaled_gps_raw
                               (MMModemLocation *self);

Gets a MMLocationGpsRaw object with the current GPS raw location information.

Unlike mm_modem_location_get_gps_raw() or mm_modem_location_get_gps_raw_sync(), this method does not perform an explicit query. Instead, this method will return the location information that may have been signaled by the modem. Therefore, this method will only succeed if location signaling is enabled (e.g. with mm_modem_location_setup() in the MMModemLocation).

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 mm_modem_location_get_signaled_gps_raw() if on another thread.

Parameters

self

A MMModemLocation.

 

Returns

A MMLocationGpsRaw, or NULL if none available. Do not free the returned value, it belongs to self .

[transfer none]

Since: 1.18


mm_modem_location_get_signaled_gps_raw ()

MMLocationGpsRaw *
mm_modem_location_get_signaled_gps_raw
                               (MMModemLocation *self);

Gets a MMLocationGpsRaw object with the current GPS raw location information.

Unlike mm_modem_location_get_gps_raw() or mm_modem_location_get_gps_raw_sync(), this method does not perform an explicit query. Instead, this method will return the location information that may have been signaled by the modem. Therefore, this method will only succeed if location signaling is enabled (e.g. with mm_modem_location_setup() in the MMModemLocation).

The values reported by self are not updated when the values in the interface change. Instead, the client is expected to call mm_modem_location_get_signaled_gps_raw() again to get a new MMLocationGpsRaw with the new values.

Parameters

self

A MMModemLocation.

 

Returns

A MMLocationGpsRaw that must be freed with g_object_unref() or NULL if none available.

[transfer full]

Since: 1.18


mm_modem_location_get_cdma_bs ()

void
mm_modem_location_get_cdma_bs (MMModemLocation *self,
                               GCancellable *cancellable,
                               GAsyncReadyCallback callback,
                               gpointer user_data);

Asynchronously gets the current CDMA base station location information.

When the operation is finished, callback will be invoked in the

thread-default main loop

of the thread you are calling this method from. You can then call mm_modem_location_get_cdma_bs_finish() to get the result of the operation.

See mm_modem_location_get_cdma_bs_sync() for the synchronous, blocking version of this method.

Parameters

self

A MMModemLocation.

 

cancellable

A GCancellable or NULL.

[allow-none]

callback

A GAsyncReadyCallback to call when the request is satisfied or NULL.

 

user_data

User data to pass to callback .

 

Since: 1.0


mm_modem_location_get_cdma_bs_finish ()

MMLocationCdmaBs *
mm_modem_location_get_cdma_bs_finish (MMModemLocation *self,
                                      GAsyncResult *res,
                                      GError **error);

Finishes an operation started with mm_modem_location_get_cdma_bs().

Parameters

self

A MMModemLocation.

 

res

The GAsyncResult obtained from the GAsyncReadyCallback passed to mm_modem_location_get_cdma_bs().

 

error

Return location for error or NULL.

 

Returns

A MMLocationCdmaBs, or NULL if not available. The returned value should be freed with g_object_unref().

[transfer full]

Since: 1.0


mm_modem_location_get_cdma_bs_sync ()

MMLocationCdmaBs *
mm_modem_location_get_cdma_bs_sync (MMModemLocation *self,
                                    GCancellable *cancellable,
                                    GError **error);

Synchronously gets the current CDMA base station location information.

The calling thread is blocked until a reply is received. See mm_modem_location_get_cdma_bs() for the asynchronous version of this method.

Parameters

self

A MMModemLocation.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

A MMLocationCdmaBs, or NULL if not available. The returned value should be freed with g_object_unref().

[transfer full]

Since: 1.0


mm_modem_location_peek_signaled_cdma_bs ()

MMLocationCdmaBs *
mm_modem_location_peek_signaled_cdma_bs
                               (MMModemLocation *self);

Gets a MMLocationCdmaBs object with the current CDMA base station location information.

Unlike mm_modem_location_get_cdma_bs() or mm_modem_location_get_cdma_bs_sync(), this method does not perform an explicit query. Instead, this method will return the location information that may have been signaled by the modem. Therefore, this method will only succeed if location signaling is enabled (e.g. with mm_modem_location_setup() in the MMModemLocation).

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 mm_modem_location_get_signaled_cdma_bs() if on another thread.

Parameters

self

A MMModemLocation.

 

Returns

A MMLocationCdmaBs, or NULL if none available. Do not free the returned value, it belongs to self .

[transfer none]

Since: 1.18


mm_modem_location_get_signaled_cdma_bs ()

MMLocationCdmaBs *
mm_modem_location_get_signaled_cdma_bs
                               (MMModemLocation *self);

Gets a MMLocationCdmaBs object with the current CDMA base station location information.

Unlike mm_modem_location_get_cdma_bs() or mm_modem_location_get_cdma_bs_sync(), this method does not perform an explicit query. Instead, this method will return the location information that may have been signaled by the modem. Therefore, this method will only succeed if location signaling is enabled (e.g. with mm_modem_location_setup() in the MMModemLocation).

The values reported by self are not updated when the values in the interface change. Instead, the client is expected to call mm_modem_location_get_signaled_cdma_bs() again to get a new MMLocationCdmaBs with the new values.

Parameters

self

A MMModemLocation.

 

Returns

A MMLocationCdmaBs that must be freed with g_object_unref() or NULL if none available.

[transfer full]

Since: 1.18


mm_modem_location_get_full ()

void
mm_modem_location_get_full (MMModemLocation *self,
                            GCancellable *cancellable,
                            GAsyncReadyCallback callback,
                            gpointer user_data);

Asynchronously gets the current location information.

When the operation is finished, callback will be invoked in the

thread-default main loop

of the thread you are calling this method from. You can then call mm_modem_location_get_full_finish() to get the result of the operation.

See mm_modem_location_get_full_sync() for the synchronous, blocking version of this method.

Parameters

self

A MMModemLocation.

 

cancellable

A GCancellable or NULL.

[allow-none]

callback

A GAsyncReadyCallback to call when the request is satisfied or NULL.

 

user_data

User data to pass to callback .

 

Since: 1.0


mm_modem_location_get_full_finish ()

gboolean
mm_modem_location_get_full_finish (MMModemLocation *self,
                                   GAsyncResult *res,
                                   MMLocation3gpp **location_3gpp,
                                   MMLocationGpsNmea **location_gps_nmea,
                                   MMLocationGpsRaw **location_gps_raw,
                                   MMLocationCdmaBs **location_cdma_bs,
                                   GError **error);

Finishes an operation started with mm_modem_location_get_full().

Parameters

self

A MMModemLocation.

 

location_3gpp

Return location for a MMLocation3gpp if 3GPP location is requested, or NULL if not required. The returned value should be freed with g_object_unref().

[out][allow-none][transfer full]

location_gps_nmea

Return location for a MMLocationGpsNmea if GPS NMEA location is requested, or NULL if not required. The returned value should be freed with g_object_unref().

[out][allow-none][transfer full]

location_gps_raw

Return location for a MMLocationGpsRaw if GPS raw location is requested, or NULL if not required. The returned value should be freed with g_object_unref().

[out][allow-none][transfer full]

location_cdma_bs

Return location for a MMLocationCdmaBs if CDMA Base Station location is requested, or NULL if not required. The returned value should be freed with g_object_unref().

[out][allow-none][transfer full]

res

The GAsyncResult obtained from the GAsyncReadyCallback passed to mm_modem_location_get_full().

 

error

Return location for error or NULL.

 

Returns

TRUE if the retrieval was successful, FALSE if error is set.

Since: 1.0


mm_modem_location_get_full_sync ()

gboolean
mm_modem_location_get_full_sync (MMModemLocation *self,
                                 MMLocation3gpp **location_3gpp,
                                 MMLocationGpsNmea **location_gps_nmea,
                                 MMLocationGpsRaw **location_gps_raw,
                                 MMLocationCdmaBs **location_cdma_bs,
                                 GCancellable *cancellable,
                                 GError **error);

Synchronously gets the current location information.

The calling thread is blocked until a reply is received. See mm_modem_location_get_full() for the asynchronous version of this method.

Parameters

self

A MMModemLocation.

 

location_3gpp

Return location for a MMLocation3gpp if 3GPP location is requested, or NULL if not required. The returned value should be freed with g_object_unref().

[out][allow-none][transfer full]

location_gps_nmea

Return location for a MMLocationGpsNmea if GPS NMEA location is requested, or NULL if not required. The returned value should be freed with g_object_unref().

[out][allow-none][transfer full]

location_gps_raw

Return location for a MMLocationGpsRaw if GPS raw location is requested, or NULL if not required. The returned value should be freed with g_object_unref().

[out][allow-none][transfer full]

location_cdma_bs

Return location for a MMLocationCdmaBs if CDMA Base Station location is requested, or NULL if not required. The returned value should be freed with g_object_unref().

[out][allow-none][transfer full]

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

TRUE if the setup was successful, FALSE if error is set.

Since: 1.0

Types and Values

struct MMModemLocation

struct MMModemLocation;

The MMModemLocation structure contains private data and should only be accessed using the provided API.


MM_LOCATION_LONGITUDE_UNKNOWN

#define MM_LOCATION_LONGITUDE_UNKNOWN -G_MAXDOUBLE

Identifier for an unknown longitude value.

Proper longitude values fall in the [-180,180] range.

Since: 1.0


MM_LOCATION_LATITUDE_UNKNOWN

#define MM_LOCATION_LATITUDE_UNKNOWN  -G_MAXDOUBLE

Identifier for an unknown latitude value.

Proper latitude values fall in the [-90,90] range.

Since: 1.0


MM_LOCATION_ALTITUDE_UNKNOWN

#define MM_LOCATION_ALTITUDE_UNKNOWN  -G_MAXDOUBLE

Identifier for an unknown altitude value.

Since: 1.0