11de7b4b8SPedro F. Giffuni /*- 26490c2ffSMaksim Yevmenkin * bthidcontrol.h 36490c2ffSMaksim Yevmenkin * 4*4d846d26SWarner Losh * SPDX-License-Identifier: BSD-2-Clause 51de7b4b8SPedro F. Giffuni * 66490c2ffSMaksim Yevmenkin * Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com> 76490c2ffSMaksim Yevmenkin * All rights reserved. 86490c2ffSMaksim Yevmenkin * 96490c2ffSMaksim Yevmenkin * Redistribution and use in source and binary forms, with or without 106490c2ffSMaksim Yevmenkin * modification, are permitted provided that the following conditions 116490c2ffSMaksim Yevmenkin * are met: 126490c2ffSMaksim Yevmenkin * 1. Redistributions of source code must retain the above copyright 136490c2ffSMaksim Yevmenkin * notice, this list of conditions and the following disclaimer. 146490c2ffSMaksim Yevmenkin * 2. Redistributions in binary form must reproduce the above copyright 156490c2ffSMaksim Yevmenkin * notice, this list of conditions and the following disclaimer in the 166490c2ffSMaksim Yevmenkin * documentation and/or other materials provided with the distribution. 176490c2ffSMaksim Yevmenkin * 186490c2ffSMaksim Yevmenkin * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 196490c2ffSMaksim Yevmenkin * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 206490c2ffSMaksim Yevmenkin * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 216490c2ffSMaksim Yevmenkin * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 226490c2ffSMaksim Yevmenkin * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 236490c2ffSMaksim Yevmenkin * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 246490c2ffSMaksim Yevmenkin * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 256490c2ffSMaksim Yevmenkin * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 266490c2ffSMaksim Yevmenkin * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 276490c2ffSMaksim Yevmenkin * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 286490c2ffSMaksim Yevmenkin * SUCH DAMAGE. 296490c2ffSMaksim Yevmenkin * 306490c2ffSMaksim Yevmenkin * $Id: bthidcontrol.h,v 1.1 2004/02/12 23:25:51 max Exp $ 316490c2ffSMaksim Yevmenkin */ 326490c2ffSMaksim Yevmenkin 336490c2ffSMaksim Yevmenkin #ifndef __BTHIDCONTROL_H__ 346490c2ffSMaksim Yevmenkin #define __BTHIDCONTROL_H__ 356490c2ffSMaksim Yevmenkin 366490c2ffSMaksim Yevmenkin #define OK 0 /* everything was OK */ 376490c2ffSMaksim Yevmenkin #define ERROR 1 /* could not execute command */ 386490c2ffSMaksim Yevmenkin #define FAILED 2 /* error was reported */ 396490c2ffSMaksim Yevmenkin #define USAGE 3 /* invalid parameters */ 406490c2ffSMaksim Yevmenkin 416490c2ffSMaksim Yevmenkin struct bthid_command { 426490c2ffSMaksim Yevmenkin char const *command; 436490c2ffSMaksim Yevmenkin char const *description; 446490c2ffSMaksim Yevmenkin int (*handler)(bdaddr_t *, int, char **); 456490c2ffSMaksim Yevmenkin }; 466490c2ffSMaksim Yevmenkin 476490c2ffSMaksim Yevmenkin extern struct bthid_command hid_commands[]; 486490c2ffSMaksim Yevmenkin extern struct bthid_command sdp_commands[]; 496490c2ffSMaksim Yevmenkin 506490c2ffSMaksim Yevmenkin #endif /* __BTHIDCONTROL_H__ */ 516490c2ffSMaksim Yevmenkin 52