summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-12-01 19:54:32 +0100
committerMarcel Holtmann <marcel@holtmann.org>2008-12-01 19:54:32 +0100
commit341818bd8834d430652e4b0b3210335b9657ce8a (patch)
tree1910239a5eb59c5990d8323076657a6b02b6edff
parent5112255d4578887d616560ece01474de1b5d0c12 (diff)
Remove deprecated methods and signals from input interface
-rw-r--r--doc/input-api.txt10
-rw-r--r--input/device.c46
2 files changed, 1 insertions, 55 deletions
diff --git a/doc/input-api.txt b/doc/input-api.txt
index d4b9ba1c..38310ce4 100644
--- a/doc/input-api.txt
+++ b/doc/input-api.txt
@@ -27,10 +27,6 @@ Methods void Connect()
Possible errors: org.bluez.Error.Failed
- bool IsConnected() {deprecated}
-
- Returns the connection status.
-
dict GetProperties()
Returns all properties for the interface. See the
@@ -38,11 +34,7 @@ Methods void Connect()
Possible Errors: org.bluez.Error.InvalidArguments
-Signals void Connected() {deprecated}
-
- void Disconnected() {deprecated}
-
- PropertyChanged(string name, variant value)
+Signals PropertyChanged(string name, variant value)
This signal indicates a changed value of the given
property.
diff --git a/input/device.c b/input/device.c
index 6564b90d..e146c85a 100644
--- a/input/device.c
+++ b/input/device.c
@@ -337,7 +337,6 @@ static void rfcomm_connect_cb(GIOChannel *chan, int err, const bdaddr_t *src,
struct input_device *idev = iconn->idev;
struct fake_input *fake = iconn->fake;
DBusMessage *reply;
- const char *path;
if (err < 0)
goto failed;
@@ -363,12 +362,6 @@ static void rfcomm_connect_cb(GIOChannel *chan, int err, const bdaddr_t *src,
reply = dbus_message_new_method_return(iconn->pending_connect);
g_dbus_send_message(idev->conn, reply);
- /* Sending the Connected signal */
- path = dbus_message_get_path(iconn->pending_connect);
- g_dbus_emit_signal(idev->conn, path,
- INPUT_DEVICE_INTERFACE, "Connected",
- DBUS_TYPE_INVALID);
-
dbus_message_unref(iconn->pending_connect);
iconn->pending_connect = NULL;
@@ -406,9 +399,6 @@ static gboolean intr_watch_cb(GIOChannel *chan, GIOCondition cond, gpointer data
if (cond & (G_IO_HUP | G_IO_ERR))
g_io_channel_close(chan);
- g_dbus_emit_signal(idev->conn, idev->path,
- INPUT_DEVICE_INTERFACE, "Disconnected",
- DBUS_TYPE_INVALID);
emit_property_changed(idev->conn, idev->path, INPUT_DEVICE_INTERFACE,
"Connected", DBUS_TYPE_BOOLEAN, &connected);
@@ -429,15 +419,10 @@ static gboolean intr_watch_cb(GIOChannel *chan, GIOCondition cond, gpointer data
static gboolean ctrl_watch_cb(GIOChannel *chan, GIOCondition cond, gpointer data)
{
struct input_conn *iconn = data;
- struct input_device *idev = iconn->idev;
if (cond & (G_IO_HUP | G_IO_ERR))
g_io_channel_close(chan);
- g_dbus_emit_signal(idev->conn, idev->path,
- INPUT_DEVICE_INTERFACE, "Disconnected",
- DBUS_TYPE_INVALID);
-
g_source_remove(iconn->intr_watch);
iconn->intr_watch = 0;
iconn->ctrl_watch = 0;
@@ -698,9 +683,6 @@ static void interrupt_connect_cb(GIOChannel *chan, int err, const bdaddr_t *src,
iconn->intr_watch = create_watch(iconn->intr_sk, intr_watch_cb, iconn);
iconn->ctrl_watch = create_watch(iconn->ctrl_sk, ctrl_watch_cb, iconn);
- g_dbus_emit_signal(idev->conn, idev->path,
- INPUT_DEVICE_INTERFACE, "Connected",
- DBUS_TYPE_INVALID);
/* Replying to the requestor */
g_dbus_send_reply(idev->conn, iconn->pending_connect, DBUS_TYPE_INVALID);
@@ -952,27 +934,6 @@ static DBusMessage *device_disconnect(DBusConnection *conn,
return g_dbus_create_reply(msg, DBUS_TYPE_INVALID);
}
-static DBusMessage *device_is_connected(DBusConnection *conn,
- DBusMessage *msg, void *data)
-{
- struct input_device *idev = data;
- dbus_bool_t connected = FALSE;
- GSList *l;
-
- for (l = idev->connections; l; l = l->next) {
- struct input_conn *iconn = l->data;
-
- if (!is_connected(iconn))
- continue;
-
- connected = TRUE;
- break;
- }
-
- return g_dbus_create_reply(msg, DBUS_TYPE_BOOLEAN, &connected,
- DBUS_TYPE_INVALID);
-}
-
static void device_unregister(void *data)
{
struct input_device *idev = data;
@@ -1026,15 +987,11 @@ static GDBusMethodTable device_methods[] = {
{ "Connect", "", "", device_connect,
G_DBUS_METHOD_FLAG_ASYNC },
{ "Disconnect", "", "", device_disconnect },
- { "IsConnected", "", "b", device_is_connected,
- G_DBUS_METHOD_FLAG_DEPRECATED },
{ "GetProperties", "", "a{sv}",device_get_properties },
{ }
};
static GDBusSignalTable device_signals[] = {
- { "Connected", "", G_DBUS_SIGNAL_FLAG_DEPRECATED},
- { "Disconnected", "", G_DBUS_SIGNAL_FLAG_DEPRECATED},
{ "PropertyChanged", "sv" },
{ }
};
@@ -1256,9 +1213,6 @@ int input_device_connadd(const bdaddr_t *src, const bdaddr_t *dst)
iconn->intr_watch = create_watch(iconn->intr_sk, intr_watch_cb, iconn);
iconn->ctrl_watch = create_watch(iconn->ctrl_sk, ctrl_watch_cb, iconn);
connected = TRUE;
- g_dbus_emit_signal(idev->conn, idev->path,
- INPUT_DEVICE_INTERFACE, "Connected",
- DBUS_TYPE_INVALID);
emit_property_changed(idev->conn, idev->path, INPUT_DEVICE_INTERFACE,
"Connected", DBUS_TYPE_BOOLEAN, &connected);