diff options
author | Marius B. Kotsbak <marius@kotsbak.com> | 2012-08-08 22:49:33 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-08-09 07:51:09 +0200 |
commit | 850d78b938e895e3a1628f8ce45a67c7d5cfd2ca (patch) | |
tree | 981b079a74201d6761e9c1f71f9bb8c60aa2625b | |
parent | f04cef182879ca944a543304bf779c1b908072ff (diff) |
mbm: use +CFUN=4 for powering down
(bgo #665877) (lp:816400)
-rw-r--r-- | plugins/mm-modem-mbm.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/plugins/mm-modem-mbm.c b/plugins/mm-modem-mbm.c index ab39ff60..8b7bc9f4 100644 --- a/plugins/mm-modem-mbm.c +++ b/plugins/mm-modem-mbm.c @@ -1070,6 +1070,31 @@ finalize (GObject *object) } static void +set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + /* Do nothing... see set_property() in parent, which also does nothing */ +} + +static void +get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + switch (prop_id) { + case MM_GENERIC_GSM_PROP_POWER_DOWN_CMD: + /* Use AT+CFUN=4 for power down. */ + g_value_set_string (value, "+CFUN=4"); + break; + default: + break; + } +} + +static void mm_modem_mbm_class_init (MMModemMbmClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); @@ -1080,6 +1105,12 @@ mm_modem_mbm_class_init (MMModemMbmClass *klass) /* Virtual methods */ object_class->finalize = finalize; + object_class->get_property = get_property; + object_class->set_property = set_property; + + g_object_class_override_property (object_class, + MM_GENERIC_GSM_PROP_POWER_DOWN_CMD, + MM_GENERIC_GSM_POWER_DOWN_CMD); gsm_class->do_enable = do_enable; gsm_class->do_disconnect = do_disconnect; |