You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lighttpd2/src/actions.h

76 lines
1.2 KiB

15 years ago
#ifndef _LIGHTTPD_ACTIONS_H_
#define _LIGHTTPD_ACTIONS_H_
15 years ago
typedef enum { ACTION_RESULT_GO_ON, ACTION_RESULT_BREAK, ACTION_RESULT_WAIT_FOR_EVENT } action_result;
// action type
15 years ago
typedef enum { ACTION_SETTING, ACTION_FUNCTION, ACTION_CONDITION } action_type;
struct action;
typedef struct action action;
15 years ago
struct action_list;
typedef struct action_list action_list;
struct action_stack;
typedef struct action_stack action_stack;
15 years ago
15 years ago
struct action_list {
15 years ago
GArray* actions;
guint refcount;
15 years ago
};
15 years ago
15 years ago
struct action_stack {
15 years ago
GArray* stack;
guint index;
15 years ago
};
15 years ago
15 years ago
struct action_stack_elem {
15 years ago
action_list* al;
guint index;
15 years ago
};
15 years ago
typedef struct action_stack_elem action_stack_elem;
15 years ago
struct action {
15 years ago
action_type type;
15 years ago
union {
struct {
15 years ago
option_mark opt;
option newvalue;
} setting;
15 years ago
condition cond;
15 years ago
15 years ago
struct {
15 years ago
action_func* func;
gpointer param;
} actionfunc;
15 years ago
} value;
};
15 years ago
struct condition {
15 years ago
condition_type type;
condition_op op;
15 years ago
action_list* target; // action target to jump to if condition is fulfilled
15 years ago
// left value of condition
15 years ago
union {
15 years ago
guint val_int;
gboolean val_bool;
GString* val_string;
} lvalue;
// right value of condition
15 years ago
union {
15 years ago
guint val_int;
gboolean val_bool;
GString* val_string;
} rvalue;
};
#endif