b9a21c3c91c47e090316e28d759194e46628ed49vboxsync/*
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * Copyright © 2006-2007 Daniel Stone
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync *
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * Permission is hereby granted, free of charge, to any person obtaining a
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * copy of this software and associated documentation files (the "Software"),
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * to deal in the Software without restriction, including without limitation
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * the rights to use, copy, modify, merge, publish, distribute, sublicense,
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * and/or sell copies of the Software, and to permit persons to whom the
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * Software is furnished to do so, subject to the following conditions:
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync *
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * The above copyright notice and this permission notice (including the next
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * paragraph) shall be included in all copies or substantial portions of the
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * Software.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync *
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * DEALINGS IN THE SOFTWARE.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync *
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * Author: Daniel Stone <daniel@fooishbar.org>
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#ifdef HAVE_DIX_CONFIG_H
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#include <dix-config.h>
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#endif
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#include "input.h"
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncvoid remove_devices(const char *backend, const char *config_info);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncBOOL device_is_duplicate(const char *config_info);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncvoid add_option(InputOption **options, const char *key, const char *value);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#ifdef CONFIG_UDEV
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncint config_udev_init(void);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncvoid config_udev_fini(void);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#else
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync# ifdef CONFIG_NEED_DBUS
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#include <dbus/dbus.h>
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsynctypedef void (*config_dbus_core_connect_hook)(DBusConnection *connection,
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync void *data);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsynctypedef void (*config_dbus_core_disconnect_hook)(void *data);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncstruct config_dbus_core_hook {
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync config_dbus_core_connect_hook connect;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync config_dbus_core_disconnect_hook disconnect;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync void *data;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync struct config_dbus_core_hook *next;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync};
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncint config_dbus_core_init(void);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncvoid config_dbus_core_fini(void);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncint config_dbus_core_add_hook(struct config_dbus_core_hook *hook);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncvoid config_dbus_core_remove_hook(struct config_dbus_core_hook *hook);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync# endif
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync# ifdef CONFIG_DBUS_API
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncint config_dbus_init(void);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncvoid config_dbus_fini(void);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync# endif
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync# ifdef CONFIG_HAL
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncint config_hal_init(void);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncvoid config_hal_fini(void);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync# endif
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#endif