diff options
author | Havoc Pennington <hp@redhat.com> | 2003-03-13 03:52:58 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2003-03-13 03:52:58 +0000 |
commit | 6ecc14ffabcffb69aa938a67940db48272e05046 (patch) | |
tree | 76e4c12cdc5c0ef9b3a9fc4913afdfa1fac6478c /bus/services.h | |
parent | 29560adcc79a259a0be3511c056ee7453aa26c04 (diff) |
2003-03-12 Havoc Pennington <hp@pobox.com>
Throughout: purge global variables, introduce BusActivation,
BusConnections, BusRegistry, etc. objects instead.
* bus/bus.h, bus/bus.c: introduce BusContext as a global
message bus object
* test/Makefile.am (TEST_BINARIES): disable bus-test for now,
going to redo this a bit differently I think
Diffstat (limited to 'bus/services.h')
-rw-r--r-- | bus/services.h | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/bus/services.h b/bus/services.h index 97583582..5e9ece18 100644 --- a/bus/services.h +++ b/bus/services.h @@ -27,26 +27,29 @@ #include <dbus/dbus.h> #include <dbus/dbus-string.h> #include "connection.h" - -/* forward decl that probably shouldn't be in this file */ -typedef struct BusTransaction BusTransaction; - -/* Each service can have multiple owners; one owner is the "real - * owner" and the others are queued up. For example, if I have - * multiple text editors open, one might own the TextEditor service; - * if I close that one, the next in line will become the owner of it. - */ - -typedef struct BusService BusService; +#include "bus.h" typedef void (* BusServiceForeachFunction) (BusService *service, void *data); -BusService* bus_service_lookup (const DBusString *service_name); -BusService* bus_service_ensure (const DBusString *service_name, - DBusConnection *owner_if_created, - BusTransaction *transaction, - DBusError *error); +BusRegistry* bus_registry_new (void); +void bus_registry_ref (BusRegistry *registry); +void bus_registry_unref (BusRegistry *registry); +BusService* bus_registry_lookup (BusRegistry *registry, + const DBusString *service_name); +BusService* bus_registry_ensure (BusRegistry *registry, + const DBusString *service_name, + DBusConnection *owner_if_created, + BusTransaction *transaction, + DBusError *error); +void bus_registry_foreach (BusRegistry *registry, + BusServiceForeachFunction function, + void *data); +dbus_bool_t bus_registry_list_services (BusRegistry *registry, + char ***listp, + int *array_len); + + dbus_bool_t bus_service_add_owner (BusService *service, DBusConnection *owner, BusTransaction *transaction, @@ -62,10 +65,5 @@ void bus_service_set_prohibit_replacement (BusService dbus_bool_t prohibit_replacement); dbus_bool_t bus_service_get_prohibit_replacement (BusService *service); const char* bus_service_get_name (BusService *service); -void bus_service_foreach (BusServiceForeachFunction function, - void *data); - - -char **bus_services_list (int *array_len); #endif /* BUS_SERVICES_H */ |