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.
The Modem interface can be disabled, going from enabled back to initialized. The
disabling process will include closing the ports opened during the enabling.
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 Modem interface will take care of running the modem enabling
process (flashing port, power up and such).
With AT+GCAP we load the currently available capabilities, and we store them
in a new "iface-modem-capabilities" property in the MMIfaceModem interface. This
property is bound to the "current-capabilities" property in the MmGdbusModem
skeleton object, so no need to update both when it changes.
ModemCapabilities depend directly on whether the modem can load firmware without
reflashing the device. Currently, just set it equal to CurrentCapabilities.
The original command line interface was written based on a hand-made libmm. This
commit ports the Manager interface handling to the new gdbus-codegen-based
libmm-glib.