aboutsummaryrefslogtreecommitdiff
path: root/src/mm-bearer-list.c
AgeCommit message (Collapse)Author
2023-05-03bearer-list: rename variables in the foreach contextsAleksander Morgado
So that the variable names in each context identify the action being performed, to easier reading.
2023-05-03bearer-list: new common method to disconnect one or all bearersAleksander Morgado
2022-06-09suspend: add suspend/resume support with powerd on ChromeOSRukun Mao
ModemManager handles suspend and resume signals sent from powerd Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/547
2021-12-26iface-modem-3gpp-profile-manager: support 'apn-type' as index fieldAleksander Morgado
The modem may report the 'apn-type' field is the one to be used as index; if that's the case, allow setting and deleting profiles based on the given 'apn-type' field. This change also makes the internal profile management operations use one index field or another, based on what the protocol implements.
2021-08-09bearer-list: if non-multiplexing not supported, 0 max non-multiplexed bearersAleksander Morgado
2021-08-09bearer-list: if multiplexing not supported, 0 max multiplexed bearersAleksander Morgado
Fixes warnings on AT+PPP based devices: ModemManager[602870]: <debug> [1626948725.168355] [modem0] allowed up to 1 active bearers (ModemManager:602870): GLib-GObject-WARNING **: 12:12:05.185: value "0" of type 'guint' is invalid or out of range for property 'max-active-multiplexed-bearers' of type 'guint'
2021-05-26iface-modem,bearer-list: sync all bearers one after the otherAleksander Morgado
Do not launch N checks for N bearers and ignore their result. Instead, go one by one, and report errors one by one.
2021-04-29bearer-list: allow lookup by connected profile idAleksander Morgado
Some of the operations performed by the profile management interface will require checking whether the operation is attempted on a profile for which there is a known connected bearer object. We introduce a new method to lookup a bearer in the bearer list by its connected profile id.
2021-03-10api,modem: new 'MaxActiveMultiplexedBearers' propertyAleksander Morgado
In addition to the amount of bearers a user may connect without multiplexing enabled (the default until now), we now also expose the maximum number of bearers a user may connect after enabling multiplexing over one single network interface (if supported). The method responsible for creating the MMBearerList is now also subclassable, so that implementations supporting multiplexing can provide their own version with their own thresholds.
2021-03-10api,modem: deprecate the 'MaxBearers' propertyAleksander Morgado
This property was never initialized with a correct value, we would always use the same value as used for MaxActiveBearers, which isn't technically right. Just suggest to ignore this property, and flag it as deprecated. In addition to deprecating the API property, we will internally no longer limit the amount of bearer objects that may be created with different connection settings. The bearer object exposed in DBus is a representation of the connection that may be setup, and so we can hold as many representations as we want as long as the amount of connected bearers doesn't exceed the maximum amount for each modem. Leaving around the disconnected modems also serves another purpose. Each bearer holds information about the amount of times a connection with it has been attempted, and the amount of data transferred through it. If we use the Simple.Connect() method to connect the modem using different bearer settings, we won't lose the information of the past connection attempts with different settings.
2020-12-21libmm-glib,bearer-properties: allow loose comparisonsAleksander Morgado
When comparing bearer properties provided by the user versus loaded from the modem, we shouldn't be very strict, e.g.: * Password or other fields may not be readable from the device. * Some fields may not apply at all (e.g. RM protocol for EPS bearers) * NULL strings could be assumed equal to empty strings. * If no explicit IP type specified, an IPv4 default may be assumed. * If no explicit allowed auth specified, 'none' default may be assumed. These loose comparisons are applied when managing the initial EPS bearer settings and status, and we keep the strict comparison only during the connection attempt lookup of a bearer with certain settings, as those bearer objects are all created in the same place with the same rules.
2020-04-08bearer-list: no logging in objectAleksander Morgado
2020-01-30bearer-list: fix warnings with -WshadowAleksander Morgado
mm-bearer-list.c: In function ‘mm_bearer_list_find_by_properties’: mm-bearer-list.c:151:56: error: declaration of ‘properties’ shadows a global declaration [-Werror=shadow] 151 | MMBearerProperties *properties) | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ mm-bearer-list.c:42:20: note: shadowed declaration is here 42 | static GParamSpec *properties[PROP_LAST]; | ^~~~~~~~~~
2017-06-23core: use g_list_copy_deep for deep copying a GListBen Chan
2017-04-06bearer-list: port mm_bearer_list_disconnect_all_bearers to use GTaskBen Chan
2017-03-29core: remove explicit GDestroyNotify cast on g_free / g_object_unrefBen Chan
g_free and g_object_unref are in form of `void (*)(gpointer)`, which matches the GDestroyNotify signature. An explicit GDestroyNotify cast on g_free and g_object_unref is thus not needed.
2015-12-03iface-modem: explicitly disconnect bearer before removing itAleksander Morgado
https://bugs.freedesktop.org/show_bug.cgi?id=90408
2015-12-03bearer-list: rename bearer find method to specify properties are comparedAleksander Morgado
2015-12-03bearer-list: no need for the method to remove all bearersAleksander Morgado
2014-07-06bearer: rename 'MMBearer' to 'MMBaseBearer'Aleksander Morgado
Just so that we don't have same header names in src/ and /libmm-glib.
2014-05-20core: minor coding style fixesBen Chan
2013-11-21introspection,api: new 'Bearers' property in the Modem interfaceAleksander Morgado
https://bugzilla.gnome.org/show_bug.cgi?id=712276
2012-10-04libmm-glib: remove the `libmm-common.h' headerAleksander Morgado
Both the ModemManager daemon and the mmcli will now include `libmm-glib.h' only. We also handle two new special `_LIBMM_INSIDE_MM' and `LIBMM_INSIDE_MMCLI' symbols, which if included before the `libmm-glib.h' library allow us to: * Don't include the libmm-glib high level API in the ModemManager daemon, as the object names would clash with those in the core. * Define some of the methods of helper objects to be included only if compiling ModemManager daemon or the mmcli.
2012-09-14libmm-common: added common utils from coreAleksander Morgado
Moved the utils to play with binary to hex strings into libmm-common.
2012-05-06bearer: simplify handling of the bearer configurationAleksander Morgado
The base MMBearer object will receive the MMBearerProperties configuration, which contains every generic and plugin-specific set up. Not every configuration parameter will be used by every implementation (e.g. not every bearer needs user/password). The Bearer object will expose every configuration parameter received in its `Properties' property in the interface, even if it's not really used.
2012-03-16libmm-common: `MMBearerProperties' won't be considered internal any moreAleksander Morgado
Renamed `MMCommonBearerProperties' to `MMBearerProperties', and removed the `MMBearerProperties' provided in libmm-glib. We'll just use the original one from libmm-common always.
2012-03-15bearer-list: avoid redefinition of MMBearerLisForeachFuncAleksander Morgado
2012-03-15bearer-list: new method to look for a bearer using its propertiesAleksander Morgado
2012-03-15bearer-list: new async method to disconnect all bearersAleksander Morgado
2012-03-15core: use g_list_free_full() when possibleAleksander Morgado
2012-03-15bearer-list: new method to remove all existing bearersAleksander Morgado
2012-03-15core,libmm-glib: include ony `libmm-common.h'Aleksander Morgado
Don't include one by one all the headers from libmm-common, just include the global `libmm-common.h' which includes all the others.
2012-03-15bearer-list: allow iterating over the bearers in the listAleksander Morgado
2012-03-15iface-modem: implement all bearer list operations in the interfaceAleksander Morgado
Bearer list operations, except for Bearer creation, are so generic that the interface itself can implement it for every object implementing the interface. This implementation is based on a new MMBearerList object.