introspection,api: add SUPL server configuration in the Location interface

This commit is contained in:
Aleksander Morgado
2014-02-06 11:10:53 +01:00
parent 02961c388b
commit fbeee20d5b
4 changed files with 41 additions and 3 deletions

View File

@@ -1895,6 +1895,8 @@ mm_gdbus_modem_location_get_capabilities
mm_gdbus_modem_location_get_signals_location mm_gdbus_modem_location_get_signals_location
mm_gdbus_modem_location_get_location mm_gdbus_modem_location_get_location
mm_gdbus_modem_location_dup_location mm_gdbus_modem_location_dup_location
mm_gdbus_modem_location_dup_supl_server
mm_gdbus_modem_location_get_supl_server
<SUBSECTION Methods> <SUBSECTION Methods>
mm_gdbus_modem_location_call_get_location mm_gdbus_modem_location_call_get_location
mm_gdbus_modem_location_call_get_location_finish mm_gdbus_modem_location_call_get_location_finish
@@ -1902,13 +1904,18 @@ mm_gdbus_modem_location_call_get_location_sync
mm_gdbus_modem_location_call_setup mm_gdbus_modem_location_call_setup
mm_gdbus_modem_location_call_setup_finish mm_gdbus_modem_location_call_setup_finish
mm_gdbus_modem_location_call_setup_sync mm_gdbus_modem_location_call_setup_sync
mm_gdbus_modem_location_call_set_supl_server
mm_gdbus_modem_location_call_set_supl_server_finish
mm_gdbus_modem_location_call_set_supl_server_sync
<SUBSECTION Private> <SUBSECTION Private>
mm_gdbus_modem_location_set_capabilities mm_gdbus_modem_location_set_capabilities
mm_gdbus_modem_location_set_enabled mm_gdbus_modem_location_set_enabled
mm_gdbus_modem_location_set_location mm_gdbus_modem_location_set_location
mm_gdbus_modem_location_set_signals_location mm_gdbus_modem_location_set_signals_location
mm_gdbus_modem_location_set_supl_server
mm_gdbus_modem_location_complete_get_location mm_gdbus_modem_location_complete_get_location
mm_gdbus_modem_location_complete_setup mm_gdbus_modem_location_complete_setup
mm_gdbus_modem_location_complete_set_supl_server
mm_gdbus_modem_location_interface_info mm_gdbus_modem_location_interface_info
mm_gdbus_modem_location_override_properties mm_gdbus_modem_location_override_properties
<SUBSECTION Standard> <SUBSECTION Standard>

View File

@@ -819,6 +819,7 @@ typedef enum { /*< underscore_name=mm_sms_cdma_service_category >*/
* @MM_MODEM_LOCATION_SOURCE_GPS_NMEA: GPS location given as NMEA traces. * @MM_MODEM_LOCATION_SOURCE_GPS_NMEA: GPS location given as NMEA traces.
* @MM_MODEM_LOCATION_SOURCE_CDMA_BS: CDMA base station position. * @MM_MODEM_LOCATION_SOURCE_CDMA_BS: CDMA base station position.
* @MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED: No location given, just GPS module setup. * @MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED: No location given, just GPS module setup.
* @MM_MODEM_LOCATION_SOURCE_AGPS: A-GPS location requested.
* *
* Sources of location information supported by the modem. * Sources of location information supported by the modem.
*/ */
@@ -829,6 +830,7 @@ typedef enum { /*< underscore_name=mm_modem_location_source >*/
MM_MODEM_LOCATION_SOURCE_GPS_NMEA = 1 << 2, MM_MODEM_LOCATION_SOURCE_GPS_NMEA = 1 << 2,
MM_MODEM_LOCATION_SOURCE_CDMA_BS = 1 << 3, MM_MODEM_LOCATION_SOURCE_CDMA_BS = 1 << 3,
MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED = 1 << 4, MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED = 1 << 4,
MM_MODEM_LOCATION_SOURCE_AGPS = 1 << 5,
} MMModemLocationSource; } MMModemLocationSource;
/** /**

View File

@@ -40,6 +40,14 @@
<link linkend="gdbus-method-org-freedesktop-ModemManager1-Modem-Location.GetLocation">GetLocation()</link> <link linkend="gdbus-method-org-freedesktop-ModemManager1-Modem-Location.GetLocation">GetLocation()</link>
) to get ) to get
location information. location information.
The optional
<link linkend="MM-MODEM-LOCATION-SOURCE-AGPS:CAPS">MM_MODEM_LOCATION_SOURCE_AGPS</link>
allows to request A-GPS operation, and it must be given along with either
<link linkend="MM-MODEM-LOCATION-SOURCE-GPS-RAW:CAPS">MM_MODEM_LOCATION_SOURCE_GPS_RAW</link>
or
<link linkend="MM-MODEM-LOCATION-SOURCE-GPS-NMEA:CAPS">MM_MODEM_LOCATION_SOURCE_GPS_NMEA</link>.
--> -->
<method name="Setup"> <method name="Setup">
<arg name="sources" type="u" direction="in" /> <arg name="sources" type="u" direction="in" />
@@ -61,6 +69,16 @@
<arg name="Location" type="a{uv}" direction="out" /> <arg name="Location" type="a{uv}" direction="out" />
</method> </method>
<!--
SetSuplServer:
@supl: SUPL server configuration, given either as IP:PORT or with a full URL.
Configure the SUPL server for A-GPS.
-->
<method name="SetSuplServer">
<arg name="supl" type="s" direction="in" />
</method>
<!-- <!--
Capabilities: Capabilities:
@@ -265,5 +283,12 @@
--> -->
<property name="Location" type="a{uv}" access="read" /> <property name="Location" type="a{uv}" access="read" />
<!--
SuplServer:
SUPL server configuration for A-GPS, given either as IP:PORT or with a full URL.
-->
<property name="SuplServer" type="s" access="read" />
</interface> </interface>
</node> </node>

View File

@@ -139,6 +139,8 @@ build_location_dictionary (GVariant *previous,
break; break;
case MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED: case MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED:
g_assert_not_reached (); g_assert_not_reached ();
case MM_MODEM_LOCATION_SOURCE_AGPS:
g_assert_not_reached ();
default: default:
g_warn_if_reached (); g_warn_if_reached ();
break; break;
@@ -508,6 +510,7 @@ update_location_source_status (MMIfaceModemLocation *self,
g_clear_object (&ctx->location_cdma_bs); g_clear_object (&ctx->location_cdma_bs);
break; break;
case MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED: case MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED:
case MM_MODEM_LOCATION_SOURCE_AGPS:
/* Nothing to setup in the context */ /* Nothing to setup in the context */
default: default:
break; break;
@@ -616,7 +619,7 @@ setup_gathering_step (SetupGatheringContext *ctx)
return; return;
} }
while (ctx->current <= MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED) { while (ctx->current <= MM_MODEM_LOCATION_SOURCE_AGPS) {
gchar *source_str; gchar *source_str;
if (ctx->to_enable & ctx->current) { if (ctx->to_enable & ctx->current) {
@@ -713,7 +716,7 @@ setup_gathering (MMIfaceModemLocation *self,
/* Loop through all known bits in the bitmask to enable/disable specific location sources */ /* Loop through all known bits in the bitmask to enable/disable specific location sources */
for (source = MM_MODEM_LOCATION_SOURCE_3GPP_LAC_CI; for (source = MM_MODEM_LOCATION_SOURCE_3GPP_LAC_CI;
source <= MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED; source <= MM_MODEM_LOCATION_SOURCE_AGPS;
source = source << 1) { source = source << 1) {
/* skip unsupported sources */ /* skip unsupported sources */
if (!(mm_gdbus_modem_location_get_capabilities (ctx->skeleton) & source)) if (!(mm_gdbus_modem_location_get_capabilities (ctx->skeleton) & source))
@@ -1184,7 +1187,8 @@ interface_enabling_step (EnablingContext *ctx)
default_sources = mm_gdbus_modem_location_get_capabilities (ctx->skeleton); default_sources = mm_gdbus_modem_location_get_capabilities (ctx->skeleton);
default_sources &= ~(MM_MODEM_LOCATION_SOURCE_GPS_RAW | default_sources &= ~(MM_MODEM_LOCATION_SOURCE_GPS_RAW |
MM_MODEM_LOCATION_SOURCE_GPS_NMEA | MM_MODEM_LOCATION_SOURCE_GPS_NMEA |
MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED); MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED |
MM_MODEM_LOCATION_SOURCE_AGPS);
setup_gathering (ctx->self, setup_gathering (ctx->self,
default_sources, default_sources,