Librepo library  1.7.13
C library for downloading linux repository metadata and packages
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules
Common stuff for XML parsers in Librepo (datatypes, etc.)

Macros

#define LR_CB_RET_OK   0
 
#define LR_CB_RET_ERR   1
 

Typedefs

typedef int(* LrXmlParserWarningCb )(LrXmlParserWarningType type, char *msg, void *cbdata, GError **err)
 

Enumerations

enum  LrXmlParserWarningType {
  LR_XML_WARNING_UNKNOWNTAG, LR_XML_WARNING_MISSINGATTR, LR_XML_WARNING_UNKNOWNVAL, LR_XML_WARNING_BADATTRVAL,
  LR_XML_WARNING_MISSINGVAL, LR_XML_WARNING_SENTINEL
}
 

Detailed Description

Macro Definition Documentation

#define LR_CB_RET_ERR   1

Return value for callbacks signalizing error

Definition at line 34 of file xmlparser.h.

#define LR_CB_RET_OK   0

Return value for callbacks signalizing success

Definition at line 33 of file xmlparser.h.

Typedef Documentation

typedef int(* LrXmlParserWarningCb)(LrXmlParserWarningType type, char *msg, void *cbdata, GError **err)

Callback for XML parser warnings. All reported warnings are non-fatal, and ignored by default. But if callback return LR_CB_RET_ERR instead of LR_CB_RET_OK then parsing is immediately interrupted.

Parameters
typeType of warning
msgWarning msg. The message is destroyed after the call. If you want touse the message later, you have to copy it.
cbdataUser data.
errGError **
Returns
LR_CB_RET_OK (0) or LR_CB_RET_ERR (1) - stops the parsing

Definition at line 57 of file xmlparser.h.

Enumeration Type Documentation

Type of warnings reported by parsers by the warning callback.

Enumerator
LR_XML_WARNING_UNKNOWNTAG 

Unknown tag

LR_XML_WARNING_MISSINGATTR 

Missing attribute

LR_XML_WARNING_UNKNOWNVAL 

Unknown tag or attribute value

LR_XML_WARNING_BADATTRVAL 

Bad attribute value

LR_XML_WARNING_MISSINGVAL 

Missing tag value

Definition at line 38 of file xmlparser.h.