RetroArch
Classes | Typedefs | Enumerations | Functions | Variables
netplay_room_parse.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <string/stdstring.h>
#include <compat/strl.h>
#include <formats/jsonsax_full.h>
#include "netplay_discovery.h"
#include "../../verbosity.h"
Include dependency graph for netplay_room_parse.c:

Classes

struct  netplay_rooms
 
struct  tag_Context
 

Typedefs

typedef struct tag_Context Context
 

Enumerations

enum  parse_state {
  STATE_START = 0, STATE_ARRAY_START, STATE_OBJECT_START, STATE_FIELDS_START,
  STATE_FIELDS_OBJECT_START, STATE_END
}
 

Functions

static void parse_context_init (Context *pCtx)
 
static void parse_context_free (Context *pCtx)
 
static JSON_Parser_HandlerResult JSON_CALL EncodingDetectedHandler (JSON_Parser parser)
 
static JSON_Parser_HandlerResult JSON_CALL NullHandler (JSON_Parser parser)
 
static JSON_Parser_HandlerResult JSON_CALL BooleanHandler (JSON_Parser parser, JSON_Boolean value)
 
static JSON_Parser_HandlerResult JSON_CALL StringHandler (JSON_Parser parser, char *pValue, size_t length, JSON_StringAttributes attributes)
 
static JSON_Parser_HandlerResult JSON_CALL NumberHandler (JSON_Parser parser, char *pValue, size_t length, JSON_NumberAttributes attributes)
 
static JSON_Parser_HandlerResult JSON_CALL SpecialNumberHandler (JSON_Parser parser, JSON_SpecialNumber value)
 
static JSON_Parser_HandlerResult JSON_CALL StartObjectHandler (JSON_Parser parser)
 
static JSON_Parser_HandlerResult JSON_CALL EndObjectHandler (JSON_Parser parser)
 
static JSON_Parser_HandlerResult JSON_CALL ObjectMemberHandler (JSON_Parser parser, char *pValue, size_t length, JSON_StringAttributes attributes)
 
static JSON_Parser_HandlerResult JSON_CALL StartArrayHandler (JSON_Parser parser)
 
static JSON_Parser_HandlerResult JSON_CALL EndArrayHandler (JSON_Parser parser)
 
static JSON_Parser_HandlerResult JSON_CALL ArrayItemHandler (JSON_Parser parser)
 
static int parse_context_setup (Context *pCtx)
 
static void parse_context_error (Context *pCtx)
 
static int json_parse (Context *pCtx, const char *buf)
 
void netplay_rooms_free ()
 
int netplay_rooms_parse (const char *buf)
 
struct netplay_roomnetplay_room_get (int index)
 
int netplay_rooms_get_count ()
 

Variables

static struct netplay_roomsrooms
 

Typedef Documentation

◆ Context

typedef struct tag_Context Context

Enumeration Type Documentation

◆ parse_state

Enumerator
STATE_START 
STATE_ARRAY_START 
STATE_OBJECT_START 
STATE_FIELDS_START 
STATE_FIELDS_OBJECT_START 
STATE_END 

Function Documentation

◆ ArrayItemHandler()

static JSON_Parser_HandlerResult JSON_CALL ArrayItemHandler ( JSON_Parser  parser)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ BooleanHandler()

static JSON_Parser_HandlerResult JSON_CALL BooleanHandler ( JSON_Parser  parser,
JSON_Boolean  value 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ EncodingDetectedHandler()

static JSON_Parser_HandlerResult JSON_CALL EncodingDetectedHandler ( JSON_Parser  parser)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ EndArrayHandler()

static JSON_Parser_HandlerResult JSON_CALL EndArrayHandler ( JSON_Parser  parser)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ EndObjectHandler()

static JSON_Parser_HandlerResult JSON_CALL EndObjectHandler ( JSON_Parser  parser)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ json_parse()

static int json_parse ( Context pCtx,
const char *  buf 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ netplay_room_get()

struct netplay_room* netplay_room_get ( int  index)

◆ netplay_rooms_free()

void netplay_rooms_free ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ netplay_rooms_get_count()

int netplay_rooms_get_count ( void  )

◆ netplay_rooms_parse()

int netplay_rooms_parse ( const char *  buf)
Here is the call graph for this function:

◆ NullHandler()

static JSON_Parser_HandlerResult JSON_CALL NullHandler ( JSON_Parser  parser)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ NumberHandler()

static JSON_Parser_HandlerResult JSON_CALL NumberHandler ( JSON_Parser  parser,
char *  pValue,
size_t  length,
JSON_NumberAttributes  attributes 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ObjectMemberHandler()

static JSON_Parser_HandlerResult JSON_CALL ObjectMemberHandler ( JSON_Parser  parser,
char *  pValue,
size_t  length,
JSON_StringAttributes  attributes 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse_context_error()

static void parse_context_error ( Context pCtx)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse_context_free()

static void parse_context_free ( Context pCtx)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse_context_init()

static void parse_context_init ( Context pCtx)
static
Here is the caller graph for this function:

◆ parse_context_setup()

static int parse_context_setup ( Context pCtx)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SpecialNumberHandler()

static JSON_Parser_HandlerResult JSON_CALL SpecialNumberHandler ( JSON_Parser  parser,
JSON_SpecialNumber  value 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ StartArrayHandler()

static JSON_Parser_HandlerResult JSON_CALL StartArrayHandler ( JSON_Parser  parser)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ StartObjectHandler()

static JSON_Parser_HandlerResult JSON_CALL StartObjectHandler ( JSON_Parser  parser)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ StringHandler()

static JSON_Parser_HandlerResult JSON_CALL StringHandler ( JSON_Parser  parser,
char *  pValue,
size_t  length,
JSON_StringAttributes  attributes 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ rooms

struct netplay_rooms* rooms
static