dbus/bus activation.c, 1.37, 1.38 config-parser.c, 1.39, 1.40 dbus-daemon-1.1.in, 1.10, 1.11 dispatch.c, 1.65, 1.66 driver.c, 1.60, 1.61 services.c, 1.28, 1.29 signals.c, 1.10, 1.11

Havoc Pennington hp@freedesktop.org
Tue Jan 18 12:42:17 PST 2005


Update of /cvs/dbus/dbus/bus
In directory gabe:/tmp/cvs-serv23786/bus

Modified Files:
	activation.c config-parser.c dbus-daemon-1.1.in dispatch.c 
	driver.c services.c signals.c 
Log Message:
2005-01-18  Havoc Pennington  <hp@redhat.com>

        * Throughout, grand renaming to strip out the use of "service",
	just say "name" instead (or "bus name" when ambiguous).  Did not
	change the internal code of the message bus itself, only the
	programmer-facing API and messages.
	
	* doc/dbus-specification.xml: further update the message bus section
	
	* bus/config-parser.c (all_are_equiv): fix bug using freed string
	in error case



Index: activation.c
===================================================================
RCS file: /cvs/dbus/dbus/bus/activation.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- activation.c	15 Jan 2005 07:15:38 -0000	1.37
+++ activation.c	18 Jan 2005 20:42:15 -0000	1.38
@@ -789,13 +789,13 @@
   /* If no memory, we simply have the child exit, so it won't try
    * to connect to the wrong thing.
    */
-  if (!_dbus_setenv ("DBUS_ACTIVATION_ADDRESS", activation->server_address))
+  if (!_dbus_setenv ("DBUS_STARTER_ADDRESS", activation->server_address))
     _dbus_exit (1);
   
   type = bus_context_get_type (activation->context);
   if (type != NULL)
     {
-      if (!_dbus_setenv ("DBUS_BUS_TYPE", type))
+      if (!_dbus_setenv ("DBUS_STARTER_BUS_TYPE", type))
         _dbus_exit (1);
 
       if (strcmp (type, "session") == 0)
@@ -920,7 +920,7 @@
 		  goto error;
 		}
 
-              result = DBUS_ACTIVATION_REPLY_ACTIVATED;
+              result = DBUS_START_REPLY_SUCCESS;
               
 	      if (!dbus_message_append_args (message,
 					     DBUS_TYPE_UINT32, &result,
@@ -1280,8 +1280,8 @@
 
   if (!entry) 
     {
-      dbus_set_error (error, DBUS_ERROR_ACTIVATE_SERVICE_NOT_FOUND,
-		      "The service %s was not found in the activation entry list",
+      dbus_set_error (error, DBUS_ERROR_SERVICE_UNKNOWN,
+		      "The name %s was not provided by any .service files",
 		      service_name);
       return NULL;
     }
@@ -1347,7 +1347,7 @@
               return FALSE;
             }
 
-          result = DBUS_ACTIVATION_REPLY_ALREADY_ACTIVE;
+          result = DBUS_START_REPLY_ALREADY_RUNNING;
           
           if (!dbus_message_append_args (message,
                                          DBUS_TYPE_UINT32, &result,

Index: config-parser.c
===================================================================
RCS file: /cvs/dbus/dbus/bus/config-parser.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- config-parser.c	7 Nov 2004 17:05:19 -0000	1.39
+++ config-parser.c	18 Jan 2005 20:42:15 -0000	1.40
@@ -1677,7 +1677,7 @@
       must_be_positive = TRUE;
       parser->limits.max_message_size = value;
     }
-  else if (strcmp (name, "activation_timeout") == 0)
+  else if (strcmp (name, "service_start_timeout") == 0)
     {
       must_be_positive = TRUE;
       must_be_int = TRUE;
@@ -1713,13 +1713,13 @@
       must_be_int = TRUE;
       parser->limits.max_connections_per_user = value;
     }
-  else if (strcmp (name, "max_pending_activations") == 0)
+  else if (strcmp (name, "max_pending_service_starts") == 0)
     {
       must_be_positive = TRUE;
       must_be_int = TRUE;
       parser->limits.max_pending_activations = value;
     }
-  else if (strcmp (name, "max_services_per_connection") == 0)
+  else if (strcmp (name, "max_names_per_connection") == 0)
     {
       must_be_positive = TRUE;
       must_be_int = TRUE;
@@ -2814,28 +2814,29 @@
       printf ("    %s\n", _dbus_string_get_const_data (&filename));
 
       parser = bus_config_load (&full_path, TRUE, NULL, &error);
-      _dbus_string_free (&full_path);
 
       if (parser == NULL)
 	{
 	  _dbus_warn ("Could not load file %s: %s\n",
 		      _dbus_string_get_const_data (&full_path),
 		      error.message);
+          _dbus_string_free (&full_path);
 	  dbus_error_free (&error);
 	  goto finished;
 	}
       else if (first_parser == NULL)
 	{
+          _dbus_string_free (&full_path);
 	  first_parser = parser;
 	}
       else
 	{
+          _dbus_string_free (&full_path);
 	  equal = config_parsers_equal (first_parser, parser);
 	  bus_config_parser_unref (parser);
 	  if (! equal)
 	    goto finished;
 	}
-
     }
 
   retval = TRUE;

Index: dbus-daemon-1.1.in
===================================================================
RCS file: /cvs/dbus/dbus/bus/dbus-daemon-1.1.in,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- dbus-daemon-1.1.in	27 Nov 2004 02:18:36 -0000	1.10
+++ dbus-daemon-1.1.in	18 Jan 2005 20:42:15 -0000	1.11
@@ -23,7 +23,7 @@
 
 .PP
 There are two standard message bus instances: the systemwide message bus 
-(installed on many systems as the "messagebus" service) and the 
+(installed on many systems as the "messagebus" init service) and the 
 per-user-login-session message bus (started each time a user logs in).
 \fIdbus-daemon-1\fP is used for both of these instances, but with 
 a different configuration file.
@@ -212,7 +212,7 @@
 .PP
 If there are multiple <listen> elements, then the bus listens 
 on multiple addresses. The bus will pass its address to 
-activated services or other interested parties with 
+started services or other interested parties with 
 the last address given in <listen> first. That is, 
 apps will try to connect to the last <listen> address first.
 
@@ -241,8 +241,8 @@
 service will be used).
 
 .PP
-Service files tell the bus how to automatically start a particular
-service. They are primarily used with the per-user-session bus, 
+Service files tell the bus how to automatically start a program.
+They are primarily used with the per-user-session bus, 
 not the systemwide bus.
 
 .TP
@@ -265,8 +265,8 @@
                                      queued up for a single connection
       "max_message_size"           : max size of a single message in
                                      bytes
-      "activation_timeout"         : milliseconds (thousandths) until 
-                                     an activated service has to connect
+      "service_start_timeout"      : milliseconds (thousandths) until 
+                                     a started service has to connect
       "auth_timeout"               : milliseconds (thousandths) a
                                      connection is given to
                                      authenticate
@@ -275,9 +275,9 @@
                                      connections
       "max_connections_per_user"   : max number of completed connections from
                                      the same user
-      "max_pending_activations"    : max number of activations in
+      "max_pending_service_starts" : max number of service launches in
                                      progress at the same time
-      "max_services_per_connection": max number of services a single 
+      "max_names_per_connection"   : max number of names a single 
                                      connection can own
       "max_match_rules_per_connection": max number of match rules for a single 
                                         connection
@@ -347,14 +347,14 @@
    send_interface="interface_name"
    send_member="method_or_signal_name" 
    send_error="error_name" 
-   send_destination="service_name" 
+   send_destination="name" 
    send_type="method_call" | "method_return" | "signal" | "error" 
    send_path="/path/name"
 
    receive_interface="interface_name"
    receive_member="method_or_signal_name" 
    receive_error="error_name" 
-   receive_sender="service_name" 
+   receive_sender="name" 
    receive_type="method_call" | "method_return" | "signal" | "error"
    receive_path="/path/name"
 
@@ -363,7 +363,7 @@
 
    eavesdrop="true" | "false"
 
-   own="servicename"
+   own="name"
    user="username"
    group="groupname"
 .fi
@@ -387,8 +387,8 @@
 
 .PP
 send_destination and receive_sender rules mean that messages may not be
-sent to or received from the *owner* of the given service, not that
-they may not be sent *to that service name*. That is, if a connection
+sent to or received from the *owner* of the given name, not that
+they may not be sent *to that name*. That is, if a connection
 owns services A, B, C, and sending to A is denied, sending to B or C
 will not work either.
 
@@ -398,7 +398,7 @@
 
 .PP
 "Eavesdropping" occurs when an application receives a message that
-was explicitly addressed to a service the application does not own.
+was explicitly addressed to a name the application does not own.
 Eavesdropping thus only applies to messages that are addressed to
 services (i.e. it does not apply to signals).
 
@@ -437,7 +437,7 @@
 not connect to the message bus.
 
 .PP
-For "service_name", "username", "groupname", etc.
+For "name", "username", "groupname", etc.
 the character "*" can be substituted, meaning "any." Complex globs
 like "foo.bar.*" aren't allowed for now because they'd be work to
 implement and maybe encourage sloppy security anyway.
@@ -449,10 +449,10 @@
 
 .PP
 A single <deny> rule may specify combinations of attributes such as
-send_service and send_interface and send_type. In this case, the
+send_destination and send_interface and send_type. In this case, the
 denial applies only if both attributes match the message being denied.
-e.g. <deny send_interface="foo.bar" send_service="foo.blah"/> would
-deny messages of the given interface AND to the given service.
+e.g. <deny send_interface="foo.bar" send_destination="foo.blah"/> would
+deny messages with the given interface AND the given bus name.
 To get an OR effect you specify multiple <deny> rules.
 
 .PP
@@ -482,17 +482,17 @@
 .fi
 
 .PP
-This means that if a connection asks to own the service
+This means that if a connection asks to own the name
 "org.freedesktop.Foobar" then the source context will be the context
 of the connection and the target context will be "foo_t" - see the 
 short discussion of SELinux below.
 
 .PP
-Note, the context here is the target context when acquiring a service,
-NOT the context of the connection owning the service.
+Note, the context here is the target context when requesting a name,
+NOT the context of the connection owning the name.
 
 .PP
-There's currently no way to set a default for owning any service, if
+There's currently no way to set a default for owning any name, if
 we add this syntax it will look like:
 .nf
    <associate own="*" context="foo_t"/> 
@@ -501,9 +501,8 @@
 Right now the default will be the security context of the bus itself.
 
 .PP
-If two <associate> elements specify the same service name, 
-the element appearing later in the configuration file will 
-be used.
+If two <associate> elements specify the same name, the element
+appearing later in the configuration file will be used.
 
 .SH SELinux
 
@@ -557,14 +556,14 @@
 probably add a way to set the default connection context.
 
 .PP
-Second, any time a connection asks to own a service, 
+Second, any time a connection asks to own a name, 
 the bus daemon will check permissions with the security 
 context of the connection as source, the security context specified
-for the service name with an <associate> element as target, object 
+for the name with an <associate> element as target, object 
 class "dbus" and requested permission "acquire_svc".
 
 .PP
-If the service name has no security context associated in the 
+If the name has no security context associated in the 
 configuration file, the security context of the bus daemon 
 itself will be used.
 

Index: dispatch.c
===================================================================
RCS file: /cvs/dbus/dbus/bus/dispatch.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- dispatch.c	15 Jan 2005 07:15:38 -0000	1.65
+++ dispatch.c	18 Jan 2005 20:42:15 -0000	1.66
@@ -258,7 +258,7 @@
       _dbus_string_init_const (&service_string, service_name);
       service = bus_registry_lookup (registry, &service_string);
 
-      if (service == NULL && dbus_message_get_auto_activation (message))
+      if (service == NULL && dbus_message_get_auto_start (message))
         {
 	  BusActivation *activation;
 
@@ -281,8 +281,8 @@
       else if (service == NULL)
         {
           dbus_set_error (&error,
-                          DBUS_ERROR_SERVICE_DOES_NOT_EXIST,
-                          "Service \"%s\" does not exist",
+                          DBUS_ERROR_NAME_HAS_NO_OWNER,
+                          "Name \"%s\" does not exist",
                           service_name);
           goto out;
         }
@@ -539,14 +539,14 @@
   if (message == NULL)
     {
       _dbus_warn ("Did not receive a message on %p, expecting %s\n",
-                  connection, "ServiceOwnerChanged");
+                  connection, "NameOwnerChanged");
       goto out;
     }
   else if (!dbus_message_is_signal (message,
                                     DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS,
-                                    "ServiceOwnerChanged"))
+                                    "NameOwnerChanged"))
     {
-      warn_unexpected (connection, message, "ServiceOwnerChanged");
+      warn_unexpected (connection, message, "NameOwnerChanged");
 
       goto out;
     }
@@ -582,7 +582,7 @@
           || (d->expected_kind == OWNER_CHANGED   && (!old_owner[0] || !new_owner[0]))
           || (d->expected_kind == SERVICE_DELETED && (!old_owner[0] ||  new_owner[0])))
         {
-          _dbus_warn ("inconsistent ServiceOwnerChanged arguments");
+          _dbus_warn ("inconsistent NameOwnerChanged arguments");
           goto out;
         }
 
@@ -625,7 +625,7 @@
 
   _dbus_verbose ("killing connection %p\n", connection);
   
-  s = dbus_bus_get_base_service (connection);
+  s = dbus_bus_get_unique_name (connection);
   _dbus_assert (s != NULL);
 
   while ((base_service = _dbus_strdup (s)) == NULL)
@@ -660,7 +660,7 @@
   dbus_free (base_service);
   
   if (socd.failed)
-    _dbus_assert_not_reached ("didn't get the expected ServiceOwnerChanged (deletion) messages");
+    _dbus_assert_not_reached ("didn't get the expected NameOwnerChanged (deletion) messages");
   
   if (!check_no_leftovers (context))
     _dbus_assert_not_reached ("stuff left in message queues after disconnecting a client");
@@ -877,7 +877,7 @@
 
       _dbus_verbose ("Got hello name: %s\n", name);
 
-      while (!dbus_bus_set_base_service (connection, name))
+      while (!dbus_bus_set_unique_name (connection, name))
         _dbus_wait_for_memory ();
       
       socd.expected_kind = SERVICE_CREATED;
@@ -897,14 +897,14 @@
       if (message == NULL)
         {
           _dbus_warn ("Expecting %s, got nothing\n",
-                      "ServiceAcquired");
+                      "NameAcquired");
           goto out;
         }
       if (! dbus_message_is_signal (message, DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS,
-				    "ServiceAcquired"))
+				    "NameAcquired"))
         {
           _dbus_warn ("Expecting %s, got smthg else\n",
-                      "ServiceAcquired");
+                      "NameAcquired");
           goto out;
         }
       
@@ -1076,7 +1076,7 @@
   if (message == NULL)
     return TRUE;
 
-  base_service_name = dbus_bus_get_base_service (connection);
+  base_service_name = dbus_bus_get_unique_name (connection);
 
   if (!dbus_message_append_args (message, 
                                  DBUS_TYPE_STRING, &base_service_name,
@@ -1213,7 +1213,7 @@
   if (message == NULL)
     return TRUE;
 
-  base_service_name = dbus_bus_get_base_service (connection);
+  base_service_name = dbus_bus_get_unique_name (connection);
 
   if (!dbus_message_append_args (message, 
                                  DBUS_TYPE_STRING, &base_service_name,
@@ -1500,7 +1500,7 @@
   if (!check_hello_message (context, connection))
     return FALSE;
   
-  if (dbus_bus_get_base_service (connection) == NULL)
+  if (dbus_bus_get_unique_name (connection) == NULL)
     {
       /* We didn't successfully register, so we can't
        * do the usual kill_client_connection() checks
@@ -1536,8 +1536,8 @@
   message = dbus_message_new_method_call (DBUS_SERVICE_ORG_FREEDESKTOP_DBUS,
                                           DBUS_PATH_ORG_FREEDESKTOP_DBUS,
                                           DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS,
-                                          "ActivateService");
-
+                                          "StartServiceByName");
+  
   if (message == NULL)
     return TRUE;
 
@@ -1576,7 +1576,7 @@
   if (message == NULL)
     {
       _dbus_warn ("Did not receive a reply to %s %d on %p\n",
-                  "ActivateService", serial, connection);
+                  "StartServiceByName", serial, connection);
       goto out;
     }
 
@@ -1598,7 +1598,7 @@
           ; /* good, this is a valid response */
         }
       else if (dbus_message_is_error (message,
-                                      DBUS_ERROR_ACTIVATE_SERVICE_NOT_FOUND))
+                                      DBUS_ERROR_SERVICE_UNKNOWN))
         {
           ; /* good, this is expected also */
         }
@@ -1643,7 +1643,7 @@
   if (message == NULL)
     return TRUE;
 
-  dbus_message_set_auto_activation (message, TRUE);
+  dbus_message_set_auto_start (message, TRUE);
  
   if (!dbus_connection_send (connection, message, &serial))
     {
@@ -1693,7 +1693,7 @@
           ; /* good, this is a valid response */
         }
       else if (dbus_message_is_error (message,
-                                      DBUS_ERROR_ACTIVATE_SERVICE_NOT_FOUND))
+                                      DBUS_ERROR_SERVICE_UNKNOWN))
         {
           ; /* good, this is expected also */
         }
@@ -1742,7 +1742,7 @@
 
   if (dbus_message_is_signal (message,
                               DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS,
-                              "ServiceOwnerChanged"))
+                              "NameOwnerChanged"))
     {
       CheckServiceOwnerChangedData socd;
 
@@ -1766,7 +1766,7 @@
           else
             {
               _dbus_warn ("Message %s doesn't have a service name: %s\n",
-                          "ServiceOwnerChanged (creation)",
+                          "NameOwnerChanged (creation)",
                           error.message);
               goto out;
             }
@@ -1805,7 +1805,7 @@
     }
   else
     {
-      warn_unexpected (connection, message, "ServiceOwnerChanged (creation) for base service");
+      warn_unexpected (connection, message, "NameOwnerChanged (creation) for base service");
 
       goto out;
     }
@@ -1844,7 +1844,7 @@
 
   if (dbus_message_is_signal (message,
                               DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS,
-                              "ServiceOwnerChanged"))
+                              "NameOwnerChanged"))
     {
       CheckServiceOwnerChangedData socd;
       const char *service_name, *base_service_from_bus, *old_owner;
@@ -1869,7 +1869,7 @@
           else
             {
               _dbus_warn ("Message %s doesn't have a service name: %s\n",
-                          "ServiceOwnerChanged (creation)",
+                          "NameOwnerChanged (creation)",
                           error.message);
               goto out;
             }
@@ -1884,7 +1884,7 @@
 
       if (strcmp (base_service_name, base_service_from_bus) != 0)
         {
-          _dbus_warn ("ServiceOwnerChanged reports wrong base service: %s owner, expected %s instead\n",
+          _dbus_warn ("NameOwnerChanged reports wrong base service: %s owner, expected %s instead\n",
                       base_service_from_bus, base_service_name);
           goto out;
         }
@@ -1892,8 +1892,8 @@
       if (old_owner[0])
         {
           _dbus_warn ("expected a %s, got a %s\n",
-                      "ServiceOwnerChanged (creation)",
-                      "ServiceOwnerChanged (change)");
+                      "NameOwnerChanged (creation)",
+                      "NameOwnerChanged (change)");
           goto out;
         }
 
@@ -1916,20 +1916,20 @@
       if (message == NULL)
         {
           _dbus_warn ("Expected a reply to %s, got nothing\n",
-                      "ActivateService");
+                      "StartServiceByName");
           goto out;
         }
     }
   else
     {
-      warn_unexpected (connection, message, "ServiceOwnerChanged for the activated name");
+      warn_unexpected (connection, message, "NameOwnerChanged for the activated name");
       
       goto out;
     }
   
   if (dbus_message_get_type (message) != DBUS_MESSAGE_TYPE_METHOD_RETURN)
     {
-      warn_unexpected (connection, message, "reply to ActivateService");
+      warn_unexpected (connection, message, "reply to StartServiceByName");
 
       goto out;
     }
@@ -1942,7 +1942,7 @@
       if (!dbus_error_has_name (&error, DBUS_ERROR_NO_MEMORY))
         {
           _dbus_warn ("Did not have activation result first argument to %s: %s\n",
-                      "ActivateService", error.message);
+                      "StartServiceByName", error.message);
           goto out;
         }
 
@@ -1950,13 +1950,13 @@
     }
   else
     {
-      if (activation_result == DBUS_ACTIVATION_REPLY_ACTIVATED)
+      if (activation_result == DBUS_START_REPLY_SUCCESS)
         ; /* Good */
-      else if (activation_result == DBUS_ACTIVATION_REPLY_ALREADY_ACTIVE)
+      else if (activation_result == DBUS_START_REPLY_ALREADY_RUNNING)
         ; /* Good also */
       else
         {
-          _dbus_warn ("Activation result was 0x%x, no good.\n",
+          _dbus_warn ("Activation result was %u, no good.\n",
                       activation_result);
           goto out;
         }
@@ -2001,7 +2001,7 @@
 
   if (dbus_message_is_signal (message,
                               DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS,
-                              "ServiceOwnerChanged"))
+                              "NameOwnerChanged"))
     {
       const char *service_name;
       CheckServiceOwnerChangedData socd;
@@ -2020,7 +2020,7 @@
           else
             {
               _dbus_warn ("Message %s doesn't have a service name: %s\n",
-                          "ServiceOwnerChanged",
+                          "NameOwnerChanged",
                           error.message);
               dbus_error_free (&error);
               goto out;
@@ -2054,7 +2054,7 @@
     }
   else
     {
-      warn_unexpected (connection, message, "ServiceOwnerChanged for the activated name");
+      warn_unexpected (connection, message, "NameOwnerChanged for the activated name");
       
       goto out;
     }
@@ -2335,7 +2335,7 @@
 
   if (dbus_message_is_signal (message,
                               DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS,
-                              "ServiceOwnerChanged"))
+                              "NameOwnerChanged"))
     {
       DBusError error;
       const char *service_name, *old_owner, *new_owner;
@@ -2360,7 +2360,7 @@
             }
           else
             {
-              _dbus_warn ("unexpected arguments for ServiceOwnerChanged message");
+              _dbus_warn ("unexpected arguments for NameOwnerChanged message");
               message_kind = GOT_SOMETHING_ELSE;
             }
         }
@@ -2403,7 +2403,7 @@
   message = dbus_message_new_method_call (DBUS_SERVICE_ORG_FREEDESKTOP_DBUS,
                                           DBUS_PATH_ORG_FREEDESKTOP_DBUS,
                                           DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS,
-                                          "ActivateService");
+                                          "StartServiceByName");
 
   if (message == NULL)
     return TRUE;
@@ -2448,12 +2448,12 @@
   if (message == NULL)
     {
       _dbus_warn ("Did not receive any messages after %s %d on %p\n",
-                  "ActivateService", serial, connection);
+                  "StartServiceByName", serial, connection);
       goto out;
     }
 
   verbose_message_received (connection, message);
-  _dbus_verbose ("  (after sending %s)\n", "ActivateService");
+  _dbus_verbose ("  (after sending %s)\n", "StartServiceByName");
 
   if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_ERROR)
     {
@@ -2570,7 +2570,7 @@
           if (message == NULL)
             {
               _dbus_warn ("Failed to pop message we just put back! "
-			  "should have been a ServiceOwnerChanged (creation)\n");
+			  "should have been a NameOwnerChanged (creation)\n");
               goto out;
             }
           
@@ -2623,7 +2623,7 @@
   message = dbus_message_new_method_call (DBUS_SERVICE_ORG_FREEDESKTOP_DBUS,
                                           DBUS_PATH_ORG_FREEDESKTOP_DBUS,
                                           DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS,
-                                          "ActivateService");
+                                          "StartServiceByName");
 
   if (message == NULL)
     return TRUE;
@@ -2664,7 +2664,7 @@
   if (message == NULL)
     {
       _dbus_warn ("Did not receive a reply to %s %d on %p\n",
-                  "ActivateService", serial, connection);
+                  "StartServiceByName", serial, connection);
       goto out;
     }
 
@@ -2732,7 +2732,7 @@
   if (message == NULL)
     return TRUE;
 
-  dbus_message_set_auto_activation (message, TRUE);
+  dbus_message_set_auto_start (message, TRUE);
   
   if (!dbus_connection_send (connection, message, &serial))
     {
@@ -2833,7 +2833,7 @@
   if (message == NULL)
     return TRUE;
 
-  dbus_message_set_auto_activation (message, TRUE);
+  dbus_message_set_auto_start (message, TRUE);
 
   text = TEST_ECHO_MESSAGE;
   if (!dbus_message_append_args (message,
@@ -2872,13 +2872,13 @@
   message = pop_message_waiting_for_memory (connection);
   if (message == NULL)
     {
-      _dbus_warn ("Did not receive any messages after auto activation %d on %p\n",
+      _dbus_warn ("Did not receive any messages after auto start %d on %p\n",
                   serial, connection);
       goto out;
     }
 
   verbose_message_received (connection, message);
-  _dbus_verbose ("  (after sending %s)\n", "auto activation");
+  _dbus_verbose ("  (after sending %s)\n", "auto start");
 
   /* we should get zero or two ServiceOwnerChanged signals */
   if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_SIGNAL)
@@ -2920,7 +2920,7 @@
 	  if (message == NULL)
 	    {
 	      _dbus_warn ("Failed to pop message we just put back! "
-			  "should have been a ServiceOwnerChanged (creation)\n");
+			  "should have been a NameOwnerChanged (creation)\n");
 	      goto out;
 	    }
 	    

Index: driver.c
===================================================================
RCS file: /cvs/dbus/dbus/bus/driver.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- driver.c	17 Jan 2005 19:49:52 -0000	1.60
+++ driver.c	18 Jan 2005 20:42:15 -0000	1.61
@@ -52,14 +52,14 @@
   _DBUS_ASSERT_ERROR_IS_CLEAR (error);
 
   null_service = "";
-  _dbus_verbose ("sending service owner changed: %s [%s -> %s]\n",
+  _dbus_verbose ("sending name owner changed: %s [%s -> %s]\n",
                  service_name, 
                  old_owner ? old_owner : null_service, 
                  new_owner ? new_owner : null_service);
 
   message = dbus_message_new_signal (DBUS_PATH_ORG_FREEDESKTOP_DBUS,
                                      DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS,
-                                     "ServiceOwnerChanged");
+                                     "NameOwnerChanged");
   
   if (message == NULL)
     {
@@ -102,7 +102,7 @@
   
   message = dbus_message_new_signal (DBUS_PATH_ORG_FREEDESKTOP_DBUS,
                                      DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS,
-                                     "ServiceLost");
+                                     "NameLost");
   
   if (message == NULL)
     {
@@ -145,7 +145,7 @@
   
   message = dbus_message_new_signal (DBUS_PATH_ORG_FREEDESKTOP_DBUS,
                                      DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS,
-                                     "ServiceAcquired");
+                                     "NameAcquired");
 
   if (message == NULL)
     {
@@ -597,7 +597,7 @@
                               DBUS_TYPE_INVALID))
     {
       _DBUS_ASSERT_ERROR_IS_SET (error);
-      _dbus_verbose ("No memory to get arguments to ActivateService\n");
+      _dbus_verbose ("No memory to get arguments to StartServiceByName\n");
       return FALSE;
     }
 
@@ -795,17 +795,18 @@
   if (service == NULL)
     {
       dbus_set_error (error, 
-		      DBUS_ERROR_SERVICE_HAS_NO_OWNER,
-		      "Could not get owner of service '%s': no such service", text);
+		      DBUS_ERROR_NAME_HAS_NO_OWNER,
+		      "Could not get owner of name '%s': no such name", text);
       goto failed;
     }
 
   base_name = bus_connection_get_name (bus_service_get_primary_owner (service));
   if (base_name == NULL)
     {
+      /* FIXME - how is this error possible? */
       dbus_set_error (error,
 		      DBUS_ERROR_FAILED,
-		      "Could not determine base service for '%s'", text);
+		      "Could not determine unique name for '%s'", text);
       goto failed;
     }
   _dbus_assert (*base_name == ':');
@@ -870,8 +871,8 @@
   if (serv == NULL)
     {
       dbus_set_error (error, 
-		      DBUS_ERROR_SERVICE_HAS_NO_OWNER,
-		      "Could not get owner of service '%s': no such service", service);
+		      DBUS_ERROR_NAME_HAS_NO_OWNER,
+		      "Could not get UID of name '%s': no such name", service);
       goto failed;
     }
 
@@ -946,8 +947,8 @@
   if (serv == NULL)
     {
       dbus_set_error (error, 
-		      DBUS_ERROR_SERVICE_HAS_NO_OWNER,
-		      "Could not get owner of service '%s': no such service", service);
+		      DBUS_ERROR_NAME_HAS_NO_OWNER,
+		      "Could not get PID of name '%s': no such name", service);
       goto failed;
     }
 
@@ -1026,14 +1027,14 @@
                            DBusMessage    *message,
                            DBusError      *error);
 } message_handlers[] = {
-  { "AcquireService", bus_driver_handle_acquire_service },
-  { "ActivateService", bus_driver_handle_activate_service },
+  { "RequestName", bus_driver_handle_acquire_service },
+  { "StartServiceByName", bus_driver_handle_activate_service },
   { "Hello", bus_driver_handle_hello },
-  { "ServiceExists", bus_driver_handle_service_exists },
-  { "ListServices", bus_driver_handle_list_services },
+  { "NameHasOwner", bus_driver_handle_service_exists },
+  { "ListNames", bus_driver_handle_list_services },
   { "AddMatch", bus_driver_handle_add_match },
   { "RemoveMatch", bus_driver_handle_remove_match },
-  { "GetServiceOwner", bus_driver_handle_get_service_owner },
+  { "GetNameOwner", bus_driver_handle_get_service_owner },
   { "GetConnectionUnixUser", bus_driver_handle_get_connection_unix_user },
   { "GetConnectionUnixProcessID", bus_driver_handle_get_connection_unix_process_id },
   { "ReloadConfig", bus_driver_handle_reload_config }

Index: services.c
===================================================================
RCS file: /cvs/dbus/dbus/bus/services.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- services.c	15 Jan 2005 07:15:38 -0000	1.28
+++ services.c	18 Jan 2005 20:42:15 -0000	1.29
@@ -375,14 +375,14 @@
       _dbus_assert (current_owner == connection);
 
       bus_service_set_prohibit_replacement (service,
-					    (flags & DBUS_SERVICE_FLAG_PROHIBIT_REPLACEMENT));      
+					    (flags & DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT));      
 			
-      *result = DBUS_SERVICE_REPLY_PRIMARY_OWNER;      
+      *result = DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER;      
     }
   else if (old_owner == connection)
-    *result = DBUS_SERVICE_REPLY_ALREADY_OWNER;
-  else if (!((flags & DBUS_SERVICE_FLAG_REPLACE_EXISTING)))
-    *result = DBUS_SERVICE_REPLY_SERVICE_EXISTS;
+    *result = DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER;
+  else if (!((flags & DBUS_NAME_FLAG_REPLACE_EXISTING)))
+    *result = DBUS_REQUEST_NAME_REPLY_EXISTS;
   else if (bus_service_get_prohibit_replacement (service))
     {
       /* Queue the connection */
@@ -390,14 +390,14 @@
                                   transaction, error))
         goto out;
       
-      *result = DBUS_SERVICE_REPLY_IN_QUEUE;
+      *result = DBUS_REQUEST_NAME_REPLY_IN_QUEUE;
     }
   else
     {
       /* Replace the current owner */
 
       /* We enqueue the new owner and remove the first one because
-       * that will cause ServiceAcquired and ServiceLost messages to
+       * that will cause NameAcquired and NameLost messages to
        * be sent.
        */
       
@@ -410,7 +410,7 @@
         goto out;
       
       _dbus_assert (connection == bus_service_get_primary_owner (service));
-      *result = DBUS_SERVICE_REPLY_PRIMARY_OWNER;
+      *result = DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER;
     }
 
   activation = bus_context_get_activation (registry->context);

Index: signals.c
===================================================================
RCS file: /cvs/dbus/dbus/bus/signals.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- signals.c	15 Jan 2005 07:15:38 -0000	1.10
+++ signals.c	18 Jan 2005 20:42:15 -0000	1.11
@@ -657,10 +657,10 @@
               goto failed;
             }
 
-          if (!_dbus_validate_service (&tmp_str, 0, len))
+          if (!_dbus_validate_bus_name (&tmp_str, 0, len))
             {
               dbus_set_error (error, DBUS_ERROR_MATCH_RULE_INVALID,
-                              "Sender service name '%s' is invalid\n", value);
+                              "Sender name '%s' is invalid\n", value);
               goto failed;
             }
 
@@ -745,10 +745,10 @@
               goto failed;
             }
 
-          if (!_dbus_validate_service (&tmp_str, 0, len))
+          if (!_dbus_validate_bus_name (&tmp_str, 0, len))
             {
               dbus_set_error (error, DBUS_ERROR_MATCH_RULE_INVALID,
-                              "Destination service name '%s' is invalid\n", value);
+                              "Destination name '%s' is invalid\n", value);
               goto failed;
             }
 



More information about the dbus-commit mailing list