![]() |
Multi-ApplicationOnlineProfiling
2.1
|
#include <stdio.h>#include <stdlib.h>#include <stdint.h>#include <pthread.h>

Go to the source code of this file.
Data Structures | |
| struct | json_t_s |
| struct | json_null_s |
| struct | json_bool_s |
| struct | json_string_s |
| struct | json_int_s |
| struct | json_real_s |
| struct | ObjectHT_entry |
| struct | ObjectHT |
| struct | json_object_s |
| struct | json_array_s |
| struct | json_object_iterator_s |
| struct | jsonCache |
Macros | |
| #define | json_to_null(a) ( (json_null_t *)( a ) ) |
| #define | json_to_bool(a) ( (json_bool_t *)( a ) ) |
| #define | json_to_string(a) ( (json_string_t *)( a ) ) |
| #define | json_to_int(a) ( (json_int_t *)( a ) ) |
| #define | json_to_real(a) ( (json_real_t *)( a ) ) |
| #define | json_to_object(a) ( (json_object_t *)( a ) ) |
| #define | json_to_array(a) ( (json_array_t *)( a ) ) |
Typedefs | |
| typedef enum json_type_e | json_type |
| typedef struct json_t_s | json_t |
| typedef struct json_null_s | json_null_t |
| typedef struct json_bool_s | json_bool_t |
| typedef struct json_string_s | json_string_t |
| typedef struct json_int_s | json_int_t |
| typedef struct json_real_s | json_real_t |
| typedef struct json_object_s | json_object_t |
| typedef struct json_array_s | json_array_t |
| typedef struct json_object_iterator_s | json_object_iterator |
Enumerations | |
| enum | json_type_e { JSON_NULL, JSON_BOOL, JSON_STRING, JSON_INT, JSON_REAL, JSON_OBJECT, JSON_ARRAY, JSON_SOMETHING_ELSE } |
| enum | json_format { JSON_COMPACT = 1, JSON_PRETTY = 2, JSON_NO_LOCK = 4 } |
Functions | |
| static void | json_lock (json_t *json) |
| static void | json_unlock (json_t *json) |
| static int | json_locked (json_t *json) |
| void | json_incref (json_t *json) |
| void | json_decref (json_t *json) |
| json_t * | __json_t_init (json_type type) |
| void | __json_t_release (json_t *json) |
| static void | json_incref_lf (json_t *json) |
| static int | json_decref_lf (json_t *json) |
| json_t * | json_null () |
| void | json_null_destroy (json_t *json) |
| json_t * | json_bool (int thruth) |
| void | json_bool_destroy (json_t *json) |
| json_t * | json_string (char *string) |
| json_t * | json_string_l (char *string, int len) |
| void | json_string_destroy (json_t *json) |
| json_t * | json_int (int64_t value) |
| void | json_int_destroy (json_t *json) |
| json_t * | json_real (double value) |
| void | json_real_destroy (json_t *json) |
| void | ObjectHT_init (struct ObjectHT *ht, int pow2_size) |
| void | ObjectHT_release (struct ObjectHT *ht) |
| void | ObjectHT_set (struct ObjectHT *ht, char *key, json_t *elem) |
| struct ObjectHT_entry * | ObjectHT_get (struct ObjectHT *ht, char *key) |
| void | ObjectHT_delete (struct ObjectHT *ht, char *key) |
| json_t * | json_object () |
| json_t * | json_object_set (json_t *json, char *key, json_t *elem) |
| json_t * | json_object_get (json_t *json, char *key) |
| json_t * | json_object_delete (json_t *json, char *key) |
| void | json_object_destroy (json_t *json) |
| json_t * | json_array () |
| json_t * | json_array_push (json_t *json, json_t *elem) |
| json_t * | json_array_push_at (json_t *json, unsigned int offset, json_t *elem) |
| json_t * | json_array_get (json_t *json, unsigned int offset) |
| json_t * | json_array_set (json_t *json, unsigned int offset, json_t *elem) |
| json_t * | json_array_del (json_t *json, unsigned int offset) |
| void | json_array_destroy (json_t *json) |
| int | json_array_guarantee (json_array_t *a, unsigned int offset, int count) |
| static void | json_object_iterator_init (json_object_iterator *it, json_t *json) |
| static int | json_object_iterator_next (json_object_iterator *it) |
| static char * | json_object_iterator_key (json_object_iterator *it) |
| static json_t * | json_object_iterator_elem (json_object_iterator *it) |
| char * | json_dump (json_t *json, json_format mode) |
| void | json_dump_f (FILE *f, json_t *json, json_format mode) |
| static void | json_print (json_t *json, json_format mode) |
| json_t * | _json_parse (char **buff) |
| json_t * | json_parse (char *json) |
| void | jsonCache_init (struct jsonCache *cache, void(*set_handler)(char *, json_t *, void *ctx), void(*delete_handler)(char *, void *ctx), void *ctx) |
| void | jsonCache_release (struct jsonCache *cache) |
| json_t * | jsonCache_get (struct jsonCache *cache, char *key) |
| void | jsonCache_commit (struct jsonCache *cache, char *key) |
| char * | jsonCache_json (struct jsonCache *c, char *key, json_format mode) |
| void | jsonCache_set_json (struct jsonCache *cache, char *key, char *json) |
| void | jsonCache_set (struct jsonCache *cache, char *key, json_t *elem) |
| void | jsonCache_set_json_nocommit (struct jsonCache *cache, char *key, char *json) |
| void | jsonCache_set_nocommit (struct jsonCache *cache, char *key, json_t *elem) |
| void | jsonCache_delete (struct jsonCache *cache, char *key) |
| void | jsonCache_delete_nocommit (struct jsonCache *cache, char *key) |
| #define json_to_array | ( | a | ) | ( (json_array_t *)( a ) ) |
Definition at line 238 of file jsonCache.h.
| #define json_to_bool | ( | a | ) | ( (json_bool_t *)( a ) ) |
Definition at line 233 of file jsonCache.h.
| #define json_to_int | ( | a | ) | ( (json_int_t *)( a ) ) |
Definition at line 235 of file jsonCache.h.
| #define json_to_null | ( | a | ) | ( (json_null_t *)( a ) ) |
Definition at line 232 of file jsonCache.h.
| #define json_to_object | ( | a | ) | ( (json_object_t *)( a ) ) |
Definition at line 237 of file jsonCache.h.
| #define json_to_real | ( | a | ) | ( (json_real_t *)( a ) ) |
Definition at line 236 of file jsonCache.h.
| #define json_to_string | ( | a | ) | ( (json_string_t *)( a ) ) |
Definition at line 234 of file jsonCache.h.
| typedef struct json_array_s json_array_t |
| typedef struct json_bool_s json_bool_t |
| typedef struct json_int_s json_int_t |
| typedef struct json_null_s json_null_t |
| typedef struct json_object_iterator_s json_object_iterator |
| typedef struct json_object_s json_object_t |
| typedef struct json_real_s json_real_t |
| typedef struct json_string_s json_string_t |
| typedef enum json_type_e json_type |
| enum json_format |
| Enumerator | |
|---|---|
| JSON_COMPACT | |
| JSON_PRETTY | |
| JSON_NO_LOCK | |
Definition at line 332 of file jsonCache.h.
| enum json_type_e |
| Enumerator | |
|---|---|
| JSON_NULL | |
| JSON_BOOL | |
| JSON_STRING | |
| JSON_INT | |
| JSON_REAL | |
| JSON_OBJECT | |
| JSON_ARRAY | |
| JSON_SOMETHING_ELSE | |
Definition at line 13 of file jsonCache.h.
| void __json_t_release | ( | json_t * | json | ) |
Definition at line 97 of file jsonCache.c.


| json_t* _json_parse | ( | char ** | buff | ) |
Definition at line 1469 of file jsonCache.c.


| json_t* json_array | ( | ) |
Definition at line 540 of file jsonCache.c.


| void json_array_destroy | ( | json_t * | json | ) |
Definition at line 700 of file jsonCache.c.


| int json_array_guarantee | ( | json_array_t * | a, |
| unsigned int | offset, | ||
| int | count | ||
| ) |
Definition at line 553 of file jsonCache.c.


Definition at line 610 of file jsonCache.c.


Definition at line 592 of file jsonCache.c.


| json_t* json_bool | ( | int | thruth | ) |
Definition at line 156 of file jsonCache.c.


| void json_bool_destroy | ( | json_t * | json | ) |
| void json_decref | ( | json_t * | json | ) |
Definition at line 23 of file jsonCache.c.


|
inlinestatic |
Definition at line 78 of file jsonCache.h.


| char* json_dump | ( | json_t * | json, |
| json_format | mode | ||
| ) |
Definition at line 938 of file jsonCache.c.


| void json_dump_f | ( | FILE * | f, |
| json_t * | json, | ||
| json_format | mode | ||
| ) |
Definition at line 980 of file jsonCache.c.


| void json_incref | ( | json_t * | json | ) |
Definition at line 13 of file jsonCache.c.


|
inlinestatic |
| json_t* json_int | ( | int64_t | value | ) |
Definition at line 212 of file jsonCache.c.


| void json_int_destroy | ( | json_t * | json | ) |
|
inlinestatic |
|
inlinestatic |
Definition at line 56 of file jsonCache.h.
| json_t* json_null | ( | ) |
Definition at line 145 of file jsonCache.c.


| void json_null_destroy | ( | json_t * | json | ) |
| json_t* json_object | ( | ) |
Definition at line 468 of file jsonCache.c.


Definition at line 520 of file jsonCache.c.


| void json_object_destroy | ( | json_t * | json | ) |
Definition at line 480 of file jsonCache.c.


Definition at line 500 of file jsonCache.c.


|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Definition at line 487 of file jsonCache.c.


| json_t* json_parse | ( | char * | json | ) |
Definition at line 1504 of file jsonCache.c.


|
inlinestatic |
| json_t* json_real | ( | double | value | ) |
Definition at line 229 of file jsonCache.c.


| void json_real_destroy | ( | json_t * | json | ) |
| json_t* json_string | ( | char * | string | ) |
Definition at line 173 of file jsonCache.c.


| void json_string_destroy | ( | json_t * | json | ) |
| json_t* json_string_l | ( | char * | string, |
| int | len | ||
| ) |
|
inlinestatic |
| void jsonCache_commit | ( | struct jsonCache * | cache, |
| char * | key | ||
| ) |
Definition at line 1578 of file jsonCache.c.


| void jsonCache_delete | ( | struct jsonCache * | cache, |
| char * | key | ||
| ) |
Definition at line 1565 of file jsonCache.c.


| void jsonCache_delete_nocommit | ( | struct jsonCache * | cache, |
| char * | key | ||
| ) |
Definition at line 1570 of file jsonCache.c.


Definition at line 1539 of file jsonCache.c.


| void jsonCache_init | ( | struct jsonCache * | cache, |
| void(*)(char *, json_t *, void *ctx) | set_handler, | ||
| void(*)(char *, void *ctx) | delete_handler, | ||
| void * | ctx | ||
| ) |
| char* jsonCache_json | ( | struct jsonCache * | c, |
| char * | key, | ||
| json_format | mode | ||
| ) |
| void jsonCache_release | ( | struct jsonCache * | cache | ) |
Definition at line 1531 of file jsonCache.c.


Definition at line 1619 of file jsonCache.c.


| void jsonCache_set_json | ( | struct jsonCache * | cache, |
| char * | key, | ||
| char * | json | ||
| ) |
| void jsonCache_set_json_nocommit | ( | struct jsonCache * | cache, |
| char * | key, | ||
| char * | json | ||
| ) |
Definition at line 1653 of file jsonCache.c.


Definition at line 1625 of file jsonCache.c.


| void ObjectHT_delete | ( | struct ObjectHT * | ht, |
| char * | key | ||
| ) |
Definition at line 461 of file jsonCache.c.


| struct ObjectHT_entry* ObjectHT_get | ( | struct ObjectHT * | ht, |
| char * | key | ||
| ) |
Definition at line 387 of file jsonCache.c.


| void ObjectHT_init | ( | struct ObjectHT * | ht, |
| int | pow2_size | ||
| ) |
| void ObjectHT_release | ( | struct ObjectHT * | ht | ) |
Definition at line 332 of file jsonCache.c.


Definition at line 409 of file jsonCache.c.

