summaryrefslogtreecommitdiffstats
path: root/input
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2007-01-18 17:10:29 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2007-01-18 17:10:29 +0000
commitb7781d4cbc0689f30402e685b91f4e1bfbd21ed2 (patch)
tree821dd363874698b64de50236e239159a212b5dbb /input
parentd1ae2b4841f2b16f647903ff48bb82f2ee35b167 (diff)
Removed forward declaration and fixed code standard.
Diffstat (limited to 'input')
-rw-r--r--input/input-service.c55
1 files changed, 24 insertions, 31 deletions
diff --git a/input/input-service.c b/input/input-service.c
index 9b5dde45..5dbed3b4 100644
--- a/input/input-service.c
+++ b/input/input-service.c
@@ -49,23 +49,6 @@
static DBusConnection *connection = NULL;
-static DBusHandlerResult manager_message(DBusConnection *conn,
- DBusMessage *msg, void *data);
-
-static void manager_unregister(DBusConnection *conn, void *data);
-
-static DBusHandlerResult device_message(DBusConnection *conn,
- DBusMessage *msg, void *data);
-
-static const DBusObjectPathVTable manager_table = {
- .message_function = manager_message,
- .unregister_function = manager_unregister,
-};
-
-static const DBusObjectPathVTable device_table = {
- .message_function = device_message,
-};
-
/*
* Common D-Bus BlueZ input error functions
*/
@@ -93,21 +76,21 @@ struct input_manager {
};
static DBusHandlerResult manager_create_device(DBusConnection *conn,
- DBusMessage *msg, void *udata)
+ DBusMessage *msg, void *data)
{
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
static DBusHandlerResult manager_remove_device(DBusConnection *conn,
- DBusMessage *msg, void *udata)
+ DBusMessage *msg, void *data)
{
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
static DBusHandlerResult manager_list_devices(DBusConnection *conn,
- DBusMessage *msg, void *udata)
+ DBusMessage *msg, void *data)
{
- struct input_manager *mgr = udata;
+ struct input_manager *mgr = data;
DBusMessageIter iter, iter_array;
DBusMessage *reply;
GList *paths;
@@ -172,64 +155,69 @@ static void manager_unregister(DBusConnection *conn, void *data)
free(mgr);
}
+/* Virtual table to handle manager object path hierarchy */
+static const DBusObjectPathVTable manager_table = {
+ .message_function = manager_message,
+ .unregister_function = manager_unregister,
+};
+
/*
* Input Device methods
*/
static DBusHandlerResult device_connect(DBusConnection *conn,
- DBusMessage *msg, void *udata)
+ DBusMessage *msg, void *data)
{
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
static DBusHandlerResult device_disconnect(DBusConnection *conn,
- DBusMessage *msg, void *udata)
+ DBusMessage *msg, void *data)
{
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
static DBusHandlerResult device_unplug(DBusConnection *conn,
- DBusMessage *msg, void *udata)
+ DBusMessage *msg, void *data)
{
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
static DBusHandlerResult device_is_connected(DBusConnection *conn,
- DBusMessage *msg, void *udata)
+ DBusMessage *msg, void *data)
{
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
static DBusHandlerResult device_get_address(DBusConnection *conn,
- DBusMessage *msg, void *udata)
+ DBusMessage *msg, void *data)
{
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
static DBusHandlerResult device_get_name(DBusConnection *conn,
- DBusMessage *msg, void *udata)
+ DBusMessage *msg, void *data)
{
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
static DBusHandlerResult device_get_product_id(DBusConnection *conn,
- DBusMessage *msg, void *udata)
+ DBusMessage *msg, void *data)
{
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
static DBusHandlerResult device_get_vendor_id(DBusConnection *conn,
- DBusMessage *msg, void *udata)
+ DBusMessage *msg, void *data)
{
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
static DBusHandlerResult device_set_timeout(DBusConnection *conn,
- DBusMessage *msg, void *udata)
+ DBusMessage *msg, void *data)
{
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
-
static DBusHandlerResult device_message(DBusConnection *conn,
DBusMessage *msg, void *data)
{
@@ -272,6 +260,11 @@ static DBusHandlerResult device_message(DBusConnection *conn,
return err_unknown_method(conn, msg);
}
+/* Virtual table to handle device object path hierarchy */
+static const DBusObjectPathVTable device_table = {
+ .message_function = device_message,
+};
+
int input_dbus_init(void)
{
struct input_manager *mgr;