diff --git a/plugins/mm-modem-nokia.c b/plugins/mm-modem-nokia.c index 379fba0..445f12e 100644 --- a/plugins/mm-modem-nokia.c +++ b/plugins/mm-modem-nokia.c @@ -84,9 +84,50 @@ mm_modem_nokia_init (MMModemNokia *self) } static void +get_property (GObject *object, guint prop_id, + GValue *value, GParamSpec *pspec) +{ + + /* Nokia headsets (at least N85) do not support "power on"; they do */ + /* support "power off" but you proabably do not want to turn off the */ + /* power on your telephone if something went wrong with connecting */ + /* process. So, disabling both these operations. [crosser 2009-09-22] */ + + switch (prop_id) { + case MM_GENERIC_GSM_PROP_POWER_UP_CMD: + g_value_set_string (value, ""); + break; + case MM_GENERIC_GSM_PROP_POWER_DOWN_CMD: + g_value_set_string (value, ""); + break; + default: + break; + } +} + +static void +set_property (GObject *object, guint prop_id, + const GValue *value, GParamSpec *pspec) +{ +} + +static void mm_modem_nokia_class_init (MMModemNokiaClass *klass) { + GObjectClass *object_class = G_OBJECT_CLASS (klass); + mm_modem_nokia_parent_class = g_type_class_peek_parent (klass); + + object_class->get_property = get_property; + object_class->set_property = set_property; + + g_object_class_override_property (object_class, + MM_GENERIC_GSM_PROP_POWER_UP_CMD, + MM_GENERIC_GSM_POWER_UP_CMD); + + g_object_class_override_property (object_class, + MM_GENERIC_GSM_PROP_POWER_DOWN_CMD, + MM_GENERIC_GSM_POWER_DOWN_CMD); } GType