~ubuntu-branches/ubuntu/wily/bluez/wily

« back to all changes in this revision

Viewing changes to lib/hidp.h

ImportĀ upstreamĀ versionĀ 4.81

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *
 
3
 *  BlueZ - Bluetooth protocol stack for Linux
 
4
 *
 
5
 *  Copyright (C) 2003-2010  Marcel Holtmann <marcel@holtmann.org>
 
6
 *
 
7
 *
 
8
 *  This program is free software; you can redistribute it and/or modify
 
9
 *  it under the terms of the GNU General Public License as published by
 
10
 *  the Free Software Foundation; either version 2 of the License, or
 
11
 *  (at your option) any later version.
 
12
 *
 
13
 *  This program is distributed in the hope that it will be useful,
 
14
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
 *  GNU General Public License for more details.
 
17
 *
 
18
 *  You should have received a copy of the GNU General Public License
 
19
 *  along with this program; if not, write to the Free Software
 
20
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
21
 *
 
22
 */
 
23
 
 
24
#ifndef __HIDP_H
 
25
#define __HIDP_H
 
26
 
 
27
#ifdef __cplusplus
 
28
extern "C" {
 
29
#endif
 
30
 
 
31
/* HIDP defaults */
 
32
#define HIDP_MINIMUM_MTU 48
 
33
#define HIDP_DEFAULT_MTU 48
 
34
 
 
35
/* HIDP ioctl defines */
 
36
#define HIDPCONNADD     _IOW('H', 200, int)
 
37
#define HIDPCONNDEL     _IOW('H', 201, int)
 
38
#define HIDPGETCONNLIST _IOR('H', 210, int)
 
39
#define HIDPGETCONNINFO _IOR('H', 211, int)
 
40
 
 
41
#define HIDP_VIRTUAL_CABLE_UNPLUG       0
 
42
#define HIDP_BOOT_PROTOCOL_MODE         1
 
43
#define HIDP_BLUETOOTH_VENDOR_ID        9
 
44
 
 
45
struct hidp_connadd_req {
 
46
        int ctrl_sock;          /* Connected control socket */
 
47
        int intr_sock;          /* Connected interrupt socket */
 
48
        uint16_t parser;        /* Parser version */
 
49
        uint16_t rd_size;       /* Report descriptor size */
 
50
        uint8_t *rd_data;       /* Report descriptor data */
 
51
        uint8_t  country;
 
52
        uint8_t  subclass;
 
53
        uint16_t vendor;
 
54
        uint16_t product;
 
55
        uint16_t version;
 
56
        uint32_t flags;
 
57
        uint32_t idle_to;
 
58
        char name[128];         /* Device name */
 
59
};
 
60
 
 
61
struct hidp_conndel_req {
 
62
        bdaddr_t bdaddr;
 
63
        uint32_t flags;
 
64
};
 
65
 
 
66
struct hidp_conninfo {
 
67
        bdaddr_t bdaddr;
 
68
        uint32_t flags;
 
69
        uint16_t state;
 
70
        uint16_t vendor;
 
71
        uint16_t product;
 
72
        uint16_t version;
 
73
        char name[128];
 
74
};
 
75
 
 
76
struct hidp_connlist_req {
 
77
        uint32_t cnum;
 
78
        struct hidp_conninfo *ci;
 
79
};
 
80
 
 
81
#ifdef __cplusplus
 
82
}
 
83
#endif
 
84
 
 
85
#endif /* __HIDP_H */