]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
2004-12-26 John (J5) Palmieri <johnp@redhat.com>
authorJohn (J5) Palmieri <johnp@redhat.com>
Mon, 27 Dec 2004 16:01:13 +0000 (16:01 +0000)
committerJohn (J5) Palmieri <johnp@redhat.com>
Mon, 27 Dec 2004 16:01:13 +0000 (16:01 +0000)
* python/dbus_bindings.pyx.in (bus_activate_service): Bind
dbus_bus_activate_service

* python/dbus.py (Bus.activate_service): activate a service on the
bus.

ChangeLog
python/dbus.py
python/dbus_bindings.pyx.in

index cf6ee41230c8b09af2aea5dae7bca4dd758ebb87..4ab433291e45e334e12d3220e76f49832f1012b2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2004-12-26  John (J5) Palmieri  <johnp@redhat.com>
+
+       * python/dbus_bindings.pyx.in (bus_activate_service): Bind
+       dbus_bus_activate_service
+
+       * python/dbus.py (Bus.activate_service): activate a service on the
+       bus.
+
 2004-12-24  Havoc Pennington  <hp@redhat.com>
 
        * test/decode-gcov.c: change to use .gcno and .gcda files, but the
index c8ac561a8b06501e95003b8be7eb622c62c49507..6d38667d9fb2509b9c1eaaa294a970e61dd081c8 100644 (file)
@@ -62,6 +62,10 @@ class Bus:
 
     """bus_type=[Bus.TYPE_SESSION | Bus.TYPE_SYSTEM | Bus.TYPE_ACTIVATION]
     """
+
+    ACTIVATION_REPLY_ACTIVE = dbus_bindings.ACTIVATION_REPLY_ACTIVE
+    ACTIVATION_REPLY_ALREADY_ACTIVE = dbus_bindings.ACTIVATION_REPLY_ALREADY_ACTIVE 
+
     def __init__(self, bus_type=TYPE_SESSION, glib_mainloop=True):
         self._connection = dbus_bindings.bus_get(bus_type)
 
@@ -139,6 +143,9 @@ class Bus:
             for receiver in receivers:
                 receiver(*args)
 
+    def activate_service(self, service):
+        return dbus_bindings.bus_activate_service(self._connection, service)
+
 class SystemBus(Bus):
     """The system-wide message bus
     """
index 59c38586d80f9e7476f778da318be86876d80599..db391e1d8de8b336c8fa115cccae6d0bf42787f0 100644 (file)
@@ -1144,7 +1144,23 @@ def bus_get_unix_user(Connection connection, service_name):
     if dbus_error_is_set(&error):
         raise DBusException, error.message
     return retval
+
+ACTIVATION_REPLY_ACTIVATED = DBUS_ACTIVATION_REPLY_ACTIVATED
+ACTIVATION_REPLY_ALREADY_ACTIVE = DBUS_ACTIVATION_REPLY_ALREADY_ACTIVE
     
+def bus_activate_service(Connection connection, service_name, flags=0):
+    cdef DBusError error
+    dbus_error_init(&error)
+    cdef dbus_bool_t retval
+    cdef dbus_uint32_t results
+    cdef DBusConnection *conn
+
+    conn = connection._get_conn()
+
+    retval = dbus_bus_activate_service(conn, service_name, flags, &results, &error)
+
+    return (retval, results) 
+
 def bus_register(Connection connection):
     cdef DBusError error
     dbus_error_init(&error)