We provide the result of the +COPS=? parsing in a GList of MM3gppNetworkInfo
structures. We avoid the previous hash table, or using a dictionary, as a
list of structs with a predefined set of elements, which should be easier for
plugins wanting to make their own version
Running a CS/PS registration check may not return any direct result (this is, no
MMModem3gppRegistrationStatus returned), as usually replies to +CREG? and
+CGREG? are parsed as unsolicited messages.
The 3GPP registration state will always be set from outside the 3GPP interface,
for example when parsing unsolicited registration messages, on when the
interface requests manual checking of registration state.
We'll also update the State property in the Modem interface when we switch to a
connected state, so we also set the Modem interface as a prerrequisite of the
3GPP interface.
Some states need to be set from outside the scope of the Modem interface, like
Registration-related ones (REGISTERED, SEARCHING, ...) or Connection-related
ones (CONNECTED, ...).
When the port is grabbed, we setup NULL callbacks for all unsolicited
registration message handlers. If we do enable 3GPP registrations
afterwards, we'll set proper callbacks.
Existing unsolicited message handlers can be overwritten at any time now. This
allows initializing the port with all possible message handlers configured with
a NULL callback, and then setup the proper handlers when we go on enabling the
different interfaces.
In addition to initializing the interface, to load initial values of all
properties and export the object in DBus, the interface can now also be enabled.
Enabling the 3GPP interface will take care of running the network registration
process.
When the first AT port is grabbed, modem initialization is launched, using that
specific port. This port is also passed to all interface initialization methods.
Interfaces won't have a 'status', just initialize(), enable(), disable() and
shutdown().
Also, shutdown() should never fail. We will take care of cancelling any ongoing
operation afterwards, before calling shutdown().
Elements in a DBus interface name cannot start with a digit, so
"org.freedesktop.ModemManager1.Modem.3gpp" is an invalid interface name.
Renamed here all relevant interfaces so that they have an additional "Modem"
prefix in the element, so we get now:
"org.freedesktop.ModemManager1.Modem.Modem3gpp"
"org.freedesktop.ModemManager1.Modem.Modem3gpp.Ussd"
"org.freedesktop.ModemManager1.Modem.ModemCdma"
Objects generated with gdbus-codegen maintain the previous names.