summaryrefslogtreecommitdiff
path: root/bus
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@codefactory.se>2003-02-13 21:21:42 +0000
committerAnders Carlsson <andersca@codefactory.se>2003-02-13 21:21:42 +0000
commitaa4b4ef5955606659557a40a2220090ee9c108d4 (patch)
tree86038fbfeedd65f137fa29ac0f2a04bc8a8cb9de /bus
parenta7c05492537b149f67760ecb1958350900843173 (diff)
downloaddbus-aa4b4ef5955606659557a40a2220090ee9c108d4.tar.gz
2003-02-13 Anders Carlsson <andersca@codefactory.se>
* bus/driver.c: (bus_driver_send_service_deleted), (bus_driver_send_service_created), (bus_driver_send_service_lost), (bus_driver_send_service_acquired), (bus_driver_handle_hello), (bus_driver_send_welcome_message), (bus_driver_handle_list_services), (bus_driver_handle_acquire_service), (bus_driver_handle_service_exists): * dbus/dbus-bus.c: (dbus_bus_register_client), (dbus_bus_acquire_service), (dbus_bus_service_exists): * dbus/dbus-errors.c: (dbus_result_to_string): * dbus/dbus-errors.h: * dbus/dbus-message.c: (dbus_message_append_args), (dbus_message_append_args_valist), (dbus_message_get_args), (dbus_message_get_args_valist), (dbus_message_get_args_iter), (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string), (dbus_message_iter_get_byte_array), (dbus_message_iter_get_string_array), (message_iter_test), (check_message_handling), (_dbus_message_test): * dbus/dbus-message.h: * test/bus-test.c: (main): Change fields to arguments in messages, so that they won't be confused with header fields. * glib/test-dbus-glib.c: (main): Remove append_fields from hello message.
Diffstat (limited to 'bus')
-rw-r--r--bus/driver.c78
1 files changed, 39 insertions, 39 deletions
diff --git a/bus/driver.c b/bus/driver.c
index 3b79ea56..25d6d263 100644
--- a/bus/driver.c
+++ b/bus/driver.c
@@ -45,9 +45,9 @@ bus_driver_send_service_deleted (const char *service_name)
BUS_HANDLE_OOM (dbus_message_set_sender (message, DBUS_SERVICE_DBUS));
- BUS_HANDLE_OOM (dbus_message_append_fields (message,
- DBUS_TYPE_STRING, service_name,
- 0));
+ BUS_HANDLE_OOM (dbus_message_append_args (message,
+ DBUS_TYPE_STRING, service_name,
+ 0));
bus_dispatch_broadcast_message (message);
dbus_message_unref (message);
}
@@ -62,9 +62,9 @@ bus_driver_send_service_created (const char *service_name)
BUS_HANDLE_OOM (dbus_message_set_sender (message, DBUS_SERVICE_DBUS));
- BUS_HANDLE_OOM (dbus_message_append_fields (message,
- DBUS_TYPE_STRING, service_name,
- 0));
+ BUS_HANDLE_OOM (dbus_message_append_args (message,
+ DBUS_TYPE_STRING, service_name,
+ 0));
bus_dispatch_broadcast_message (message);
dbus_message_unref (message);
}
@@ -79,9 +79,9 @@ bus_driver_send_service_lost (DBusConnection *connection,
DBUS_MESSAGE_SERVICE_LOST));
BUS_HANDLE_OOM (dbus_message_set_sender (message, DBUS_SERVICE_DBUS));
- BUS_HANDLE_OOM (dbus_message_append_fields (message,
- DBUS_TYPE_STRING, service_name,
- 0));
+ BUS_HANDLE_OOM (dbus_message_append_args (message,
+ DBUS_TYPE_STRING, service_name,
+ 0));
BUS_HANDLE_OOM (dbus_connection_send_message (connection, message, NULL, NULL));
dbus_message_unref (message);
@@ -97,9 +97,9 @@ bus_driver_send_service_acquired (DBusConnection *connection,
DBUS_MESSAGE_SERVICE_ACQUIRED));
BUS_HANDLE_OOM (dbus_message_set_sender (message, DBUS_SERVICE_DBUS));
- BUS_HANDLE_OOM (dbus_message_append_fields (message,
- DBUS_TYPE_STRING, service_name,
- 0));
+ BUS_HANDLE_OOM (dbus_message_append_args (message,
+ DBUS_TYPE_STRING, service_name,
+ 0));
BUS_HANDLE_OOM (dbus_connection_send_message (connection, message, NULL, NULL));
dbus_message_unref (message);
@@ -182,7 +182,7 @@ bus_driver_handle_hello (DBusConnection *connection,
BUS_HANDLE_OOM (bus_connection_set_name (connection, &unique_name));
BUS_HANDLE_OOM (dbus_message_set_sender (message,
- bus_connection_get_name (connection)));
+ bus_connection_get_name (connection)));
_dbus_string_free (&unique_name);
@@ -206,9 +206,9 @@ bus_driver_send_welcome_message (DBusConnection *connection,
BUS_HANDLE_OOM (dbus_message_set_sender (welcome, DBUS_SERVICE_DBUS));
- BUS_HANDLE_OOM (dbus_message_append_fields (welcome,
- DBUS_TYPE_STRING, name,
- NULL));
+ BUS_HANDLE_OOM (dbus_message_append_args (welcome,
+ DBUS_TYPE_STRING, name,
+ NULL));
BUS_HANDLE_OOM (dbus_connection_send_message (connection, welcome, NULL, NULL));
@@ -227,9 +227,9 @@ bus_driver_handle_list_services (DBusConnection *connection,
BUS_HANDLE_OOM (services = bus_services_list (&len));
- BUS_HANDLE_OOM (dbus_message_append_fields (reply,
- DBUS_TYPE_STRING_ARRAY, services, len,
- 0));
+ BUS_HANDLE_OOM (dbus_message_append_args (reply,
+ DBUS_TYPE_STRING_ARRAY, services, len,
+ 0));
BUS_HANDLE_OOM (dbus_connection_send_message (connection, reply, NULL, NULL));
@@ -255,10 +255,10 @@ bus_driver_handle_acquire_service (DBusConnection *connection,
int service_reply;
int flags;
- BUS_HANDLE_OOM ((result = dbus_message_get_fields (message,
- DBUS_TYPE_STRING, &name,
- DBUS_TYPE_UINT32, &flags,
- 0)) != DBUS_RESULT_NO_MEMORY);
+ BUS_HANDLE_OOM ((result = dbus_message_get_args (message,
+ DBUS_TYPE_STRING, &name,
+ DBUS_TYPE_UINT32, &flags,
+ 0)) != DBUS_RESULT_NO_MEMORY);
if (result != DBUS_RESULT_SUCCESS)
{
@@ -324,7 +324,7 @@ bus_driver_handle_acquire_service (DBusConnection *connection,
service_reply = DBUS_SERVICE_REPLY_PRIMARY_OWNER;
}
- BUS_HANDLE_OOM (dbus_message_append_fields (reply, DBUS_TYPE_UINT32, service_reply, 0));
+ BUS_HANDLE_OOM (dbus_message_append_args (reply, DBUS_TYPE_UINT32, service_reply, 0));
/* Send service reply */
BUS_HANDLE_OOM (dbus_connection_send_message (connection, reply, NULL, NULL));
@@ -342,28 +342,28 @@ bus_driver_handle_service_exists (DBusConnection *connection,
BusService *service;
char *name;
- BUS_HANDLE_OOM ((result = dbus_message_get_fields (message,
- DBUS_TYPE_STRING, &name,
- 0)) != DBUS_RESULT_NO_MEMORY);
- if (result != DBUS_RESULT_SUCCESS)
+ BUS_HANDLE_OOM ((result = dbus_message_get_args (message,
+ DBUS_TYPE_STRING, &name,
+ 0)) != DBUS_RESULT_NO_MEMORY);
+ if (result != DBUS_RESULT_SUCCESS)
{
dbus_free (name);
dbus_connection_disconnect (connection);
return;
}
- _dbus_string_init_const (&service_name, name);
- service = bus_service_lookup (&service_name, FALSE);
+ _dbus_string_init_const (&service_name, name);
+ service = bus_service_lookup (&service_name, FALSE);
- BUS_HANDLE_OOM ((reply = dbus_message_new_reply (message)));
- BUS_HANDLE_OOM (dbus_message_set_sender (reply, DBUS_SERVICE_DBUS));
-
- BUS_HANDLE_OOM (dbus_message_append_fields (reply,
- DBUS_TYPE_UINT32, service != NULL,
- 0));
- BUS_HANDLE_OOM (dbus_connection_send_message (connection, reply, NULL, NULL));
- dbus_message_unref (reply);
- dbus_free (name);
+ BUS_HANDLE_OOM ((reply = dbus_message_new_reply (message)));
+ BUS_HANDLE_OOM (dbus_message_set_sender (reply, DBUS_SERVICE_DBUS));
+
+ BUS_HANDLE_OOM (dbus_message_append_args (reply,
+ DBUS_TYPE_UINT32, service != NULL,
+ 0));
+ BUS_HANDLE_OOM (dbus_connection_send_message (connection, reply, NULL, NULL));
+ dbus_message_unref (reply);
+ dbus_free (name);
}
void