diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2006-02-24 02:16:28 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2006-02-24 02:16:28 +0000 |
commit | cbedcb58d895cc15f6b697926834eb9f421956bb (patch) | |
tree | e2ccdeca44db9a0976447c24434f2dcc63801352 | |
parent | b25e1fb7e929d1642dad88a21733cde53ec89f10 (diff) |
Add support for the minor class changed signal
-rw-r--r-- | hcid/dbus-device.c | 12 | ||||
-rw-r--r-- | hcid/dbus.h | 3 |
2 files changed, 13 insertions, 2 deletions
diff --git a/hcid/dbus-device.c b/hcid/dbus-device.c index 97bb590f..8f7d6bfe 100644 --- a/hcid/dbus-device.c +++ b/hcid/dbus-device.c @@ -471,8 +471,9 @@ static DBusMessage *handle_dev_set_discoverable_to_req(DBusMessage *msg, void *d static DBusMessage *handle_dev_set_minor_class_req(DBusMessage *msg, void *data) { struct hci_dbus_data *dbus_data = data; - DBusMessage *reply; + DBusConnection *connection = get_dbus_connection(); DBusMessageIter iter; + DBusMessage *reply, *signal; const char *minor; uint8_t cls[3]; uint32_t dev_class = 0xFFFFFFFF; @@ -518,6 +519,15 @@ static DBusMessage *handle_dev_set_minor_class_req(DBusMessage *msg, void *data) goto failed; } + signal = dev_signal_factory(dbus_data->dev_id, DEV_SIG_MINOR_CLASS_CHANGED, + DBUS_TYPE_STRING, &minor, + DBUS_TYPE_INVALID); + if (signal) { + dbus_connection_send(connection, signal, NULL); + dbus_connection_flush(connection); + dbus_message_unref(signal); + } + reply = dbus_message_new_method_return(msg); failed: diff --git a/hcid/dbus.h b/hcid/dbus.h index 2ddbeb8b..86303ef1 100644 --- a/hcid/dbus.h +++ b/hcid/dbus.h @@ -203,8 +203,9 @@ int get_default_dev_id(void); /* Signals sent in the Manager path */ -#define DEV_SIG_MODE_CHANGED "ModeChanged" +#define DEV_SIG_MODE_CHANGED "ModeChanged" #define DEV_SIG_NAME_CHANGED "NameChanged" +#define DEV_SIG_MINOR_CLASS_CHANGED "MinorClassChanged" #define DEV_SIG_REMOTE_NAME_CHANGED "RemoteNameChange" #define DEV_SIG_REMOTE_ALIAS_CHANGED "RemoteAliasChanged" #define DEV_SIG_BONDING_CREATED "BondingCreated" |