nxt_conf.h (111:cfdcff16aa43) nxt_conf.h (116:b36238461b48)
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) Valentin V. Bartenev
5 * Copyright (C) NGINX, Inc.
6 */
7
8#ifndef _NXT_CONF_INCLUDED_
9#define _NXT_CONF_INCLUDED_
10
11
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) Valentin V. Bartenev
5 * Copyright (C) NGINX, Inc.
6 */
7
8#ifndef _NXT_CONF_INCLUDED_
9#define _NXT_CONF_INCLUDED_
10
11
12#define NXT_CONF_NULL 0x01
13#define NXT_CONF_BOOLEAN 0x02
14#define NXT_CONF_INTEGER 0x04
15#define NXT_CONF_NUMBER 0x08
16#define NXT_CONF_STRING 0x10
17#define NXT_CONF_ARRAY 0x20
18#define NXT_CONF_OBJECT 0x40
19
20
12typedef struct nxt_conf_value_s nxt_conf_value_t;
13typedef struct nxt_conf_op_s nxt_conf_op_t;
14
15
16typedef enum {
17 NXT_CONF_MAP_INT8,
18 NXT_CONF_MAP_INT32,
19 NXT_CONF_MAP_INT64,

--- 15 unchanged lines hidden (view full) ---

35
36
37typedef struct {
38 uint32_t level;
39 uint8_t more_space; /* 1 bit. */
40} nxt_conf_json_pretty_t;
41
42
21typedef struct nxt_conf_value_s nxt_conf_value_t;
22typedef struct nxt_conf_op_s nxt_conf_op_t;
23
24
25typedef enum {
26 NXT_CONF_MAP_INT8,
27 NXT_CONF_MAP_INT32,
28 NXT_CONF_MAP_INT64,

--- 15 unchanged lines hidden (view full) ---

44
45
46typedef struct {
47 uint32_t level;
48 uint8_t more_space; /* 1 bit. */
49} nxt_conf_json_pretty_t;
50
51
52nxt_uint_t nxt_conf_type(nxt_conf_value_t *value);
53
43nxt_conf_value_t *nxt_conf_get_path(nxt_conf_value_t *value, nxt_str_t *path);
44nxt_conf_value_t *nxt_conf_get_object_member(nxt_conf_value_t *value,
45 nxt_str_t *name, uint32_t *index);
46nxt_conf_value_t *nxt_conf_next_object_member(nxt_conf_value_t *value,
47 nxt_str_t *name, uint32_t *next);
48
49nxt_int_t nxt_conf_map_object(nxt_conf_value_t *value, nxt_conf_map_t *map,
50 void *data);

--- 8 unchanged lines hidden (view full) ---

59#define nxt_conf_json_parse_str(mp, str) \
60 nxt_conf_json_parse(mp, (str)->start, (str)->start + (str)->length)
61
62size_t nxt_conf_json_length(nxt_conf_value_t *value,
63 nxt_conf_json_pretty_t *pretty);
64u_char *nxt_conf_json_print(u_char *p, nxt_conf_value_t *value,
65 nxt_conf_json_pretty_t *pretty);
66
54nxt_conf_value_t *nxt_conf_get_path(nxt_conf_value_t *value, nxt_str_t *path);
55nxt_conf_value_t *nxt_conf_get_object_member(nxt_conf_value_t *value,
56 nxt_str_t *name, uint32_t *index);
57nxt_conf_value_t *nxt_conf_next_object_member(nxt_conf_value_t *value,
58 nxt_str_t *name, uint32_t *next);
59
60nxt_int_t nxt_conf_map_object(nxt_conf_value_t *value, nxt_conf_map_t *map,
61 void *data);

--- 8 unchanged lines hidden (view full) ---

70#define nxt_conf_json_parse_str(mp, str) \
71 nxt_conf_json_parse(mp, (str)->start, (str)->start + (str)->length)
72
73size_t nxt_conf_json_length(nxt_conf_value_t *value,
74 nxt_conf_json_pretty_t *pretty);
75u_char *nxt_conf_json_print(u_char *p, nxt_conf_value_t *value,
76 nxt_conf_json_pretty_t *pretty);
77
78nxt_int_t nxt_conf_validate(nxt_conf_value_t *value);
67
79
80
68#endif /* _NXT_CONF_INCLUDED_ */
81#endif /* _NXT_CONF_INCLUDED_ */