summaryrefslogtreecommitdiffstats
path: root/hcid
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2006-03-11 02:09:47 +0000
committerMarcel Holtmann <marcel@holtmann.org>2006-03-11 02:09:47 +0000
commitab2985f81ea7a678f8266184916d8f666555b8c6 (patch)
treea0a18adeb4ca5c986d5212ba59839a54c2528862 /hcid
parent47e4018d784e752bb3c10b74eb12dcaf6be27b6a (diff)
Remove signal definitions
Diffstat (limited to 'hcid')
-rw-r--r--hcid/dbus-adapter.c7
-rw-r--r--hcid/dbus.c18
-rw-r--r--hcid/dbus.h13
3 files changed, 12 insertions, 26 deletions
diff --git a/hcid/dbus-adapter.c b/hcid/dbus-adapter.c
index 6c38597d..c535b788 100644
--- a/hcid/dbus-adapter.c
+++ b/hcid/dbus-adapter.c
@@ -522,7 +522,7 @@ static DBusHandlerResult handle_dev_set_minor_class_req(DBusConnection *conn, DB
return error_failed(conn, msg, errno);
}
- signal = dev_signal_factory(dbus_data->dev_id, DEV_SIG_MINOR_CLASS_CHANGED,
+ signal = dev_signal_factory(dbus_data->dev_id, "MinorClassChange",
DBUS_TYPE_STRING, &minor,
DBUS_TYPE_INVALID);
if (signal) {
@@ -802,7 +802,7 @@ static DBusHandlerResult handle_dev_set_remote_alias_req(DBusConnection *conn, D
if (err < 0)
return error_failed(conn, msg, -err);
- signal = dev_signal_factory(dbus_data->dev_id, DEV_SIG_REMOTE_ALIAS_CHANGED,
+ signal = dev_signal_factory(dbus_data->dev_id, "RemoteAliasChanged",
DBUS_TYPE_STRING, &addr_ptr,
DBUS_TYPE_STRING, &str_ptr,
DBUS_TYPE_INVALID);
@@ -1016,8 +1016,7 @@ static DBusHandlerResult handle_dev_remove_bonding_req(DBusConnection *conn, DBu
}
/* FIXME: which condition must be verified before send the signal */
- signal = dev_signal_factory(dbus_data->dev_id,
- DEV_SIG_BONDING_REMOVED,
+ signal = dev_signal_factory(dbus_data->dev_id, "BondingRemoved",
DBUS_TYPE_STRING, &addr_ptr,
DBUS_TYPE_INVALID);
if (signal) {
diff --git a/hcid/dbus.c b/hcid/dbus.c
index 4039179e..4564b67b 100644
--- a/hcid/dbus.c
+++ b/hcid/dbus.c
@@ -526,7 +526,7 @@ void hcid_dbus_bonding_created_complete(bdaddr_t *local, bdaddr_t *peer, const u
* 0x00: authentication request successfully completed
* 0x01-0x0F: authentication request failed
*/
- name = status ? DEV_SIG_BONDING_FAILED : DEV_SIG_BONDING_CREATED;
+ name = status ? "BondingFailed" : "BondingCreated";
message = dbus_message_new_signal(path, ADAPTER_INTERFACE, name);
@@ -573,7 +573,7 @@ void hcid_dbus_inquiry_start(bdaddr_t *local)
snprintf(path, sizeof(path), "%s/hci%d", ADAPTER_PATH, id);
message = dbus_message_new_signal(path, ADAPTER_INTERFACE,
- DEV_SIG_DISCOVER_START);
+ "DiscoveryStarted");
if (message == NULL) {
syslog(LOG_ERR, "Can't allocate D-Bus inquiry start message");
goto failed;
@@ -618,7 +618,7 @@ void hcid_dbus_inquiry_complete(bdaddr_t *local)
}
message = dbus_message_new_signal(path, ADAPTER_INTERFACE,
- DEV_SIG_DISCOVER_COMPLETE);
+ "DiscoveryCompleted");
if (message == NULL) {
syslog(LOG_ERR, "Can't allocate D-Bus inquiry complete message");
goto failed;
@@ -664,7 +664,7 @@ void hcid_dbus_inquiry_result(bdaddr_t *local, bdaddr_t *peer, uint32_t class, i
snprintf(path, sizeof(path), "%s/hci%d", ADAPTER_PATH, id);
message = dbus_message_new_signal(path, ADAPTER_INTERFACE,
- DEV_SIG_REMOTE_DEVICE_FOUND);
+ "RemoteDeviceFound");
if (message == NULL) {
syslog(LOG_ERR, "Can't allocate D-Bus inquiry result message");
goto failed;
@@ -720,7 +720,7 @@ void hcid_dbus_inquiry_result(bdaddr_t *local, bdaddr_t *peer, uint32_t class, i
dbus_message_unref(message);
message = dbus_message_new_signal(path, ADAPTER_INTERFACE,
- DEV_SIG_REMOTE_DEVICE_FOUND);
+ "RemoteDeviceFound");
if (message == NULL) {
syslog(LOG_ERR, "Can't allocate D-Bus inquiry result message");
goto failed;
@@ -768,7 +768,7 @@ void hcid_dbus_remote_name(bdaddr_t *local, bdaddr_t *peer, char *name)
snprintf(path, sizeof(path), "%s/hci%d", ADAPTER_PATH, id);
message = dbus_message_new_signal(path, ADAPTER_INTERFACE,
- DEV_SIG_REMOTE_NAME_UPDATED);
+ "RemoteNameUpdated");
if (message == NULL) {
syslog(LOG_ERR, "Can't allocate D-Bus remote name message");
goto failed;
@@ -1220,10 +1220,10 @@ void hcid_dbus_setname_complete(bdaddr_t *local)
name[248] = '\0';
pname = name;
- signal = dev_signal_factory(id, DEV_SIG_NAME_CHANGED,
+ signal = dev_signal_factory(id, "NameChanged",
DBUS_TYPE_STRING, &pname, DBUS_TYPE_INVALID);
if (dbus_connection_send(connection, signal, NULL) == FALSE) {
- syslog(LOG_ERR, "Can't send D-Bus %s signal", DEV_SIG_NAME_CHANGED);
+ syslog(LOG_ERR, "Can't send D-Bus signal");
goto failed;
}
@@ -1317,7 +1317,7 @@ void hcid_dbus_setscan_enable_complete(bdaddr_t *local)
}
message = dbus_message_new_signal(path, ADAPTER_INTERFACE,
- DEV_SIG_MODE_CHANGED);
+ "ModeChanged");
if (message == NULL) {
syslog(LOG_ERR, "Can't allocate D-Bus inquiry complete message");
goto failed;
diff --git a/hcid/dbus.h b/hcid/dbus.h
index 42cb528e..6c32f2da 100644
--- a/hcid/dbus.h
+++ b/hcid/dbus.h
@@ -138,19 +138,6 @@ static inline DBusHandlerResult send_reply_and_unref(DBusConnection *conn, DBusM
return DBUS_HANDLER_RESULT_HANDLED;
}
-/* Signals sent in the adapter based path /org/bluez/Adapter/{hci0, hci1, ...} */
-#define DEV_SIG_MODE_CHANGED "ModeChanged"
-#define DEV_SIG_NAME_CHANGED "NameChanged"
-#define DEV_SIG_MINOR_CLASS_CHANGED "MinorClassChanged"
-#define DEV_SIG_REMOTE_NAME_UPDATED "RemoteNameUpdated"
-#define DEV_SIG_REMOTE_ALIAS_CHANGED "RemoteAliasChanged"
-#define DEV_SIG_BONDING_CREATED "BondingCreated"
-#define DEV_SIG_BONDING_FAILED "BondingFailed"
-#define DEV_SIG_BONDING_REMOVED "BondingRemoved"
-#define DEV_SIG_DISCOVER_START "DiscoveryStart"
-#define DEV_SIG_DISCOVER_COMPLETE "DiscoveryCompleted"
-#define DEV_SIG_REMOTE_DEVICE_FOUND "RemoteDeviceFound"
-
/*
* Scanning modes, used by DEV_SET_MODE
* off: remote devices are not allowed to find or connect to this device