1 /* $Id: lirc_client.h,v 5.11 2008/05/20 18:54:37 lirc Exp $ */
3 /****************************************************************************
4 ** lirc_client.h ***********************************************************
5 ****************************************************************************
7 * lirc_client - common routines for lircd clients
9 * Copyright (C) 1998 Trent Piepho <xyzzy@u.washington.edu>
10 * Copyright (C) 1998 Christoph Bartelmus <lirc@bartelmus.de>
23 #define LIRC_RET_SUCCESS (0)
24 #define LIRC_RET_ERROR (-1)
26 #define LIRC_ALL ((char *) (-1))
28 enum lirc_flags
{none
=0x00,
40 struct lirc_list
*next
;
47 struct lirc_code
*next
;
53 struct lirc_config_entry
*next
;
54 struct lirc_config_entry
*first
;
59 struct lirc_config_entry
62 struct lirc_code
*code
;
63 unsigned int rep_delay
;
65 struct lirc_list
*config
;
70 struct lirc_list
*next_config
;
71 struct lirc_code
*next_code
;
73 struct lirc_config_entry
*next
;
76 int lirc_init(char *prog
,int verbose
);
77 int lirc_deinit(void);
79 int lirc_readconfig(char *file
,struct lirc_config
**config
,
80 int (check
)(char *s
));
81 void lirc_freeconfig(struct lirc_config
*config
);
84 char *lirc_nextir(void);
86 char *lirc_ir2char(struct lirc_config
*config
,char *code
);
88 int lirc_nextcode(char **code
);
89 int lirc_code2char(struct lirc_config
*config
,char *code
,char **string
);
91 /* new interface for client daemon */
92 int lirc_readconfig_only(char *file
,struct lirc_config
**config
,
93 int (check
)(char *s
));
94 int lirc_code2charprog(struct lirc_config
*config
,char *code
,char **string
,
96 size_t lirc_getsocketname(const char *filename
, char *buf
, size_t size
);
97 const char *lirc_getmode(struct lirc_config
*config
);
98 const char *lirc_setmode(struct lirc_config
*config
, const char *mode
);