mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-24 21:48:10 +02:00
* 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.
40 lines
1.4 KiB
C
40 lines
1.4 KiB
C
/* -*- mode: C; c-file-style: "gnu" -*- */
|
|
/* driver.h Bus client (driver)
|
|
*
|
|
* Copyright (C) 2003 CodeFactory AB
|
|
*
|
|
* Licensed under the Academic Free License version 1.2
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
*
|
|
*/
|
|
|
|
#ifndef BUS_DRIVER_H
|
|
#define BUS_DRIVER_H
|
|
|
|
#include <dbus/dbus.h>
|
|
|
|
void bus_driver_remove_connection (DBusConnection *connection);
|
|
void bus_driver_handle_message (DBusConnection *connection,
|
|
DBusMessage *message);
|
|
void bus_driver_send_service_deleted (const char *service_name);
|
|
void bus_driver_send_service_lost (DBusConnection *connection,
|
|
const char *service_name);
|
|
void bus_driver_send_service_acquired (DBusConnection *connection,
|
|
const char *service_name);
|
|
|
|
|
|
|
|
#endif /* BUS_DRIVER_H */
|