additions to actions.h
This commit is contained in:
commit
09351463a5
|
@ -1,11 +1,13 @@
|
|||
#ifndef _LIGHTTPD_ACTIONS_H_
|
||||
#define _LIGHTTPD_ACTIONS_H_
|
||||
|
||||
// action type
|
||||
typedef enum { ACTION_SETTING, ACTION_FUNCTION, ACTION_CONDITION } action_type;
|
||||
|
||||
struct action;
|
||||
typedef struct action action;
|
||||
|
||||
// condition operator
|
||||
typedef enum
|
||||
{
|
||||
CONDITION_EQUAL, CONDITION_UNEQUAL,
|
||||
|
@ -14,6 +16,7 @@ typedef enum
|
|||
CONDITION_REGEX_MATCH, CONDITION_REGEX_NOMATCH
|
||||
} condition_op;
|
||||
|
||||
// condition type
|
||||
typedef enum { CONDITION_BOOL, CONDITION_INT, CONDITION_STRING, CONDITION_IP } condition_type;
|
||||
|
||||
struct condition;
|
||||
|
@ -37,7 +40,9 @@ struct condition
|
|||
{
|
||||
condition_type type;
|
||||
condition_op op;
|
||||
action* target; // action target to jump to if condition is fulfilled
|
||||
|
||||
// left value of condition
|
||||
union
|
||||
{
|
||||
guint val_int;
|
||||
|
@ -45,6 +50,7 @@ struct condition
|
|||
GString* val_string;
|
||||
} lvalue;
|
||||
|
||||
// right value of condition
|
||||
union
|
||||
{
|
||||
guint val_int;
|
||||
|
|
Loading…
Reference in New Issue