Multi-ApplicationOnlineProfiling  2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
jsonCache.c File Reference
#include "jsonCache.h"
#include <string.h>
#include <errno.h>
#include <limits.h>
Include dependency graph for jsonCache.c:

Go to the source code of this file.

Data Structures

struct  string_buff
 

Functions

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)
 
json_tjson_null ()
 
void json_null_destroy (json_t *json)
 
json_tjson_bool (int thruth)
 
void json_bool_destroy (json_t *json)
 
json_tjson_string (char *string)
 
json_tjson_string_l (char *string, int len)
 
void json_string_destroy (json_t *json)
 
json_tjson_int (int64_t value)
 
void json_int_destroy (json_t *json)
 
json_tjson_real (double value)
 
void json_real_destroy (json_t *json)
 
struct ObjectHT_entryObjectHT_entry_new (char *key, json_t *elem)
 
void ObjectHT_entry_release (struct ObjectHT_entry *ent)
 
struct ObjectHT_entryObjectHT_entry_push (struct ObjectHT_entry *prev, char *key, json_t *elem)
 
void ObjectHT_init (struct ObjectHT *ht, int pow2_size)
 
void ObjectHT_release (struct ObjectHT *ht)
 
static unsigned int hashString (char *s, int bit_width)
 
static int same_string (char *a, char *b)
 
struct ObjectHT_entryObjectHT_get (struct ObjectHT *ht, char *key)
 
void ObjectHT_set (struct ObjectHT *ht, char *key, json_t *elem)
 
struct ObjectHT_entry__ObjectHT_delete (struct ObjectHT_entry *ent, char *key, int did_delete)
 
void ObjectHT_delete (struct ObjectHT *ht, char *key)
 
json_tjson_object ()
 
void json_object_destroy (json_t *json)
 
json_tjson_object_set (json_t *json, char *key, json_t *elem)
 
json_tjson_object_get (json_t *json, char *key)
 
json_tjson_object_delete (json_t *json, char *key)
 
json_tjson_array ()
 
int json_array_guarantee (json_array_t *a, unsigned int offset, int count)
 
json_tjson_array_push_at (json_t *json, unsigned int offset, json_t *elem)
 
json_tjson_array_push (json_t *json, json_t *elem)
 
json_tjson_array_get (json_t *json, unsigned int offset)
 
json_tjson_array_set (json_t *json, unsigned int offset, json_t *elem)
 
json_tjson_array_del (json_t *json, unsigned int offset)
 
void json_array_destroy (json_t *json)
 
void string_buff_init (struct string_buff *sb)
 
void string_buff_release (struct string_buff *sb)
 
void string_buff_push (struct string_buff *sb, char *s)
 
char * c_newline (newline)
 
void stream_indent (char *tmp_buff, struct string_buff *out, int depth)
 
void __json_dump (char *tmp_buff, struct string_buff *out, json_t *json, int depth, int indent, int newline, int lock)
 
char * json_dump (json_t *json, json_format mode)
 
void json_dump_f (FILE *f, json_t *json, json_format mode)
 
int is_alphanumeric (char *c)
 
int is_numeric (char *c)
 
int pad_buff (char **buff, char expect)
 
char * parse_string (char **json_string)
 
int is_true (char *s)
 
int is_false (char *s)
 
int is_null (char *s)
 
int json_infer_type (char *ent)
 
json_tjson_parse_int (char **buff)
 
json_tjson_parse_real (char **buff)
 
json_tjson_parse_string (char **buff)
 
json_tjson_parse_bool (char **json_string)
 
json_tjson_parse_array (char **json_string)
 
char * json_parse_key (char **json_string)
 
json_tjson_parse_object (char **json_string)
 
json_t_json_parse (char **buff)
 
json_tjson_parse (char *json)
 
void jsonCache_init (struct jsonCache *c, void(*set_handler)(char *, json_t *, void *), void(*delete_handler)(char *, void *), void *ctx)
 
void jsonCache_release (struct jsonCache *c)
 
json_tjsonCache_get (struct jsonCache *c, char *key)
 
void _jsonCache_delete (struct jsonCache *c, char *key, int docommit)
 
void jsonCache_delete (struct jsonCache *c, char *key)
 
void jsonCache_delete_nocommit (struct jsonCache *c, char *key)
 
void jsonCache_commit (struct jsonCache *c, char *key)
 
void _jsonCache_set (struct jsonCache *c, char *key, json_t *elem, int do_commit)
 
void jsonCache_set (struct jsonCache *c, char *key, json_t *elem)
 
void jsonCache_set_nocommit (struct jsonCache *c, char *key, json_t *elem)
 
void _jsonCache_set_json (struct jsonCache *c, char *key, char *json, int do_commit)
 
void jsonCache_set_json (struct jsonCache *c, char *key, char *json)
 
void jsonCache_set_json_nocommit (struct jsonCache *c, char *key, char *json)
 
char * jsonCache_json (struct jsonCache *c, char *key, json_format mode)
 

Function Documentation

void __json_dump ( char *  tmp_buff,
struct string_buff out,
json_t json,
int  depth,
int  indent,
int  newline,
int  lock 
)

Definition at line 791 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

json_t* __json_t_init ( json_type  type)

Definition at line 31 of file jsonCache.c.

Here is the caller graph for this function:

void __json_t_release ( json_t json)

Definition at line 97 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

struct ObjectHT_entry* __ObjectHT_delete ( struct ObjectHT_entry ent,
char *  key,
int  did_delete 
)

Definition at line 429 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

json_t* _json_parse ( char **  buff)

Definition at line 1469 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void _jsonCache_delete ( struct jsonCache c,
char *  key,
int  docommit 
)

Definition at line 1550 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void _jsonCache_set ( struct jsonCache c,
char *  key,
json_t elem,
int  do_commit 
)

Definition at line 1593 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void _jsonCache_set_json ( struct jsonCache c,
char *  key,
char *  json,
int  do_commit 
)

Definition at line 1631 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

char* c_newline ( newline  )

Definition at line 770 of file jsonCache.c.

Here is the caller graph for this function:

static unsigned int hashString ( char *  s,
int  bit_width 
)
inlinestatic

Definition at line 348 of file jsonCache.c.

Here is the caller graph for this function:

int is_alphanumeric ( char *  c)

Definition at line 994 of file jsonCache.c.

int is_false ( char *  s)

Definition at line 1105 of file jsonCache.c.

Here is the caller graph for this function:

int is_null ( char *  s)

Definition at line 1128 of file jsonCache.c.

Here is the caller graph for this function:

int is_numeric ( char *  c)

Definition at line 1012 of file jsonCache.c.

Here is the caller graph for this function:

int is_true ( char *  s)

Definition at line 1086 of file jsonCache.c.

Here is the caller graph for this function:

json_t* json_array ( )

Definition at line 540 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

json_t* json_array_del ( json_t json,
unsigned int  offset 
)

Definition at line 655 of file jsonCache.c.

Here is the call graph for this function:

void json_array_destroy ( json_t json)

Definition at line 700 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

json_t* json_array_get ( json_t json,
unsigned int  offset 
)

Definition at line 618 of file jsonCache.c.

Here is the call graph for this function:

int json_array_guarantee ( json_array_t a,
unsigned int  offset,
int  count 
)

Definition at line 553 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

json_t* json_array_push ( json_t json,
json_t elem 
)

Definition at line 610 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

json_t* json_array_push_at ( json_t json,
unsigned int  offset,
json_t elem 
)

Definition at line 592 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

json_t* json_array_set ( json_t json,
unsigned int  offset,
json_t elem 
)

Definition at line 635 of file jsonCache.c.

Here is the call graph for this function:

json_t* json_bool ( int  thruth)

Definition at line 156 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void json_bool_destroy ( json_t json)

Definition at line 167 of file jsonCache.c.

Here is the caller graph for this function:

void json_decref ( json_t json)

Definition at line 23 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

char* json_dump ( json_t json,
json_format  mode 
)

Definition at line 938 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void json_dump_f ( FILE *  f,
json_t json,
json_format  mode 
)

Definition at line 980 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void json_incref ( json_t json)

Definition at line 13 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int json_infer_type ( char *  ent)

Definition at line 1149 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

json_t* json_int ( int64_t  value)

Definition at line 212 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void json_int_destroy ( json_t json)

Definition at line 223 of file jsonCache.c.

Here is the caller graph for this function:

json_t* json_null ( )

Definition at line 145 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void json_null_destroy ( json_t json)

Definition at line 151 of file jsonCache.c.

Here is the caller graph for this function:

json_t* json_object ( )

Definition at line 468 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

json_t* json_object_delete ( json_t json,
char *  key 
)

Definition at line 520 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void json_object_destroy ( json_t json)

Definition at line 480 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

json_t* json_object_get ( json_t json,
char *  key 
)

Definition at line 500 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

json_t* json_object_set ( json_t json,
char *  key,
json_t elem 
)

Definition at line 487 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

json_t* json_parse ( char *  json)

Definition at line 1504 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

json_t* json_parse_array ( char **  json_string)

Definition at line 1299 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

json_t* json_parse_bool ( char **  json_string)

Definition at line 1274 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

json_t* json_parse_int ( char **  buff)

Definition at line 1194 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

char* json_parse_key ( char **  json_string)

Definition at line 1370 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

json_t* json_parse_object ( char **  json_string)

Definition at line 1395 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

json_t* json_parse_real ( char **  buff)

Definition at line 1228 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

json_t* json_parse_string ( char **  buff)

Definition at line 1263 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

json_t* json_real ( double  value)

Definition at line 229 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void json_real_destroy ( json_t json)

Definition at line 240 of file jsonCache.c.

Here is the caller graph for this function:

json_t* json_string ( char *  string)

Definition at line 173 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void json_string_destroy ( json_t json)

Definition at line 205 of file jsonCache.c.

Here is the caller graph for this function:

json_t* json_string_l ( char *  string,
int  len 
)

Definition at line 184 of file jsonCache.c.

Here is the call graph for this function:

void jsonCache_commit ( struct jsonCache c,
char *  key 
)

Definition at line 1578 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void jsonCache_delete ( struct jsonCache c,
char *  key 
)

Definition at line 1565 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void jsonCache_delete_nocommit ( struct jsonCache c,
char *  key 
)

Definition at line 1570 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

json_t* jsonCache_get ( struct jsonCache c,
char *  key 
)

Definition at line 1539 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void jsonCache_init ( struct jsonCache c,
void(*)(char *, json_t *, void *)  set_handler,
void(*)(char *, void *)  delete_handler,
void *  ctx 
)

Definition at line 1522 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

char* jsonCache_json ( struct jsonCache c,
char *  key,
json_format  mode 
)

Definition at line 1660 of file jsonCache.c.

Here is the call graph for this function:

void jsonCache_release ( struct jsonCache c)

Definition at line 1531 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void jsonCache_set ( struct jsonCache c,
char *  key,
json_t elem 
)

Definition at line 1619 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void jsonCache_set_json ( struct jsonCache c,
char *  key,
char *  json 
)

Definition at line 1648 of file jsonCache.c.

Here is the call graph for this function:

void jsonCache_set_json_nocommit ( struct jsonCache c,
char *  key,
char *  json 
)

Definition at line 1653 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void jsonCache_set_nocommit ( struct jsonCache c,
char *  key,
json_t elem 
)

Definition at line 1625 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void ObjectHT_delete ( struct ObjectHT ht,
char *  key 
)

Definition at line 461 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

struct ObjectHT_entry* ObjectHT_entry_new ( char *  key,
json_t elem 
)

Definition at line 250 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

struct ObjectHT_entry* ObjectHT_entry_push ( struct ObjectHT_entry prev,
char *  key,
json_t elem 
)

Definition at line 293 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void ObjectHT_entry_release ( struct ObjectHT_entry ent)

Definition at line 274 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

struct ObjectHT_entry* ObjectHT_get ( struct ObjectHT ht,
char *  key 
)

Definition at line 387 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void ObjectHT_init ( struct ObjectHT ht,
int  pow2_size 
)

Definition at line 310 of file jsonCache.c.

Here is the caller graph for this function:

void ObjectHT_release ( struct ObjectHT ht)

Definition at line 332 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void ObjectHT_set ( struct ObjectHT ht,
char *  key,
json_t elem 
)

Definition at line 409 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int pad_buff ( char **  buff,
char  expect 
)

Definition at line 1024 of file jsonCache.c.

Here is the caller graph for this function:

char* parse_string ( char **  json_string)

Definition at line 1048 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static int same_string ( char *  a,
char *  b 
)
inlinestatic

Definition at line 368 of file jsonCache.c.

Here is the caller graph for this function:

void stream_indent ( char *  tmp_buff,
struct string_buff out,
int  depth 
)

Definition at line 778 of file jsonCache.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void string_buff_init ( struct string_buff sb)

Definition at line 727 of file jsonCache.c.

Here is the caller graph for this function:

void string_buff_push ( struct string_buff sb,
char *  s 
)

Definition at line 741 of file jsonCache.c.

Here is the caller graph for this function:

void string_buff_release ( struct string_buff sb)

Definition at line 734 of file jsonCache.c.

Here is the call graph for this function: