Commit Graph

3 Commits

Author SHA1 Message Date
Yegor Yefremov
16d1cf3318 examples: rework imports
Remove unused imports and fix import sorting using isort utility.
2021-02-13 11:09:59 +01:00
Aleksander Morgado
fcbffbd123 libmm-glib,3gpp: make MMModem3gppNetwork a boxed type
So that bindings know how to free the list of structs.

This commit ends up triggering an API break in the bindings generated
via GObject introspection, because the methods to access the items of
a MMModem3gppNetwork are no longer treated as Modem3gpp class methods.

E.g. instead of:
  ModemManager.Modem3gpp.network_get_operator_code(network)
We should now do:
  network.get_operator_code()

There is no API break in libmm-glib.
2019-12-13 18:04:02 +01:00
Aleksander Morgado
248cd55f0e examples: new network-scan-python example
This is currently not working completely ok because python doesn't
know how to free the GList of MMModem3gppNetwork elements.

  /org/freedesktop/ModemManager1/Modem/1: starting network scan...
  21403: Orange - Orange (unknown, forbidden)
  21401: vodafone ES - vodafone ES (unknown, forbidden)
  21403: Orange - Orange (unknown, forbidden)
  21403: Orange - Orange (unknown, forbidden)
  21401: vodafone ES - vodafone ES (unknown, forbidden)
  21404: Yoigo - Yoigo (unknown, forbidden)
  21401: vodafone ES - vodafone ES (unknown, forbidden)
  21404: Yoigo - Yoigo (unknown, forbidden)
  21407: Movistar - Movistar (unknown, available)
  21407: Movistar - Movistar (unknown, available)
  21407: Movistar - Movistar (unknown, current)
  free(): invalid pointer
  Aborted
2019-12-13 17:36:06 +01:00