mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-01 03:18:07 +02:00
* 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
This commit is contained in:
parent
737479031f
commit
f4d4d5ace5
3 changed files with 42 additions and 20 deletions
22
ChangeLog
22
ChangeLog
|
|
@ -1,3 +1,25 @@
|
|||
2005-01-25 John (J5) Palmieri <johnp@redhat.com>
|
||||
|
||||
* 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
|
||||
|
||||
|
||||
2005-01-24 Joe Shaw <joeshaw@novell.com>
|
||||
|
||||
* dbus/dbus-connection.c (dbus_connection_dispatch): Print out the
|
||||
|
|
|
|||
|
|
@ -63,8 +63,8 @@ class Bus:
|
|||
"""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 @@ class Bus:
|
|||
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 @@ class Service:
|
|||
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"""
|
||||
|
|
|
|||
|
|
@ -153,8 +153,8 @@ cdef class Connection:
|
|||
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 @@ def bus_get (bus_type):
|
|||
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 @@ def bus_get_unix_user(Connection connection, service_name):
|
|||
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 @@ def bus_activate_service(Connection connection, service_name, flags=0):
|
|||
|
||||
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 @@ def bus_register(Connection connection):
|
|||
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):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue