RetroArch
Classes | Macros | Functions
parser.c File Reference
#include "parser.h"
#include "hash.h"
#include "util.h"
#include <formats/jsonsax.h>
#include <string/stdstring.h>
#include <compat/strl.h>
Include dependency graph for parser.c:

Classes

struct  cheevos_getvalueud_t
 
struct  cheevos_countud_t
 
struct  cheevos_field_t
 
struct  cheevos_readud_t
 
struct  cheevos_deactivate_t
 

Macros

#define CHEEVOS_JSON_KEY_GAMEID   0xb4960eecU
 
#define CHEEVOS_JSON_KEY_ACHIEVEMENTS   0x69749ae1U
 
#define CHEEVOS_JSON_KEY_ID   0x005973f2U
 
#define CHEEVOS_JSON_KEY_MEMADDR   0x1e76b53fU
 
#define CHEEVOS_JSON_KEY_TITLE   0x0e2a9a07U
 
#define CHEEVOS_JSON_KEY_DESCRIPTION   0xe61a1f69U
 
#define CHEEVOS_JSON_KEY_POINTS   0xca8fce22U
 
#define CHEEVOS_JSON_KEY_AUTHOR   0xa804edb8U
 
#define CHEEVOS_JSON_KEY_MODIFIED   0xdcea4fe6U
 
#define CHEEVOS_JSON_KEY_CREATED   0x3a84721dU
 
#define CHEEVOS_JSON_KEY_BADGENAME   0x887685d9U
 
#define CHEEVOS_JSON_KEY_CONSOLE_ID   0x071656e5U
 
#define CHEEVOS_JSON_KEY_TOKEN   0x0e2dbd26U
 
#define CHEEVOS_JSON_KEY_FLAGS   0x0d2e96b2U
 
#define CHEEVOS_JSON_KEY_LEADERBOARDS   0xf1247d2dU
 
#define CHEEVOS_JSON_KEY_MEM   0x0b8807e4U
 
#define CHEEVOS_JSON_KEY_FORMAT   0xb341208eU
 
#define CHEEVOS_JSON_KEY_SUCCESS   0x110461deU
 
#define CHEEVOS_JSON_KEY_ERROR   0x0d2011cfU
 

Functions

static int cheevos_getvalue_key (void *userdata, const char *name, size_t length)
 
static int cheevos_getvalue_string (void *userdata, const char *string, size_t length)
 
static int cheevos_getvalue_boolean (void *userdata, int istrue)
 
static int cheevos_getvalue_null (void *userdata)
 
static int cheevos_get_value (const char *json, unsigned key_hash, char *value, size_t length)
 
int cheevos_get_token (const char *json, char *token, size_t length)
 
static int cheevos_count_end_array (void *userdata)
 
static int cheevos_count_key (void *userdata, const char *name, size_t length)
 
static int cheevos_count_number (void *userdata, const char *number, size_t length)
 
static int cheevos_count_cheevos (const char *json, unsigned *core_count, unsigned *unofficial_count, unsigned *lboard_count)
 
static const char * cheevos_dupstr (const cheevos_field_t *field)
 
static int cheevos_new_cheevo (cheevos_readud_t *ud)
 
static int cheevos_new_lboard (cheevos_readud_t *ud)
 
static int cheevos_read_end_object (void *userdata)
 
static int cheevos_read_end_array (void *userdata)
 
static int cheevos_read_key (void *userdata, const char *name, size_t length)
 
static int cheevos_read_string (void *userdata, const char *string, size_t length)
 
static int cheevos_read_number (void *userdata, const char *number, size_t length)
 
int cheevos_get_patchdata (const char *json, cheevos_rapatchdata_t *patchdata)
 
void cheevos_free_patchdata (cheevos_rapatchdata_t *patchdata)
 
static int cheevos_deactivate_index (void *userdata, unsigned int index)
 
static int cheevos_deactivate_number (void *userdata, const char *number, size_t length)
 
void cheevos_deactivate_unlocks (const char *json, cheevos_unlock_cb_t unlock_cb, void *userdata)
 
unsigned chevos_get_gameid (const char *json)
 

Macro Definition Documentation

◆ CHEEVOS_JSON_KEY_ACHIEVEMENTS

#define CHEEVOS_JSON_KEY_ACHIEVEMENTS   0x69749ae1U

◆ CHEEVOS_JSON_KEY_AUTHOR

#define CHEEVOS_JSON_KEY_AUTHOR   0xa804edb8U

◆ CHEEVOS_JSON_KEY_BADGENAME

#define CHEEVOS_JSON_KEY_BADGENAME   0x887685d9U

◆ CHEEVOS_JSON_KEY_CONSOLE_ID

#define CHEEVOS_JSON_KEY_CONSOLE_ID   0x071656e5U

◆ CHEEVOS_JSON_KEY_CREATED

#define CHEEVOS_JSON_KEY_CREATED   0x3a84721dU

◆ CHEEVOS_JSON_KEY_DESCRIPTION

#define CHEEVOS_JSON_KEY_DESCRIPTION   0xe61a1f69U

◆ CHEEVOS_JSON_KEY_ERROR

#define CHEEVOS_JSON_KEY_ERROR   0x0d2011cfU

◆ CHEEVOS_JSON_KEY_FLAGS

#define CHEEVOS_JSON_KEY_FLAGS   0x0d2e96b2U

◆ CHEEVOS_JSON_KEY_FORMAT

#define CHEEVOS_JSON_KEY_FORMAT   0xb341208eU

◆ CHEEVOS_JSON_KEY_GAMEID

#define CHEEVOS_JSON_KEY_GAMEID   0xb4960eecU

◆ CHEEVOS_JSON_KEY_ID

#define CHEEVOS_JSON_KEY_ID   0x005973f2U

◆ CHEEVOS_JSON_KEY_LEADERBOARDS

#define CHEEVOS_JSON_KEY_LEADERBOARDS   0xf1247d2dU

◆ CHEEVOS_JSON_KEY_MEM

#define CHEEVOS_JSON_KEY_MEM   0x0b8807e4U

◆ CHEEVOS_JSON_KEY_MEMADDR

#define CHEEVOS_JSON_KEY_MEMADDR   0x1e76b53fU

◆ CHEEVOS_JSON_KEY_MODIFIED

#define CHEEVOS_JSON_KEY_MODIFIED   0xdcea4fe6U

◆ CHEEVOS_JSON_KEY_POINTS

#define CHEEVOS_JSON_KEY_POINTS   0xca8fce22U

◆ CHEEVOS_JSON_KEY_SUCCESS

#define CHEEVOS_JSON_KEY_SUCCESS   0x110461deU

◆ CHEEVOS_JSON_KEY_TITLE

#define CHEEVOS_JSON_KEY_TITLE   0x0e2a9a07U

◆ CHEEVOS_JSON_KEY_TOKEN

#define CHEEVOS_JSON_KEY_TOKEN   0x0e2dbd26U

Function Documentation

◆ cheevos_count_cheevos()

static int cheevos_count_cheevos ( const char *  json,
unsigned *  core_count,
unsigned *  unofficial_count,
unsigned *  lboard_count 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheevos_count_end_array()

static int cheevos_count_end_array ( void userdata)
static
Here is the caller graph for this function:

◆ cheevos_count_key()

static int cheevos_count_key ( void userdata,
const char *  name,
size_t  length 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheevos_count_number()

static int cheevos_count_number ( void userdata,
const char *  number,
size_t  length 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheevos_deactivate_index()

static int cheevos_deactivate_index ( void userdata,
unsigned int  index 
)
static
Here is the caller graph for this function:

◆ cheevos_deactivate_number()

static int cheevos_deactivate_number ( void userdata,
const char *  number,
size_t  length 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheevos_deactivate_unlocks()

void cheevos_deactivate_unlocks ( const char *  json,
cheevos_unlock_cb_t  unlock_cb,
void userdata 
)
Here is the call graph for this function:

◆ cheevos_dupstr()

static const char* cheevos_dupstr ( const cheevos_field_t field)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheevos_free_patchdata()

void cheevos_free_patchdata ( cheevos_rapatchdata_t patchdata)
Here is the caller graph for this function:

◆ cheevos_get_patchdata()

int cheevos_get_patchdata ( const char *  json,
cheevos_rapatchdata_t patchdata 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheevos_get_token()

int cheevos_get_token ( const char *  json,
char *  token,
size_t  length 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheevos_get_value()

static int cheevos_get_value ( const char *  json,
unsigned  key_hash,
char *  value,
size_t  length 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheevos_getvalue_boolean()

static int cheevos_getvalue_boolean ( void userdata,
int  istrue 
)
static
Here is the caller graph for this function:

◆ cheevos_getvalue_key()

static int cheevos_getvalue_key ( void userdata,
const char *  name,
size_t  length 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheevos_getvalue_null()

static int cheevos_getvalue_null ( void userdata)
static
Here is the caller graph for this function:

◆ cheevos_getvalue_string()

static int cheevos_getvalue_string ( void userdata,
const char *  string,
size_t  length 
)
static
Here is the caller graph for this function:

◆ cheevos_new_cheevo()

static int cheevos_new_cheevo ( cheevos_readud_t ud)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheevos_new_lboard()

static int cheevos_new_lboard ( cheevos_readud_t ud)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheevos_read_end_array()

static int cheevos_read_end_array ( void userdata)
static
Here is the caller graph for this function:

◆ cheevos_read_end_object()

static int cheevos_read_end_object ( void userdata)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheevos_read_key()

static int cheevos_read_key ( void userdata,
const char *  name,
size_t  length 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheevos_read_number()

static int cheevos_read_number ( void userdata,
const char *  number,
size_t  length 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheevos_read_string()

static int cheevos_read_string ( void userdata,
const char *  string,
size_t  length 
)
static
Here is the caller graph for this function:

◆ chevos_get_gameid()

unsigned chevos_get_gameid ( const char *  json)
Here is the call graph for this function:
Here is the caller graph for this function: