Deleted
Added
nxt_conf.h (172:72c5b69c7145) | nxt_conf.h (208:7d1017bd0f6c) |
---|---|
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_ --- 8 unchanged lines hidden (view full) --- 17#define NXT_CONF_ARRAY 0x20 18#define NXT_CONF_OBJECT 0x40 19 20 21typedef struct nxt_conf_value_s nxt_conf_value_t; 22typedef struct nxt_conf_op_s nxt_conf_op_t; 23 24 | 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_ --- 8 unchanged lines hidden (view full) --- 17#define NXT_CONF_ARRAY 0x20 18#define NXT_CONF_OBJECT 0x40 19 20 21typedef struct nxt_conf_value_s nxt_conf_value_t; 22typedef struct nxt_conf_op_s nxt_conf_op_t; 23 24 |
25typedef struct { 26 u_char *pos; 27 u_char *detail; 28} nxt_conf_json_error_t; 29 30 |
|
25typedef enum { 26 NXT_CONF_MAP_INT8, 27 NXT_CONF_MAP_INT32, 28 NXT_CONF_MAP_INT64, 29 NXT_CONF_MAP_INT, 30 NXT_CONF_MAP_SIZE, 31 NXT_CONF_MAP_OFF, 32 NXT_CONF_MAP_MSEC, --- 27 unchanged lines hidden (view full) --- 60nxt_int_t nxt_conf_map_object(nxt_conf_value_t *value, nxt_conf_map_t *map, 61 nxt_uint_t n, void *data); 62 63nxt_int_t nxt_conf_op_compile(nxt_mp_t *mp, nxt_conf_op_t **ops, 64 nxt_conf_value_t *root, nxt_str_t *path, nxt_conf_value_t *value); 65nxt_conf_value_t *nxt_conf_clone(nxt_mp_t *mp, nxt_conf_op_t *op, 66 nxt_conf_value_t *value); 67 | 31typedef enum { 32 NXT_CONF_MAP_INT8, 33 NXT_CONF_MAP_INT32, 34 NXT_CONF_MAP_INT64, 35 NXT_CONF_MAP_INT, 36 NXT_CONF_MAP_SIZE, 37 NXT_CONF_MAP_OFF, 38 NXT_CONF_MAP_MSEC, --- 27 unchanged lines hidden (view full) --- 66nxt_int_t nxt_conf_map_object(nxt_conf_value_t *value, nxt_conf_map_t *map, 67 nxt_uint_t n, void *data); 68 69nxt_int_t nxt_conf_op_compile(nxt_mp_t *mp, nxt_conf_op_t **ops, 70 nxt_conf_value_t *root, nxt_str_t *path, nxt_conf_value_t *value); 71nxt_conf_value_t *nxt_conf_clone(nxt_mp_t *mp, nxt_conf_op_t *op, 72 nxt_conf_value_t *value); 73 |
68nxt_conf_value_t *nxt_conf_json_parse(nxt_mp_t *mp, u_char *start, u_char *end); | 74nxt_conf_value_t *nxt_conf_json_parse(nxt_mp_t *mp, u_char *start, u_char *end, 75 nxt_conf_json_error_t *error); |
69 70#define nxt_conf_json_parse_str(mp, str) \ | 76 77#define nxt_conf_json_parse_str(mp, str) \ |
71 nxt_conf_json_parse(mp, (str)->start, (str)->start + (str)->length) | 78 nxt_conf_json_parse(mp, (str)->start, (str)->start + (str)->length, NULL) |
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); | 79 80size_t nxt_conf_json_length(nxt_conf_value_t *value, 81 nxt_conf_json_pretty_t *pretty); 82u_char *nxt_conf_json_print(u_char *p, nxt_conf_value_t *value, 83 nxt_conf_json_pretty_t *pretty); |
84void nxt_conf_json_position(u_char *start, u_char *pos, nxt_uint_t *line, 85 nxt_uint_t *column); |
|
77 78nxt_int_t nxt_conf_validate(nxt_conf_value_t *value); 79 80void nxt_conf_get_string(nxt_conf_value_t *value, nxt_str_t *str); 81 82// FIXME reimplement and reorder functions below 83nxt_uint_t nxt_conf_object_members_count(nxt_conf_value_t *value); 84nxt_conf_value_t *nxt_conf_create_object(nxt_mp_t *mp, nxt_uint_t count); | 86 87nxt_int_t nxt_conf_validate(nxt_conf_value_t *value); 88 89void nxt_conf_get_string(nxt_conf_value_t *value, nxt_str_t *str); 90 91// FIXME reimplement and reorder functions below 92nxt_uint_t nxt_conf_object_members_count(nxt_conf_value_t *value); 93nxt_conf_value_t *nxt_conf_create_object(nxt_mp_t *mp, nxt_uint_t count); |
85nxt_int_t nxt_conf_set_object_member(nxt_conf_value_t *object, nxt_str_t *name, | 94void nxt_conf_set_member(nxt_conf_value_t *object, nxt_str_t *name, |
86 nxt_conf_value_t *value, uint32_t index); | 95 nxt_conf_value_t *value, uint32_t index); |
96void nxt_conf_set_member_string(nxt_conf_value_t *object, nxt_str_t *name, 97 nxt_str_t *value, uint32_t index); 98void nxt_conf_set_member_integer(nxt_conf_value_t *object, nxt_str_t *name, 99 int64_t value, uint32_t index); |
|
87 88 89#endif /* _NXT_CONF_INCLUDED_ */ | 100 101 102#endif /* _NXT_CONF_INCLUDED_ */ |