linux/net/bluetooth/hidp/hidp.h

/*
   HIDP implementation for Linux Bluetooth stack (BlueZ).
   Copyright (C) 2003-2004 Marcel Holtmann <[email protected]>

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License version 2 as
   published by the Free Software Foundation;

   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
   IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
   CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
   WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
   ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
   OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

   ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
   COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
   SOFTWARE IS DISCLAIMED.
*/

#ifndef __HIDP_H
#define __HIDP_H

#include <linux/types.h>
#include <linux/hid.h>
#include <linux/kref.h>
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/l2cap.h>

/* HIDP header masks */
#define HIDP_HEADER_TRANS_MASK
#define HIDP_HEADER_PARAM_MASK

/* HIDP transaction types */
#define HIDP_TRANS_HANDSHAKE
#define HIDP_TRANS_HID_CONTROL
#define HIDP_TRANS_GET_REPORT
#define HIDP_TRANS_SET_REPORT
#define HIDP_TRANS_GET_PROTOCOL
#define HIDP_TRANS_SET_PROTOCOL
#define HIDP_TRANS_GET_IDLE
#define HIDP_TRANS_SET_IDLE
#define HIDP_TRANS_DATA
#define HIDP_TRANS_DATC

/* HIDP handshake results */
#define HIDP_HSHK_SUCCESSFUL
#define HIDP_HSHK_NOT_READY
#define HIDP_HSHK_ERR_INVALID_REPORT_ID
#define HIDP_HSHK_ERR_UNSUPPORTED_REQUEST
#define HIDP_HSHK_ERR_INVALID_PARAMETER
#define HIDP_HSHK_ERR_UNKNOWN
#define HIDP_HSHK_ERR_FATAL

/* HIDP control operation parameters */
#define HIDP_CTRL_NOP
#define HIDP_CTRL_HARD_RESET
#define HIDP_CTRL_SOFT_RESET
#define HIDP_CTRL_SUSPEND
#define HIDP_CTRL_EXIT_SUSPEND
#define HIDP_CTRL_VIRTUAL_CABLE_UNPLUG

/* HIDP data transaction headers */
#define HIDP_DATA_RTYPE_MASK
#define HIDP_DATA_RSRVD_MASK
#define HIDP_DATA_RTYPE_OTHER
#define HIDP_DATA_RTYPE_INPUT
#define HIDP_DATA_RTYPE_OUPUT
#define HIDP_DATA_RTYPE_FEATURE

/* HIDP protocol header parameters */
#define HIDP_PROTO_BOOT
#define HIDP_PROTO_REPORT

/* HIDP ioctl defines */
#define HIDPCONNADD
#define HIDPCONNDEL
#define HIDPGETCONNLIST
#define HIDPGETCONNINFO

#define HIDP_VIRTUAL_CABLE_UNPLUG
#define HIDP_BOOT_PROTOCOL_MODE
#define HIDP_BLUETOOTH_VENDOR_ID
#define HIDP_WAITING_FOR_RETURN
#define HIDP_WAITING_FOR_SEND_ACK

struct hidp_connadd_req {};

struct hidp_conndel_req {};

struct hidp_conninfo {};

struct hidp_connlist_req {};

int hidp_connection_add(const struct hidp_connadd_req *req, struct socket *ctrl_sock, struct socket *intr_sock);
int hidp_connection_del(struct hidp_conndel_req *req);
int hidp_get_connlist(struct hidp_connlist_req *req);
int hidp_get_conninfo(struct hidp_conninfo *ci);

enum hidp_session_state {};

/* HIDP session defines */
struct hidp_session {};

/* HIDP init defines */
int __init hidp_init_sockets(void);
void __exit hidp_cleanup_sockets(void);

#endif /* __HIDP_H */