usb-common.h revision 61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4cc
1633838b8255282d10af15c5c84cee5a51466712Bob Halley/*
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * Copyright 2002 Red Hat Inc., Durham, North Carolina.
1633838b8255282d10af15c5c84cee5a51466712Bob Halley *
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * All Rights Reserved.
1633838b8255282d10af15c5c84cee5a51466712Bob Halley *
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * Permission is hereby granted, free of charge, to any person obtaining
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * a copy of this software and associated documentation files (the
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * "Software"), to deal in the Software without restriction, including
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * without limitation on the rights to use, copy, modify, merge,
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * publish, distribute, sublicense, and/or sell copies of the Software,
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * and to permit persons to whom the Software is furnished to do so,
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * subject to the following conditions:
1633838b8255282d10af15c5c84cee5a51466712Bob Halley *
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * The above copyright notice and this permission notice (including the
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * next paragraph) shall be included in all copies or substantial
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * portions of the Software.
6d05b41aaef2a56d8d806b2cbf3ab08a1b4990e6Michael Graff *
d25afd60ee2286cb171c4960a790f3d7041b6f85Bob Halley * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
d25afd60ee2286cb171c4960a790f3d7041b6f85Bob Halley * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
6d05b41aaef2a56d8d806b2cbf3ab08a1b4990e6Michael Graff * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
6d05b41aaef2a56d8d806b2cbf3ab08a1b4990e6Michael Graff * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
6d05b41aaef2a56d8d806b2cbf3ab08a1b4990e6Michael Graff * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
4095b364155591b10bfe79c77e686031f6976852Michael Graff * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
6d05b41aaef2a56d8d806b2cbf3ab08a1b4990e6Michael Graff * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
6d05b41aaef2a56d8d806b2cbf3ab08a1b4990e6Michael Graff * SOFTWARE.
6792dd6d22db8441bb7c4d24819b4f9291e257b1Bob Halley */
6d05b41aaef2a56d8d806b2cbf3ab08a1b4990e6Michael Graff
6d05b41aaef2a56d8d806b2cbf3ab08a1b4990e6Michael Graff/*
6d05b41aaef2a56d8d806b2cbf3ab08a1b4990e6Michael Graff * Authors:
6d05b41aaef2a56d8d806b2cbf3ab08a1b4990e6Michael Graff * Rickard E. (Rik) Faith <faith@redhat.com>
7251d776466396a2a8f2769c8fa0c13e4db8ef9cMichael Graff *
6d05b41aaef2a56d8d806b2cbf3ab08a1b4990e6Michael Graff */
4095b364155591b10bfe79c77e686031f6976852Michael Graff
a21e2e7fea21498dde43d69f9679d7233f13955aMichael Graff/** \file
a21e2e7fea21498dde43d69f9679d7233f13955aMichael Graff * Interface to common USB support. \see usb-common.c \see usb-mouse.c
4095b364155591b10bfe79c77e686031f6976852Michael Graff * \see usb-keyboard.c \see usb-other.c */
a21e2e7fea21498dde43d69f9679d7233f13955aMichael Graff
4095b364155591b10bfe79c77e686031f6976852Michael Graff#ifndef _USB_COMMON_H_
4095b364155591b10bfe79c77e686031f6976852Michael Graff#define _USB_COMMON_H_
8dcce6f92254680aaa9b66afb927a30316b9e46eBob Halleytypedef enum {
7251d776466396a2a8f2769c8fa0c13e4db8ef9cMichael Graff usbMouse,
7f9e7076849ac56b03c6f578c22a47c81aa5d171Michael Graff usbKeyboard,
0ab04d76c8b47210c91cb960854a17b28e2daa35Bob Halley usbOther
0ab04d76c8b47210c91cb960854a17b28e2daa35Bob Halley} usbType;
a21e2e7fea21498dde43d69f9679d7233f13955aMichael Graff
0ab04d76c8b47210c91cb960854a17b28e2daa35Bob Halleyextern void *usbCreatePrivate(DeviceIntPtr pDevice);
3740b569ae76295b941d57a724a43beb75b533baBob Halleyextern void usbDestroyPrivate(void *priv);
6d05b41aaef2a56d8d806b2cbf3ab08a1b4990e6Michael Graffextern void usbRead(DevicePtr pDev,
6d05b41aaef2a56d8d806b2cbf3ab08a1b4990e6Michael Graff dmxMotionProcPtr motion,
6d05b41aaef2a56d8d806b2cbf3ab08a1b4990e6Michael Graff dmxEnqueueProcPtr enqueue,
6d05b41aaef2a56d8d806b2cbf3ab08a1b4990e6Michael Graff int minButton, DMXBlockType block);
6d05b41aaef2a56d8d806b2cbf3ab08a1b4990e6Michael Graffextern void usbInit(DevicePtr pDev, usbType type);
6d05b41aaef2a56d8d806b2cbf3ab08a1b4990e6Michael Graffextern void usbOff(DevicePtr pDev);
6d05b41aaef2a56d8d806b2cbf3ab08a1b4990e6Michael Graff#endif
6d05b41aaef2a56d8d806b2cbf3ab08a1b4990e6Michael Graff