nut-debian/include/extstate.h

46 lines
842 B
C
Raw Normal View History

2010-03-26 01:20:59 +02:00
/* external state structures used by things like upsd */
#ifndef EXTSTATE_H_SEEN
#define EXTSTATE_H_SEEN 1
2013-11-24 17:00:12 +02:00
#ifdef __cplusplus
/* *INDENT-OFF* */
extern "C" {
/* *INDENT-ON* */
#endif
2010-03-26 01:20:59 +02:00
/* this could be made dynamic if someone really needs more than this... */
#define ST_MAX_VALUE_LEN 256
/* state tree flags */
#define ST_FLAG_RW 0x0001
#define ST_FLAG_STRING 0x0002
#define ST_FLAG_IMMUTABLE 0x0004
/* list of possible ENUM values */
2011-01-26 11:35:08 +02:00
typedef struct enum_s {
2010-03-26 01:20:59 +02:00
char *val;
2011-01-26 11:35:08 +02:00
struct enum_s *next;
} enum_t;
2010-03-26 01:20:59 +02:00
2012-06-01 16:55:19 +03:00
/* RANGE boundaries */
typedef struct range_s {
int min;
int max;
struct range_s *next;
} range_t;
2010-03-26 01:20:59 +02:00
/* list of instant commands */
2011-01-26 11:35:08 +02:00
typedef struct cmdlist_s {
2010-03-26 01:20:59 +02:00
char *name;
2011-01-26 11:35:08 +02:00
struct cmdlist_s *next;
} cmdlist_t;
2010-03-26 01:20:59 +02:00
2013-11-24 17:00:12 +02:00
#ifdef __cplusplus
/* *INDENT-OFF* */
}
/* *INDENT-ON* */
#endif
2010-03-26 01:20:59 +02:00
#endif /* EXTSTATE_H_SEEN */