summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2008-09-05 16:05:32 +0300
committerJohan Hedberg <johan.hedberg@nokia.com>2008-09-05 16:05:32 +0300
commit7efc4a093324169cbcaef10e584f0d0dc40ed5ef (patch)
treedb4b20e4cc8c0e22fab61798aa100daef5f48c59 /audio
parentff8ccc9e559429988f1d5f6920d8da7341eec7b8 (diff)
Implement dummy registration and roaming status methods
Diffstat (limited to 'audio')
-rw-r--r--audio/telephony-dummy.c50
1 files changed, 45 insertions, 5 deletions
diff --git a/audio/telephony-dummy.c b/audio/telephony-dummy.c
index 982279b6..9cc0f4db 100644
--- a/audio/telephony-dummy.c
+++ b/audio/telephony-dummy.c
@@ -211,12 +211,52 @@ static DBusMessage *battery_level(DBusConnection *conn, DBusMessage *msg,
return dbus_message_new_method_return(msg);;
}
+static DBusMessage *roaming_status(DBusConnection *conn, DBusMessage *msg,
+ void *data)
+{
+ dbus_bool_t roaming;
+ int val;
+
+ if (!dbus_message_get_args(msg, NULL, DBUS_TYPE_BOOLEAN, &roaming,
+ DBUS_TYPE_INVALID))
+ return NULL;
+
+ val = roaming ? EV_ROAM_ACTIVE : EV_ROAM_INACTIVE;
+
+ telephony_update_indicator(dummy_indicators, "roam", val);
+
+ debug("telephony-dummy: roaming status set to %d", val);
+
+ return dbus_message_new_method_return(msg);;
+}
+
+static DBusMessage *registration_status(DBusConnection *conn, DBusMessage *msg,
+ void *data)
+{
+ dbus_bool_t registration;
+ int val;
+
+ if (!dbus_message_get_args(msg, NULL, DBUS_TYPE_BOOLEAN, &registration,
+ DBUS_TYPE_INVALID))
+ return NULL;
+
+ val = registration ? EV_SERVICE_PRESENT : EV_SERVICE_NONE;
+
+ telephony_update_indicator(dummy_indicators, "service", val);
+
+ debug("telephony-dummy: registration status set to %d", val);
+
+ return dbus_message_new_method_return(msg);;
+}
+
static GDBusMethodTable dummy_methods[] = {
- { "OutgoingCall", "s", "", outgoing_call },
- { "IncomingCall", "s", "", incoming_call },
- { "CancelCall", "", "", cancel_call },
- { "SignalStrength", "u", "", signal_strength },
- { "BatteryLevel", "u", "", battery_level },
+ { "OutgoingCall", "s", "", outgoing_call },
+ { "IncomingCall", "s", "", incoming_call },
+ { "CancelCall", "", "", cancel_call },
+ { "SignalStrength", "u", "", signal_strength },
+ { "BatteryLevel", "u", "", battery_level },
+ { "RoamingStatus", "b", "", roaming_status },
+ { "RegistrationStatus", "b", "", registration_status },
{ }
};