bthidd.h (128080) | bthidd.h (137868) |
---|---|
1/* 2 * bthidd.h 3 * 4 * Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 11 unchanged lines hidden (view full) --- 20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * | 1/* 2 * bthidd.h 3 * 4 * Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 11 unchanged lines hidden (view full) --- 20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * |
28 * $Id: bthidd.h,v 1.4 2004/02/26 21:44:20 max Exp $ 29 * $FreeBSD: head/usr.sbin/bluetooth/bthidd/bthidd.h 128080 2004-04-10 00:18:00Z emax $ | 28 * $Id: bthidd.h,v 1.6 2004/11/17 21:59:42 max Exp $ 29 * $FreeBSD: head/usr.sbin/bluetooth/bthidd/bthidd.h 137868 2004-11-18 18:05:15Z emax $ |
30 */ 31 32#ifndef _BTHIDD_H_ 33#define _BTHIDD_H_ 1 34 35#define BTHIDD_IDENT "bthidd" 36#define BTHIDD_PIDFILE "/var/run/" BTHIDD_IDENT ".pid" 37 38struct bthid_session; 39 40struct bthid_server 41{ | 30 */ 31 32#ifndef _BTHIDD_H_ 33#define _BTHIDD_H_ 1 34 35#define BTHIDD_IDENT "bthidd" 36#define BTHIDD_PIDFILE "/var/run/" BTHIDD_IDENT ".pid" 37 38struct bthid_session; 39 40struct bthid_server 41{ |
42 bdaddr_t bdaddr; /* local bdaddr */ 43 int cons; /* /dev/consolectl */ 44 int ctrl; /* control channel (listen) */ 45 int intr; /* interrupt channel (listen) */ 46 int maxfd; /* max fd in sets */ 47 fd_set rfdset; /* read descriptor set */ 48 fd_set wfdset; /* write descriptor set */ 49 LIST_HEAD(, bthid_session) sessions; | 42 bdaddr_t bdaddr; /* local bdaddr */ 43 int cons; /* /dev/consolectl */ 44 int vkbd; /* /dev/vkbdctl */ 45 char const *script; /* keyboard switching script */ 46 int windex; /* wired keyboard index */ 47 bitstr_t *keys; /* pressed keys map */ 48 int ctrl; /* control channel (listen) */ 49 int intr; /* intr. channel (listen) */ 50 int maxfd; /* max fd in sets */ 51 fd_set rfdset; /* read descriptor set */ 52 fd_set wfdset; /* write descriptor set */ 53 LIST_HEAD(, bthid_session) sessions; |
50}; 51 52typedef struct bthid_server bthid_server_t; 53typedef struct bthid_server * bthid_server_p; 54 55struct bthid_session 56{ | 54}; 55 56typedef struct bthid_server bthid_server_t; 57typedef struct bthid_server * bthid_server_p; 58 59struct bthid_session 60{ |
57 bthid_server_p srv; /* pointer back to server */ 58 int ctrl; /* control channel */ 59 int intr; /* interrupt channel */ 60 bdaddr_t bdaddr; /* remote bdaddr */ 61 short state; /* session state */ | 61 bthid_server_p srv; /* pointer back to server */ 62 int ctrl; /* control channel */ 63 int intr; /* interrupt channel */ 64 bdaddr_t bdaddr;/* remote bdaddr */ 65 short state; /* session state */ |
62#define CLOSED 0 63#define W4CTRL 1 64#define W4INTR 2 65#define OPEN 3 | 66#define CLOSED 0 67#define W4CTRL 1 68#define W4INTR 2 69#define OPEN 3 |
66 LIST_ENTRY(bthid_session) next; /* link to next */ | 70 bitstr_t *keys; /* pressed keys map */ 71 LIST_ENTRY(bthid_session) next; /* link to next */ |
67}; 68 69typedef struct bthid_session bthid_session_t; 70typedef struct bthid_session * bthid_session_p; 71 72int server_init (bthid_server_p srv); 73void server_shutdown (bthid_server_p srv); 74int server_do (bthid_server_p srv); --- 14 unchanged lines hidden --- | 72}; 73 74typedef struct bthid_session bthid_session_t; 75typedef struct bthid_session * bthid_session_p; 76 77int server_init (bthid_server_p srv); 78void server_shutdown (bthid_server_p srv); 79int server_do (bthid_server_p srv); --- 14 unchanged lines hidden --- |