diff options
Diffstat (limited to 'bus/driver-afbus.h')
-rw-r--r-- | bus/driver-afbus.h | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/bus/driver-afbus.h b/bus/driver-afbus.h new file mode 100644 index 00000000..9c401119 --- /dev/null +++ b/bus/driver-afbus.h @@ -0,0 +1,96 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* driver-afbus.h Bus client, AF_BUS bits (driver) + * + * Copyright (C) 2012 Collabora Ltd + * + * Licensed under the Academic Free License version 2.1 + * + * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef BUS_DRIVER_AFBUS_H +#define BUS_DRIVER_AFBUS_H + +#include <config.h> +#include <sys/socket.h> +#include <dbus/dbus.h> +#include "connection.h" + +#if HAVE_AFBUS +dbus_bool_t bus_driver_afbus_add_match_rule (DBusConnection *connection, + const char *rule, + DBusError *error); +dbus_bool_t bus_driver_afbus_remove_match_rule (DBusConnection *connection, + const char *rule, + DBusError *error); +dbus_bool_t bus_driver_afbus_append_unique_name (DBusConnection *connection, + DBusString *str); +dbus_bool_t bus_driver_afbus_emit_forwarded (BusTransaction *transaction, + DBusConnection *connection, + DBusConnection *addressed_recipient, + const char *service_name); +dbus_bool_t bus_driver_afbus_assign_address (DBusConnection *connection); +dbus_bool_t bus_driver_afbus_disconnected (DBusConnection *connection, + DBusError *error); +#else +static inline +dbus_bool_t bus_driver_afbus_add_match_rule (DBusConnection *connection, + const char *rule, + DBusError *error) +{ + return TRUE; +} + +static inline +dbus_bool_t bus_driver_afbus_remove_match_rule (DBusConnection *connection, + const char *rule, + DBusError *error) +{ + return TRUE; +} + +static inline +dbus_bool_t bus_driver_afbus_append_unique_name (DBusConnection *connection, + DBusString *str) +{ + return TRUE; +} + +static inline +dbus_bool_t bus_driver_afbus_emit_forwarded (BusTransaction *transaction, + DBusConnection *connection, + DBusConnection *addressed_recipient, + const char *service_name) +{ + return TRUE; +} + +static inline +dbus_bool_t bus_driver_afbus_assign_address (DBusConnection *connection) +{ + return TRUE; +} + +static inline +dbus_bool_t bus_driver_afbus_disconnected (DBusConnection *connection, + DBusError *error) +{ + return TRUE; +} + +#endif + +#endif /* BUS_DRIVER_AFBUS_H */ |