diff options
author | Dan Williams <dcbw@redhat.com> | 2012-02-02 21:09:48 -0600 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2012-02-02 21:09:48 -0600 |
commit | 681a24c8d87cad064696d1dcf17ec78a23823d0c (patch) | |
tree | 0edfcd96c6a54df5bace8b806e7ed48bb778267c | |
parent | 14a59c4384011ac1ff0793502fb8c2c8ae75d45c (diff) |
novatel: override message storage and notification
It seems that even though the firmware says it supports
specific CNMI notification values, it really doesn't. Also
set storage to the SIM until we support automatically
determining the right storage in MM. XU870 does not
support ME storage according to +CPMS=?.
-rw-r--r-- | plugins/mm-modem-novatel-gsm.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/plugins/mm-modem-novatel-gsm.c b/plugins/mm-modem-novatel-gsm.c index 706664c5..05eb8e15 100644 --- a/plugins/mm-modem-novatel-gsm.c +++ b/plugins/mm-modem-novatel-gsm.c @@ -326,14 +326,54 @@ mm_modem_novatel_gsm_init (MMModemNovatelGsm *self) } 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_SMS_INDICATION_ENABLE_CMD: + /* Many Qualcomm chipsets don't support mode=2 */ + g_value_set_string (value, "+CNMI=1,1,2,1,0"); + break; + case MM_GENERIC_GSM_PROP_SMS_STORAGE_LOCATION_CMD: + g_value_set_string (value, "+CPMS=\"SM\",\"SM\",\"SM\""); + break; + default: + break; + } +} + +static void mm_modem_novatel_gsm_class_init (MMModemNovatelGsmClass *klass) { + GObjectClass *object_class = G_OBJECT_CLASS (klass); MMGenericGsmClass *gsm_class = MM_GENERIC_GSM_CLASS (klass); mm_modem_novatel_gsm_parent_class = g_type_class_peek_parent (klass); + object_class->get_property = get_property; + object_class->set_property = set_property; + gsm_class->set_allowed_mode = set_allowed_mode; gsm_class->get_allowed_mode = get_allowed_mode; gsm_class->get_access_technology = get_access_technology; + + g_object_class_override_property (object_class, + MM_GENERIC_GSM_PROP_SMS_INDICATION_ENABLE_CMD, + MM_GENERIC_GSM_SMS_INDICATION_ENABLE_CMD); + + g_object_class_override_property (object_class, + MM_GENERIC_GSM_PROP_SMS_STORAGE_LOCATION_CMD, + MM_GENERIC_GSM_SMS_STORAGE_LOCATION_CMD); } |