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