summaryrefslogtreecommitdiffstats
path: root/bus/services.h
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@codefactory.se>2003-01-27 11:20:55 +0000
committerAnders Carlsson <andersca@codefactory.se>2003-01-27 11:20:55 +0000
commitee1133de4dc5e181be5d09f084d8823388d5f693 (patch)
treec4641ef545f3ce65bfeb79ab4236ef71f785687c /bus/services.h
parent2f440457d5fe45afb732820da64a147157e2e82d (diff)
2003-01-27 Anders Carlsson <andersca@codefactory.se>
* bus/dispatch.c: (bus_dispatch_message_handler): Dispatch messages sent to services. * bus/driver.c: (bus_driver_send_service_deleted), (bus_driver_send_service_created), (bus_driver_send_service_lost), (bus_driver_send_service_acquired): Add helper functions for sending service related messages. (bus_driver_send_welcome_message): Send HELLO_REPLY instead of WELCOME. (bus_driver_handle_list_services): Send LIST_SERVICES_REPLY instead of SERVICES. (bus_driver_handle_own_service), (bus_driver_handle_service_exists): New message handlers. (bus_driver_handle_message): Invoke new message handlers. (bus_driver_remove_connection): Don't remove any services here since that's done automatically by bus_service_remove_owner now. * bus/driver.h: New function signatures. * bus/services.c: (bus_service_add_owner): Send ServiceAcquired message if we're the only primary owner. (bus_service_remove_owner): Send ServiceAcquired/ServiceLost messages. (bus_service_set_prohibit_replacement), (bus_service_get_prohibit_replacement): Functions for setting prohibit replacement. (bus_service_has_owner): New function that checks if a connection is in the owner queue of a certain service. * bus/services.h: Add new function signatures. * dbus/dbus-list.c: (_dbus_list_test): Add tests for _dbus_list_remove_last and traversing the list backwards. * dbus/dbus-list.h: Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't go any further, so return NULL then. * dbus/dbus-protocol.h: Add new messages, service flags and service replies.
Diffstat (limited to 'bus/services.h')
-rw-r--r--bus/services.h27
1 files changed, 16 insertions, 11 deletions
diff --git a/bus/services.h b/bus/services.h
index 3dd2b0f5..3f6b31a9 100644
--- a/bus/services.h
+++ b/bus/services.h
@@ -38,17 +38,22 @@ typedef struct BusService BusService;
typedef void (* BusServiceForeachFunction) (BusService *service,
void *data);
-BusService* bus_service_lookup (const DBusString *service_name,
- dbus_bool_t create_if_not_found);
-void bus_service_free (BusService *service);
-dbus_bool_t bus_service_add_owner (BusService *service,
- DBusConnection *owner);
-void bus_service_remove_owner (BusService *service,
- DBusConnection *owner);
-DBusConnection* bus_service_get_primary_owner (BusService *service);
-const char* bus_service_get_name (BusService *service);
-void bus_service_foreach (BusServiceForeachFunction function,
- void *data);
+BusService* bus_service_lookup (const DBusString *service_name,
+ dbus_bool_t create_if_not_found);
+dbus_bool_t bus_service_add_owner (BusService *service,
+ DBusConnection *owner);
+void bus_service_remove_owner (BusService *service,
+ DBusConnection *owner);
+dbus_bool_t bus_service_has_owner (BusService *service,
+ DBusConnection *owner);
+DBusConnection* bus_service_get_primary_owner (BusService *service);
+void bus_service_set_prohibit_replacement (BusService *service,
+ 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);