summaryrefslogtreecommitdiffstats
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
parent15eded276cb81a91f812fe8a5eb8e29a3839542b (diff)
Use g_dbus_emit_signal for sending D-Bus signals
-rw-r--r--audio/control.c8
-rw-r--r--audio/headset.c18
-rw-r--r--audio/manager.c24
-rw-r--r--audio/sink.c8
-rw-r--r--hcid/adapter.c20
-rw-r--r--hcid/dbus-hci.c66
-rw-r--r--hcid/dbus-sdp.c2
-rw-r--r--hcid/dbus-service.c12
-rw-r--r--hcid/device.c6
-rw-r--r--input/device.c14
-rw-r--r--input/manager.c4
-rw-r--r--network/connection.c4
-rw-r--r--network/manager.c6
-rw-r--r--network/server.c4
-rw-r--r--serial/manager.c12
-rw-r--r--serial/port.c4
16 files changed, 106 insertions, 106 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);
diff --git a/hcid/adapter.c b/hcid/adapter.c
index d0226db5..3948908a 100644
--- a/hcid/adapter.c
+++ b/hcid/adapter.c
@@ -733,7 +733,7 @@ static DBusMessage *set_mode(DBusConnection *conn, DBusMessage *msg,
} else {
/* discoverable or limited */
if ((scan_enable & SCAN_INQUIRY) && (new_mode != adapter->mode)) {
- dbus_connection_emit_signal(conn,
+ g_dbus_emit_signal(conn,
dbus_message_get_path(msg),
ADAPTER_INTERFACE,
"ModeChanged",
@@ -926,7 +926,7 @@ static DBusMessage *set_discoverable_timeout(DBusConnection *conn,
resolve_paths(msg, &old_path, &new_path);
- dbus_connection_emit_signal(conn, old_path,
+ g_dbus_emit_signal(conn, old_path,
ADAPTER_INTERFACE,
"DiscoverableTimeoutChanged",
DBUS_TYPE_UINT32, &timeout,
@@ -1238,7 +1238,7 @@ static DBusMessage *adapter_set_minor_class(DBusConnection *conn,
return failed_strerror(msg, err);
}
- dbus_connection_emit_signal(conn, dbus_message_get_path(msg),
+ g_dbus_emit_signal(conn, dbus_message_get_path(msg),
ADAPTER_INTERFACE, "MinorClassChanged",
DBUS_TYPE_STRING, &minor,
DBUS_TYPE_INVALID);
@@ -2044,7 +2044,7 @@ static DBusMessage *adapter_set_remote_alias(DBusConnection *conn,
resolve_paths(msg, &old_path, &new_path);
- dbus_connection_emit_signal(conn, old_path,
+ g_dbus_emit_signal(conn, old_path,
ADAPTER_INTERFACE, "RemoteAliasChanged",
DBUS_TYPE_STRING, &addr,
DBUS_TYPE_STRING, &alias,
@@ -2096,7 +2096,7 @@ static DBusMessage *adapter_clear_remote_alias(DBusConnection *conn,
return failed_strerror(msg, -ecode);
if (had_alias)
- dbus_connection_emit_signal(conn, dbus_message_get_path(msg),
+ g_dbus_emit_signal(conn, dbus_message_get_path(msg),
ADAPTER_INTERFACE,
"RemoteAliasCleared",
DBUS_TYPE_STRING, &addr_ptr,
@@ -2274,7 +2274,7 @@ static DBusMessage *adapter_dc_remote_device(DBusConnection *conn,
adapter->pending_dc->conn_handle =
((struct active_conn_info *) l->data)->handle;
- dbus_connection_emit_signal(conn, dbus_message_get_path(msg),
+ g_dbus_emit_signal(conn, dbus_message_get_path(msg),
ADAPTER_INTERFACE,
"RemoteDeviceDisconnectRequested",
DBUS_TYPE_STRING, &peer_addr,
@@ -2397,7 +2397,7 @@ static DBusMessage *remove_bonding(DBusConnection *conn, DBusMessage *msg,
if (paired) {
snprintf(path, MAX_PATH_LENGTH, BASE_PATH "/hci%d",
adapter->dev_id);
- dbus_connection_emit_signal(conn, path,
+ g_dbus_emit_signal(conn, path,
ADAPTER_INTERFACE, "BondingRemoved",
DBUS_TYPE_STRING, &address,
DBUS_TYPE_INVALID);
@@ -2438,7 +2438,7 @@ void adapter_remove_device(DBusConnection *conn, struct adapter *adapter,
if (!device->temporary) {
snprintf(path, MAX_PATH_LENGTH, "/hci%d", adapter->dev_id);
- dbus_connection_emit_signal(conn, path,
+ g_dbus_emit_signal(conn, path,
ADAPTER_INTERFACE,
"DeviceRemoved",
DBUS_TYPE_OBJECT_PATH, &device->path,
@@ -3482,7 +3482,7 @@ static DBusMessage *adapter_set_trusted(DBusConnection *conn,
resolve_paths(msg, &old_path, &new_path);
- dbus_connection_emit_signal(conn, old_path,
+ g_dbus_emit_signal(conn, old_path,
ADAPTER_INTERFACE, "TrustAdded",
DBUS_TYPE_STRING, &address,
DBUS_TYPE_INVALID);
@@ -3556,7 +3556,7 @@ static DBusMessage *adapter_remove_trust(DBusConnection *conn,
resolve_paths(msg, &old_path, &new_path);
- dbus_connection_emit_signal(conn, old_path,
+ g_dbus_emit_signal(conn, old_path,
ADAPTER_INTERFACE, "TrustRemoved",
DBUS_TYPE_STRING, &address,
DBUS_TYPE_INVALID);
diff --git a/hcid/dbus-hci.c b/hcid/dbus-hci.c
index 18210951..ec22bbce 100644
--- a/hcid/dbus-hci.c
+++ b/hcid/dbus-hci.c
@@ -347,7 +347,7 @@ static void adapter_mode_changed(struct adapter *adapter, uint8_t scan_enable)
return;
}
- dbus_connection_emit_signal(connection, adapter->path, ADAPTER_INTERFACE,
+ g_dbus_emit_signal(connection, adapter->path, ADAPTER_INTERFACE,
"ModeChanged",
DBUS_TYPE_STRING, &mode,
DBUS_TYPE_INVALID);
@@ -400,14 +400,14 @@ static void reply_pending_requests(const char *path, struct adapter *adapter)
if (hcid_dbus_use_experimental()) {
const char *ptr = path + ADAPTER_PATH_INDEX;
- dbus_connection_emit_signal(connection, ptr,
+ g_dbus_emit_signal(connection, ptr,
ADAPTER_INTERFACE,
"DiscoveryCompleted",
DBUS_TYPE_INVALID);
}
- dbus_connection_emit_signal(connection, path,
+ g_dbus_emit_signal(connection, path,
ADAPTER_INTERFACE,
"DiscoveryCompleted",
DBUS_TYPE_INVALID);
@@ -420,7 +420,7 @@ static void reply_pending_requests(const char *path, struct adapter *adapter)
if (adapter->pdiscov_active) {
/* Send periodic discovery stopped signal exit or stop
* the device */
- dbus_connection_emit_signal(connection, path,
+ g_dbus_emit_signal(connection, path,
ADAPTER_INTERFACE,
"PeriodicDiscoveryStopped",
DBUS_TYPE_INVALID);
@@ -583,14 +583,14 @@ int hcid_dbus_register_device(uint16_t id)
* Send the adapter added signal
*/
if (hcid_dbus_use_experimental()) {
- dbus_connection_emit_signal(connection, "/",
+ g_dbus_emit_signal(connection, "/",
MANAGER_INTERFACE,
"AdapterAdded",
DBUS_TYPE_OBJECT_PATH, &ptr,
DBUS_TYPE_INVALID);
}
- dbus_connection_emit_signal(connection, BASE_PATH, MANAGER_INTERFACE,
+ g_dbus_emit_signal(connection, BASE_PATH, MANAGER_INTERFACE,
"AdapterAdded",
DBUS_TYPE_STRING, &pptr,
DBUS_TYPE_INVALID);
@@ -622,14 +622,14 @@ int hcid_dbus_unregister_device(uint16_t id)
snprintf(path, sizeof(path), "%s/hci%d", BASE_PATH, id);
if (hcid_dbus_use_experimental()) {
- dbus_connection_emit_signal(connection, "/",
+ g_dbus_emit_signal(connection, "/",
MANAGER_INTERFACE,
"AdapterRemoved",
DBUS_TYPE_OBJECT_PATH, &ptr,
DBUS_TYPE_INVALID);
}
- dbus_connection_emit_signal(connection, BASE_PATH, MANAGER_INTERFACE,
+ g_dbus_emit_signal(connection, BASE_PATH, MANAGER_INTERFACE,
"AdapterRemoved",
DBUS_TYPE_STRING, &pptr,
DBUS_TYPE_INVALID);
@@ -643,20 +643,20 @@ int hcid_dbus_unregister_device(uint16_t id)
snprintf(path, sizeof(path), "%s/hci%d", BASE_PATH,
new_default);
if (hcid_dbus_use_experimental()) {
- dbus_connection_emit_signal(connection, "/",
+ g_dbus_emit_signal(connection, "/",
MANAGER_INTERFACE,
"DefaultAdapterChanged",
DBUS_TYPE_OBJECT_PATH, &ptr,
DBUS_TYPE_INVALID);
}
- dbus_connection_emit_signal(connection, BASE_PATH,
+ g_dbus_emit_signal(connection, BASE_PATH,
MANAGER_INTERFACE,
"DefaultAdapterChanged",
DBUS_TYPE_STRING, &pptr,
DBUS_TYPE_INVALID);
} else {
*path = '\0';
- dbus_connection_emit_signal(connection, BASE_PATH,
+ g_dbus_emit_signal(connection, BASE_PATH,
MANAGER_INTERFACE,
"DefaultAdapterChanged",
DBUS_TYPE_STRING, &pptr,
@@ -795,7 +795,7 @@ int hcid_dbus_start_device(uint16_t id)
ret = 0;
mode = mode2str(adapter->mode);
- dbus_connection_emit_signal(connection, path, ADAPTER_INTERFACE,
+ g_dbus_emit_signal(connection, path, ADAPTER_INTERFACE,
"ModeChanged",
DBUS_TYPE_STRING, &mode,
DBUS_TYPE_INVALID);
@@ -809,13 +809,13 @@ int hcid_dbus_start_device(uint16_t id)
if (get_default_adapter() < 0) {
set_default_adapter(id);
if (hcid_dbus_use_experimental())
- dbus_connection_emit_signal(connection, "/",
+ g_dbus_emit_signal(connection, "/",
MANAGER_INTERFACE,
"DefaultAdapterChanged",
DBUS_TYPE_OBJECT_PATH, &ptr,
DBUS_TYPE_INVALID);
- dbus_connection_emit_signal(connection, BASE_PATH,
+ g_dbus_emit_signal(connection, BASE_PATH,
MANAGER_INTERFACE,
"DefaultAdapterChanged",
DBUS_TYPE_STRING, &pptr,
@@ -841,7 +841,7 @@ static void send_dc_signal(struct active_conn_info *dev, const char *path)
ba2str(&dev->bdaddr, addr);
- dbus_connection_emit_signal(connection, path, ADAPTER_INTERFACE,
+ g_dbus_emit_signal(connection, path, ADAPTER_INTERFACE,
"RemoteDeviceDisconnected",
DBUS_TYPE_STRING, &paddr,
DBUS_TYPE_INVALID);
@@ -1224,7 +1224,7 @@ void hcid_dbus_bonding_process_complete(bdaddr_t *local, bdaddr_t *peer,
device->temporary = FALSE;
- dbus_connection_emit_signal(connection, ptr,
+ g_dbus_emit_signal(connection, ptr,
ADAPTER_INTERFACE,
"DeviceCreated",
DBUS_TYPE_OBJECT_PATH,
@@ -1309,7 +1309,7 @@ void hcid_dbus_inquiry_start(bdaddr_t *local)
DBUS_TYPE_INVALID);
if (hcid_dbus_use_experimental())
- dbus_connection_emit_signal(connection,
+ g_dbus_emit_signal(connection,
adapter->path + ADAPTER_PATH_INDEX,
ADAPTER_INTERFACE,
"DiscoveryStarted",
@@ -1418,7 +1418,7 @@ static void send_out_of_range(const char *path, GSList *l)
while (l) {
const char *peer_addr = l->data;
- dbus_connection_emit_signal(connection, path,
+ g_dbus_emit_signal(connection, path,
ADAPTER_INTERFACE,
"RemoteDeviceDisappeared",
DBUS_TYPE_STRING, &peer_addr,
@@ -1426,7 +1426,7 @@ static void send_out_of_range(const char *path, GSList *l)
if (hcid_dbus_use_experimental()) {
const char *ptr = path + ADAPTER_PATH_INDEX;
- dbus_connection_emit_signal(connection, ptr,
+ g_dbus_emit_signal(connection, ptr,
ADAPTER_INTERFACE,
"DeviceDisappeared",
DBUS_TYPE_STRING,
@@ -1497,14 +1497,14 @@ void hcid_dbus_inquiry_complete(bdaddr_t *local)
if (adapter->discov_active) {
if (hcid_dbus_use_experimental()) {
const char *ptr = adapter->path + ADAPTER_PATH_INDEX;
- dbus_connection_emit_signal(connection, ptr,
+ g_dbus_emit_signal(connection, ptr,
ADAPTER_INTERFACE,
"DiscoveryCompleted",
DBUS_TYPE_INVALID);
}
- dbus_connection_emit_signal(connection, adapter->path,
+ g_dbus_emit_signal(connection, adapter->path,
ADAPTER_INTERFACE,
"DiscoveryCompleted",
DBUS_TYPE_INVALID);
@@ -1565,7 +1565,7 @@ void hcid_dbus_periodic_inquiry_start(bdaddr_t *local, uint8_t status)
DBUS_TYPE_BOOLEAN,
&adapter->pdiscov_active);
- dbus_connection_emit_signal(connection, adapter->path, ADAPTER_INTERFACE,
+ g_dbus_emit_signal(connection, adapter->path, ADAPTER_INTERFACE,
"PeriodicDiscoveryStarted",
DBUS_TYPE_INVALID);
}
@@ -1613,12 +1613,12 @@ void hcid_dbus_periodic_inquiry_exit(bdaddr_t *local, uint8_t status)
* periodic inquiry */
if (adapter->discov_active) {
if (hcid_dbus_use_experimental())
- dbus_connection_emit_signal(connection, ptr,
+ g_dbus_emit_signal(connection, ptr,
ADAPTER_INTERFACE,
"DiscoveryCompleted",
DBUS_TYPE_INVALID);
- dbus_connection_emit_signal(connection, adapter->path,
+ g_dbus_emit_signal(connection, adapter->path,
ADAPTER_INTERFACE,
"DiscoveryCompleted",
DBUS_TYPE_INVALID);
@@ -1626,7 +1626,7 @@ void hcid_dbus_periodic_inquiry_exit(bdaddr_t *local, uint8_t status)
}
/* Send discovery completed signal if there isn't name to resolve */
- dbus_connection_emit_signal(connection, adapter->path,
+ g_dbus_emit_signal(connection, adapter->path,
ADAPTER_INTERFACE,
"PeriodicDiscoveryStopped",
DBUS_TYPE_INVALID);
@@ -1734,7 +1734,7 @@ void hcid_dbus_inquiry_result(bdaddr_t *local, bdaddr_t *peer, uint32_t class,
}
/* send the device found signal */
- dbus_connection_emit_signal(connection, adapter->path,
+ g_dbus_emit_signal(connection, adapter->path,
ADAPTER_INTERFACE,
"RemoteDeviceFound",
DBUS_TYPE_STRING, &paddr,
@@ -1779,7 +1779,7 @@ void hcid_dbus_inquiry_result(bdaddr_t *local, bdaddr_t *peer, uint32_t class,
}
if (name) {
- dbus_connection_emit_signal(connection, adapter->path,
+ g_dbus_emit_signal(connection, adapter->path,
ADAPTER_INTERFACE,
"RemoteNameUpdated",
DBUS_TYPE_STRING, &paddr,
@@ -1871,13 +1871,13 @@ void hcid_dbus_remote_name(bdaddr_t *local, bdaddr_t *peer, uint8_t status,
ba2str(peer, peer_addr);
if (status)
- dbus_connection_emit_signal(connection, adapter->path,
+ g_dbus_emit_signal(connection, adapter->path,
ADAPTER_INTERFACE,
"RemoteNameFailed",
DBUS_TYPE_STRING, &paddr,
DBUS_TYPE_INVALID);
else {
- dbus_connection_emit_signal(connection, adapter->path,
+ g_dbus_emit_signal(connection, adapter->path,
ADAPTER_INTERFACE,
"RemoteNameUpdated",
DBUS_TYPE_STRING, &paddr,
@@ -1933,13 +1933,13 @@ void hcid_dbus_remote_name(bdaddr_t *local, bdaddr_t *peer, uint8_t status,
if (adapter->discov_active) {
if (hcid_dbus_use_experimental())
- dbus_connection_emit_signal(connection,
+ g_dbus_emit_signal(connection,
adapter->path + ADAPTER_PATH_INDEX,
ADAPTER_INTERFACE,
"DiscoveryCompleted",
DBUS_TYPE_INVALID);
- dbus_connection_emit_signal(connection, adapter->path,
+ g_dbus_emit_signal(connection, adapter->path,
ADAPTER_INTERFACE,
"DiscoveryCompleted",
DBUS_TYPE_INVALID);
@@ -1979,7 +1979,7 @@ void hcid_dbus_conn_complete(bdaddr_t *local, uint8_t status, uint16_t handle,
adapter->bonding->hci_status = status;
} else {
/* Send the remote device connected signal */
- dbus_connection_emit_signal(connection, adapter->path,
+ g_dbus_emit_signal(connection, adapter->path,
ADAPTER_INTERFACE,
"RemoteDeviceConnected",
DBUS_TYPE_STRING, &paddr,
@@ -2088,7 +2088,7 @@ void hcid_dbus_disconn_complete(bdaddr_t *local, uint8_t status,
}
/* Send the remote device disconnected signal */
- dbus_connection_emit_signal(connection, adapter->path,
+ g_dbus_emit_signal(connection, adapter->path,
ADAPTER_INTERFACE,
"RemoteDeviceDisconnected",
DBUS_TYPE_STRING, &paddr,
diff --git a/hcid/dbus-sdp.c b/hcid/dbus-sdp.c
index 124825a4..4bf5b6f0 100644
--- a/hcid/dbus-sdp.c
+++ b/hcid/dbus-sdp.c
@@ -823,7 +823,7 @@ static void remote_svc_identifiers_completed_cb(uint8_t type, uint16_t err,
dbus_message_unref(reply);
if (len)
- dbus_connection_emit_signal(ctxt->conn,
+ g_dbus_emit_signal(ctxt->conn,
dbus_message_get_path(ctxt->rq),
ADAPTER_INTERFACE,
"RemoteIdentifiersUpdated",
diff --git a/hcid/dbus-service.c b/hcid/dbus-service.c
index c05a7d6d..0f7b34a1 100644
--- a/hcid/dbus-service.c
+++ b/hcid/dbus-service.c
@@ -260,7 +260,7 @@ static DBusMessage *set_trusted(DBusConnection *conn,
write_trust(BDADDR_ANY, address, service->ident, TRUE);
- dbus_connection_emit_signal(conn, service->object_path,
+ g_dbus_emit_signal(conn, service->object_path,
SERVICE_INTERFACE, "TrustAdded",
DBUS_TYPE_STRING, &address,
DBUS_TYPE_INVALID);
@@ -344,7 +344,7 @@ static DBusMessage *remove_trust(DBusConnection *conn,
write_trust(BDADDR_ANY, address, service->ident, FALSE);
- dbus_connection_emit_signal(conn, service->object_path,
+ g_dbus_emit_signal(conn, service->object_path,
SERVICE_INTERFACE, "TrustRemoved",
DBUS_TYPE_STRING, &address,
DBUS_TYPE_INVALID);
@@ -397,11 +397,11 @@ static int unregister_service_for_connection(DBusConnection *connection,
if (!conn)
goto cleanup;
- dbus_connection_emit_signal(conn, service->object_path,
+ g_dbus_emit_signal(conn, service->object_path,
SERVICE_INTERFACE,
"Stopped", DBUS_TYPE_INVALID);
- dbus_connection_emit_signal(conn, BASE_PATH, MANAGER_INTERFACE,
+ g_dbus_emit_signal(conn, BASE_PATH, MANAGER_INTERFACE,
"ServiceRemoved",
DBUS_TYPE_STRING, &service->object_path,
DBUS_TYPE_INVALID);
@@ -637,12 +637,12 @@ int register_service(const char *ident, const char **uuids)
if (uuids)
register_uuids(ident, uuids);
- dbus_connection_emit_signal(conn, BASE_PATH, MANAGER_INTERFACE,
+ g_dbus_emit_signal(conn, BASE_PATH, MANAGER_INTERFACE,
"ServiceAdded",
DBUS_TYPE_STRING, &service->object_path,
DBUS_TYPE_INVALID);
- dbus_connection_emit_signal(conn, service->object_path,
+ g_dbus_emit_signal(conn, service->object_path,
SERVICE_INTERFACE,
"Started", DBUS_TYPE_INVALID);
diff --git a/hcid/device.c b/hcid/device.c
index 9a814047..8cd0c131 100644
--- a/hcid/device.c
+++ b/hcid/device.c
@@ -924,7 +924,7 @@ static DBusMessage *set_alias(DBusConnection *conn, DBusMessage *msg,
snprintf(path, sizeof(path), "%s/hci%d", BASE_PATH, adapter->dev_id);
- dbus_connection_emit_signal(conn, path,
+ g_dbus_emit_signal(conn, path,
ADAPTER_INTERFACE, "RemoteAliasChanged",
DBUS_TYPE_STRING, &device->address,
DBUS_TYPE_STRING, &str,
@@ -953,7 +953,7 @@ static DBusMessage *set_trust(DBusConnection *conn, DBusMessage *msg,
snprintf(path, sizeof(path), "%s/hci%d", BASE_PATH, adapter->dev_id);
- dbus_connection_emit_signal(conn, path,
+ g_dbus_emit_signal(conn, path,
ADAPTER_INTERFACE,
value ? "TrustAdded" : "TrustRemoved",
DBUS_TYPE_STRING, &device->address,
@@ -1147,7 +1147,7 @@ static void browse_cb(sdp_list_t *recs, int err, gpointer user_data)
}
proceed:
- dbus_connection_emit_signal(req->conn, dbus_message_get_path(req->msg),
+ g_dbus_emit_signal(req->conn, dbus_message_get_path(req->msg),
ADAPTER_INTERFACE, "DeviceCreated",
DBUS_TYPE_OBJECT_PATH, &device->path,
DBUS_TYPE_INVALID);
diff --git a/input/device.c b/input/device.c
index 261c1a58..75acaa82 100644
--- a/input/device.c
+++ b/input/device.c
@@ -424,7 +424,7 @@ static void rfcomm_connect_cb(GIOChannel *chan, int err, const bdaddr_t *src,
/* Sending the Connected signal */
path = dbus_message_get_path(idev->pending_connect);
- dbus_connection_emit_signal(idev->conn, path,
+ g_dbus_emit_signal(idev->conn, path,
INPUT_DEVICE_INTERFACE, "Connected",
DBUS_TYPE_INVALID);
@@ -462,7 +462,7 @@ static gboolean intr_watch_cb(GIOChannel *chan, GIOCondition cond, gpointer data
if (cond & (G_IO_HUP | G_IO_ERR))
g_io_channel_close(chan);
- dbus_connection_emit_signal(idev->conn,
+ g_dbus_emit_signal(idev->conn,
idev->path,
INPUT_DEVICE_INTERFACE,
"Disconnected",
@@ -489,7 +489,7 @@ static gboolean ctrl_watch_cb(GIOChannel *chan, GIOCondition cond, gpointer data
if (cond & (G_IO_HUP | G_IO_ERR))
g_io_channel_close(chan);
- dbus_connection_emit_signal(idev->conn,
+ g_dbus_emit_signal(idev->conn,
idev->path,
INPUT_DEVICE_INTERFACE,
"Disconnected",
@@ -594,7 +594,7 @@ static void interrupt_connect_cb(GIOChannel *chan, int err, const bdaddr_t *src,
idev->intr_watch = create_watch(idev->intr_sk, intr_watch_cb, idev);
idev->ctrl_watch = create_watch(idev->ctrl_sk, ctrl_watch_cb, idev);
- dbus_connection_emit_signal(idev->conn,
+ g_dbus_emit_signal(idev->conn,
idev->path,
INPUT_DEVICE_INTERFACE,
"Connected",
@@ -1048,12 +1048,12 @@ int input_device_unregister(DBusConnection *conn, const char *path)
if (idev->intr_watch) {
g_source_remove(idev->intr_watch);
- dbus_connection_emit_signal(conn,
+ g_dbus_emit_signal(conn,
path, INPUT_DEVICE_INTERFACE,
"Disconnected", DBUS_TYPE_INVALID);
}
- dbus_connection_emit_signal(conn, INPUT_PATH,
+ g_dbus_emit_signal(conn, INPUT_PATH,
INPUT_MANAGER_INTERFACE, "DeviceRemoved" ,
DBUS_TYPE_STRING, &path,
DBUS_TYPE_INVALID);
@@ -1154,7 +1154,7 @@ int input_device_connadd(bdaddr_t *src, bdaddr_t *dst)
idev->intr_watch = create_watch(idev->intr_sk, intr_watch_cb, idev);
idev->ctrl_watch = create_watch(idev->ctrl_sk, ctrl_watch_cb, idev);
- dbus_connection_emit_signal(idev->conn,
+ g_dbus_emit_signal(idev->conn,
idev->path,
INPUT_DEVICE_INTERFACE,
"Connected",
diff --git a/input/manager.c b/input/manager.c
index 65c51fb5..2dfb9b2d 100644
--- a/input/manager.c
+++ b/input/manager.c
@@ -244,7 +244,7 @@ static void interrupt_connect_cb(GIOChannel *chan, int err,
goto cleanup;
}
- dbus_connection_emit_signal(pr->conn, INPUT_PATH,
+ g_dbus_emit_signal(pr->conn, INPUT_PATH,
INPUT_MANAGER_INTERFACE, "DeviceCreated",
DBUS_TYPE_STRING, &path,
DBUS_TYPE_INVALID);
@@ -484,7 +484,7 @@ static void headset_record_cb(sdp_list_t *recs, int err, gpointer user_data)
goto fail;
}
- dbus_connection_emit_signal(pr->conn, INPUT_PATH,
+ g_dbus_emit_signal(pr->conn, INPUT_PATH,
INPUT_MANAGER_INTERFACE, "DeviceCreated",
DBUS_TYPE_STRING, &path,
DBUS_TYPE_INVALID);
diff --git a/network/connection.c b/network/connection.c
index 55c9c529..1ddfc4cf 100644
--- a/network/connection.c
+++ b/network/connection.c
@@ -123,7 +123,7 @@ static gboolean bnep_watchdog_cb(GIOChannel *chan, GIOCondition cond,
struct network_conn *nc = data;
if (connection != NULL) {
- dbus_connection_emit_signal(connection, nc->path,
+ g_dbus_emit_signal(connection, nc->path,
NETWORK_CONNECTION_INTERFACE,
"Disconnected",
DBUS_TYPE_INVALID);
@@ -202,7 +202,7 @@ static gboolean bnep_connect_cb(GIOChannel *chan, GIOCondition cond,
}
bnep_if_up(nc->dev, nc->id);
- dbus_connection_emit_signal(connection, nc->path,
+ g_dbus_emit_signal(connection, nc->path,
NETWORK_CONNECTION_INTERFACE,
"Connected",
DBUS_TYPE_INVALID);
diff --git a/network/manager.c b/network/manager.c
index 5005f0e8..dd23b58d 100644
--- a/network/manager.c
+++ b/network/manager.c
@@ -122,7 +122,7 @@ static void create_path(DBusConnection *conn, DBusMessage *msg,
{
/* emit signal when it is a new path */
if (sname) {
- dbus_connection_emit_signal(conn, NETWORK_PATH,
+ g_dbus_emit_signal(conn, NETWORK_PATH,
NETWORK_MANAGER_INTERFACE,
sname, DBUS_TYPE_STRING, &path,
DBUS_TYPE_INVALID);
@@ -212,7 +212,7 @@ static DBusMessage *remove_path(DBusConnection *conn,
g_free(l->data);
*list = g_slist_remove(*list, l->data);
- dbus_connection_emit_signal(conn, NETWORK_PATH,
+ g_dbus_emit_signal(conn, NETWORK_PATH,
NETWORK_MANAGER_INTERFACE,
sname, DBUS_TYPE_STRING, &path,
DBUS_TYPE_INVALID);
@@ -493,7 +493,7 @@ static DBusMessage *change_default_connection(DBusConnection *conn,
default_index = g_slist_position(connection_paths, list);
connection_store(path, TRUE);
- dbus_connection_emit_signal(connection, NETWORK_PATH,
+ g_dbus_emit_signal(connection, NETWORK_PATH,
NETWORK_MANAGER_INTERFACE,
"DefaultConnectionChanged",
DBUS_TYPE_STRING, &path,
diff --git a/network/server.c b/network/server.c
index c7b2b778..4d046602 100644
--- a/network/server.c
+++ b/network/server.c
@@ -799,7 +799,7 @@ static DBusMessage *enable(DBusConnection *conn,
store_property(&ns->src, ns->id, "enabled", "1");
- dbus_connection_emit_signal(conn, ns->path, NETWORK_SERVER_INTERFACE,
+ g_dbus_emit_signal(conn, ns->path, NETWORK_SERVER_INTERFACE,
"Enabled", DBUS_TYPE_INVALID);
return reply;
@@ -839,7 +839,7 @@ static DBusMessage *disable(DBusConnection *conn,
store_property(&ns->src, ns->id, "enabled", "0");
- dbus_connection_emit_signal(conn, ns->path, NETWORK_SERVER_INTERFACE,
+ g_dbus_emit_signal(conn, ns->path, NETWORK_SERVER_INTERFACE,
"Disabled", DBUS_TYPE_INVALID);
return reply;
diff --git a/serial/manager.c b/serial/manager.c
index d285eeda..cad09e7e 100644
--- a/serial/manager.c
+++ b/serial/manager.c
@@ -239,7 +239,7 @@ static void open_notify(int fd, int err, struct pending_connect *pc)
dbus_message_unref(reply);
/* Send the D-Bus signal */
- dbus_connection_emit_signal(pc->conn, SERIAL_MANAGER_PATH,
+ g_dbus_emit_signal(pc->conn, SERIAL_MANAGER_PATH,
SERIAL_MANAGER_INTERFACE, "ServiceConnected" ,
DBUS_TYPE_STRING, &pc->dev,
DBUS_TYPE_INVALID);
@@ -458,7 +458,7 @@ static DBusMessage *create_channel_port(DBusConnection *conn,
dbus_connection_send(conn, reply, NULL);
dbus_message_unref(reply);
- dbus_connection_emit_signal(conn, SERIAL_MANAGER_PATH,
+ g_dbus_emit_signal(conn, SERIAL_MANAGER_PATH,
SERIAL_MANAGER_INTERFACE, "PortCreated" ,
DBUS_TYPE_STRING, &ppath,
DBUS_TYPE_INVALID);
@@ -757,7 +757,7 @@ static DBusMessage *remove_port(DBusConnection *conn,
if (port_unregister(path) < 0)
return does_not_exist(msg, "Invalid RFCOMM node");
- dbus_connection_emit_signal(conn, SERIAL_MANAGER_PATH,
+ g_dbus_emit_signal(conn, SERIAL_MANAGER_PATH,
SERIAL_MANAGER_INTERFACE, "PortRemoved" ,
DBUS_TYPE_STRING, &path,
DBUS_TYPE_INVALID);
@@ -1544,7 +1544,7 @@ static DBusMessage *create_proxy(DBusConnection *conn,
return failed(msg, "Create object path failed");
}
- dbus_connection_emit_signal(connection, SERIAL_MANAGER_PATH,
+ g_dbus_emit_signal(connection, SERIAL_MANAGER_PATH,
SERIAL_MANAGER_INTERFACE, "ProxyCreated",
DBUS_TYPE_STRING, &ppath,
DBUS_TYPE_INVALID);
@@ -1599,7 +1599,7 @@ static DBusMessage *remove_proxy(DBusConnection *conn,
if (!l)
return does_not_exist(msg, "Invalid proxy path");
- dbus_connection_emit_signal(conn, SERIAL_MANAGER_PATH,
+ g_dbus_emit_signal(conn, SERIAL_MANAGER_PATH,
SERIAL_MANAGER_INTERFACE, "ProxyRemoved",
DBUS_TYPE_STRING, &path,
DBUS_TYPE_INVALID);
@@ -1714,7 +1714,7 @@ static DBusMessage *disconnect_service(DBusConnection *conn,
if (err < 0)
return does_not_exist(msg, "Invalid RFCOMM node");
- dbus_connection_emit_signal(conn, SERIAL_MANAGER_PATH,
+ g_dbus_emit_signal(conn, SERIAL_MANAGER_PATH,
SERIAL_MANAGER_INTERFACE, "ServiceDisconnected" ,
DBUS_TYPE_STRING, &name,
DBUS_TYPE_INVALID);
diff --git a/serial/port.c b/serial/port.c
index c722dde4..522f7c01 100644
--- a/serial/port.c
+++ b/serial/port.c
@@ -253,7 +253,7 @@ static void connection_owner_exited(void *user_data)
debug("Connect requestor exited. Releasing %s node",
node->device);
- dbus_connection_emit_signal(node->conn, SERIAL_MANAGER_PATH,
+ g_dbus_emit_signal(node->conn, SERIAL_MANAGER_PATH,
SERIAL_MANAGER_INTERFACE, "ServiceDisconnected" ,
DBUS_TYPE_STRING, &node->device,
DBUS_TYPE_INVALID);
@@ -269,7 +269,7 @@ static gboolean rfcomm_disconnect_cb(GIOChannel *io,
g_dbus_remove_watch(node->conn, node->listener_id);
- dbus_connection_emit_signal(node->conn, SERIAL_MANAGER_PATH,
+ g_dbus_emit_signal(node->conn, SERIAL_MANAGER_PATH,
SERIAL_MANAGER_INTERFACE, "ServiceDisconnected" ,
DBUS_TYPE_STRING, &node->device,
DBUS_TYPE_INVALID);