Move mjpg-streamer.pot to the right directory
[project/luci.git] / contrib / fwd / src / fwd_config.h
1 #ifndef __FWD_CONFIG_H__
2 #define __FWD_CONFIG_H__
3
4 #include "fwd.h"
5 #include "ucix.h"
6
7 /* fwd_check_option(uci_ctx, section, name, type) */
8 #define fwd_check_option(uci, sct, name, type)                       \
9         struct fwd_##type *name = NULL;                                  \
10         if( fwd_read_##type(uci, sct, #name, &name) )                    \
11         {                                                                \
12                 printf("ERROR: section '%s' contains invalid %s in '%s'!\n", \
13                         sct, #type, #name);                                      \
14         return;                                                      \
15         }
16
17 /* structure to access fwd_data* in uci iter callbacks */
18 struct fwd_data_conveyor {
19         struct fwd_data *head;
20         struct fwd_data *cursor;
21 };
22
23 /* api */
24 struct fwd_data * fwd_read_config(struct fwd_handle *);
25 struct fwd_zone * fwd_lookup_zone(struct fwd_data *, const char *);
26
27 void fwd_free_config(struct fwd_data *);
28
29 #endif