gsm: allow setting more than one band

This commit is contained in:
Aleksander Morgado
2011-04-29 12:31:07 +02:00
parent 573dcd51c0
commit 466b6edbf7
2 changed files with 6 additions and 16 deletions
@@ -87,26 +87,26 @@
<method name="SetBand"> <method name="SetBand">
<tp:docstring> <tp:docstring>
Sets the band the device is allowed to use when connecting to a mobile network. Sets the bands the device is allowed to use when connecting to a mobile network.
</tp:docstring> </tp:docstring>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/> <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_gsm_modem_set_band"/> <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_gsm_modem_set_band"/>
<arg name="band" type="u" direction="in" tp:type="MM_MODEM_GSM_BAND"> <arg name="band" type="u" direction="in" tp:type="MM_MODEM_GSM_BAND">
<tp:docstring> <tp:docstring>
The desired band. Only one band may be specified, and may not be UNKNOWN. The desired bands, as a set of flags.
</tp:docstring> </tp:docstring>
</arg> </arg>
</method> </method>
<method name="GetBand"> <method name="GetBand">
<tp:docstring> <tp:docstring>
Returns the current band the device is using. (Note for plugin writers: returned value must not be ANY) Returns the current bands the device is using. (Note for plugin writers: returned value must not be ANY)
</tp:docstring> </tp:docstring>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/> <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_gsm_modem_get_band"/> <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_gsm_modem_get_band"/>
<arg name="band" type="u" direction="out" tp:type="MM_MODEM_GSM_BAND"> <arg name="band" type="u" direction="out" tp:type="MM_MODEM_GSM_BAND">
<tp:docstring> <tp:docstring>
The current band. The current bands, as a set of flags.
</tp:docstring> </tp:docstring>
</arg> </arg>
</method> </method>
-10
View File
@@ -496,16 +496,6 @@ impl_gsm_modem_set_band (MMModemGsmNetwork *modem,
MMModemGsmBand band, MMModemGsmBand band,
DBusGMethodInvocation *context) DBusGMethodInvocation *context)
{ {
if (!check_for_single_value (band)) {
GError *error;
error = g_error_new_literal (MM_MODEM_ERROR, MM_MODEM_ERROR_OPERATION_NOT_SUPPORTED,
"Invalid arguments (more than one value given)");
dbus_g_method_return_error (context, error);
g_error_free (error);
return;
}
mm_modem_gsm_network_set_band (modem, band, async_call_done, context); mm_modem_gsm_network_set_band (modem, band, async_call_done, context);
} }