libcsem  0.2
csem_stream.h
Go to the documentation of this file.
00001 /*
00002  * $Id: csem__stream_8h_source.html,v 1.1 2013-04-22 20:16:24 hitoshi Exp $
00003  * See Copyright for the status of this software.
00004  * uchida@w3.org
00005  */
00006 #ifndef CSEM_PARSER_H
00007 #define CSEM_PARSER_H
00008 
00009 #ifdef __cplusplus
00010 #define CSEM_NS_C_BEGIN extern "C" {
00011 #define CSEM_NS_C_END }
00012 #else
00013 #define CSEM_NS_C_BEGIN
00014 #define CSEM_NS_C_END
00015 #endif
00016 
00017 CSEM_NS_C_BEGIN
00018 
00019 #include "csem_micro_stream.h"
00020 #include "csem_rdfa_stream.h"
00021 #include "csem_url.h"
00022 
00026 typedef struct CSEM_Parser CSEM_Parser;
00032 typedef struct CSEM_Handler CSEM_Handler;
00039 typedef void (*CSEM_Parser_ErrorHandler)(const void *userdata, CSEM_Error error);
00045 CSEM_Error CSEM_Handler_Create(CSEM_Handler **handler);
00052 void CSEM_Handler_Dispose(CSEM_Handler *handler, CSEM_Bool free);
00058 void CSEM_Handler_SetErrorHandler(CSEM_Handler *handler, CSEM_Parser_ErrorHandler error);
00064 void CSEM_Handler_SetMicrodataHandler(CSEM_Handler *handler, CSEM_Micro_Handlers *microdata);
00070 void CSEM_Handler_SetRDFaHandler(CSEM_Handler *handler, CSEM_RDFa_Handlers *rdfa_lite);
00076 CSEM_Error CSEM_Parser_Create(CSEM_Parser **parser);
00082 void CSEM_Parser_SetUserdata(CSEM_Parser *parser, void *userdata);
00088 void CSEM_Parser_SetHandler(CSEM_Parser *parser, CSEM_Handler *handler);
00094 void CSEM_Parser_SetBaseURL(CSEM_Parser *parser, CSEM_Url *baseURL);
00101 CSEM_Error CSEM_Parser_Parse(CSEM_Parser *parser, int fd);
00110 CSEM_Error CSEM_Parser_ParseChunk(CSEM_Parser *parser,
00111         const char *chunk, int size, int terminate);
00116 void CSEM_Parser_Dispose(CSEM_Parser *parser);
00117 
00118 CSEM_NS_C_END
00119 
00120 #endif /* CSEM_PARSER_H */
00121 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines