summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2007-04-04 11:28:35 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2007-04-04 11:28:35 +0000
commite046ec624abb9fda8613af2079e51152f506bd7a (patch)
tree83fd20460dfbbbcd05f644f0775d4631e34127ed
parent5ad9e0ec87dd078dc2a4e70967f1e9ace1ebf43f (diff)
Add skeletons for missing methods
-rw-r--r--audio/headset.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/audio/headset.c b/audio/headset.c
index 7a01806f..fa4d68c2 100644
--- a/audio/headset.c
+++ b/audio/headset.c
@@ -107,6 +107,7 @@ struct headset {
struct manager {
GIOChannel *server_sk;
uint32_t record_id;
+ int default_hs;
GSList *headset_list;
};
@@ -1844,6 +1845,18 @@ static DBusHandlerResult am_create_headset(struct manager *manager,
return send_message_and_unref(connection, reply);
}
+static DBusHandlerResult am_create_headset(struct manager *manager,
+ DBusMessage *msg)
+{
+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+
+static DBusHandlerResult am_list_headsets(struct manager *manager,
+ DBusMessage *msg)
+{
+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+
static DBusHandlerResult am_get_default_headset(struct manager *manager,
DBusMessage *msg)
{
@@ -1858,13 +1871,20 @@ static DBusHandlerResult am_get_default_headset(struct manager *manager,
if (!reply)
return DBUS_HANDLER_RESULT_NEED_MEMORY;
- snprintf(object_path, sizeof(object_path), AUDIO_HEADSET_PATH_BASE "%d", 0);
+ snprintf(object_path, sizeof(object_path), AUDIO_HEADSET_PATH_BASE "%d",
+ manager->default_hs);
dbus_message_append_args(reply, DBUS_TYPE_STRING, &opath,
DBUS_TYPE_INVALID);
return send_message_and_unref(connection, reply);
}
+static DBusHandlerResult am_change_default_headset(struct manager *manager,
+ DBusMessage *msg)
+{
+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+
static DBusHandlerResult am_message(DBusConnection *conn,
DBusMessage *msg, void *data)
{
@@ -1884,9 +1904,18 @@ static DBusHandlerResult am_message(DBusConnection *conn,
if (strcmp(member, "CreateHeadset") == 0)
return am_create_headset(manager, msg);
+ if (strcmp(member, "RemoveHeadset") == 0)
+ return am_remove_headset(manager, msg);
+
+ if (strcmp(member, "ListHeadsets") == 0)
+ return am_list_headsets(manager, msg);
+
if (strcmp(member, "DefaultHeadset") == 0)
return am_get_default_headset(manager, msg);
+ if (strcmp(member, "ChangeDefaultHeadset") == 0)
+ return am_change_default_headset(manager, msg);
+
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}