dbus/dbus dbus-message.c, 1.120, 1.121 dbus-message.h, 1.49, 1.50 dbus-protocol.h, 1.25, 1.26

Richard Hult richard at pdx.freedesktop.org
Tue Mar 16 10:00:37 PST 2004


Update of /cvs/dbus/dbus/dbus
In directory pdx:/tmp/cvs-serv27501/dbus

Modified Files:
	dbus-message.c dbus-message.h dbus-protocol.h 
Log Message:
2004-03-16  Richard Hult  <richard at imendio.com>

	* bus/activation.c: (bus_activation_service_created),
	(bus_activation_send_pending_auto_activation_messages),
	(bus_activation_activate_service):
	* bus/activation.h:
	* bus/dispatch.c: (bus_dispatch),
	(check_nonexistent_service_auto_activation),
	(check_service_auto_activated),
	(check_segfault_service_auto_activation),
	(check_existent_service_auto_activation), (bus_dispatch_test):
	* bus/driver.c: (bus_driver_handle_activate_service):
	* bus/services.c: (bus_registry_acquire_service):
	* dbus/dbus-message.c: (dbus_message_set_auto_activation),
	(dbus_message_get_auto_activation):
	* dbus/dbus-message.h:
	* dbus/dbus-protocol.h: Implement auto-activation.


Index: dbus-message.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-message.c,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -d -r1.120 -r1.121
--- a/dbus-message.c	12 Mar 2004 14:18:34 -0000	1.120
+++ b/dbus-message.c	16 Mar 2004 18:00:35 -0000	1.121
@@ -4387,6 +4387,35 @@
   return (*header & DBUS_HEADER_FLAG_NO_REPLY_EXPECTED) != 0;
 }
 
+void
+dbus_message_set_auto_activation (DBusMessage *message,
+				  dbus_bool_t  auto_activation)
+{
+  char *header;
+
+  _dbus_return_if_fail (message != NULL);
+  _dbus_return_if_fail (!message->locked);
+  
+  header = _dbus_string_get_data_len (&message->header, FLAGS_OFFSET, 1);
+  
+  if (auto_activation)
+    *header |= DBUS_HEADER_FLAG_AUTO_ACTIVATION;
+  else
+    *header &= ~DBUS_HEADER_FLAG_AUTO_ACTIVATION;
+}
+
+dbus_bool_t
+dbus_message_get_auto_activation (DBusMessage *message)
+{
+  const char *header;
+
+  _dbus_return_val_if_fail (message != NULL, FALSE);
+  
+  header = _dbus_string_get_const_data_len (&message->header, FLAGS_OFFSET, 1);
+
+  return (*header & DBUS_HEADER_FLAG_AUTO_ACTIVATION) != 0;
+}
+
 /**
  * Gets the service which originated this message,
  * or #NULL if unknown or inapplicable.

Index: dbus-message.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-message.h,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- a/dbus-message.h	2 Dec 2003 10:44:21 -0000	1.49
+++ b/dbus-message.h	16 Mar 2004 18:00:35 -0000	1.50
@@ -119,6 +119,10 @@
                                              dbus_uint32_t  reply_serial);
 dbus_uint32_t dbus_message_get_reply_serial (DBusMessage   *message);
 
+void          dbus_message_set_auto_activation (DBusMessage   *message,
+						dbus_bool_t    auto_activation);
+dbus_bool_t   dbus_message_get_auto_activation (DBusMessage   *message);
+
 dbus_bool_t   dbus_message_get_path_decomposed (DBusMessage   *message,
                                                 char        ***path);
 

Index: dbus-protocol.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-protocol.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- a/dbus-protocol.h	2 Dec 2003 10:44:21 -0000	1.25
+++ b/dbus-protocol.h	16 Mar 2004 18:00:35 -0000	1.26
@@ -72,6 +72,7 @@
   
 /* Header flags */
 #define DBUS_HEADER_FLAG_NO_REPLY_EXPECTED 0x1
+#define DBUS_HEADER_FLAG_AUTO_ACTIVATION   0x2
   
 /* Header fields */
 #define DBUS_HEADER_FIELD_INVALID        0




More information about the dbus-commit mailing list