api: new SetAllowedModes() to be able to modify the allowed mode in the modem

Changing the allowed mode of a modem may fail, for example if trying to set a
mode which is not in the modes reported as Supported by the modem. Therefore, we
need an explicit SetAllowedModes() method with proper error reporting instead of
making the property writable.
This commit is contained in:
Aleksander Morgado
2011-10-01 15:23:08 +02:00
parent dbc64d83ba
commit b5393091de
+18 -4
View File
@@ -104,6 +104,20 @@
</arg>
</method>
<method name="SetAllowedModes">
<tp:docstring>
Set the access technologies (eg 2G/3G/4G preference) the device is
currently allowed to use when connecting to a network.
</tp:docstring>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_modem_set_allowed_mode"/>
<arg name="mode" type="u" tp:type="MM_MODEM_ALLOWED_MODE">
<tp:docstring>
Bitmask of all the modes allowed in the modem.
</tp:docstring>
</arg>
</method>
<!-- SIGNALS -->
<signal name="StateChanged">
@@ -260,11 +274,11 @@
</tp:docstring>
</property>
<property name="AllowedMode" type="u" access="readwrite" tp:type="MM_MODEM_ALLOWED_MODE">
<property name="AllowedModes" type="u" access="read" tp:type="MM_MODEM_ALLOWED_MODE">
<tp:docstring>
The allowed access technologies (eg 2G/3G/4G preference) the device is
currently allowed to use when connecting to a network. For POTS
devices, only the "any" mode is supported.
The access technologies (eg 2G/3G/4G preference) the device is currently
allowed to use when connecting to a network. For POTS devices, only the
"any" mode is supported.
</tp:docstring>
</property>