+/**
+ * headphoned for the Nokia N8x0
+ *
+ * The headphone daemon watches the state of the headphone
+ * plug (connected, disconnected) and carries out actions
+ * based on these events.
+ *
+ * Currently supported:
+ * * Send "pause" to the media player on disconnect
+ * * Maintain different volume settings for each state
+ *
+ * Copyright (c) 2009-10-21 Thomas Perl <thpinfo.com>
+ **/
+
#include <stdio.h>
#include <assert.h>
#include <glib.h>
#define MEDIA_SERVER_SRVC "com.nokia.osso_media_server"
#define MEDIA_SERVER_PATH "/com/nokia/osso_media_server"
#define MEDIA_SERVER_INTF "com.nokia.osso_media_server.music"
-#define MEDIA_SERVER_METH "pause"
+// Volume control is currently broken, as something is messing
+// with the controls from outside this process in GConf..
//#define ENABLE_VOLUME_CONTROL
#define ENABLE_PAUSE_ON_DISCONNECT
gpointer data)
{
Headphoned* headphoned = (Headphoned*)data;
- headphoned->volume[headphoned->state] = gconf_value_get_int(entry->value);
+ headphoned->volume[headphoned->state] =
+ gconf_value_get_int(entry->value);
}
Headphoned*
MEDIA_SERVER_SRVC,
MEDIA_SERVER_PATH,
MEDIA_SERVER_INTF,
- MEDIA_SERVER_METH,
+ "pause",
NULL,
DBUS_TYPE_INVALID);
}
if (new_volume != volume) {
gconf_client_set_int(headphoned->client, GCONF_VOLUME_CONTROL,
new_volume, NULL);
- gconf_client_suggest_sync(headphoned->client, NULL);
- gconf_client_clear_cache(headphoned->client);
+ /*gconf_client_suggest_sync(headphoned->client, NULL);
+ gconf_client_clear_cache(headphoned->client);*/
}
#endif
headphoned->initial = FALSE;