Strophe  0.10
XMPP client library
Data Structures | Macros | Typedefs | Enumerations | Functions
xmltok.h File Reference

Data Structures

struct  position
 
struct  ATTRIBUTE
 
struct  ENCODING
 
struct  INIT_ENCODING
 

Macros

#define XML_TOK_TRAILING_RSQB
 
#define XML_TOK_NONE   -4 /* The string to be scanned is empty */
 
#define XML_TOK_TRAILING_CR
 
#define XML_TOK_PARTIAL_CHAR   -2 /* only part of a multibyte sequence */
 
#define XML_TOK_PARTIAL   -1 /* only part of a token */
 
#define XML_TOK_INVALID   0
 
#define XML_TOK_START_TAG_WITH_ATTS   1
 
#define XML_TOK_START_TAG_NO_ATTS   2
 
#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS   3 /* empty element tag <e/> */
 
#define XML_TOK_EMPTY_ELEMENT_NO_ATTS   4
 
#define XML_TOK_END_TAG   5
 
#define XML_TOK_DATA_CHARS   6
 
#define XML_TOK_DATA_NEWLINE   7
 
#define XML_TOK_CDATA_SECT_OPEN   8
 
#define XML_TOK_ENTITY_REF   9
 
#define XML_TOK_CHAR_REF   10 /* numeric character reference */
 
#define XML_TOK_PI   11 /* processing instruction */
 
#define XML_TOK_XML_DECL   12 /* XML decl or text decl */
 
#define XML_TOK_COMMENT   13
 
#define XML_TOK_BOM   14 /* Byte order mark */
 
#define XML_TOK_PROLOG_S   15
 
#define XML_TOK_DECL_OPEN   16 /* <!foo */
 
#define XML_TOK_DECL_CLOSE   17 /* > */
 
#define XML_TOK_NAME   18
 
#define XML_TOK_NMTOKEN   19
 
#define XML_TOK_POUND_NAME   20 /* #name */
 
#define XML_TOK_OR   21 /* | */
 
#define XML_TOK_PERCENT   22
 
#define XML_TOK_OPEN_PAREN   23
 
#define XML_TOK_CLOSE_PAREN   24
 
#define XML_TOK_OPEN_BRACKET   25
 
#define XML_TOK_CLOSE_BRACKET   26
 
#define XML_TOK_LITERAL   27
 
#define XML_TOK_PARAM_ENTITY_REF   28
 
#define XML_TOK_INSTANCE_START   29
 
#define XML_TOK_NAME_QUESTION   30 /* name? */
 
#define XML_TOK_NAME_ASTERISK   31 /* name* */
 
#define XML_TOK_NAME_PLUS   32 /* name+ */
 
#define XML_TOK_COND_SECT_OPEN   33 /* <![ */
 
#define XML_TOK_COND_SECT_CLOSE   34 /* ]]> */
 
#define XML_TOK_CLOSE_PAREN_QUESTION   35 /* )? */
 
#define XML_TOK_CLOSE_PAREN_ASTERISK   36 /* )* */
 
#define XML_TOK_CLOSE_PAREN_PLUS   37 /* )+ */
 
#define XML_TOK_COMMA   38
 
#define XML_TOK_ATTRIBUTE_VALUE_S   39
 
#define XML_TOK_CDATA_SECT_CLOSE   40
 
#define XML_TOK_PREFIXED_NAME   41
 
#define XML_N_STATES   3
 
#define XML_PROLOG_STATE   0
 
#define XML_CONTENT_STATE   1
 
#define XML_CDATA_SECTION_STATE   2
 
#define XML_N_LITERAL_TYPES   2
 
#define XML_ATTRIBUTE_VALUE_LITERAL   0
 
#define XML_ENTITY_VALUE_LITERAL   1
 
#define XML_UTF8_ENCODE_MAX   4
 
#define XML_UTF16_ENCODE_MAX   2
 
#define XmlTok(enc, state, ptr, end, nextTokPtr)   (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
 
#define XmlPrologTok(enc, ptr, end, nextTokPtr)   XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
 
#define XmlContentTok(enc, ptr, end, nextTokPtr)   XmlTok(enc, XML_CONTENT_STATE, ptr, end, nextTokPtr)
 
#define XmlCdataSectionTok(enc, ptr, end, nextTokPtr)   XmlTok(enc, XML_CDATA_SECTION_STATE, ptr, end, nextTokPtr)
 
#define XmlLiteralTok(enc, literalType, ptr, end, nextTokPtr)   (((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr))
 
#define XmlAttributeValueTok(enc, ptr, end, nextTokPtr)   XmlLiteralTok(enc, XML_ATTRIBUTE_VALUE_LITERAL, ptr, end, nextTokPtr)
 
#define XmlEntityValueTok(enc, ptr, end, nextTokPtr)   XmlLiteralTok(enc, XML_ENTITY_VALUE_LITERAL, ptr, end, nextTokPtr)
 
#define XmlNameMatchesAscii(enc, ptr1, end1, ptr2)   (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
 
#define XmlNameLength(enc, ptr)   (((enc)->nameLength)(enc, ptr))
 
#define XmlSkipS(enc, ptr)   (((enc)->skipS)(enc, ptr))
 
#define XmlGetAttributes(enc, ptr, attsMax, atts)   (((enc)->getAtts)(enc, ptr, attsMax, atts))
 
#define XmlCharRefNumber(enc, ptr)   (((enc)->charRefNumber)(enc, ptr))
 
#define XmlPredefinedEntityName(enc, ptr, end)   (((enc)->predefinedEntityName)(enc, ptr, end))
 
#define XmlUpdatePosition(enc, ptr, end, pos)   (((enc)->updatePosition)(enc, ptr, end, pos))
 
#define XmlIsPublicId(enc, ptr, end, badPtr)   (((enc)->isPublicId)(enc, ptr, end, badPtr))
 
#define XmlUtf8Convert(enc, fromP, fromLim, toP, toLim)   (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
 
#define XmlUtf16Convert(enc, fromP, fromLim, toP, toLim)   (((enc)->utf16Convert)(enc, fromP, fromLim, toP, toLim))
 

Typedefs

typedef int(PTRCALLSCANNER) (const ENCODING *, const char *, const char *, const char **)
 
typedef int(XMLCALLCONVERTER) (void *userData, const char *p)
 

Enumerations

enum  XML_Convert_Result { XML_CONVERT_COMPLETED = 0, XML_CONVERT_INPUT_INCOMPLETE = 1, XML_CONVERT_OUTPUT_EXHAUSTED = 2 }
 

Functions

int XmlParseXmlDecl (int isGeneralTextEntity, const ENCODING *enc, const char *ptr, const char *end, const char **badPtr, const char **versionPtr, const char **versionEndPtr, const char **encodingNamePtr, const ENCODING **namedEncodingPtr, int *standalonePtr)
 
int XmlInitEncoding (INIT_ENCODING *, const ENCODING **, const char *name)
 
const ENCODING * XmlGetUtf8InternalEncoding (void)
 
const ENCODING * XmlGetUtf16InternalEncoding (void)
 
int FASTCALL XmlUtf8Encode (int charNumber, char *buf)
 
int FASTCALL XmlUtf16Encode (int charNumber, unsigned short *buf)
 
int XmlSizeOfUnknownEncoding (void)
 
ENCODING * XmlInitUnknownEncoding (void *mem, int *table, CONVERTER convert, void *userData)
 
int XmlParseXmlDeclNS (int isGeneralTextEntity, const ENCODING *enc, const char *ptr, const char *end, const char **badPtr, const char **versionPtr, const char **versionEndPtr, const char **encodingNamePtr, const ENCODING **namedEncodingPtr, int *standalonePtr)
 
int XmlInitEncodingNS (INIT_ENCODING *, const ENCODING **, const char *name)
 
const ENCODING * XmlGetUtf8InternalEncodingNS (void)
 
const ENCODING * XmlGetUtf16InternalEncodingNS (void)
 
ENCODING * XmlInitUnknownEncodingNS (void *mem, int *table, CONVERTER convert, void *userData)
 

Macro Definition Documentation

◆ XML_TOK_TRAILING_RSQB

#define XML_TOK_TRAILING_RSQB
Value:
-5 /* ] or ]] at the end of the scan; might be \
start of illegal ]]> sequence */

◆ XML_TOK_NONE

#define XML_TOK_NONE   -4 /* The string to be scanned is empty */

◆ XML_TOK_TRAILING_CR

#define XML_TOK_TRAILING_CR
Value:
-3 /* A CR at the end of the scan; \
might be part of CRLF sequence */

◆ XML_TOK_PARTIAL_CHAR

#define XML_TOK_PARTIAL_CHAR   -2 /* only part of a multibyte sequence */

◆ XML_TOK_PARTIAL

#define XML_TOK_PARTIAL   -1 /* only part of a token */

◆ XML_TOK_INVALID

#define XML_TOK_INVALID   0

◆ XML_TOK_START_TAG_WITH_ATTS

#define XML_TOK_START_TAG_WITH_ATTS   1

◆ XML_TOK_START_TAG_NO_ATTS

#define XML_TOK_START_TAG_NO_ATTS   2

◆ XML_TOK_EMPTY_ELEMENT_WITH_ATTS

#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS   3 /* empty element tag <e/> */

◆ XML_TOK_EMPTY_ELEMENT_NO_ATTS

#define XML_TOK_EMPTY_ELEMENT_NO_ATTS   4

◆ XML_TOK_END_TAG

#define XML_TOK_END_TAG   5

◆ XML_TOK_DATA_CHARS

#define XML_TOK_DATA_CHARS   6

◆ XML_TOK_DATA_NEWLINE

#define XML_TOK_DATA_NEWLINE   7

◆ XML_TOK_CDATA_SECT_OPEN

#define XML_TOK_CDATA_SECT_OPEN   8

◆ XML_TOK_ENTITY_REF

#define XML_TOK_ENTITY_REF   9

◆ XML_TOK_CHAR_REF

#define XML_TOK_CHAR_REF   10 /* numeric character reference */

◆ XML_TOK_PI

#define XML_TOK_PI   11 /* processing instruction */

◆ XML_TOK_XML_DECL

#define XML_TOK_XML_DECL   12 /* XML decl or text decl */

◆ XML_TOK_COMMENT

#define XML_TOK_COMMENT   13

◆ XML_TOK_BOM

#define XML_TOK_BOM   14 /* Byte order mark */

◆ XML_TOK_PROLOG_S

#define XML_TOK_PROLOG_S   15

◆ XML_TOK_DECL_OPEN

#define XML_TOK_DECL_OPEN   16 /* <!foo */

◆ XML_TOK_DECL_CLOSE

#define XML_TOK_DECL_CLOSE   17 /* > */

◆ XML_TOK_NAME

#define XML_TOK_NAME   18

◆ XML_TOK_NMTOKEN

#define XML_TOK_NMTOKEN   19

◆ XML_TOK_POUND_NAME

#define XML_TOK_POUND_NAME   20 /* #name */

◆ XML_TOK_OR

#define XML_TOK_OR   21 /* | */

◆ XML_TOK_PERCENT

#define XML_TOK_PERCENT   22

◆ XML_TOK_OPEN_PAREN

#define XML_TOK_OPEN_PAREN   23

◆ XML_TOK_CLOSE_PAREN

#define XML_TOK_CLOSE_PAREN   24

◆ XML_TOK_OPEN_BRACKET

#define XML_TOK_OPEN_BRACKET   25

◆ XML_TOK_CLOSE_BRACKET

#define XML_TOK_CLOSE_BRACKET   26

◆ XML_TOK_LITERAL

#define XML_TOK_LITERAL   27

◆ XML_TOK_PARAM_ENTITY_REF

#define XML_TOK_PARAM_ENTITY_REF   28

◆ XML_TOK_INSTANCE_START

#define XML_TOK_INSTANCE_START   29

◆ XML_TOK_NAME_QUESTION

#define XML_TOK_NAME_QUESTION   30 /* name? */

◆ XML_TOK_NAME_ASTERISK

#define XML_TOK_NAME_ASTERISK   31 /* name* */

◆ XML_TOK_NAME_PLUS

#define XML_TOK_NAME_PLUS   32 /* name+ */

◆ XML_TOK_COND_SECT_OPEN

#define XML_TOK_COND_SECT_OPEN   33 /* <![ */

◆ XML_TOK_COND_SECT_CLOSE

#define XML_TOK_COND_SECT_CLOSE   34 /* ]]> */

◆ XML_TOK_CLOSE_PAREN_QUESTION

#define XML_TOK_CLOSE_PAREN_QUESTION   35 /* )? */

◆ XML_TOK_CLOSE_PAREN_ASTERISK

#define XML_TOK_CLOSE_PAREN_ASTERISK   36 /* )* */

◆ XML_TOK_CLOSE_PAREN_PLUS

#define XML_TOK_CLOSE_PAREN_PLUS   37 /* )+ */

◆ XML_TOK_COMMA

#define XML_TOK_COMMA   38

◆ XML_TOK_ATTRIBUTE_VALUE_S

#define XML_TOK_ATTRIBUTE_VALUE_S   39

◆ XML_TOK_CDATA_SECT_CLOSE

#define XML_TOK_CDATA_SECT_CLOSE   40

◆ XML_TOK_PREFIXED_NAME

#define XML_TOK_PREFIXED_NAME   41

◆ XML_N_STATES

#define XML_N_STATES   3

◆ XML_PROLOG_STATE

#define XML_PROLOG_STATE   0

◆ XML_CONTENT_STATE

#define XML_CONTENT_STATE   1

◆ XML_CDATA_SECTION_STATE

#define XML_CDATA_SECTION_STATE   2

◆ XML_N_LITERAL_TYPES

#define XML_N_LITERAL_TYPES   2

◆ XML_ATTRIBUTE_VALUE_LITERAL

#define XML_ATTRIBUTE_VALUE_LITERAL   0

◆ XML_ENTITY_VALUE_LITERAL

#define XML_ENTITY_VALUE_LITERAL   1

◆ XML_UTF8_ENCODE_MAX

#define XML_UTF8_ENCODE_MAX   4

◆ XML_UTF16_ENCODE_MAX

#define XML_UTF16_ENCODE_MAX   2

◆ XmlTok

#define XmlTok (   enc,
  state,
  ptr,
  end,
  nextTokPtr 
)    (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))

◆ XmlPrologTok

#define XmlPrologTok (   enc,
  ptr,
  end,
  nextTokPtr 
)    XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)

◆ XmlContentTok

#define XmlContentTok (   enc,
  ptr,
  end,
  nextTokPtr 
)    XmlTok(enc, XML_CONTENT_STATE, ptr, end, nextTokPtr)

◆ XmlCdataSectionTok

#define XmlCdataSectionTok (   enc,
  ptr,
  end,
  nextTokPtr 
)    XmlTok(enc, XML_CDATA_SECTION_STATE, ptr, end, nextTokPtr)

◆ XmlLiteralTok

#define XmlLiteralTok (   enc,
  literalType,
  ptr,
  end,
  nextTokPtr 
)    (((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr))

◆ XmlAttributeValueTok

#define XmlAttributeValueTok (   enc,
  ptr,
  end,
  nextTokPtr 
)    XmlLiteralTok(enc, XML_ATTRIBUTE_VALUE_LITERAL, ptr, end, nextTokPtr)

◆ XmlEntityValueTok

#define XmlEntityValueTok (   enc,
  ptr,
  end,
  nextTokPtr 
)    XmlLiteralTok(enc, XML_ENTITY_VALUE_LITERAL, ptr, end, nextTokPtr)

◆ XmlNameMatchesAscii

#define XmlNameMatchesAscii (   enc,
  ptr1,
  end1,
  ptr2 
)    (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))

◆ XmlNameLength

#define XmlNameLength (   enc,
  ptr 
)    (((enc)->nameLength)(enc, ptr))

◆ XmlSkipS

#define XmlSkipS (   enc,
  ptr 
)    (((enc)->skipS)(enc, ptr))

◆ XmlGetAttributes

#define XmlGetAttributes (   enc,
  ptr,
  attsMax,
  atts 
)    (((enc)->getAtts)(enc, ptr, attsMax, atts))

◆ XmlCharRefNumber

#define XmlCharRefNumber (   enc,
  ptr 
)    (((enc)->charRefNumber)(enc, ptr))

◆ XmlPredefinedEntityName

#define XmlPredefinedEntityName (   enc,
  ptr,
  end 
)    (((enc)->predefinedEntityName)(enc, ptr, end))

◆ XmlUpdatePosition

#define XmlUpdatePosition (   enc,
  ptr,
  end,
  pos 
)    (((enc)->updatePosition)(enc, ptr, end, pos))

◆ XmlIsPublicId

#define XmlIsPublicId (   enc,
  ptr,
  end,
  badPtr 
)    (((enc)->isPublicId)(enc, ptr, end, badPtr))

◆ XmlUtf8Convert

#define XmlUtf8Convert (   enc,
  fromP,
  fromLim,
  toP,
  toLim 
)    (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))

◆ XmlUtf16Convert

#define XmlUtf16Convert (   enc,
  fromP,
  fromLim,
  toP,
  toLim 
)    (((enc)->utf16Convert)(enc, fromP, fromLim, toP, toLim))

Typedef Documentation

◆ SCANNER

typedef int(PTRCALL * SCANNER) (const ENCODING *, const char *, const char *, const char **)

◆ CONVERTER

typedef int(XMLCALL * CONVERTER) (void *userData, const char *p)

Enumeration Type Documentation

◆ XML_Convert_Result

Enumerator
XML_CONVERT_COMPLETED 
XML_CONVERT_INPUT_INCOMPLETE 
XML_CONVERT_OUTPUT_EXHAUSTED 

Function Documentation

◆ XmlParseXmlDecl()

int XmlParseXmlDecl ( int  isGeneralTextEntity,
const ENCODING *  enc,
const char *  ptr,
const char *  end,
const char **  badPtr,
const char **  versionPtr,
const char **  versionEndPtr,
const char **  encodingNamePtr,
const ENCODING **  namedEncodingPtr,
int *  standalonePtr 
)

◆ XmlInitEncoding()

int XmlInitEncoding ( INIT_ENCODING ,
const ENCODING **  ,
const char *  name 
)

◆ XmlGetUtf8InternalEncoding()

const ENCODING* XmlGetUtf8InternalEncoding ( void  )

◆ XmlGetUtf16InternalEncoding()

const ENCODING* XmlGetUtf16InternalEncoding ( void  )

◆ XmlUtf8Encode()

int FASTCALL XmlUtf8Encode ( int  charNumber,
char *  buf 
)

◆ XmlUtf16Encode()

int FASTCALL XmlUtf16Encode ( int  charNumber,
unsigned short *  buf 
)

◆ XmlSizeOfUnknownEncoding()

int XmlSizeOfUnknownEncoding ( void  )

◆ XmlInitUnknownEncoding()

ENCODING* XmlInitUnknownEncoding ( void *  mem,
int *  table,
CONVERTER  convert,
void *  userData 
)

◆ XmlParseXmlDeclNS()

int XmlParseXmlDeclNS ( int  isGeneralTextEntity,
const ENCODING *  enc,
const char *  ptr,
const char *  end,
const char **  badPtr,
const char **  versionPtr,
const char **  versionEndPtr,
const char **  encodingNamePtr,
const ENCODING **  namedEncodingPtr,
int *  standalonePtr 
)

◆ XmlInitEncodingNS()

int XmlInitEncodingNS ( INIT_ENCODING ,
const ENCODING **  ,
const char *  name 
)

◆ XmlGetUtf8InternalEncodingNS()

const ENCODING* XmlGetUtf8InternalEncodingNS ( void  )

◆ XmlGetUtf16InternalEncodingNS()

const ENCODING* XmlGetUtf16InternalEncodingNS ( void  )

◆ XmlInitUnknownEncodingNS()

ENCODING* XmlInitUnknownEncodingNS ( void *  mem,
int *  table,
CONVERTER  convert,
void *  userData 
)