location,agps: explicitly specify that MSA A-GPS is implemented
The A-GPS based implementations we currently have assume MSA A-GPS, so rename the MMModemLocationSource enum value to reflect that.
This commit is contained in:
committed by
Aleksander Morgado
parent
619d2ce5ac
commit
b77aa7ab0e
@@ -140,7 +140,7 @@ build_location_dictionary (GVariant *previous,
|
||||
break;
|
||||
case MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED:
|
||||
g_assert_not_reached ();
|
||||
case MM_MODEM_LOCATION_SOURCE_AGPS:
|
||||
case MM_MODEM_LOCATION_SOURCE_AGPS_MSA:
|
||||
g_assert_not_reached ();
|
||||
default:
|
||||
g_warn_if_reached ();
|
||||
@@ -506,7 +506,7 @@ update_location_source_status (MMIfaceModemLocation *self,
|
||||
g_clear_object (&ctx->location_cdma_bs);
|
||||
break;
|
||||
case MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED:
|
||||
case MM_MODEM_LOCATION_SOURCE_AGPS:
|
||||
case MM_MODEM_LOCATION_SOURCE_AGPS_MSA:
|
||||
/* Nothing to setup in the context */
|
||||
default:
|
||||
break;
|
||||
@@ -622,7 +622,7 @@ setup_gathering_step (GTask *task)
|
||||
return;
|
||||
}
|
||||
|
||||
while (ctx->current <= MM_MODEM_LOCATION_SOURCE_AGPS) {
|
||||
while (ctx->current <= MM_MODEM_LOCATION_SOURCE_AGPS_MSA) {
|
||||
gchar *source_str;
|
||||
|
||||
if (ctx->to_enable & ctx->current) {
|
||||
@@ -721,7 +721,7 @@ setup_gathering (MMIfaceModemLocation *self,
|
||||
|
||||
/* Loop through all known bits in the bitmask to enable/disable specific location sources */
|
||||
for (source = MM_MODEM_LOCATION_SOURCE_3GPP_LAC_CI;
|
||||
source <= MM_MODEM_LOCATION_SOURCE_AGPS;
|
||||
source <= MM_MODEM_LOCATION_SOURCE_AGPS_MSA;
|
||||
source = source << 1) {
|
||||
/* skip unsupported sources */
|
||||
if (!(mm_gdbus_modem_location_get_capabilities (ctx->skeleton) & source))
|
||||
@@ -982,7 +982,7 @@ handle_set_supl_server_auth_ready (MMBaseModem *self,
|
||||
}
|
||||
|
||||
/* If A-GPS is NOT supported, set error */
|
||||
if (!(mm_gdbus_modem_location_get_capabilities (ctx->skeleton) & MM_MODEM_LOCATION_SOURCE_AGPS)) {
|
||||
if (!(mm_gdbus_modem_location_get_capabilities (ctx->skeleton) & MM_MODEM_LOCATION_SOURCE_AGPS_MSA)) {
|
||||
g_dbus_method_invocation_return_error (ctx->invocation,
|
||||
MM_CORE_ERROR,
|
||||
MM_CORE_ERROR_UNSUPPORTED,
|
||||
@@ -1496,7 +1496,7 @@ interface_enabling_step (GTask *task)
|
||||
default_sources &= ~(MM_MODEM_LOCATION_SOURCE_GPS_RAW |
|
||||
MM_MODEM_LOCATION_SOURCE_GPS_NMEA |
|
||||
MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED |
|
||||
MM_MODEM_LOCATION_SOURCE_AGPS);
|
||||
MM_MODEM_LOCATION_SOURCE_AGPS_MSA);
|
||||
|
||||
setup_gathering (self,
|
||||
default_sources,
|
||||
@@ -1723,7 +1723,7 @@ interface_initialization_step (GTask *task)
|
||||
|
||||
case INITIALIZATION_STEP_SUPL_SERVER:
|
||||
/* If the modem supports A-GPS, load SUPL server */
|
||||
if (ctx->capabilities & MM_MODEM_LOCATION_SOURCE_AGPS &&
|
||||
if (ctx->capabilities & MM_MODEM_LOCATION_SOURCE_AGPS_MSA &&
|
||||
MM_IFACE_MODEM_LOCATION_GET_INTERFACE (self)->load_supl_server &&
|
||||
MM_IFACE_MODEM_LOCATION_GET_INTERFACE (self)->load_supl_server_finish) {
|
||||
MM_IFACE_MODEM_LOCATION_GET_INTERFACE (self)->load_supl_server (
|
||||
@@ -1737,7 +1737,7 @@ interface_initialization_step (GTask *task)
|
||||
|
||||
case INITIALIZATION_STEP_SUPPORTED_ASSISTANCE_DATA:
|
||||
/* If the modem supports any GPS-related technology, check assistance data types supported */
|
||||
if ((ctx->capabilities & (MM_MODEM_LOCATION_SOURCE_AGPS |
|
||||
if ((ctx->capabilities & (MM_MODEM_LOCATION_SOURCE_AGPS_MSA |
|
||||
MM_MODEM_LOCATION_SOURCE_GPS_RAW |
|
||||
MM_MODEM_LOCATION_SOURCE_GPS_NMEA)) &&
|
||||
MM_IFACE_MODEM_LOCATION_GET_INTERFACE (self)->load_supported_assistance_data &&
|
||||
|
||||
+8
-8
@@ -4424,7 +4424,7 @@ set_gps_operation_mode_standalone_ready (MMSharedQmi *self,
|
||||
|
||||
priv = get_private (self);
|
||||
|
||||
priv->enabled_sources &= ~MM_MODEM_LOCATION_SOURCE_AGPS;
|
||||
priv->enabled_sources &= ~MM_MODEM_LOCATION_SOURCE_AGPS_MSA;
|
||||
|
||||
g_task_return_boolean (task, TRUE);
|
||||
g_object_unref (task);
|
||||
@@ -4451,7 +4451,7 @@ mm_shared_qmi_disable_location_gathering (MMIfaceModemLocation *_self,
|
||||
|
||||
if (!(source & (MM_MODEM_LOCATION_SOURCE_GPS_NMEA |
|
||||
MM_MODEM_LOCATION_SOURCE_GPS_RAW |
|
||||
MM_MODEM_LOCATION_SOURCE_AGPS))) {
|
||||
MM_MODEM_LOCATION_SOURCE_AGPS_MSA))) {
|
||||
g_task_return_boolean (task, TRUE);
|
||||
g_object_unref (task);
|
||||
return;
|
||||
@@ -4460,7 +4460,7 @@ mm_shared_qmi_disable_location_gathering (MMIfaceModemLocation *_self,
|
||||
g_assert (!(priv->pds_client && priv->loc_client));
|
||||
|
||||
/* Disable A-GPS? */
|
||||
if (source == MM_MODEM_LOCATION_SOURCE_AGPS) {
|
||||
if (source == MM_MODEM_LOCATION_SOURCE_AGPS_MSA) {
|
||||
set_gps_operation_mode (self,
|
||||
GPS_OPERATION_MODE_STANDALONE,
|
||||
(GAsyncReadyCallback)set_gps_operation_mode_standalone_ready,
|
||||
@@ -4536,7 +4536,7 @@ set_gps_operation_mode_assisted_ready (MMSharedQmi *self,
|
||||
|
||||
priv = get_private (self);
|
||||
|
||||
priv->enabled_sources |= MM_MODEM_LOCATION_SOURCE_AGPS;
|
||||
priv->enabled_sources |= MM_MODEM_LOCATION_SOURCE_AGPS_MSA;
|
||||
|
||||
g_task_return_boolean (task, TRUE);
|
||||
g_object_unref (task);
|
||||
@@ -4565,14 +4565,14 @@ parent_enable_location_gathering_ready (MMIfaceModemLocation *_self,
|
||||
/* We only consider GPS related sources in this shared QMI implementation */
|
||||
if (!(source & (MM_MODEM_LOCATION_SOURCE_GPS_NMEA |
|
||||
MM_MODEM_LOCATION_SOURCE_GPS_RAW |
|
||||
MM_MODEM_LOCATION_SOURCE_AGPS))) {
|
||||
MM_MODEM_LOCATION_SOURCE_AGPS_MSA))) {
|
||||
g_task_return_boolean (task, TRUE);
|
||||
g_object_unref (task);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Enabling A-GPS? */
|
||||
if (source == MM_MODEM_LOCATION_SOURCE_AGPS) {
|
||||
if (source == MM_MODEM_LOCATION_SOURCE_AGPS_MSA) {
|
||||
set_gps_operation_mode (self,
|
||||
GPS_OPERATION_MODE_ASSISTED,
|
||||
(GAsyncReadyCallback)set_gps_operation_mode_assisted_ready,
|
||||
@@ -4662,13 +4662,13 @@ parent_load_capabilities_ready (MMIfaceModemLocation *self,
|
||||
if (mm_shared_qmi_peek_client (MM_SHARED_QMI (self), QMI_SERVICE_PDS, MM_PORT_QMI_FLAG_DEFAULT, NULL))
|
||||
sources |= (MM_MODEM_LOCATION_SOURCE_GPS_NMEA |
|
||||
MM_MODEM_LOCATION_SOURCE_GPS_RAW |
|
||||
MM_MODEM_LOCATION_SOURCE_AGPS);
|
||||
MM_MODEM_LOCATION_SOURCE_AGPS_MSA);
|
||||
|
||||
/* If we have support for the LOC client, GPS location is supported */
|
||||
if (mm_shared_qmi_peek_client (MM_SHARED_QMI (self), QMI_SERVICE_LOC, MM_PORT_QMI_FLAG_DEFAULT, NULL))
|
||||
sources |= (MM_MODEM_LOCATION_SOURCE_GPS_NMEA |
|
||||
MM_MODEM_LOCATION_SOURCE_GPS_RAW |
|
||||
MM_MODEM_LOCATION_SOURCE_AGPS);
|
||||
MM_MODEM_LOCATION_SOURCE_AGPS_MSA);
|
||||
|
||||
/* So we're done, complete */
|
||||
g_task_return_int (task, sources);
|
||||
|
||||
Reference in New Issue
Block a user