Commit Graph
450 Commits
Author SHA1 Message Date
Aleksander Morgado d2b620c5fa libmm-glib,modem: fix warning when loading SIM slots
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/465
2021-11-22 13:04:52 +00:00
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
Som_SP 511859ef0a api,bearer: add 'uplink-speed' and 'downlink-speed' stats
These values show the rates that have been negotiated with the network
during the PS domain attach.

These are not the current ongoing data rates associated to the network
usage at some given moment.

Includes updates by Aleksander Morgado to fix coding style issues and
add missing documentation items.
2021-11-03 12:41:51 +01:00
Aleksander Morgado 3ab765f11c api,3gpp: new 'SetPacketServiceState()' method 2021-11-02 09:50:17 +00:00
Aleksander Morgado f55ea211a9 api,3gpp: new 'PacketServiceState' property
This property allows the user to know whether the device is attached
or detached from the packet domain service.
2021-11-02 09:50:17 +00:00
Michal Mazur c487ca1b36 libmm-glib: add documentation for disable_facility_lock 2021-10-22 16:23:40 +02:00
Frederic Martinsons 9d82d30978 cli, plugins: factorize usage of iso8601 datetime format
Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>

Includes updates by Aleksander Morgado to fix coding style issues.
2021-10-22 13:48:20 +02:00
Frederic Martinsons 0510e9aef8 api,bearer: new 'start-date' field in bearer statistics
It stores the epoch timestamp of the current bearer session start.
If there is no connected bearer, it is set to 0 and not displayed
in mmcli output.

Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>

Includes updates by Aleksander Morgado to fix coding style issues.
2021-10-22 13:48:13 +02:00
Aleksander Morgado e8c4b88493 libmm-glib: new 'MMSignalThresholdProperties' helper object
To avoid needing to work with GVariants directly.
2021-10-20 22:14:57 +02:00
Som_SP 925f0bae11 libmm-glib,mmcli: add support for the new signal 'SetupThresholds()' API
Includes updates by Aleksander Morgado to fix mostly coding style issues.
2021-10-20 22:09:18 +02:00
Som_SP 9537261651 libmm-glib,mmcli: add support for 'error-rate' measurements in signal info
Includes updates by Aleksander Morgado to fix mostly coding style issues.
2021-10-20 22:07:24 +02:00
Andrew Lassalle c355210f5d bearer-properties: Add profile-name to the bearer properties 2021-10-17 17:56:44 +02:00
Andrew Lassalle 8ecf7fc83e 3gpp-profile: Add profile name
QMI modems also report a profile name, and that value can be used to
select and update a specific profile.
2021-10-17 17:56:44 +02:00
Iñigo Martínez b3b16b3dc2 build,meson: Make use of partial_dependency for generated dependency
The generated objects in `libmm-glib` are include in
`libmm_glib_dep` one by one to avoid the link to the generated
library that is included as a whole in `libmm-glib`.

meson includes a way to include partial objects of a dependency by
using the `partial_dependency` method, so by taking advantage of it
almost all objects are included.
2021-10-14 07:57:55 +00:00
Aleksander Morgado 1f321bd79d build,meson: add SAR interface support in libmm-glib 2021-10-13 13:14:10 +02:00
lvmaorui 8e67d2375c docs,libmm-glib: add SAR user-level api 2021-10-13 13:14:10 +02:00
Aleksander Morgado a07a43366a Revert "api: remove Modem.Sar interface"
This reverts commit 686e37ff84.
2021-09-10 09:53:57 +00:00
Aleksander Morgado 97d15c49a3 build,meson: add missing Call object support in introspection 2021-09-07 10:55:43 +00:00
Aleksander Morgado b72069395b build,autotools: add missing Call object support in introspection 2021-09-07 10:55:43 +00: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 f8bf6673db libmm-glib,3gpp-profile: fix profile comparison logic
Conveniently warned by the compiler...

  ../libmm-glib/mm-3gpp-profile.c: In function ‘mm_3gpp_profile_cmp’:
  ../libmm-glib/mm-3gpp-profile.c:98:1: warning: control reaches end of non-void function [-Wreturn-type]
     98 | }
        | ^
2021-09-07 10:55:43 +00:00
Aleksander Morgado 12ada44156 libmm-glib,simple-status: avoid shadowing 'properties' variable
../libmm-glib/mm-simple-status.c: In function ‘mm_simple_status_new_from_dictionary’:
  ../libmm-glib/mm-simple-status.c:426:21: warning: declaration of ‘properties’ shadows a global declaration [-Wshadow]
    426 |     MMSimpleStatus *properties;
        |                     ^~~~~~~~~~
  ../libmm-glib/mm-simple-status.c:55:20: note: shadowed declaration is here
     55 | static GParamSpec *properties[PROP_LAST];
        |                    ^~~~~~~~~~
2021-09-07 10:55:43 +00:00
Aleksander Morgado 93a0476b4d libmm-glib,manager: fix warning with -Wdiscarded-qualifiers
In file included from /usr/include/glib-2.0/glib.h:50,
                   from ../libmm-glib/mm-common-helpers.h:18,
                   from ../libmm-glib/mm-manager.c:27:
  /usr/include/glib-2.0/glib/ghash.h:68:61: note: expected ‘gpointer’ {aka ‘void *’} but argument is of type ‘const char *’
     68 |                                             gpointer        key,
        |                                             ~~~~~~~~~~~~~~~~^~~
  ../libmm-glib/mm-manager.c:81:43: warning: passing argument 2 of ‘g_hash_table_insert’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
     81 |         g_hash_table_insert (lookup_hash, "org.freedesktop.ModemManager1.Modem.Simple",                   GSIZE_TO_POINTER (MM_TYPE_MODEM_SIMPLE));
        |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  In file included from /usr/include/glib-2.0/glib.h:50,
                   from ../libmm-glib/mm-common-helpers.h:18,
                   from ../libmm-glib/mm-manager.c:27:
2021-09-07 10:55:43 +00:00
Iñigo Martínez 77d1c24361 build: Port to meson
meson is a build system focused on speed an ease of use, which
helps speeding up the software development. This patch adds meson
support along autotools.
2021-09-07 10:55:43 +00:00
Teemu Ikonen d6dafe5cb4 location-gps-nmea: Fix handling of multi-sentence NMEA messages
Fixes the regexp in check_append_or_replace() to accept

 1. more multi-sentence NMEA messages (ALM, GSV, RTE, SFI)
 2. multi-sentence NMEA messages from all talkers, not just GPS
    (i.e. GPGSV, GLGSV, GAGSV etc.)
2021-08-30 06:49:59 +00:00
Aleksander Morgado 686e37ff84 api: remove Modem.Sar interface
There is no real implementation for it yet, so let's recover these
changes once 1.18 has been released.
2021-08-09 23:03:23 +02:00
Iñigo Martínez 7c4db66eb3 build: Rename template files
The template files in the `build-aux` directory used in enums sources
and headers generation use the `{$name}-template.[ch]` pattern.
However, the examples in the official guide[0] and usually GNOME and
Freedesktop packages use the `{$name}.[ch].template` pattern.

Due to this, the name of the template files and build commands have
been changed.

[0] https://developer.gnome.org/gobject/stable/glib-mkenums.html
2021-07-30 10:14:52 +00:00
Benoît Monin dc66ee2aaa libmm-glib,common-helpers: fix build with glib 2.56
The support of autoptr for GEnumClass and GFlagsClass was introduced in
glib 2.58. To keep compatibility with glib 2.56, declare the autoptr
cleanup functions.

Fixes #397
2021-07-09 10:07:52 +00:00
Aleksander Morgado 132fc268b8 libmm-glib,call: use helper macros to manage the monitored properties 2021-07-01 23:38:04 +02:00
Aleksander Morgado 19b3a55230 libmm-glib,bearer: use helper macros to manage the monitored properties 2021-07-01 23:38:04 +02:00
Aleksander Morgado 5012c1a3f3 libmm-glib,modem-signal: use helper macros to manage the monitored properties 2021-07-01 23:38:04 +02:00
Aleksander Morgado b8e939ceac libmm-glib,modem-location: use helper macros to manage the monitored properties 2021-07-01 23:38:04 +02:00
Aleksander Morgado 6372d97e87 libmm-glib,modem-firmware: use helper macros to manage the monitored properties 2021-07-01 23:38:04 +02:00
Aleksander Morgado 1ecbc5e025 libmm-glib,modem-time: use helper macros to manage the monitored properties 2021-07-01 23:38:04 +02:00
Aleksander Morgado f72a6377f3 libmm-glib,modem-oma: use helper macros to manage the monitored properties 2021-07-01 23:38:04 +02:00
Aleksander Morgado 434d7be3f2 libmm-glib,modem-messaging: use helper macros to manage the monitored properties 2021-07-01 23:38:04 +02:00
Aleksander Morgado ccefbbc0c6 libmm-glib,modem-3gpp: use helper macros to manage the monitored properties 2021-07-01 23:38:04 +02:00
Aleksander Morgado d7acc276e5 libmm-glib,modem: use helper macros to manage the monitored properties 2021-07-01 23:38:04 +02:00
Aleksander Morgado 22396a7d1d libmm-glib,helpers: new helper macros to define common property management 2021-07-01 23:38:04 +02:00
Aleksander Morgado afc7e5f902 libmm-glib: use single mutex in each type to sync access
There is truly no need for a per-property mutex, using a global one
for the whole object is equally fine.
2021-07-01 15:18:44 +02:00
Aleksander Morgado 30c9fc65da libmm-glib,common-helpers: refactor helper methods
Remove unused methods, like all the variant_to_array() ones, and
reorder some others so that both header and source file have the same
order always.
2021-07-01 15:18:44 +02:00
Aleksander Morgado f226b63301 libmm-glib,location: new signaled location API support
We allow clients to receive asynchronous updates of location
information, e.g. if "location signaling" is explicitly enabled (with
the setup() method).

But if so, we should also allow clients to easily process those
asynchronous updates in the libmm-glib library, instead of requiring
them to run explicit DBus queries to refresh the location information.

These new signaled location APIs allow clients to do so; they can
enable location signaling, and then just wait for the updates to
arrive.
2021-07-01 01:10:39 +02:00
Aleksander Morgado 4e4cb6d66a libmm-glib,location: build_locations() doesn't own the dictionary
Rework the build_locations() method so that it doesn't take ownership
of the input dictionary. This allows us reusing this method with
dictionaries for which ownership cannot be transferred.
2021-06-30 23:02:33 +02:00
Aleksander Morgado 12613eac87 libmm-glib,modem: move deprecated methods to compat source 2021-06-25 19:01:06 +02:00
Aleksander Morgado 4bf7657086 libmm-glib,location-3gpp: move deprecated methods to compat source 2021-06-25 19:01:06 +02:00
Aleksander Morgado 219700ba6d libmm-glib,simple-status: move deprecated methods to compat source 2021-06-25 19:01:06 +02:00
Aleksander Morgado a09b13de86 libmm-glib,pco: move deprecated methods to compat source 2021-06-25 19:01:06 +02:00
Aleksander Morgado 27a192c1ef libmm-glib,modem-3gpp: move deprecated methods to compat source 2021-06-25 19:01:06 +02:00
Aleksander Morgado 6363add86a libmm-glib,location-gps-nmea: move deprecated methods to compat source 2021-06-25 19:01:06 +02:00
Aleksander Morgado b38586a12c libmm-glib,simple-connect-properties: move deprecated methods to compat source 2021-06-25 19:01:06 +02:00