AT&T ECOMP Vendor Event Listener library
0.1
|
Source module relating to internal EVEL_JSON_BUFFER manipulation functions. More...
Go to the source code of this file.
Functions | |
void | evel_json_buffer_init (EVEL_JSON_BUFFER *jbuf, char *const json, const int max_size, EVEL_THROTTLE_SPEC *throttle_spec) |
Initialize a EVEL_JSON_BUFFER. More... | |
void | evel_enc_int (EVEL_JSON_BUFFER *jbuf, const int value) |
Encode an integer value to a JSON buffer. More... | |
bool | evel_enc_kv_opt_string (EVEL_JSON_BUFFER *jbuf, const char *const key, const EVEL_OPTION_STRING *const option) |
Encode a string key and string value to a EVEL_JSON_BUFFER. More... | |
void | evel_enc_kv_string (EVEL_JSON_BUFFER *jbuf, const char *const key, const char *const value) |
Encode a string key and string value to a EVEL_JSON_BUFFER. More... | |
bool | evel_enc_kv_opt_int (EVEL_JSON_BUFFER *jbuf, const char *const key, const EVEL_OPTION_INT *const option) |
Encode a string key and integer value to a EVEL_JSON_BUFFER. More... | |
void | evel_enc_kv_int (EVEL_JSON_BUFFER *jbuf, const char *const key, const int value) |
Encode a string key and integer value to a EVEL_JSON_BUFFER. More... | |
bool | evel_enc_kv_opt_double (EVEL_JSON_BUFFER *jbuf, const char *const key, const EVEL_OPTION_DOUBLE *const option) |
Encode a string key and double value to a EVEL_JSON_BUFFER. More... | |
void | evel_enc_kv_double (EVEL_JSON_BUFFER *jbuf, const char *const key, const double value) |
Encode a string key and double value to a EVEL_JSON_BUFFER. More... | |
bool | evel_enc_kv_opt_ull (EVEL_JSON_BUFFER *jbuf, const char *const key, const EVEL_OPTION_ULL *const option) |
Encode a string key and unsigned long long value to a EVEL_JSON_BUFFER. More... | |
void | evel_enc_kv_ull (EVEL_JSON_BUFFER *jbuf, const char *const key, const unsigned long long value) |
Encode a string key and unsigned long long value to a EVEL_JSON_BUFFER. More... | |
bool | evel_enc_kv_opt_time (EVEL_JSON_BUFFER *jbuf, const char *const key, const EVEL_OPTION_TIME *const option) |
Encode a string key and time value to a EVEL_JSON_BUFFER. More... | |
void | evel_enc_kv_time (EVEL_JSON_BUFFER *jbuf, const char *const key, const time_t *time) |
Encode a string key and time value to a EVEL_JSON_BUFFER. More... | |
void | evel_enc_version (EVEL_JSON_BUFFER *jbuf, const char *const key, const int major_version, const int minor_version) |
Encode a key and version. More... | |
bool | evel_json_open_opt_named_list (EVEL_JSON_BUFFER *jbuf, const char *const key) |
Add the key and opening bracket of an optional named list to a JSON buffer. More... | |
void | evel_json_open_named_list (EVEL_JSON_BUFFER *jbuf, const char *const key) |
Add the key and opening bracket of a named list to a JSON buffer. More... | |
void | evel_json_close_list (EVEL_JSON_BUFFER *jbuf) |
Add the closing bracket of a list to a JSON buffer. More... | |
void | evel_enc_list_item (EVEL_JSON_BUFFER *jbuf, const char *const format,...) |
Encode a list item with format and param list to a EVEL_JSON_BUFFER. More... | |
bool | evel_json_open_opt_named_object (EVEL_JSON_BUFFER *jbuf, const char *const key) |
Add the opening bracket of an optional named object to a JSON buffer. More... | |
void | evel_json_open_named_object (EVEL_JSON_BUFFER *jbuf, const char *const key) |
Add the opening bracket of an object to a JSON buffer. More... | |
void | evel_json_open_object (EVEL_JSON_BUFFER *jbuf) |
Add the opening bracket of an object to a JSON buffer. More... | |
void | evel_json_close_object (EVEL_JSON_BUFFER *jbuf) |
Add the closing bracket of an object to a JSON buffer. More... | |
void | evel_json_checkpoint (EVEL_JSON_BUFFER *jbuf) |
Add a checkpoint - a stake in the ground to which we can rewind. More... | |
void | evel_json_rewind (EVEL_JSON_BUFFER *jbuf) |
Rewind to the latest checkoint. More... | |
Source module relating to internal EVEL_JSON_BUFFER manipulation functions.
Copyright(c) <2016>, AT&T Intellectual Property. All other rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY AT&T INTELLECTUAL PROPERTY ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AT&T INTELLECTUAL PROPERTY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file evel_json_buffer.c.
void evel_enc_int | ( | EVEL_JSON_BUFFER * | jbuf, |
const int | value | ||
) |
Encode an integer value to a JSON buffer.
jbuf | Pointer to working EVEL_JSON_BUFFER. |
value | The integer to add to it. |
Definition at line 80 of file evel_json_buffer.c.
void evel_enc_kv_double | ( | EVEL_JSON_BUFFER * | jbuf, |
const char *const | key, | ||
const double | value | ||
) |
Encode a string key and double value to a EVEL_JSON_BUFFER.
jbuf | Pointer to working EVEL_JSON_BUFFER. |
key | Pointer to the key to encode. |
value | The corresponding value to encode. |
Definition at line 323 of file evel_json_buffer.c.
void evel_enc_kv_int | ( | EVEL_JSON_BUFFER * | jbuf, |
const char *const | key, | ||
const int | value | ||
) |
Encode a string key and integer value to a EVEL_JSON_BUFFER.
jbuf | Pointer to working EVEL_JSON_BUFFER. |
key | Pointer to the key to encode. |
value | The corresponding value to encode. |
Definition at line 252 of file evel_json_buffer.c.
bool evel_enc_kv_opt_double | ( | EVEL_JSON_BUFFER * | jbuf, |
const char *const | key, | ||
const EVEL_OPTION_DOUBLE *const | option | ||
) |
Encode a string key and double value to a EVEL_JSON_BUFFER.
jbuf | Pointer to working EVEL_JSON_BUFFER. |
key | Pointer to the key to encode. |
option | Pointer to holder of the corresponding value to encode. |
Definition at line 282 of file evel_json_buffer.c.
bool evel_enc_kv_opt_int | ( | EVEL_JSON_BUFFER * | jbuf, |
const char *const | key, | ||
const EVEL_OPTION_INT *const | option | ||
) |
Encode a string key and integer value to a EVEL_JSON_BUFFER.
jbuf | Pointer to working EVEL_JSON_BUFFER. |
key | Pointer to the key to encode. |
option | Pointer to holder of the corresponding value to encode. |
Definition at line 211 of file evel_json_buffer.c.
bool evel_enc_kv_opt_string | ( | EVEL_JSON_BUFFER * | jbuf, |
const char *const | key, | ||
const EVEL_OPTION_STRING *const | option | ||
) |
Encode a string key and string value to a EVEL_JSON_BUFFER.
jbuf | Pointer to working EVEL_JSON_BUFFER. |
key | Pointer to the key to encode. |
option | Pointer to holder of the corresponding value to encode. |
Definition at line 105 of file evel_json_buffer.c.
bool evel_enc_kv_opt_time | ( | EVEL_JSON_BUFFER * | jbuf, |
const char *const | key, | ||
const EVEL_OPTION_TIME *const | option | ||
) |
Encode a string key and time value to a EVEL_JSON_BUFFER.
jbuf | Pointer to working EVEL_JSON_BUFFER. |
key | Pointer to the key to encode. |
option | Pointer to holder of the corresponding value to encode. |
Definition at line 424 of file evel_json_buffer.c.
bool evel_enc_kv_opt_ull | ( | EVEL_JSON_BUFFER * | jbuf, |
const char *const | key, | ||
const EVEL_OPTION_ULL *const | option | ||
) |
Encode a string key and unsigned long long value to a EVEL_JSON_BUFFER.
jbuf | Pointer to working EVEL_JSON_BUFFER. |
key | Pointer to the key to encode. |
option | Pointer to holder of the corresponding value to encode. |
Definition at line 353 of file evel_json_buffer.c.
void evel_enc_kv_string | ( | EVEL_JSON_BUFFER * | jbuf, |
const char *const | key, | ||
const char *const | value | ||
) |
Encode a string key and string value to a EVEL_JSON_BUFFER.
jbuf | Pointer to working EVEL_JSON_BUFFER. |
key | Pointer to the key to encode. |
value | Pointer to the corresponding value to encode. |
Definition at line 146 of file evel_json_buffer.c.
void evel_enc_kv_time | ( | EVEL_JSON_BUFFER * | jbuf, |
const char *const | key, | ||
const time_t * | time | ||
) |
Encode a string key and time value to a EVEL_JSON_BUFFER.
jbuf | Pointer to working EVEL_JSON_BUFFER. |
key | Pointer to the key to encode. |
time | Pointer to the time to encode. |
Definition at line 465 of file evel_json_buffer.c.
void evel_enc_kv_ull | ( | EVEL_JSON_BUFFER * | jbuf, |
const char *const | key, | ||
const unsigned long long | value | ||
) |
Encode a string key and unsigned long long value to a EVEL_JSON_BUFFER.
jbuf | Pointer to working EVEL_JSON_BUFFER. |
key | Pointer to the key to encode. |
value | The corresponding value to encode. |
Definition at line 394 of file evel_json_buffer.c.
void evel_enc_list_item | ( | EVEL_JSON_BUFFER * | jbuf, |
const char *const | format, | ||
... | |||
) |
Encode a list item with format and param list to a EVEL_JSON_BUFFER.
jbuf | Pointer to working EVEL_JSON_BUFFER. |
format | Format string in standard printf format. |
... | Variable parameters for format string. |
Definition at line 620 of file evel_json_buffer.c.
void evel_enc_version | ( | EVEL_JSON_BUFFER * | jbuf, |
const char *const | key, | ||
const int | major_version, | ||
const int | minor_version | ||
) |
Encode a key and version.
jbuf | Pointer to working EVEL_JSON_BUFFER. |
key | Pointer to the key to encode. |
major_version | The major version to encode. |
minor_version | The minor version to encode. |
Definition at line 501 of file evel_json_buffer.c.
void evel_json_buffer_init | ( | EVEL_JSON_BUFFER * | jbuf, |
char *const | json, | ||
const int | max_size, | ||
EVEL_THROTTLE_SPEC * | throttle_spec | ||
) |
Initialize a EVEL_JSON_BUFFER.
jbuf | Pointer to the EVEL_JSON_BUFFER to initialise. |
json | Pointer to the underlying working buffer to use. |
max_size | Size of storage available in the JSON buffer. |
throttle_spec | Pointer to throttle specification. Can be NULL. |
Definition at line 55 of file evel_json_buffer.c.
void evel_json_checkpoint | ( | EVEL_JSON_BUFFER * | jbuf | ) |
Add a checkpoint - a stake in the ground to which we can rewind.
jbuf | Pointer to working EVEL_JSON_BUFFER. |
Definition at line 813 of file evel_json_buffer.c.
void evel_json_close_list | ( | EVEL_JSON_BUFFER * | jbuf | ) |
Add the closing bracket of a list to a JSON buffer.
jbuf | Pointer to working EVEL_JSON_BUFFER. |
Definition at line 596 of file evel_json_buffer.c.
void evel_json_close_object | ( | EVEL_JSON_BUFFER * | jbuf | ) |
Add the closing bracket of an object to a JSON buffer.
jbuf | Pointer to working EVEL_JSON_BUFFER. |
Definition at line 758 of file evel_json_buffer.c.
void evel_json_open_named_list | ( | EVEL_JSON_BUFFER * | jbuf, |
const char *const | key | ||
) |
Add the key and opening bracket of a named list to a JSON buffer.
jbuf | Pointer to working EVEL_JSON_BUFFER. |
key | Pointer to the key to encode. |
Definition at line 570 of file evel_json_buffer.c.
void evel_json_open_named_object | ( | EVEL_JSON_BUFFER * | jbuf, |
const char *const | key | ||
) |
Add the opening bracket of an object to a JSON buffer.
jbuf | Pointer to working EVEL_JSON_BUFFER. |
key | Pointer to the key to encode. |
Definition at line 698 of file evel_json_buffer.c.
void evel_json_open_object | ( | EVEL_JSON_BUFFER * | jbuf | ) |
Add the opening bracket of an object to a JSON buffer.
jbuf | Pointer to working EVEL_JSON_BUFFER. |
Definition at line 724 of file evel_json_buffer.c.
bool evel_json_open_opt_named_list | ( | EVEL_JSON_BUFFER * | jbuf, |
const char *const | key | ||
) |
Add the key and opening bracket of an optional named list to a JSON buffer.
jbuf | Pointer to working EVEL_JSON_BUFFER. |
key | Pointer to the key to encode. |
Definition at line 533 of file evel_json_buffer.c.
bool evel_json_open_opt_named_object | ( | EVEL_JSON_BUFFER * | jbuf, |
const char *const | key | ||
) |
Add the opening bracket of an optional named object to a JSON buffer.
jbuf | Pointer to working EVEL_JSON_BUFFER. |
key | Pointer to the key to encode. |
Definition at line 660 of file evel_json_buffer.c.
void evel_json_rewind | ( | EVEL_JSON_BUFFER * | jbuf | ) |
Rewind to the latest checkoint.
jbuf | Pointer to working EVEL_JSON_BUFFER. |
Definition at line 835 of file evel_json_buffer.c.