summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog19
-rw-r--r--dbus/dbus-internals.c8
-rw-r--r--dbus/dbus-message-builder.c8
-rw-r--r--dbus/dbus-message.c18
-rw-r--r--dbus/dbus-protocol.h6
-rw-r--r--doc/TODO4
-rw-r--r--doc/dbus-specification.xml4
7 files changed, 41 insertions, 26 deletions
diff --git a/ChangeLog b/ChangeLog
index d1d340e..04e397e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -66,6 +66,25 @@
use dbus_gproxy_new_for_service_owner so that we can receive the
signal.
+2004-04-15 John (J5) Palmieri <johnp@redhat.com>
+
+ * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
+ dbus/dbus-message.c, dbus/dbus-protocol.h
+ (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
+
+ * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
+ dbus/dbus-message.c, dbus/dbus-protocol.h
+ (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
+
+ * dbus/dbus-internals.c (_dbus_header_field_to_string):
+ DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
+ DBUS_HEADER_FIELD_SENDER resolves to "sender"
+
+ * doc/dbus-specification.xml (Header Fields Table):
+ s/SERVICE/DESTINATION
+ s/SENDER_SERVICE/SENDER
+
+
2004-04-14 Olivier Andrieu <oliv__a@users.sourceforge.net>
* test/glib/test-dbus-glib.c (timed_exit): fail the test after
diff --git a/dbus/dbus-internals.c b/dbus/dbus-internals.c
index a7d6e21..a8a46c6 100644
--- a/dbus/dbus-internals.c
+++ b/dbus/dbus-internals.c
@@ -414,10 +414,10 @@ _dbus_header_field_to_string (int header_field)
return "error-name";
case DBUS_HEADER_FIELD_REPLY_SERIAL:
return "reply-serial";
- case DBUS_HEADER_FIELD_SERVICE:
- return "service";
- case DBUS_HEADER_FIELD_SENDER_SERVICE:
- return "sender-service";
+ case DBUS_HEADER_FIELD_DESTINATION:
+ return "destination";
+ case DBUS_HEADER_FIELD_SENDER:
+ return "sender";
default:
return "unknown";
}
diff --git a/dbus/dbus-message-builder.c b/dbus/dbus-message-builder.c
index ebe049d..00941e9 100644
--- a/dbus/dbus-message-builder.c
+++ b/dbus/dbus-message-builder.c
@@ -691,10 +691,10 @@ _dbus_message_data_load (DBusString *dest,
field = DBUS_HEADER_FIELD_ERROR_NAME;
else if (_dbus_string_starts_with_c_str (&line, "REPLY_SERIAL"))
field = DBUS_HEADER_FIELD_REPLY_SERIAL;
- else if (_dbus_string_starts_with_c_str (&line, "SERVICE"))
- field = DBUS_HEADER_FIELD_SERVICE;
- else if (_dbus_string_starts_with_c_str (&line, "SENDER_SERVICE"))
- field = DBUS_HEADER_FIELD_SENDER_SERVICE;
+ else if (_dbus_string_starts_with_c_str (&line, "DESTINATION"))
+ field = DBUS_HEADER_FIELD_DESTINATION;
+ else if (_dbus_string_starts_with_c_str (&line, "SENDER"))
+ field = DBUS_HEADER_FIELD_SENDER;
else if (_dbus_string_starts_with_c_str (&line, "UNKNOWN"))
field = 22; /* random unknown header field */
else
diff --git a/dbus/dbus-message.c b/dbus/dbus-message.c
index 9066843..03a3822 100644
--- a/dbus/dbus-message.c
+++ b/dbus/dbus-message.c
@@ -1062,7 +1062,7 @@ dbus_message_create_header (DBusMessage *message,
if (service != NULL)
{
if (!append_string_field (message,
- DBUS_HEADER_FIELD_SERVICE,
+ DBUS_HEADER_FIELD_DESTINATION,
DBUS_TYPE_STRING,
service))
return FALSE;
@@ -1289,7 +1289,7 @@ dbus_message_new_method_return (DBusMessage *method_call)
_dbus_return_val_if_fail (method_call != NULL, NULL);
sender = get_string_field (method_call,
- DBUS_HEADER_FIELD_SENDER_SERVICE,
+ DBUS_HEADER_FIELD_SENDER,
NULL);
/* sender is allowed to be null here in peer-to-peer case */
@@ -1380,7 +1380,7 @@ dbus_message_new_error (DBusMessage *reply_to,
_dbus_return_val_if_fail (error_name != NULL, NULL);
sender = get_string_field (reply_to,
- DBUS_HEADER_FIELD_SENDER_SERVICE,
+ DBUS_HEADER_FIELD_SENDER,
NULL);
/* sender may be NULL for non-message-bus case or
@@ -1825,7 +1825,7 @@ dbus_message_set_destination (DBusMessage *message,
_dbus_return_val_if_fail (!message->locked, FALSE);
return set_string_field (message,
- DBUS_HEADER_FIELD_SERVICE,
+ DBUS_HEADER_FIELD_DESTINATION,
DBUS_TYPE_STRING,
destination);
}
@@ -1842,7 +1842,7 @@ dbus_message_get_destination (DBusMessage *message)
_dbus_return_val_if_fail (message != NULL, NULL);
return get_string_field (message,
- DBUS_HEADER_FIELD_SERVICE,
+ DBUS_HEADER_FIELD_DESTINATION,
NULL);
}
@@ -4440,7 +4440,7 @@ dbus_message_set_sender (DBusMessage *message,
_dbus_return_val_if_fail (!message->locked, FALSE);
return set_string_field (message,
- DBUS_HEADER_FIELD_SENDER_SERVICE,
+ DBUS_HEADER_FIELD_SENDER,
DBUS_TYPE_STRING,
sender);
}
@@ -4550,7 +4550,7 @@ dbus_message_get_sender (DBusMessage *message)
_dbus_return_val_if_fail (message != NULL, NULL);
return get_string_field (message,
- DBUS_HEADER_FIELD_SENDER_SERVICE,
+ DBUS_HEADER_FIELD_SENDER,
NULL);
}
@@ -5093,7 +5093,7 @@ decode_header_data (const DBusString *data,
switch (field)
{
- case DBUS_HEADER_FIELD_SERVICE:
+ case DBUS_HEADER_FIELD_DESTINATION:
if (!decode_string_field (data, field, &fields[field],
&field_data, pos, type))
return FALSE;
@@ -5156,7 +5156,7 @@ decode_header_data (const DBusString *data,
}
break;
- case DBUS_HEADER_FIELD_SENDER_SERVICE:
+ case DBUS_HEADER_FIELD_SENDER:
if (!decode_string_field (data, field, &fields[field],
&field_data, pos, type))
return FALSE;
diff --git a/dbus/dbus-protocol.h b/dbus/dbus-protocol.h
index 54d70e4..b07bd39 100644
--- a/dbus/dbus-protocol.h
+++ b/dbus/dbus-protocol.h
@@ -81,10 +81,10 @@ extern "C" {
#define DBUS_HEADER_FIELD_MEMBER 3
#define DBUS_HEADER_FIELD_ERROR_NAME 4
#define DBUS_HEADER_FIELD_REPLY_SERIAL 5
-#define DBUS_HEADER_FIELD_SERVICE 6
-#define DBUS_HEADER_FIELD_SENDER_SERVICE 7
+#define DBUS_HEADER_FIELD_DESTINATION 6
+#define DBUS_HEADER_FIELD_SENDER 7
-#define DBUS_HEADER_FIELD_LAST DBUS_HEADER_FIELD_SENDER_SERVICE
+#define DBUS_HEADER_FIELD_LAST DBUS_HEADER_FIELD_SENDER
/* Services */
#define DBUS_SERVICE_ORG_FREEDESKTOP_DBUS "org.freedesktop.DBus"
diff --git a/doc/TODO b/doc/TODO
index 77308c2..7105910 100644
--- a/doc/TODO
+++ b/doc/TODO
@@ -120,10 +120,6 @@
base64, then we can dump the base64 implementation and
save some bloat.
- - rename HEADER_FIELD_SERVICE -> HEADER_FIELD_DESTINATION
- and HEADER_FIELD_SENDER_SERVICE -> HEADER_FIELD_SENDER
- for both dbus-protocol.h and in the spec
-
- Better error checking for bogus configuration files. Currently if a
configuration file tries to include itself the bus crashes on start. We
should probably have a check against this.
diff --git a/doc/dbus-specification.xml b/doc/dbus-specification.xml
index 2f22b77..412d8ea 100644
--- a/doc/dbus-specification.xml
+++ b/doc/dbus-specification.xml
@@ -339,7 +339,7 @@
see <xref linkend="message-protocol-header-encoding"/>.)</entry>
</row>
<row>
- <entry>SERVICE</entry>
+ <entry>DESTINATION</entry>
<entry>6</entry>
<entry>STRING</entry>
<entry>The name of the service this message should be routed to.
@@ -347,7 +347,7 @@
<xref linkend="message-bus"/>.</entry>
</row>
<row>
- <entry>SENDER_SERVICE</entry>
+ <entry>SENDER</entry>
<entry>7</entry>
<entry>STRING</entry>
<entry>Sender service. The name of the base service that sent