Commit Graph

12 Commits

Author SHA1 Message Date
Aleksander Morgado
21c775703c libmm-glib: fix license in sources
The libmm-glib library is LGPLv2+, not GPLv2+.
2021-11-16 17:54:26 +01:00
Aleksander Morgado
ba5ad78ed9 libmm-glib,location-3gpp: remove unused variable
../libmm-glib/mm-location-3gpp.c: In function ‘mm_location_3gpp_new_from_string_variant’:
  ../libmm-glib/mm-location-3gpp.c:400:16: warning: unused variable ‘operator_code’ [-Wunused-variable]
    400 |         gchar *operator_code;
        |                ^~~~~~~~~~~~~
2021-09-07 10:55:43 +00:00
Aleksander Morgado
4bf7657086 libmm-glib,location-3gpp: move deprecated methods to compat source 2021-06-25 19:01:06 +02:00
Aleksander Morgado
0ea6e01c9b libmm-glib,location-3gpp: fix string overflow
mm-location-3gpp.c: In function ‘mm_location_3gpp_get_mobile_country_code’:
  mm-location-3gpp.c:139:12: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
    139 |     mcc[4] = '\0';
        |     ~~~~~~~^~~~~~
  mm-location-3gpp.c:132:11: note: at offset 4 to object ‘mcc’ with size 4 declared here
    132 |     gchar mcc[4];
        |           ^~~
2021-05-17 14:29:35 +02:00
Teijo Kinnunen
879ec1a5d4 libmm-glib,iface-modem-location: add MMLocation3gpp 3 digit MNC support
MMLocation3gpp provides MCC/MNC information as integers, so it can not
make distinction between operator codes such as XXX01 and XXX001.

This commit deprecates mm_location_3gpp_get_mobile_network_code() and
implements a new function mm_location_3gpp_get_operator_code() which
provides the MCC+MNC in string format.

The mm_location_3gpp_get_mobile_country_code() is still available as
returning the MCC as an integer does not have ambiguity issues.
2021-05-17 12:46:52 +03:00
Aleksander Morgado
a61caff747 iface-modem-location: plug memleaks when updating gps raw variant
The helper method returning a variant from a MMLocationGpsRaw would
return already a full variant reference instead of a floating one, so
we were really increasing the refcount when doing g_variant_ref_sink()
in the location interface.

Fix this by consolidating all helper methods in libmm-glib that return
variants from the different MMLocationXX objects, so that they all
return full variants instead of floating ones.
2020-02-07 14:42:16 +00:00
Aleksander Morgado
5dd829174f libmm-glib: flag as (skip) all non-API methods
So that the GI scanner ignores them.
2019-10-28 10:28:31 +01:00
Aleksander Morgado
08d23dd64d docs,libmm-glib: provide per-version indices 2019-10-28 10:28:31 +01:00
Aleksander Morgado
0ca95254ae libmm-glib,location-3gpp: don't ignore location updates when MNC is 0
E.g. China Mobile (MCC 460, MNC 0).

    $ mmcli -m toby --location-get

    /org/freedesktop/ModemManager1/Modem/0
      -------------------------
      3GPP location   | Mobile country code: '460'
                      | Mobile network code: '0'
                      |  Location area code: '6188'
                      |             Cell ID: '40955'
      -------------------------
      GPS NMEA traces | Not available
      -------------------------
      Raw GPS         | Not available
      -------------------------
      CDMA BS         | Not available
2018-09-25 19:21:00 +02:00
Aleksander Morgado
7e6b4d7aa9 api,location: give Tracking Area Code field in 3GPP location info
The "location area code" field is given in GSM/UMTS networks
exclusively. LTE networks use the concept of "tracking area code"
instead.

This patch updates the Location interface to Provide separate fields
for LAC and TAC, instead of giving TAC values in the LAC field.
2018-08-08 21:46:28 +02:00
Aleksander Morgado
7edc3508c7 libmm-glib,location-3gpp: improve documentation 2012-10-04 10:17:12 +02:00
Aleksander Morgado
b6d628b3a1 build: merge libmm-common into libmm-glib
It's pointless to have libmm-common around, just merge it into libmm-glib and
make ModemManager depend on libmm-glib directly. At the end, the non-common
stuff in libmm-glib is really minimal.
2012-10-04 10:17:05 +02:00