api,modem: new 'SetPrimarySimSlot' method

This new method allows changing the SIM slot considered as primary,
when the modem supports multiple SIM slots.

The generic handling of this method will make sure that the modem
object and all its SIM objects are re-probed from scratch as soon as a
successful SIM slot switch happens.

Implementations may report MM_CORE_ERROR_EXISTS when the switch
doesn't need to happen (e.g. if the requested SIM slot is already the
active one).
This commit is contained in:
Aleksander Morgado
2020-08-01 09:59:37 +02:00
parent 5041b9c99b
commit 924cf1af3c
8 changed files with 303 additions and 0 deletions

View File

@@ -182,6 +182,24 @@
<arg name="bands" type="au" direction="in" />
</method>
<!--
SetPrimarySimSlot:
@sim_slot: SIM slot number to set as primary.
Selects which SIM slot to be considered as primary, on devices that expose
multiple slots in the #org.freedesktop.ModemManager1.Modem:SimSlots property.
When the switch happens the modem may require a full device reprobe, so the modem
object in DBus will get removed, and recreated once the selected SIM slot is in
use.
There is no limitation on which SIM slot to select, so the user may also set as
primary a slot that doesn't currently have any valid SIM card inserted.
-->
<method name="SetPrimarySimSlot">
<arg name="sim_slot" type="u" direction="in" />
</method>
<!--
Command:
@cmd: The command string, e.g. "AT+GCAP" or "+GCAP" (leading AT is inserted if necessary).