dbus/python dbus_bindings.pyx.in,1.18,1.19 dbus.py,1.15,1.16

John Palmieri johnp@freedesktop.org
Tue Jan 25 11:06:56 PST 2005


Update of /cvs/dbus/dbus/python
In directory gabe:/tmp/cvs-serv31269/python

Modified Files:
	dbus_bindings.pyx.in dbus.py 
Log Message:
* python/dbus_bindings.pyx.in: Rename of methods and bindings
	- get_base_service->get_unique_name
	- bus_get_base_service->bus_get_unique_name
	- dbus_bus_get_base_service -> dbus_bus_get_unique_name
	- ACTIVATION_REPLY_ACTIVATED -> DBUS_START_REPLY_SUCCESS 
	- ACTIVATION_REPLY_ALREADY_ACTIVE -> DBUS_START_REPLY_ALREADY_RUNNING
	- bus_activate_service -> bus_start_service_by_name
	- dbus_bus_activate_service -> dbus_bus_start_service_by_name
	- bus_acquire_service -> bus_request_name
	- dbus_bus_acquire_service -> dbus_bus_request_name
	- bus_service_exists -> bus_name_has_owner
	- dbus_bus_service_exists -> dbus_bus_name_has_owner

* python/dbus.py: Rename of methods
	- activate_service -> start_service_by_name
	- bus_acquire_service -> bus_request_name
	- ACTIVATION_REPLY_ACTIVATED -> START_REPLY_SUCCESS 
	- ACTIVATION_REPLY_ALREADY_ACTIVE -> START_REPLY_ALREADY_RUNNING



Index: dbus_bindings.pyx.in
===================================================================
RCS file: /cvs/dbus/dbus/python/dbus_bindings.pyx.in,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- dbus_bindings.pyx.in	30 Dec 2004 14:19:54 -0000	1.18
+++ dbus_bindings.pyx.in	25 Jan 2005 19:06:53 -0000	1.19
@@ -153,8 +153,8 @@
     cdef DBusConnection *_get_conn(self):
         return self.conn
     
-    def get_base_service(self):
-        return bus_get_base_service(self)
+    def get_unique_name(self):
+        return bus_get_unique_name(self)
 
     def setup_with_g_main(self):
         dbus_connection_setup_with_g_main(self.conn, NULL)
@@ -1127,10 +1127,10 @@
     conn.__cinit__(None, connection)
     return conn 
 
-def bus_get_base_service(Connection connection):
+def bus_get_unique_name(Connection connection):
     cdef DBusConnection *conn
     conn = connection._get_conn()
-    return dbus_bus_get_base_service(conn)
+    return dbus_bus_get_unique_name(conn)
 
 def bus_get_unix_user(Connection connection, service_name):
     cdef DBusError error
@@ -1146,10 +1146,10 @@
     return retval
 
 #These are defines, not enums so they aren't auto generated
-ACTIVATION_REPLY_ACTIVATED = 0 
-ACTIVATION_REPLY_ALREADY_ACTIVE = 1 
+DBUS_START_REPLY_SUCCESS = 0 
+DBUS_START_REPLY_ALREADY_RUNNING = 1 
     
-def bus_activate_service(Connection connection, service_name, flags=0):
+def bus_start_service_by_name(Connection connection, service_name, flags=0):
     cdef DBusError error
     dbus_error_init(&error)
     cdef dbus_bool_t retval
@@ -1158,7 +1158,7 @@
 
     conn = connection._get_conn()
 
-    retval = dbus_bus_activate_service(conn, service_name, flags, &results, &error)
+    retval = dbus_bus_start_service_by_name(conn, service_name, flags, &results, &error)
 
     return (retval, results) 
 
@@ -1179,29 +1179,29 @@
 SERVICE_FLAG_PROHIBIT_REPLACEMENT = 0x1
 SERVICE_FLAG_REPLACE_EXISTING     = 0x2
 
-def bus_acquire_service(Connection connection, service_name, flags=0):
+def bus_request_name(Connection connection, service_name, flags=0):
     cdef DBusError error
     dbus_error_init(&error)
     cdef int retval
     cdef DBusConnection *conn
 
     conn = connection._get_conn()
-    retval = dbus_bus_acquire_service(conn,
-                                      service_name,
-                                      flags,
-                                      &error)
+    retval = dbus_bus_request_name(conn,
+                                   service_name,
+                                   flags,
+                                   &error)
     if dbus_error_is_set(&error):
         raise DBusException, error.message
     return retval
     
-def bus_service_exists(Connection connection, service_name):
+def bus_name_has_owner(Connection connection, service_name):
     cdef DBusError error
     dbus_error_init(&error)
     cdef dbus_bool_t retval
     cdef DBusConnection *conn
 
     conn = connection._get_conn()
-    retval = dbus_bus_service_exists(conn,
+    retval = dbus_bus_name_has_owner(conn,
                                      service_name,
                                      &error)
     if dbus_error_is_set(&error):

Index: dbus.py
===================================================================
RCS file: /cvs/dbus/dbus/python/dbus.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- dbus.py	30 Dec 2004 18:28:03 -0000	1.15
+++ dbus.py	25 Jan 2005 19:06:53 -0000	1.16
@@ -63,8 +63,8 @@
     """bus_type=[Bus.TYPE_SESSION | Bus.TYPE_SYSTEM | Bus.TYPE_ACTIVATION]
     """
 
-    ACTIVATION_REPLY_ACTIVATED = dbus_bindings.ACTIVATION_REPLY_ACTIVATED
-    ACTIVATION_REPLY_ALREADY_ACTIVE = dbus_bindings.ACTIVATION_REPLY_ALREADY_ACTIVE 
+    START_REPLY_SUCCESS = dbus_bindings.DBUS_START_REPLY_SUCCESS
+    START_REPLY_ALREADY_RUNNING = dbus_bindings.DBUS_START_REPLY_ALREADY_RUNNING 
 
     def __init__(self, bus_type=TYPE_SESSION, glib_mainloop=True):
         self._connection = dbus_bindings.bus_get(bus_type)
@@ -143,8 +143,8 @@
             for receiver in receivers:
                 receiver(*args)
 
-    def activate_service(self, service):
-        return dbus_bindings.bus_activate_service(self._connection, service)
+    def start_service_by_name(self, service):
+        return dbus_bindings.bus_start_service_by_name(self._connection, service)
 
 class SystemBus(Bus):
     """The system-wide message bus
@@ -241,7 +241,7 @@
         else:
             self._bus = bus
 
-        dbus_bindings.bus_acquire_service(self._bus.get_connection(), service_name)
+        dbus_bindings.bus_request_name(self._bus.get_connection(), service_name)
 
     def get_bus(self):
         """Get the Bus this Service is on"""



More information about the dbus-commit mailing list