Add CDMA Activate and ActivateManual methods.
BUG=6885 TEST=built modemmanager and cromo Change-Id: Ib73a093b13da05948a2f1da8f051fe7c55682584 Review URL: http://codereview.chromium.org/3517013 (cherry picked from commit f447c8e1a0062500e1171e031cf4c8fef76ffd59) Conflicts: src/mm-modem-cdma.c
This commit is contained in:
@@ -3,6 +3,34 @@
|
||||
<node name="/" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
|
||||
<interface name="org.freedesktop.ModemManager.Modem.Cdma">
|
||||
|
||||
<method name="Activate">
|
||||
<tp:docstring>
|
||||
Activates the modem for use with a given carrier.
|
||||
</tp:docstring>
|
||||
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
|
||||
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_modem_cdma_activate"/>
|
||||
<arg name="carrier" type="s" direction="in">
|
||||
<tp:docstring>
|
||||
Name of carrier.
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
</method>
|
||||
|
||||
<method name="ActivateManual">
|
||||
<tp:docstring>
|
||||
Sets modem configuration data. Unlike regular Activate(),
|
||||
this does not contact the carrier. Some modems will reboot
|
||||
after this call is made.
|
||||
</tp:docstring>
|
||||
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
|
||||
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_modem_cdma_activate_manual"/>
|
||||
<arg name="properties" type="a{sv}" direction="in">
|
||||
<tp:docstring>
|
||||
A dictionary of properties to set on the modem. Keys include 'mdn', 'min'
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
</method>
|
||||
|
||||
<method name="GetSignalQuality">
|
||||
<tp:docstring>
|
||||
Get the current signal quality.
|
||||
|
@@ -26,6 +26,8 @@ static void impl_modem_cdma_get_signal_quality (MMModemCdma *modem, DBusGMethodI
|
||||
static void impl_modem_cdma_get_esn (MMModemCdma *modem, DBusGMethodInvocation *context);
|
||||
static void impl_modem_cdma_get_serving_system (MMModemCdma *modem, DBusGMethodInvocation *context);
|
||||
static void impl_modem_cdma_get_registration_state (MMModemCdma *modem, DBusGMethodInvocation *context);
|
||||
static void impl_modem_cdma_activate (MMModemCdma *modem, DBusGMethodInvocation *context);
|
||||
static void impl_modem_cdma_activate_manual (MMModemCdma *modem, DBusGMethodInvocation *context);
|
||||
|
||||
#include "mm-modem-cdma-glue.h"
|
||||
|
||||
@@ -251,6 +253,39 @@ mm_modem_cdma_emit_signal_quality_changed (MMModemCdma *self, guint32 quality)
|
||||
g_signal_emit (self, signals[SIGNAL_QUALITY], 0, quality);
|
||||
}
|
||||
|
||||
void mm_modem_cdma_activate(MMModemCdma *self, MMModemUIntFn callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
g_return_if_fail (MM_IS_MODEM_CDMA (self));
|
||||
g_return_if_fail (callback != NULL);
|
||||
|
||||
if (MM_MODEM_CDMA_GET_INTERFACE (self)->activate)
|
||||
MM_MODEM_CDMA_GET_INTERFACE (self)->activate(self, callback, user_data);
|
||||
else
|
||||
uint_op_not_supported (MM_MODEM (self), callback, user_data);
|
||||
}
|
||||
|
||||
static void impl_modem_cdma_activate(MMModemCdma *modem,
|
||||
DBusGMethodInvocation *context)
|
||||
{
|
||||
mm_modem_cdma_activate (modem, uint_call_done, context);
|
||||
}
|
||||
|
||||
|
||||
void mm_modem_cdma_activate_manual(MMModemCdma *self, MMModemUIntFn callback,
|
||||
gpointer user_data) {
|
||||
g_return_if_fail (MM_IS_MODEM_CDMA (self));
|
||||
g_return_if_fail (callback != NULL);
|
||||
if (MM_MODEM_CDMA_GET_INTERFACE (self)->activate_manual)
|
||||
MM_MODEM_CDMA_GET_INTERFACE (self)->activate_manual(self, callback, user_data);
|
||||
else
|
||||
uint_op_not_supported (MM_MODEM (self), callback, user_data);
|
||||
}
|
||||
static void impl_modem_cdma_activate_manual (MMModemCdma *modem,
|
||||
DBusGMethodInvocation *context) {
|
||||
mm_modem_cdma_activate_manual(modem, uint_call_done, context);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static void
|
||||
|
@@ -70,6 +70,18 @@ struct _MMModemCdma {
|
||||
MMModemCdmaRegistrationStateFn callback,
|
||||
gpointer user_data);
|
||||
|
||||
void (*activate) (MMModemCdma *self,
|
||||
MMModemUIntFn callback,
|
||||
gpointer user_data);
|
||||
|
||||
void (*activate_manual) (MMModemCdma *self,
|
||||
MMModemUIntFn callback,
|
||||
gpointer user_data);
|
||||
|
||||
void (*activate_manual_debug) (MMModemCdma *self,
|
||||
MMModemUIntFn callback,
|
||||
gpointer user_data);
|
||||
|
||||
/* Signals */
|
||||
void (*signal_quality) (MMModemCdma *self,
|
||||
guint32 quality);
|
||||
@@ -97,6 +109,12 @@ void mm_modem_cdma_get_registration_state (MMModemCdma *self,
|
||||
MMModemCdmaRegistrationStateFn callback,
|
||||
gpointer user_data);
|
||||
|
||||
void mm_modem_cdma_activate (MMModemCdma *self, MMModemUIntFn callback,
|
||||
gpointer user_data);
|
||||
|
||||
void mm_modem_cdma_activate_manual (MMModemCdma *self, MMModemUIntFn callback,
|
||||
gpointer user_data);
|
||||
|
||||
/* Protected */
|
||||
|
||||
void mm_modem_cdma_emit_signal_quality_changed (MMModemCdma *self, guint32 new_quality);
|
||||
|
Reference in New Issue
Block a user