Strophe 0.12
XMPP client library
Data Structures | Macros | Functions | Variables
parser_expat.c File Reference

XML parser handlers. More...

Data Structures

struct  parser_t
 

Macros

#define INNER_TEXT_PADDING   2
 

Functions

static void * parser_mem_malloc (size_t size)
 
static void * parser_mem_realloc (void *ptr, size_t size)
 
static void parser_mem_free (void *ptr)
 
static char * _xml_name (xmpp_ctx_t *ctx, const char *nsname)
 
static char * _xml_namespace (xmpp_ctx_t *ctx, const char *nsname)
 
static void _set_attributes (xmpp_stanza_t *stanza, const XML_Char **attrs)
 
static void complete_inner_text (parser_t *parser)
 
static void _start_element (void *userdata, const XML_Char *nsname, const XML_Char **attrs)
 
static void _end_element (void *userdata, const XML_Char *name)
 
static void _characters (void *userdata, const XML_Char *s, int len)
 
parser_t * parser_new (xmpp_ctx_t *ctx, parser_start_callback startcb, parser_end_callback endcb, parser_stanza_callback stanzacb, void *userdata)
 
char * parser_attr_name (xmpp_ctx_t *ctx, char *nsname)
 
static void _free_parent_stanza (xmpp_stanza_t *stanza)
 
void parser_free (parser_t *parser)
 
int parser_reset (parser_t *parser)
 
int parser_feed (parser_t *parser, char *chunk, int len)
 

Variables

const XML_Char namespace_sep = '\x1F'
 
static xmpp_ctx_t * mem_ctx = NULL
 
static const XML_Memory_Handling_Suite parser_mem_suite
 

Detailed Description

XML parser handlers.

Macro Definition Documentation

◆ INNER_TEXT_PADDING

#define INNER_TEXT_PADDING   2

Function Documentation

◆ parser_mem_malloc()

static void * parser_mem_malloc ( size_t  size)
static

◆ parser_mem_realloc()

static void * parser_mem_realloc ( void *  ptr,
size_t  size 
)
static

◆ parser_mem_free()

static void parser_mem_free ( void *  ptr)
static

◆ _xml_name()

static char * _xml_name ( xmpp_ctx_t *  ctx,
const char *  nsname 
)
static

◆ _xml_namespace()

static char * _xml_namespace ( xmpp_ctx_t *  ctx,
const char *  nsname 
)
static

◆ _set_attributes()

static void _set_attributes ( xmpp_stanza_t *  stanza,
const XML_Char **  attrs 
)
static

◆ complete_inner_text()

static void complete_inner_text ( parser_t *  parser)
static

◆ _start_element()

static void _start_element ( void *  userdata,
const XML_Char *  nsname,
const XML_Char **  attrs 
)
static

◆ _end_element()

static void _end_element ( void *  userdata,
const XML_Char *  name 
)
static

◆ _characters()

static void _characters ( void *  userdata,
const XML_Char *  s,
int  len 
)
static

◆ parser_new()

parser_t * parser_new ( xmpp_ctx_t *  ctx,
parser_start_callback  startcb,
parser_end_callback  endcb,
parser_stanza_callback  stanzacb,
void *  userdata 
)

◆ parser_attr_name()

char * parser_attr_name ( xmpp_ctx_t *  ctx,
char *  nsname 
)

◆ _free_parent_stanza()

static void _free_parent_stanza ( xmpp_stanza_t *  stanza)
static

◆ parser_free()

void parser_free ( parser_t *  parser)

◆ parser_reset()

int parser_reset ( parser_t *  parser)

◆ parser_feed()

int parser_feed ( parser_t *  parser,
char *  chunk,
int  len 
)

Variable Documentation

◆ namespace_sep

const XML_Char namespace_sep = '\x1F'

◆ mem_ctx

xmpp_ctx_t* mem_ctx = NULL
static

◆ parser_mem_suite

const XML_Memory_Handling_Suite parser_mem_suite
static
Initial value:
= {
.malloc_fcn = &parser_mem_malloc,
.realloc_fcn = &parser_mem_realloc,
.free_fcn = &parser_mem_free,
}
static void * parser_mem_malloc(size_t size)
Definition: parser_expat.c:60
static void parser_mem_free(void *ptr)
Definition: parser_expat.c:76
static void * parser_mem_realloc(void *ptr, size_t size)
Definition: parser_expat.c:68