libcsem
0.2
|
Go to the source code of this file.
Defines | |
#define | CSEM_NS_C_BEGIN |
#define | CSEM_NS_C_END |
Typedefs | |
typedef typedefCSEM_NS_C_BEGIN struct CSEM_Micro_Handlers | CSEM_Micro_Handlers |
Handlers for HTML5 microdata streaming parser. | |
typedef CSEM_Bool(* | CSEM_Micro_ItemStart )(const void *userdata, const CSEM_Url *id, const CSEM_List *types, const CSEM_List *refs) |
Handler for start scope of an item. | |
typedef void(* | CSEM_Micro_ItemEnd )(const void *userdata) |
Handler for end scope of an item. | |
typedef CSEM_Bool(* | CSEM_Micro_PropStart )(const void *userdata, const char *propName, CSEM_Bool hasUrlValue) |
Handler for start scope of a property. | |
typedef void(* | CSEM_Micro_PropValue )(const void *userdata, const char *value, int len) |
Handler for property value. | |
typedef void(* | CSEM_Micro_PropEnd )(const void *userdata) |
Handler for end scope of a property. | |
typedef CSEM_Bool(* | CSEM_Micro_IdStart )(const void *userdata, const char *id) |
Handler for start scope of an id referenced by @itemref. | |
typedef void(* | CSEM_Micro_IdEnd )(const void *userdata) |
Handler for end scope of an id. | |
Functions | |
CSEM_Error | CSEM_Micro_CreateHandler (CSEM_Micro_Handlers **handler) |
Create a handler manager for microdata. | |
void | CSEM_Micro_DisposeHandler (CSEM_Micro_Handlers *handler) |
Dispose a handler manager. | |
void | CSEM_Micro_SetItemStart (CSEM_Micro_Handlers *handler, CSEM_Micro_ItemStart startScope) |
Set item start handler to the handler manager. | |
void | CSEM_Micro_SetItemEnd (CSEM_Micro_Handlers *handler, CSEM_Micro_ItemEnd endScope) |
Set item end handler to the handler manager. | |
void | CSEM_Micro_SetPropStart (CSEM_Micro_Handlers *handler, CSEM_Micro_PropStart startProp) |
Set property start handler to the handler manager. | |
void | CSEM_Micro_SetPropValue (CSEM_Micro_Handlers *handler, CSEM_Micro_PropValue propValue) |
Set property value handler to the handler manager. | |
void | CSEM_Micro_SetPropEnd (CSEM_Micro_Handlers *handler, CSEM_Micro_PropEnd endProp) |
Set property end handler to the handler manager. | |
void | CSEM_Micro_SetIdStart (CSEM_Micro_Handlers *handler, CSEM_Micro_IdStart startId) |
Set id start handler to the handler manager. | |
void | CSEM_Micro_SetIdEnd (CSEM_Micro_Handlers *handler, CSEM_Micro_IdEnd endId) |
Set id end handler to the handler manager. |
#define CSEM_NS_C_BEGIN |
#define CSEM_NS_C_END |
typedef typedefCSEM_NS_C_BEGIN struct CSEM_Micro_Handlers CSEM_Micro_Handlers |
Handlers for HTML5 microdata streaming parser.
typedef void(* CSEM_Micro_IdEnd)(const void *userdata) |
Handler for end scope of an id.
userdata | [out]user data |
typedef CSEM_Bool(* CSEM_Micro_IdStart)(const void *userdata, const char *id) |
Handler for start scope of an id referenced by @itemref.
userdata | [out]user data |
id | [out]id |
typedef void(* CSEM_Micro_ItemEnd)(const void *userdata) |
Handler for end scope of an item.
userdata | [out]user data |
typedef CSEM_Bool(* CSEM_Micro_ItemStart)(const void *userdata, const CSEM_Url *id, const CSEM_List *types, const CSEM_List *refs) |
Handler for start scope of an item.
userdata | [out]user data |
id | [out]item id |
types | [out]types of the item |
refs | [out]references of the item |
typedef void(* CSEM_Micro_PropEnd)(const void *userdata) |
Handler for end scope of a property.
userdata | [out]user data |
typedef CSEM_Bool(* CSEM_Micro_PropStart)(const void *userdata, const char *propName, CSEM_Bool hasUrlValue) |
Handler for start scope of a property.
userdata | [out]user data |
propName | [out]the property name TODO : support space separated names |
hasUrlValue | [out]CSEM_TRUE if the value type of the property is URL. |
typedef void(* CSEM_Micro_PropValue)(const void *userdata, const char *value, int len) |
Handler for property value.
The values may be divided into pieces with multiple call back.
userdata | [out]user data |
value | [out]property value |
len | [out]length of the value |
CSEM_Error CSEM_Micro_CreateHandler | ( | CSEM_Micro_Handlers ** | handler | ) |
Create a handler manager for microdata.
handler | [out]created handler manager |
void CSEM_Micro_DisposeHandler | ( | CSEM_Micro_Handlers * | handler | ) |
Dispose a handler manager.
handler | [in]handler manager to be freed |
void CSEM_Micro_SetIdEnd | ( | CSEM_Micro_Handlers * | handler, |
CSEM_Micro_IdEnd | endId | ||
) |
Set id end handler to the handler manager.
handler | [in]handler manager |
endId | [in]id end handler |
void CSEM_Micro_SetIdStart | ( | CSEM_Micro_Handlers * | handler, |
CSEM_Micro_IdStart | startId | ||
) |
Set id start handler to the handler manager.
handler | [in]handler manager |
startId | [in]id start handler |
void CSEM_Micro_SetItemEnd | ( | CSEM_Micro_Handlers * | handler, |
CSEM_Micro_ItemEnd | endScope | ||
) |
Set item end handler to the handler manager.
handler | [in]handler manager |
endScope | [in]item end handler |
void CSEM_Micro_SetItemStart | ( | CSEM_Micro_Handlers * | handler, |
CSEM_Micro_ItemStart | startScope | ||
) |
Set item start handler to the handler manager.
handler | [in]handler manager |
startScope | [in]item start handler |
void CSEM_Micro_SetPropEnd | ( | CSEM_Micro_Handlers * | handler, |
CSEM_Micro_PropEnd | endProp | ||
) |
Set property end handler to the handler manager.
handler | [in]handler manager |
endProp | [in]property end handler |
void CSEM_Micro_SetPropStart | ( | CSEM_Micro_Handlers * | handler, |
CSEM_Micro_PropStart | startProp | ||
) |
Set property start handler to the handler manager.
handler | [in]handler manager |
startProp | [in]property start handler |
void CSEM_Micro_SetPropValue | ( | CSEM_Micro_Handlers * | handler, |
CSEM_Micro_PropValue | propValue | ||
) |
Set property value handler to the handler manager.
handler | [in]handler manager |
propValue | [in]property value handler |