summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-06-07 19:30:24 +0000
committerMarcel Holtmann <marcel@holtmann.org>2008-06-07 19:30:24 +0000
commitf80a7215275b229a597cf8d2bbc7e4e208af522c (patch)
tree9b9fcfd87de495562932e219dfb9db64859a8140 /audio
parent15eded276cb81a91f812fe8a5eb8e29a3839542b (diff)
Use g_dbus_emit_signal for sending D-Bus signals
Diffstat (limited to 'audio')
-rw-r--r--audio/control.c8
-rw-r--r--audio/headset.c18
-rw-r--r--audio/manager.c24
-rw-r--r--audio/sink.c8
4 files changed, 29 insertions, 29 deletions
diff --git a/audio/control.c b/audio/control.c
index c9663a26..6778b268 100644
--- a/audio/control.c
+++ b/audio/control.c
@@ -428,7 +428,7 @@ static void avctp_unref(struct avctp *session)
}
if (session->state == AVCTP_STATE_CONNECTED)
- dbus_connection_emit_signal(session->dev->conn,
+ g_dbus_emit_signal(session->dev->conn,
session->dev->path,
AUDIO_CONTROL_INTERFACE,
"Disconnected",
@@ -635,7 +635,7 @@ static void auth_cb(DBusError *derr, void *user_data)
session->dev->control->session = session;
init_uinput(session);
- dbus_connection_emit_signal(session->dev->conn, session->dev->path,
+ g_dbus_emit_signal(session->dev->conn, session->dev->path,
AUDIO_CONTROL_INTERFACE, "Connected",
DBUS_TYPE_INVALID);
@@ -724,7 +724,7 @@ proceed:
session->dev->control->session = session;
init_uinput(session);
flags |= G_IO_IN;
- dbus_connection_emit_signal(session->dev->conn,
+ g_dbus_emit_signal(session->dev->conn,
session->dev->path,
AUDIO_CONTROL_INTERFACE,
"Connected",
@@ -793,7 +793,7 @@ static void avctp_connect_cb(GIOChannel *chan, int err, const bdaddr_t *src,
init_uinput(session);
- dbus_connection_emit_signal(session->dev->conn, session->dev->path,
+ g_dbus_emit_signal(session->dev->conn, session->dev->path,
AUDIO_CONTROL_INTERFACE, "Connected",
DBUS_TYPE_INVALID);
diff --git a/audio/headset.c b/audio/headset.c
index bb28affb..0adc1e9d 100644
--- a/audio/headset.c
+++ b/audio/headset.c
@@ -435,7 +435,7 @@ static int answer_call(struct audio_device *device, const char *buf)
struct headset *hs = device->headset;
int err;
- dbus_connection_emit_signal(device->conn, device->path,
+ g_dbus_emit_signal(device->conn, device->path,
AUDIO_HEADSET_INTERFACE, "AnswerRequested",
DBUS_TYPE_INVALID);
@@ -470,7 +470,7 @@ static int terminate_call(struct audio_device *device, const char *buf)
struct headset *hs = device->headset;
int err;
- dbus_connection_emit_signal(device->conn, device->path,
+ g_dbus_emit_signal(device->conn, device->path,
AUDIO_HEADSET_INTERFACE, "CallTerminated",
DBUS_TYPE_INVALID);
@@ -542,7 +542,7 @@ static int signal_gain_setting(struct audio_device *device, const char *buf)
return -EINVAL;
}
- dbus_connection_emit_signal(device->conn, device->path,
+ g_dbus_emit_signal(device->conn, device->path,
AUDIO_HEADSET_INTERFACE, name,
DBUS_TYPE_UINT16, &gain,
DBUS_TYPE_INVALID);
@@ -1248,14 +1248,14 @@ static DBusMessage *hs_set_gain(DBusConnection *conn,
done:
if (type == HEADSET_GAIN_SPEAKER) {
hs->sp_gain = gain;
- dbus_connection_emit_signal(conn, device->path,
+ g_dbus_emit_signal(conn, device->path,
AUDIO_HEADSET_INTERFACE,
"SpeakerGainChanged",
DBUS_TYPE_UINT16, &gain,
DBUS_TYPE_INVALID);
} else {
hs->mic_gain = gain;
- dbus_connection_emit_signal(conn, device->path,
+ g_dbus_emit_signal(conn, device->path,
AUDIO_HEADSET_INTERFACE,
"MicrophoneGainChanged",
DBUS_TYPE_UINT16, &gain,
@@ -1796,7 +1796,7 @@ void headset_set_state(struct audio_device *dev, headset_state_t state)
case HEADSET_STATE_DISCONNECTED:
close_sco(dev);
headset_close_rfcomm(dev);
- dbus_connection_emit_signal(dev->conn, dev->path,
+ g_dbus_emit_signal(dev->conn, dev->path,
AUDIO_HEADSET_INTERFACE,
"Disconnected",
DBUS_TYPE_INVALID);
@@ -1806,12 +1806,12 @@ void headset_set_state(struct audio_device *dev, headset_state_t state)
case HEADSET_STATE_CONNECTED:
close_sco(dev);
if (hs->state < state) {
- dbus_connection_emit_signal(dev->conn, dev->path,
+ g_dbus_emit_signal(dev->conn, dev->path,
AUDIO_HEADSET_INTERFACE,
"Connected",
DBUS_TYPE_INVALID);
} else if (hs->state == HEADSET_STATE_PLAYING) {
- dbus_connection_emit_signal(dev->conn, dev->path,
+ g_dbus_emit_signal(dev->conn, dev->path,
AUDIO_HEADSET_INTERFACE,
"Stopped",
DBUS_TYPE_INVALID);
@@ -1824,7 +1824,7 @@ void headset_set_state(struct audio_device *dev, headset_state_t state)
G_IO_ERR | G_IO_HUP | G_IO_NVAL,
(GIOFunc) sco_cb, dev);
- dbus_connection_emit_signal(dev->conn, dev->path,
+ g_dbus_emit_signal(dev->conn, dev->path,
AUDIO_HEADSET_INTERFACE,
"Playing", DBUS_TYPE_INVALID);
diff --git a/audio/manager.c b/audio/manager.c
index ec9b203e..630d6017 100644
--- a/audio/manager.c
+++ b/audio/manager.c
@@ -160,14 +160,14 @@ static gboolean add_device(struct audio_device *device, gboolean send_signals)
if (!send_signals)
goto add;
- dbus_connection_emit_signal(connection, AUDIO_MANAGER_PATH,
+ g_dbus_emit_signal(connection, AUDIO_MANAGER_PATH,
AUDIO_MANAGER_INTERFACE,
"DeviceCreated",
DBUS_TYPE_STRING, &device->path,
DBUS_TYPE_INVALID);
if (device->headset)
- dbus_connection_emit_signal(connection,
+ g_dbus_emit_signal(connection,
AUDIO_MANAGER_PATH,
AUDIO_MANAGER_INTERFACE,
"HeadsetCreated",
@@ -522,7 +522,7 @@ struct audio_device *manager_device_connected(const bdaddr_t *bda, const char *u
path = device->path;
if (created) {
- dbus_connection_emit_signal(connection, AUDIO_MANAGER_PATH,
+ g_dbus_emit_signal(connection, AUDIO_MANAGER_PATH,
AUDIO_MANAGER_INTERFACE,
"DeviceCreated",
DBUS_TYPE_STRING, &path,
@@ -531,7 +531,7 @@ struct audio_device *manager_device_connected(const bdaddr_t *bda, const char *u
}
if (headset)
- dbus_connection_emit_signal(connection, AUDIO_MANAGER_PATH,
+ g_dbus_emit_signal(connection, AUDIO_MANAGER_PATH,
AUDIO_MANAGER_INTERFACE,
"HeadsetCreated",
DBUS_TYPE_STRING, &path,
@@ -539,7 +539,7 @@ struct audio_device *manager_device_connected(const bdaddr_t *bda, const char *u
if (headset && !default_hs) {
default_hs = device;
- dbus_connection_emit_signal(connection, AUDIO_MANAGER_PATH,
+ g_dbus_emit_signal(connection, AUDIO_MANAGER_PATH,
AUDIO_MANAGER_INTERFACE,
"DefaultHeadsetChanged",
DBUS_TYPE_STRING, &path,
@@ -548,7 +548,7 @@ struct audio_device *manager_device_connected(const bdaddr_t *bda, const char *u
if (!default_dev) {
default_dev = device;
- dbus_connection_emit_signal(connection, AUDIO_MANAGER_PATH,
+ g_dbus_emit_signal(connection, AUDIO_MANAGER_PATH,
AUDIO_MANAGER_INTERFACE,
"DefaultDeviceChanged",
DBUS_TYPE_STRING, &path,
@@ -697,13 +697,13 @@ static DBusMessage *am_remove_device(DBusConnection *conn,
param = default_dev ? default_dev->path : "";
- dbus_connection_emit_signal(conn, AUDIO_MANAGER_PATH,
+ g_dbus_emit_signal(conn, AUDIO_MANAGER_PATH,
AUDIO_MANAGER_INTERFACE,
"DefaultHeadsetChanged",
DBUS_TYPE_STRING, &param,
DBUS_TYPE_INVALID);
- dbus_connection_emit_signal(conn, AUDIO_MANAGER_PATH,
+ g_dbus_emit_signal(conn, AUDIO_MANAGER_PATH,
AUDIO_MANAGER_INTERFACE,
"DefaultDeviceChanged",
DBUS_TYPE_STRING, &param,
@@ -713,13 +713,13 @@ static DBusMessage *am_remove_device(DBusConnection *conn,
device_store(default_dev, TRUE);
}
- dbus_connection_emit_signal(conn, AUDIO_MANAGER_PATH,
+ g_dbus_emit_signal(conn, AUDIO_MANAGER_PATH,
AUDIO_MANAGER_INTERFACE,
"HeadsetRemoved",
DBUS_TYPE_STRING, &path,
DBUS_TYPE_INVALID);
- dbus_connection_emit_signal(conn, AUDIO_MANAGER_PATH,
+ g_dbus_emit_signal(conn, AUDIO_MANAGER_PATH,
AUDIO_MANAGER_INTERFACE,
"DeviceRemoved",
DBUS_TYPE_STRING, &path,
@@ -812,13 +812,13 @@ static DBusMessage *am_change_default_device(DBusConnection *conn,
if (!dbus_message_is_method_call(msg, AUDIO_MANAGER_INTERFACE,
"ChangeDefaultHeadset"))
- dbus_connection_emit_signal(conn, AUDIO_MANAGER_PATH,
+ g_dbus_emit_signal(conn, AUDIO_MANAGER_PATH,
AUDIO_MANAGER_INTERFACE,
"DefaultDeviceChanged",
DBUS_TYPE_STRING, &device->path,
DBUS_TYPE_INVALID);
else if (device->headset)
- dbus_connection_emit_signal(conn, AUDIO_MANAGER_PATH,
+ g_dbus_emit_signal(conn, AUDIO_MANAGER_PATH,
AUDIO_MANAGER_INTERFACE,
"DefaultHeadsetChanged",
DBUS_TYPE_STRING, &device->path,
diff --git a/audio/sink.c b/audio/sink.c
index 3b5447db..2af74bb3 100644
--- a/audio/sink.c
+++ b/audio/sink.c
@@ -84,7 +84,7 @@ static void stream_state_changed(struct avdtp_stream *stream,
switch (new_state) {
case AVDTP_STATE_IDLE:
- dbus_connection_emit_signal(dev->conn, dev->path,
+ g_dbus_emit_signal(dev->conn, dev->path,
AUDIO_SINK_INTERFACE,
"Disconnected",
DBUS_TYPE_INVALID);
@@ -110,18 +110,18 @@ static void stream_state_changed(struct avdtp_stream *stream,
break;
case AVDTP_STATE_OPEN:
if (old_state == AVDTP_STATE_CONFIGURED)
- dbus_connection_emit_signal(dev->conn, dev->path,
+ g_dbus_emit_signal(dev->conn, dev->path,
AUDIO_SINK_INTERFACE,
"Connected",
DBUS_TYPE_INVALID);
else if (old_state == AVDTP_STATE_STREAMING)
- dbus_connection_emit_signal(dev->conn, dev->path,
+ g_dbus_emit_signal(dev->conn, dev->path,
AUDIO_SINK_INTERFACE,
"Stopped",
DBUS_TYPE_INVALID);
break;
case AVDTP_STATE_STREAMING:
- dbus_connection_emit_signal(dev->conn, dev->path,
+ g_dbus_emit_signal(dev->conn, dev->path,
AUDIO_SINK_INTERFACE,
"Playing",
DBUS_TYPE_INVALID);