1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
|
/* $Id: lirc_client.h,v 5.5 2003/08/15 09:37:30 lirc Exp $ */
/****************************************************************************
** lirc_client.h ***********************************************************
****************************************************************************
*
* lirc_client - common routines for lircd clients
*
* Copyright (C) 1998 Trent Piepho <xyzzy@u.washington.edu>
* Copyright (C) 1998 Christoph Bartelmus <lirc@bartelmus.de>
*
*/
#ifndef LIRC_CLIENT_H
#define LIRC_CLIENT_H
#ifdef __cplusplus
extern "C" {
#endif
#define LIRC_ALL ((char *) (-1))
enum lirc_flags {none=0x00,
once=0x01,
quit=0x02,
mode=0x04,
ecno=0x08,
startup_mode=0x10
};
struct lirc_list
{
char *string;
struct lirc_list *next;
};
struct lirc_code
{
char *remote;
char *button;
struct lirc_code *next;
};
struct lirc_config
{
char *current_mode;
struct lirc_config_entry *next;
struct lirc_config_entry *first;
};
struct lirc_config_entry
{
char *prog;
struct lirc_code *code;
unsigned int rep_delay;
unsigned int rep;
struct lirc_list *config;
char *change_mode;
unsigned int flags;
char *mode;
struct lirc_list *next_config;
struct lirc_code *next_code;
struct lirc_config_entry *next;
};
int lirc_init(char *prog,int verbose);
int lirc_deinit(void);
int lirc_readconfig(char *file,struct lirc_config **config,
int (check)(char *s));
void lirc_freeconfig(struct lirc_config *config);
/* obsolete */
char *lirc_nextir(void);
/* obsolete */
char *lirc_ir2char(struct lirc_config *config,char *code);
int lirc_nextcode(char **code);
int lirc_code2char(struct lirc_config *config,char *code,char **string);
#ifdef __cplusplus
}
#endif
#endif
|