raptor.h | raptor.h | |||
---|---|---|---|---|
skipping to change at line 78 | skipping to change at line 78 | |||
/* OSX gcc cpp-precomp is broken */ | /* OSX gcc cpp-precomp is broken */ | |||
#define RAPTOR_DEPRECATED | #define RAPTOR_DEPRECATED | |||
#else | #else | |||
#define RAPTOR_DEPRECATED __attribute__((deprecated)) | #define RAPTOR_DEPRECATED __attribute__((deprecated)) | |||
#endif | #endif | |||
#else | #else | |||
#define RAPTOR_DEPRECATED | #define RAPTOR_DEPRECATED | |||
#endif | #endif | |||
/** | /** | |||
* RAPTOR_V2_EXPERIMENTAL: | ||||
* | ||||
* Enable EXPERIMENTAL and UNSUPPORTED API v2 structs and functions | ||||
* | ||||
* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | ||||
* | ||||
* The v2 structs and raptor*_v2() functions are NOT supported. | ||||
* | ||||
* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | ||||
*/ | ||||
#undef RAPTOR_V2_AVAILABLE | ||||
#ifdef RAPTOR_V2_EXPERIMENTAL | ||||
#define RAPTOR_V2_AVAILABLE 1 | ||||
#endif | ||||
/* Allow to flag V1 functions as deprecated */ | ||||
#ifndef RAPTOR_V1 | ||||
#define RAPTOR_V1 | ||||
#endif | ||||
/** | ||||
* RAPTOR_PRINTF_FORMAT: | * RAPTOR_PRINTF_FORMAT: | |||
* @string_index: ignore me | * @string_index: ignore me | |||
* @first_to_check_index: ignore me | * @first_to_check_index: ignore me | |||
* | * | |||
* Internal macro | * Internal macro | |||
*/ | */ | |||
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) | #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) | |||
#define RAPTOR_PRINTF_FORMAT(string_index, first_to_check_index) \ | #define RAPTOR_PRINTF_FORMAT(string_index, first_to_check_index) \ | |||
__attribute__((__format__(__printf__, string_index, first_to_check_index) )) | __attribute__((__format__(__printf__, string_index, first_to_check_index) )) | |||
#else | #else | |||
skipping to change at line 149 | skipping to change at line 170 | |||
/** | /** | |||
* raptor_xml_literal_datatype_uri_string_len: | * raptor_xml_literal_datatype_uri_string_len: | |||
* | * | |||
* Length of #raptor_xml_literal_datatype_uri_string | * Length of #raptor_xml_literal_datatype_uri_string | |||
*/ | */ | |||
RAPTOR_API | RAPTOR_API | |||
extern const unsigned int raptor_xml_literal_datatype_uri_string_len; | extern const unsigned int raptor_xml_literal_datatype_uri_string_len; | |||
/* Public structure */ | /* Public structure */ | |||
#ifndef RAPTOR_WORLD_DECLARED | ||||
#define RAPTOR_WORLD_DECLARED 1 | ||||
/** | ||||
* raptor_world: | ||||
* | ||||
* Raptor world class. | ||||
*/ | ||||
typedef struct raptor_world_s raptor_world; | ||||
#endif | ||||
/** | /** | |||
* raptor_parser: | * raptor_parser: | |||
* | * | |||
* Raptor Parser class | * Raptor Parser class | |||
*/ | */ | |||
typedef struct raptor_parser_s raptor_parser; | typedef struct raptor_parser_s raptor_parser; | |||
/** | /** | |||
* raptor_serializer: | * raptor_serializer: | |||
* | * | |||
* Raptor Serializer class | * Raptor Serializer class | |||
skipping to change at line 370 | skipping to change at line 400 | |||
* for GRDDL parser. | * for GRDDL parser. | |||
* @RAPTOR_FEATURE_WWW_TIMEOUT: Set timeout for internal WWW URI requests | * @RAPTOR_FEATURE_WWW_TIMEOUT: Set timeout for internal WWW URI requests | |||
* for GRDDL parser. | * for GRDDL parser. | |||
* @RAPTOR_FEATURE_WRITE_BASE_URI: Write @base directive for Turtle/N3. | * @RAPTOR_FEATURE_WRITE_BASE_URI: Write @base directive for Turtle/N3. | |||
* @RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL: HTTP Cache-Control: header | * @RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL: HTTP Cache-Control: header | |||
* @RAPTOR_FEATURE_WWW_HTTP_USER_AGENT: HTTP User-Agent: header | * @RAPTOR_FEATURE_WWW_HTTP_USER_AGENT: HTTP User-Agent: header | |||
* @RAPTOR_FEATURE_JSON_CALLBACK: JSON serializer callback function. | * @RAPTOR_FEATURE_JSON_CALLBACK: JSON serializer callback function. | |||
* @RAPTOR_FEATURE_JSON_EXTRA_DATA: JSON serializer extra top-level data | * @RAPTOR_FEATURE_JSON_EXTRA_DATA: JSON serializer extra top-level data | |||
* @RAPTOR_FEATURE_RSS_TRIPLES: Atom/RSS serializer writes extra RDF triple s it finds (none, rdf-xml, atom-triples) | * @RAPTOR_FEATURE_RSS_TRIPLES: Atom/RSS serializer writes extra RDF triple s it finds (none, rdf-xml, atom-triples) | |||
* @RAPTOR_FEATURE_ATOM_ENTRY_URI: Atom entry URI. If given, generate an A tom Entry Document with the item having the given URI, otherwise generate a n Atom Feed Document with any items found. | * @RAPTOR_FEATURE_ATOM_ENTRY_URI: Atom entry URI. If given, generate an A tom Entry Document with the item having the given URI, otherwise generate a n Atom Feed Document with any items found. | |||
* @RAPTOR_FEATURE_PREFIX_ELEMENTS: Integer. If set, generate Atom/RSS1.0 d ocuments with prefixed elements, otherwise unprefixed. | ||||
* @RAPTOR_FEATURE_LAST: Internal | * @RAPTOR_FEATURE_LAST: Internal | |||
* | * | |||
* Raptor parser, serializer or XML writer features. | * Raptor parser, serializer or XML writer features. | |||
*/ | */ | |||
typedef enum { | typedef enum { | |||
RAPTOR_FEATURE_SCANNING, | RAPTOR_FEATURE_SCANNING, | |||
RAPTOR_FEATURE_ASSUME_IS_RDF, | RAPTOR_FEATURE_ASSUME_IS_RDF, | |||
RAPTOR_FEATURE_ALLOW_NON_NS_ATTRIBUTES, | RAPTOR_FEATURE_ALLOW_NON_NS_ATTRIBUTES, | |||
RAPTOR_FEATURE_ALLOW_OTHER_PARSETYPES, | RAPTOR_FEATURE_ALLOW_OTHER_PARSETYPES, | |||
RAPTOR_FEATURE_ALLOW_BAGID, | RAPTOR_FEATURE_ALLOW_BAGID, | |||
skipping to change at line 410 | skipping to change at line 441 | |||
RAPTOR_FEATURE_MICROFORMATS, | RAPTOR_FEATURE_MICROFORMATS, | |||
RAPTOR_FEATURE_HTML_LINK, | RAPTOR_FEATURE_HTML_LINK, | |||
RAPTOR_FEATURE_WWW_TIMEOUT, | RAPTOR_FEATURE_WWW_TIMEOUT, | |||
RAPTOR_FEATURE_WRITE_BASE_URI, | RAPTOR_FEATURE_WRITE_BASE_URI, | |||
RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL, | RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL, | |||
RAPTOR_FEATURE_WWW_HTTP_USER_AGENT, | RAPTOR_FEATURE_WWW_HTTP_USER_AGENT, | |||
RAPTOR_FEATURE_JSON_CALLBACK, | RAPTOR_FEATURE_JSON_CALLBACK, | |||
RAPTOR_FEATURE_JSON_EXTRA_DATA, | RAPTOR_FEATURE_JSON_EXTRA_DATA, | |||
RAPTOR_FEATURE_RSS_TRIPLES, | RAPTOR_FEATURE_RSS_TRIPLES, | |||
RAPTOR_FEATURE_ATOM_ENTRY_URI, | RAPTOR_FEATURE_ATOM_ENTRY_URI, | |||
RAPTOR_FEATURE_LAST=RAPTOR_FEATURE_ATOM_ENTRY_URI | RAPTOR_FEATURE_PREFIX_ELEMENTS, | |||
RAPTOR_FEATURE_LAST = RAPTOR_FEATURE_PREFIX_ELEMENTS | ||||
} raptor_feature; | } raptor_feature; | |||
/** | /** | |||
* raptor_genid_type: | * raptor_genid_type: | |||
* @RAPTOR_GENID_TYPE_BNODEID: Generated ID is for a blank node | * @RAPTOR_GENID_TYPE_BNODEID: Generated ID is for a blank node | |||
* @RAPTOR_GENID_TYPE_BAGID: Generated ID is for rdf:bagID | * @RAPTOR_GENID_TYPE_BAGID: Generated ID is for rdf:bagID | |||
* | * | |||
* Intended type for a generated identifier asked for by the handler | * Intended type for a generated identifier asked for by the handler | |||
* registered with raptor_set_generate_id_handler(). | * registered with raptor_set_generate_id_handler(). | |||
*/ | */ | |||
skipping to change at line 441 | skipping to change at line 473 | |||
* @uri_source: where the identifier (URI or blank node) came from | * @uri_source: where the identifier (URI or blank node) came from | |||
* @id: blank node identifier for type %RAPTOR_IDENTIFIER_TYPE_ANONYMOUS | * @id: blank node identifier for type %RAPTOR_IDENTIFIER_TYPE_ANONYMOUS | |||
* @ordinal: integer ordinal for type %RAPTOR_IDENTIFIER_TYPE_ORDINAL | * @ordinal: integer ordinal for type %RAPTOR_IDENTIFIER_TYPE_ORDINAL | |||
* @is_malloced: internal | * @is_malloced: internal | |||
* @literal: literal string for types %RAPTOR_IDENTIFIER_TYPE_LITERAL and | * @literal: literal string for types %RAPTOR_IDENTIFIER_TYPE_LITERAL and | |||
* %RAPTOR_IDENTIFIER_TYPE_XML_LITERAL | * %RAPTOR_IDENTIFIER_TYPE_XML_LITERAL | |||
* @literal_datatype: RDF literal datatype URI for types | * @literal_datatype: RDF literal datatype URI for types | |||
* %RAPTOR_IDENTIFIER_TYPE_LITERAL and %RAPTOR_IDENTIFIER_TYPE_XML_LITERA L | * %RAPTOR_IDENTIFIER_TYPE_LITERAL and %RAPTOR_IDENTIFIER_TYPE_XML_LITERA L | |||
* @literal_language: RDF literal language for type | * @literal_language: RDF literal language for type | |||
* %RAPTOR_IDENTIFIER_TYPE_LITERAL | * %RAPTOR_IDENTIFIER_TYPE_LITERAL | |||
* @world: raptor_world object | ||||
* | * | |||
* Raptor RDF term identifier. | * Raptor RDF term identifier. | |||
*/ | */ | |||
typedef struct { | typedef struct { | |||
raptor_identifier_type type; | raptor_identifier_type type; | |||
raptor_uri *uri; | raptor_uri *uri; | |||
raptor_uri_source uri_source; | raptor_uri_source uri_source; | |||
const unsigned char *id; | const unsigned char *id; | |||
int ordinal; | int ordinal; | |||
int is_malloced; | int is_malloced; | |||
const unsigned char *literal; | const unsigned char *literal; | |||
raptor_uri *literal_datatype; | raptor_uri *literal_datatype; | |||
const unsigned char *literal_language; | const unsigned char *literal_language; | |||
raptor_world *world; | ||||
} raptor_identifier; | } raptor_identifier; | |||
/** | /** | |||
* raptor_statement: | * raptor_statement: | |||
* @subject: triple subject data | * @subject: triple subject data | |||
* @subject_type: triple subject type | * @subject_type: triple subject type | |||
* @predicate: triple predicate data | * @predicate: triple predicate data | |||
* @predicate_type: triple predicate type | * @predicate_type: triple predicate type | |||
* @object: triple object literal string | * @object: triple object literal string | |||
* @object_type: triple object type | * @object_type: triple object type | |||
* @object_literal_datatype: triple object literal datatype URI (or NULL) | * @object_literal_datatype: triple object literal datatype URI (or NULL) | |||
* @object_literal_language: triple object literal language string (or NULL ) | * @object_literal_language: triple object literal language string (or NULL ) | |||
* | * | |||
* An RDF triple | * An RDF triple | |||
* | * | |||
* See #raptor_identifier for a description of how the fields may be used. | * See #raptor_identifier for a description of how the fields may be used. | |||
* As returned by a parser statement_handler. | * As returned by a parser statement_handler. | |||
* | ||||
* See also #raptor_statement_v2. | ||||
*/ | */ | |||
typedef struct { | typedef struct { | |||
const void *subject; | const void *subject; | |||
raptor_identifier_type subject_type; | raptor_identifier_type subject_type; | |||
const void *predicate; | const void *predicate; | |||
raptor_identifier_type predicate_type; | raptor_identifier_type predicate_type; | |||
const void *object; | const void *object; | |||
raptor_identifier_type object_type; | raptor_identifier_type object_type; | |||
raptor_uri *object_literal_datatype; | raptor_uri *object_literal_datatype; | |||
const unsigned char *object_literal_language; | const unsigned char *object_literal_language; | |||
} raptor_statement; | } raptor_statement; | |||
#ifdef RAPTOR_V2_AVAILABLE | ||||
/** | ||||
* raptor_statement_v2: | ||||
* @world: raptor_world object | ||||
* @s: #raptor_statement | ||||
* | ||||
* An RDF triple wrapper for raptor v2 statement API. | ||||
* | ||||
* See #raptor_statement. | ||||
*/ | ||||
typedef struct { | ||||
raptor_world* world; | ||||
raptor_statement *s; | ||||
} raptor_statement_v2; | ||||
#endif | ||||
/** | /** | |||
* raptor_new_uri_func: | * raptor_new_uri_func: | |||
* @context: URI context data | * @context: URI context data | |||
* @uri_string: URI string | * @uri_string: URI string | |||
* | * | |||
* Handler function for implementing raptor_new_uri(). | * Handler function for implementing raptor_new_uri(). | |||
* | * | |||
* Return value: new URI object or NULL on failure | * Return value: new URI object or NULL on failure | |||
*/ | */ | |||
typedef raptor_uri* (*raptor_new_uri_func) (void *context, const unsigned c har *uri_string); | typedef raptor_uri* (*raptor_new_uri_func) (void *context, const unsigned c har *uri_string); | |||
skipping to change at line 769 | skipping to change at line 821 | |||
* raptor_uri_filter_func: | * raptor_uri_filter_func: | |||
* @user_data: user data | * @user_data: user data | |||
* @uri: #raptor_uri URI to check | * @uri: #raptor_uri URI to check | |||
* | * | |||
* Callback function for #raptor_www_set_uri_filter | * Callback function for #raptor_www_set_uri_filter | |||
* | * | |||
* Return value: non-0 to filter the URI | * Return value: non-0 to filter the URI | |||
*/ | */ | |||
typedef int (*raptor_uri_filter_func)(void *user_data, raptor_uri* uri); | typedef int (*raptor_uri_filter_func)(void *user_data, raptor_uri* uri); | |||
/** | ||||
* raptor_libxml_flags: | ||||
* @RAPTOR_LIBXML_FLAGS_GENERIC_ERROR_SAVE: if set - save/restore the libxm | ||||
l generic error handler when parsing (default unset) | ||||
* @RAPTOR_LIBXML_FLAGS_STRUCTURED_ERROR_SAVE: if set - save/restore the li | ||||
bxml structured error handler when parsing (default unset) | ||||
* | ||||
* libxml library flags | ||||
* | ||||
* These are used by raptor_world_set_libxml_flags() and | ||||
* raptor_set_libxml_flags() to control common libxml features. | ||||
* | ||||
* If any handler saving/restoring is enabled, any existing handler | ||||
* and context is saved before parsing and restored afterwards. | ||||
* Otherwise, no saving/restoring is performed. | ||||
* | ||||
*/ | ||||
typedef enum { | ||||
RAPTOR_LIBXML_FLAGS_GENERIC_ERROR_SAVE = 1, | ||||
RAPTOR_LIBXML_FLAGS_STRUCTURED_ERROR_SAVE = 2 | ||||
} raptor_libxml_flags; | ||||
/* Public functions */ | /* Public functions */ | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_init(void); | raptor_world* raptor_new_world(void); | |||
RAPTOR_API | ||||
int raptor_world_open(raptor_world* world); | ||||
RAPTOR_API | ||||
void raptor_free_world(raptor_world* world); | ||||
RAPTOR_API | ||||
void raptor_world_set_libxslt_security_preferences(raptor_world *world, voi | ||||
d *security_preferences); | ||||
RAPTOR_API | RAPTOR_API | |||
void raptor_world_set_libxml_flags(raptor_world *world, int flags); | ||||
#ifndef RAPTOR_DISABLE_V1 | ||||
RAPTOR_API RAPTOR_V1 | ||||
void raptor_init(void); | ||||
RAPTOR_API RAPTOR_V1 | ||||
void raptor_finish(void); | void raptor_finish(void); | |||
RAPTOR_API RAPTOR_V1 | ||||
void raptor_set_libxslt_security_preferences(void *security_preferences); | ||||
void raptor_set_libxml_flags(int flags); | ||||
#endif | ||||
/* Get parser names */ | /* Get parser names */ | |||
RAPTOR_API | #ifndef RAPTOR_DISABLE_V1 | |||
RAPTOR_API RAPTOR_V1 | ||||
int raptor_parsers_enumerate(const unsigned int counter, const char **name, const char **label); | int raptor_parsers_enumerate(const unsigned int counter, const char **name, const char **label); | |||
RAPTOR_API | RAPTOR_API RAPTOR_V1 | |||
int raptor_syntaxes_enumerate(const unsigned int counter, const char **name , const char **label, const char **mime_type, const unsigned char **uri_str ing); | int raptor_syntaxes_enumerate(const unsigned int counter, const char **name , const char **label, const char **mime_type, const unsigned char **uri_str ing); | |||
RAPTOR_API | RAPTOR_API RAPTOR_V1 | |||
int raptor_syntax_name_check(const char *name); | int raptor_syntax_name_check(const char *name); | |||
RAPTOR_API | RAPTOR_API RAPTOR_V1 | |||
const char* raptor_guess_parser_name(raptor_uri *uri, const char *mime_type , const unsigned char *buffer, size_t len, const unsigned char *identifier) ; | const char* raptor_guess_parser_name(raptor_uri *uri, const char *mime_type , const unsigned char *buffer, size_t len, const unsigned char *identifier) ; | |||
#endif | ||||
#ifdef RAPTOR_V2_AVAILABLE | ||||
RAPTOR_API | ||||
int raptor_parsers_enumerate_v2(raptor_world* world, const unsigned int cou | ||||
nter, const char **name, const char **label); | ||||
RAPTOR_API | ||||
int raptor_syntaxes_enumerate_v2(raptor_world* world, const unsigned int co | ||||
unter, const char **name, const char **label, const char **mime_type, const | ||||
unsigned char **uri_string); | ||||
RAPTOR_API | ||||
int raptor_syntax_name_check_v2(raptor_world* world, const char *name); | ||||
RAPTOR_API | ||||
const char* raptor_guess_parser_name_v2(raptor_world* world, raptor_uri *ur | ||||
i, const char *mime_type, const unsigned char *buffer, size_t len, const un | ||||
signed char *identifier); | ||||
#endif | ||||
/* Create */ | /* Create */ | |||
RAPTOR_API | #ifndef RAPTOR_DISABLE_V1 | |||
RAPTOR_API RAPTOR_V1 | ||||
raptor_parser* raptor_new_parser(const char *name); | raptor_parser* raptor_new_parser(const char *name); | |||
RAPTOR_API | RAPTOR_API RAPTOR_V1 | |||
raptor_parser* raptor_new_parser_for_content(raptor_uri *uri, const char *m ime_type, const unsigned char *buffer, size_t len, const unsigned char *ide ntifier); | raptor_parser* raptor_new_parser_for_content(raptor_uri *uri, const char *m ime_type, const unsigned char *buffer, size_t len, const unsigned char *ide ntifier); | |||
#endif | ||||
#ifdef RAPTOR_V2_AVAILABLE | ||||
RAPTOR_API | ||||
raptor_parser* raptor_new_parser_v2(raptor_world* world, const char *name); | ||||
RAPTOR_API | ||||
raptor_parser* raptor_new_parser_for_content_v2(raptor_world* world, raptor | ||||
_uri *uri, const char *mime_type, const unsigned char *buffer, size_t len, | ||||
const unsigned char *identifier); | ||||
#endif | ||||
RAPTOR_API | RAPTOR_API | |||
int raptor_start_parse(raptor_parser *rdf_parser, raptor_uri *uri); | int raptor_start_parse(raptor_parser *rdf_parser, raptor_uri *uri); | |||
/* Destroy */ | /* Destroy */ | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_free_parser(raptor_parser* parser); | void raptor_free_parser(raptor_parser* parser); | |||
/* Handlers */ | /* Handlers */ | |||
RAPTOR_API | RAPTOR_API | |||
skipping to change at line 817 | skipping to change at line 925 | |||
void raptor_set_statement_handler(raptor_parser* parser, void *user_data, r aptor_statement_handler handler); | void raptor_set_statement_handler(raptor_parser* parser, void *user_data, r aptor_statement_handler handler); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_set_graph_handler(raptor_parser* parser, void *user_data, rapto r_graph_handler handler); | void raptor_set_graph_handler(raptor_parser* parser, void *user_data, rapto r_graph_handler handler); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_set_generate_id_handler(raptor_parser* parser, void *user_data, raptor_generate_id_handler handler); | void raptor_set_generate_id_handler(raptor_parser* parser, void *user_data, raptor_generate_id_handler handler); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_set_namespace_handler(raptor_parser* parser, void *user_data, r aptor_namespace_handler handler); | void raptor_set_namespace_handler(raptor_parser* parser, void *user_data, r aptor_namespace_handler handler); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_parser_set_uri_filter(raptor_parser* parser, raptor_uri_filter_ func filter, void* user_data); | void raptor_parser_set_uri_filter(raptor_parser* parser, raptor_uri_filter_ func filter, void* user_data); | |||
RAPTOR_API | #ifndef RAPTOR_DISABLE_V1 | |||
RAPTOR_API RAPTOR_V1 | ||||
void raptor_print_statement(const raptor_statement * statement, FILE *strea m); | void raptor_print_statement(const raptor_statement * statement, FILE *strea m); | |||
RAPTOR_API | RAPTOR_API RAPTOR_V1 | |||
void raptor_print_statement_as_ntriples(const raptor_statement * statement, FILE *stream); | void raptor_print_statement_as_ntriples(const raptor_statement * statement, FILE *stream); | |||
#ifndef RAPTOR_DISABLE_DEPRECATED | #endif | |||
#ifdef RAPTOR_V2_AVAILABLE | ||||
RAPTOR_API | ||||
void raptor_print_statement_v2(const raptor_statement_v2 * statement, FILE | ||||
*stream); | ||||
RAPTOR_API | ||||
void raptor_print_statement_as_ntriples_v2(const raptor_statement_v2 * stat | ||||
ement, FILE *stream); | ||||
#endif | ||||
#if !defined(RAPTOR_DISABLE_DEPRECATED) && !defined(RAPTOR_DISABLE_V1) | ||||
RAPTOR_API RAPTOR_DEPRECATED | RAPTOR_API RAPTOR_DEPRECATED | |||
void raptor_print_statement_detailed(const raptor_statement * statement, in t detailed, FILE *stream); | void raptor_print_statement_detailed(const raptor_statement * statement, in t detailed, FILE *stream); | |||
#endif | #endif | |||
RAPTOR_API | #ifndef RAPTOR_DISABLE_V1 | |||
RAPTOR_API RAPTOR_V1 | ||||
unsigned char* raptor_statement_part_as_counted_string(const void *term, ra ptor_identifier_type type, raptor_uri* literal_datatype, const unsigned cha r *literal_language, size_t* len_p); | unsigned char* raptor_statement_part_as_counted_string(const void *term, ra ptor_identifier_type type, raptor_uri* literal_datatype, const unsigned cha r *literal_language, size_t* len_p); | |||
RAPTOR_API | RAPTOR_API RAPTOR_V1 | |||
unsigned char* raptor_statement_part_as_string(const void *term, raptor_ide ntifier_type type, raptor_uri* literal_datatype, const unsigned char *liter al_language); | unsigned char* raptor_statement_part_as_string(const void *term, raptor_ide ntifier_type type, raptor_uri* literal_datatype, const unsigned char *liter al_language); | |||
RAPTOR_API | RAPTOR_API RAPTOR_V1 | |||
int raptor_statement_compare(const raptor_statement *s1, const raptor_state ment *s2); | int raptor_statement_compare(const raptor_statement *s1, const raptor_state ment *s2); | |||
#endif | ||||
#ifdef RAPTOR_V2_AVAILABLE | ||||
RAPTOR_API | ||||
unsigned char* raptor_statement_part_as_counted_string_v2(raptor_world* wor | ||||
ld, const void *term, raptor_identifier_type type, raptor_uri* literal_data | ||||
type, const unsigned char *literal_language, size_t* len_p); | ||||
RAPTOR_API | ||||
unsigned char* raptor_statement_part_as_string_v2(raptor_world* world, cons | ||||
t void *term, raptor_identifier_type type, raptor_uri* literal_datatype, co | ||||
nst unsigned char *literal_language); | ||||
RAPTOR_API | ||||
int raptor_statement_compare_v2(const raptor_statement_v2 *s1, const raptor | ||||
_statement_v2 *s2); | ||||
#endif | ||||
RAPTOR_API | RAPTOR_API | |||
raptor_locator* raptor_get_locator(raptor_parser* rdf_parser); | raptor_locator* raptor_get_locator(raptor_parser* rdf_parser); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_set_default_generate_id_parameters(raptor_parser* rdf_parser, c har *prefix, int base); | void raptor_set_default_generate_id_parameters(raptor_parser* rdf_parser, c har *prefix, int base); | |||
/* Parsing functions */ | /* Parsing functions */ | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_parse_chunk(raptor_parser* rdf_parser, const unsigned char *buff er, size_t len, int is_end); | int raptor_parse_chunk(raptor_parser* rdf_parser, const unsigned char *buff er, size_t len, int is_end); | |||
skipping to change at line 853 | skipping to change at line 979 | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_parse_file(raptor_parser* rdf_parser, raptor_uri *uri, raptor_ur i *base_uri); | int raptor_parse_file(raptor_parser* rdf_parser, raptor_uri *uri, raptor_ur i *base_uri); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_parse_uri(raptor_parser* rdf_parser, raptor_uri *uri, raptor_uri *base_uri); | int raptor_parse_uri(raptor_parser* rdf_parser, raptor_uri *uri, raptor_uri *base_uri); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_parse_uri_with_connection(raptor_parser* rdf_parser, raptor_uri *uri, raptor_uri *base_uri, void *connection); | int raptor_parse_uri_with_connection(raptor_parser* rdf_parser, raptor_uri *uri, raptor_uri *base_uri, void *connection); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_parse_abort(raptor_parser* rdf_parser); | void raptor_parse_abort(raptor_parser* rdf_parser); | |||
/* Utility functions */ | /* Utility functions */ | |||
RAPTOR_API | #ifndef RAPTOR_DISABLE_V1 | |||
RAPTOR_API RAPTOR_V1 | ||||
void raptor_print_locator(FILE *stream, raptor_locator* locator); | void raptor_print_locator(FILE *stream, raptor_locator* locator); | |||
RAPTOR_API | RAPTOR_API RAPTOR_V1 | |||
int raptor_format_locator(char *buffer, size_t length, raptor_locator* loca tor); | int raptor_format_locator(char *buffer, size_t length, raptor_locator* loca tor); | |||
RAPTOR_API RAPTOR_V1 | ||||
const char * raptor_locator_uri(raptor_locator *locator); | ||||
#endif | ||||
#ifdef RAPTOR_V2_AVAILABLE | ||||
RAPTOR_API | ||||
void raptor_print_locator_v2(raptor_world* world, FILE *stream, raptor_loca | ||||
tor* locator); | ||||
RAPTOR_API | ||||
int raptor_format_locator_v2(raptor_world* world, char *buffer, size_t leng | ||||
th, raptor_locator* locator); | ||||
#endif | ||||
RAPTOR_API | RAPTOR_API | |||
int raptor_locator_line(raptor_locator *locator); | int raptor_locator_line(raptor_locator *locator); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_locator_column(raptor_locator *locator); | int raptor_locator_column(raptor_locator *locator); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_locator_byte(raptor_locator *locator); | int raptor_locator_byte(raptor_locator *locator); | |||
RAPTOR_API | RAPTOR_API | |||
const char * raptor_locator_file(raptor_locator *locator); | const char * raptor_locator_file(raptor_locator *locator); | |||
#ifdef RAPTOR_V2_AVAILABLE | ||||
RAPTOR_API | RAPTOR_API | |||
const char * raptor_locator_uri(raptor_locator *locator); | const char * raptor_locator_uri_v2(raptor_world* world, raptor_locator *loc | |||
ator); | ||||
#endif | ||||
RAPTOR_API | RAPTOR_API | |||
const char* raptor_get_name(raptor_parser *rdf_parser); | const char* raptor_get_name(raptor_parser *rdf_parser); | |||
RAPTOR_API | RAPTOR_API | |||
const char* raptor_get_label(raptor_parser *rdf_parser); | const char* raptor_get_label(raptor_parser *rdf_parser); | |||
RAPTOR_API | RAPTOR_API | |||
const char* raptor_get_mime_type(raptor_parser *rdf_parser); | const char* raptor_get_mime_type(raptor_parser *rdf_parser); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_get_need_base_uri(raptor_parser *rdf_parser); | int raptor_get_need_base_uri(raptor_parser *rdf_parser); | |||
RAPTOR_API | #ifndef RAPTOR_DISABLE_V1 | |||
RAPTOR_API RAPTOR_V1 | ||||
int raptor_features_enumerate(const raptor_feature feature, const char **na me, raptor_uri **uri, const char **label); | int raptor_features_enumerate(const raptor_feature feature, const char **na me, raptor_uri **uri, const char **label); | |||
#endif | ||||
#ifdef RAPTOR_V2_AVAILABLE | ||||
RAPTOR_API | ||||
int raptor_features_enumerate_v2(raptor_world* world, const raptor_feature | ||||
feature, const char **name, raptor_uri **uri, const char **label); | ||||
#endif | ||||
RAPTOR_API | RAPTOR_API | |||
int raptor_set_feature(raptor_parser *parser, raptor_feature feature, int v alue); | int raptor_set_feature(raptor_parser *parser, raptor_feature feature, int v alue); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_parser_set_feature_string(raptor_parser *parser, raptor_feature feature, const unsigned char *value); | int raptor_parser_set_feature_string(raptor_parser *parser, raptor_feature feature, const unsigned char *value); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_get_feature(raptor_parser *parser, raptor_feature feature); | int raptor_get_feature(raptor_parser *parser, raptor_feature feature); | |||
RAPTOR_API | RAPTOR_API | |||
const unsigned char* raptor_parser_get_feature_string(raptor_parser *parser , raptor_feature feature); | const unsigned char* raptor_parser_get_feature_string(raptor_parser *parser , raptor_feature feature); | |||
RAPTOR_API | RAPTOR_API | |||
unsigned int raptor_get_feature_count(void); | unsigned int raptor_get_feature_count(void); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_set_parser_strict(raptor_parser* rdf_parser, int is_strict); | void raptor_set_parser_strict(raptor_parser* rdf_parser, int is_strict); | |||
RAPTOR_API | RAPTOR_API | |||
const char* raptor_parser_get_accept_header(raptor_parser* rdf_parser); | const char* raptor_parser_get_accept_header(raptor_parser* rdf_parser); | |||
unsigned char* raptor_parser_generate_id(raptor_parser *rdf_parser, raptor_ genid_type type); | unsigned char* raptor_parser_generate_id(raptor_parser *rdf_parser, raptor_ genid_type type); | |||
/* Get serializer names */ | ||||
RAPTOR_API | RAPTOR_API | |||
raptor_world* raptor_parser_get_world(raptor_parser* rdf_parser); | ||||
/* Get serializer names */ | ||||
#ifndef RAPTOR_DISABLE_V1 | ||||
RAPTOR_API RAPTOR_V1 | ||||
int raptor_serializers_enumerate(const unsigned int counter, const char **n ame, const char **label, const char **mime_type, const unsigned char **uri_ string); | int raptor_serializers_enumerate(const unsigned int counter, const char **n ame, const char **label, const char **mime_type, const unsigned char **uri_ string); | |||
RAPTOR_API | RAPTOR_API RAPTOR_V1 | |||
int raptor_serializer_syntax_name_check(const char *name); | int raptor_serializer_syntax_name_check(const char *name); | |||
#endif | ||||
#ifdef RAPTOR_V2_AVAILABLE | ||||
RAPTOR_API | ||||
int raptor_serializers_enumerate_v2(raptor_world* world, const unsigned int | ||||
counter, const char **name, const char **label, const char **mime_type, co | ||||
nst unsigned char **uri_string); | ||||
RAPTOR_API | ||||
int raptor_serializer_syntax_name_check_v2(raptor_world* world, const char | ||||
*name); | ||||
#endif | ||||
/* Serializing */ | /* Serializing */ | |||
RAPTOR_API | #ifndef RAPTOR_DISABLE_V1 | |||
RAPTOR_API RAPTOR_V1 | ||||
raptor_serializer* raptor_new_serializer(const char *name); | raptor_serializer* raptor_new_serializer(const char *name); | |||
#endif | ||||
#ifdef RAPTOR_V2_AVAILABLE | ||||
RAPTOR_API | ||||
raptor_serializer* raptor_new_serializer_v2(raptor_world* world, const char | ||||
*name); | ||||
#endif | ||||
RAPTOR_API | RAPTOR_API | |||
void raptor_free_serializer(raptor_serializer* rdf_serializer); | void raptor_free_serializer(raptor_serializer* rdf_serializer); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_serialize_start(raptor_serializer *rdf_serializer, raptor_uri *u ri, raptor_iostream *iostream); | int raptor_serialize_start(raptor_serializer *rdf_serializer, raptor_uri *u ri, raptor_iostream *iostream); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_serialize_start_to_iostream(raptor_serializer *rdf_serializer, r aptor_uri *uri, raptor_iostream *iostream); | int raptor_serialize_start_to_iostream(raptor_serializer *rdf_serializer, r aptor_uri *uri, raptor_iostream *iostream); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_serialize_start_to_filename(raptor_serializer *rdf_serializer, c onst char *filename); | int raptor_serialize_start_to_filename(raptor_serializer *rdf_serializer, c onst char *filename); | |||
RAPTOR_API | RAPTOR_API | |||
skipping to change at line 934 | skipping to change at line 1095 | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_serialize_end(raptor_serializer *rdf_serializer); | int raptor_serialize_end(raptor_serializer *rdf_serializer); | |||
RAPTOR_API | RAPTOR_API | |||
raptor_iostream* raptor_serializer_get_iostream(raptor_serializer *serializ er); | raptor_iostream* raptor_serializer_get_iostream(raptor_serializer *serializ er); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_serializer_set_error_handler(raptor_serializer* serializer, voi d *user_data, raptor_message_handler handler); | void raptor_serializer_set_error_handler(raptor_serializer* serializer, voi d *user_data, raptor_message_handler handler); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_serializer_set_warning_handler(raptor_serializer* serializer, v oid *user_data, raptor_message_handler handler); | void raptor_serializer_set_warning_handler(raptor_serializer* serializer, v oid *user_data, raptor_message_handler handler); | |||
RAPTOR_API | RAPTOR_API | |||
raptor_locator* raptor_serializer_get_locator(raptor_serializer *rdf_serial izer); | raptor_locator* raptor_serializer_get_locator(raptor_serializer *rdf_serial izer); | |||
RAPTOR_API | #ifndef RAPTOR_DISABLE_V1 | |||
RAPTOR_API RAPTOR_V1 | ||||
int raptor_serializer_features_enumerate(const raptor_feature feature, cons t char **name, raptor_uri **uri, const char **label); | int raptor_serializer_features_enumerate(const raptor_feature feature, cons t char **name, raptor_uri **uri, const char **label); | |||
#endif | ||||
#ifdef RAPTOR_V2_AVAILABLE | ||||
RAPTOR_API | ||||
int raptor_serializer_features_enumerate_v2(raptor_world* world, const rapt | ||||
or_feature feature, const char **name, raptor_uri **uri, const char **labe | ||||
l); | ||||
#endif | ||||
RAPTOR_API | RAPTOR_API | |||
int raptor_serializer_set_feature(raptor_serializer *serializer, raptor_fea ture feature, int value); | int raptor_serializer_set_feature(raptor_serializer *serializer, raptor_fea ture feature, int value); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_serializer_set_feature_string(raptor_serializer *serializer, rap tor_feature feature, const unsigned char *value); | int raptor_serializer_set_feature_string(raptor_serializer *serializer, rap tor_feature feature, const unsigned char *value); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_serializer_get_feature(raptor_serializer *serializer, raptor_fea ture feature); | int raptor_serializer_get_feature(raptor_serializer *serializer, raptor_fea ture feature); | |||
RAPTOR_API | RAPTOR_API | |||
const unsigned char *raptor_serializer_get_feature_string(raptor_serializer *serializer, raptor_feature feature); | const unsigned char *raptor_serializer_get_feature_string(raptor_serializer *serializer, raptor_feature feature); | |||
RAPTOR_API | ||||
raptor_world* raptor_serializer_get_world(raptor_serializer* rdf_serializer | ||||
); | ||||
/* memory functions */ | /* memory functions */ | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_free_memory(void *ptr); | void raptor_free_memory(void *ptr); | |||
RAPTOR_API | RAPTOR_API | |||
void* raptor_alloc_memory(size_t size); | void* raptor_alloc_memory(size_t size); | |||
RAPTOR_API | RAPTOR_API | |||
void* raptor_calloc_memory(size_t nmemb, size_t size); | void* raptor_calloc_memory(size_t nmemb, size_t size); | |||
/* URI functions */ | /* URI functions */ | |||
RAPTOR_API | #ifndef RAPTOR_DISABLE_V1 | |||
RAPTOR_API RAPTOR_V1 | ||||
raptor_uri* raptor_new_uri(const unsigned char *uri_string); | raptor_uri* raptor_new_uri(const unsigned char *uri_string); | |||
RAPTOR_API | RAPTOR_API RAPTOR_V1 | |||
raptor_uri* raptor_new_uri_from_uri_local_name(raptor_uri *uri, const unsig ned char *local_name); | raptor_uri* raptor_new_uri_from_uri_local_name(raptor_uri *uri, const unsig ned char *local_name); | |||
RAPTOR_API | RAPTOR_API RAPTOR_V1 | |||
raptor_uri* raptor_new_uri_relative_to_base(raptor_uri *base_uri, const uns igned char *uri_string); | raptor_uri* raptor_new_uri_relative_to_base(raptor_uri *base_uri, const uns igned char *uri_string); | |||
RAPTOR_API | RAPTOR_API RAPTOR_V1 | |||
raptor_uri* raptor_new_uri_from_id(raptor_uri *base_uri, const unsigned cha r *id); | raptor_uri* raptor_new_uri_from_id(raptor_uri *base_uri, const unsigned cha r *id); | |||
RAPTOR_API | RAPTOR_API RAPTOR_V1 | |||
raptor_uri* raptor_new_uri_for_rdf_concept(const char *name); | raptor_uri* raptor_new_uri_for_rdf_concept(const char *name); | |||
RAPTOR_API | RAPTOR_API RAPTOR_V1 | |||
void raptor_free_uri(raptor_uri *uri); | void raptor_free_uri(raptor_uri *uri); | |||
RAPTOR_API | RAPTOR_API RAPTOR_V1 | |||
int raptor_uri_equals(raptor_uri* uri1, raptor_uri* uri2); | int raptor_uri_equals(raptor_uri* uri1, raptor_uri* uri2); | |||
RAPTOR_API | RAPTOR_API RAPTOR_V1 | |||
int raptor_uri_compare(raptor_uri* uri1, raptor_uri* uri2); | int raptor_uri_compare(raptor_uri* uri1, raptor_uri* uri2); | |||
RAPTOR_API | RAPTOR_API RAPTOR_V1 | |||
raptor_uri* raptor_uri_copy(raptor_uri *uri); | raptor_uri* raptor_uri_copy(raptor_uri *uri); | |||
RAPTOR_API | RAPTOR_API RAPTOR_V1 | |||
unsigned char* raptor_uri_as_string(raptor_uri *uri); | unsigned char* raptor_uri_as_string(raptor_uri *uri); | |||
RAPTOR_API | RAPTOR_API RAPTOR_V1 | |||
unsigned char* raptor_uri_as_counted_string(raptor_uri *uri, size_t* len_p) ; | unsigned char* raptor_uri_as_counted_string(raptor_uri *uri, size_t* len_p) ; | |||
#endif | ||||
#ifdef RAPTOR_V2_AVAILABLE | ||||
RAPTOR_API | ||||
raptor_uri* raptor_new_uri_v2(raptor_world* world, const unsigned char *uri | ||||
_string); | ||||
RAPTOR_API | ||||
raptor_uri* raptor_new_uri_from_uri_local_name_v2(raptor_world* world, rapt | ||||
or_uri *uri, const unsigned char *local_name); | ||||
RAPTOR_API | ||||
raptor_uri* raptor_new_uri_relative_to_base_v2(raptor_world* world, raptor_ | ||||
uri *base_uri, const unsigned char *uri_string); | ||||
RAPTOR_API | ||||
raptor_uri* raptor_new_uri_from_id_v2(raptor_world* world, raptor_uri *base | ||||
_uri, const unsigned char *id); | ||||
RAPTOR_API | ||||
raptor_uri* raptor_new_uri_for_rdf_concept_v2(raptor_world* world, const ch | ||||
ar *name); | ||||
RAPTOR_API | ||||
void raptor_free_uri_v2(raptor_world* world, raptor_uri *uri); | ||||
RAPTOR_API | ||||
int raptor_uri_equals_v2(raptor_world* world, raptor_uri* uri1, raptor_uri* | ||||
uri2); | ||||
RAPTOR_API | ||||
int raptor_uri_compare_v2(raptor_world* world, raptor_uri* uri1, raptor_uri | ||||
* uri2); | ||||
RAPTOR_API | ||||
raptor_uri* raptor_uri_copy_v2(raptor_world* world, raptor_uri *uri); | ||||
RAPTOR_API | ||||
unsigned char* raptor_uri_as_string_v2(raptor_world* world, raptor_uri *uri | ||||
); | ||||
RAPTOR_API | ||||
unsigned char* raptor_uri_as_counted_string_v2(raptor_world* world, raptor_ | ||||
uri *uri, size_t* len_p); | ||||
#endif | ||||
/* Make an xml:base-compatible URI from an existing one */ | /* Make an xml:base-compatible URI from an existing one */ | |||
RAPTOR_API | #ifndef RAPTOR_DISABLE_V1 | |||
RAPTOR_API RAPTOR_V1 | ||||
raptor_uri* raptor_new_uri_for_xmlbase(raptor_uri* old_uri); | raptor_uri* raptor_new_uri_for_xmlbase(raptor_uri* old_uri); | |||
/* Make a URI suitable for retrieval (no fragment, has path) from an existi | #endif | |||
ng one */ | #ifdef RAPTOR_V2_AVAILABLE | |||
RAPTOR_API | RAPTOR_API | |||
raptor_uri* raptor_new_uri_for_xmlbase_v2(raptor_world* world, raptor_uri* | ||||
old_uri); | ||||
#endif | ||||
/* Make a URI suitable for retrieval (no fragment, has path) from an existi | ||||
ng one */ | ||||
#ifndef RAPTOR_DISABLE_V1 | ||||
RAPTOR_API RAPTOR_V1 | ||||
raptor_uri* raptor_new_uri_for_retrieval(raptor_uri* old_uri); | raptor_uri* raptor_new_uri_for_retrieval(raptor_uri* old_uri); | |||
#endif | ||||
#ifdef RAPTOR_V2_AVAILABLE | ||||
RAPTOR_API | ||||
raptor_uri* raptor_new_uri_for_retrieval_v2(raptor_world* world, raptor_uri | ||||
* old_uri); | ||||
#endif | ||||
/* Identifier functions */ | /* Identifier functions */ | |||
RAPTOR_API | #ifndef RAPTOR_DISABLE_V1 | |||
RAPTOR_API RAPTOR_V1 | ||||
raptor_identifier* raptor_new_identifier(raptor_identifier_type type, rapto r_uri *uri, raptor_uri_source uri_source, const unsigned char *id, const un signed char *literal, raptor_uri *literal_datatype, const unsigned char *li teral_language); | raptor_identifier* raptor_new_identifier(raptor_identifier_type type, rapto r_uri *uri, raptor_uri_source uri_source, const unsigned char *id, const un signed char *literal, raptor_uri *literal_datatype, const unsigned char *li teral_language); | |||
#endif | ||||
#ifdef RAPTOR_V2_AVAILABLE | ||||
RAPTOR_API | ||||
raptor_identifier* raptor_new_identifier_v2(raptor_world* world, raptor_ide | ||||
ntifier_type type, raptor_uri *uri, raptor_uri_source uri_source, const uns | ||||
igned char *id, const unsigned char *literal, raptor_uri *literal_datatype, | ||||
const unsigned char *literal_language); | ||||
#endif | ||||
RAPTOR_API | RAPTOR_API | |||
int raptor_copy_identifier(raptor_identifier *dest, raptor_identifier *src) ; | int raptor_copy_identifier(raptor_identifier *dest, raptor_identifier *src) ; | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_free_identifier(raptor_identifier *identifier); | void raptor_free_identifier(raptor_identifier *identifier); | |||
/* Utility functions */ | /* Utility functions */ | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_print_ntriples_string(FILE *stream, const unsigned char *string, const char delim); | int raptor_print_ntriples_string(FILE *stream, const unsigned char *string, const char delim); | |||
#ifndef RAPTOR_DISABLE_DEPRECATED | #ifndef RAPTOR_DISABLE_DEPRECATED | |||
RAPTOR_API RAPTOR_DEPRECATED | RAPTOR_API RAPTOR_DEPRECATED | |||
skipping to change at line 1011 | skipping to change at line 1225 | |||
const char* raptor_ntriples_term_as_string(raptor_ntriples_term_type term); | const char* raptor_ntriples_term_as_string(raptor_ntriples_term_type term); | |||
#endif | #endif | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_iostream_write_string_ntriples(raptor_iostream *iostr, const uns igned char *string, size_t len, const char delim); | int raptor_iostream_write_string_ntriples(raptor_iostream *iostr, const uns igned char *string, size_t len, const char delim); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_iostream_write_string_python(raptor_iostream *iostr, const unsig ned char *string, size_t len, const char delim, int flags); | int raptor_iostream_write_string_python(raptor_iostream *iostr, const unsig ned char *string, size_t len, const char delim, int flags); | |||
#ifndef RAPTOR_DISABLE_DEPRECATED | #ifndef RAPTOR_DISABLE_DEPRECATED | |||
RAPTOR_API RAPTOR_DEPRECATED | RAPTOR_API RAPTOR_DEPRECATED | |||
void raptor_iostream_write_string_turtle(raptor_iostream *iostr, const unsi gned char *string, size_t len); | void raptor_iostream_write_string_turtle(raptor_iostream *iostr, const unsi gned char *string, size_t len); | |||
#endif | #endif | |||
RAPTOR_API | #ifndef RAPTOR_DISABLE_V1 | |||
RAPTOR_API RAPTOR_V1 | ||||
void raptor_iostream_write_statement_ntriples(raptor_iostream* iostr, const raptor_statement *statement); | void raptor_iostream_write_statement_ntriples(raptor_iostream* iostr, const raptor_statement *statement); | |||
RAPTOR_API | RAPTOR_API | |||
#endif | ||||
#ifdef RAPTOR_V2_AVAILABLE | ||||
void raptor_iostream_write_statement_ntriples_v2(raptor_world* world, rapto | ||||
r_iostream* iostr, const raptor_statement *statement); | ||||
#endif | ||||
RAPTOR_API | ||||
int raptor_xml_any_escape_string(const unsigned char *string, size_t len, u nsigned char *buffer, size_t length, char quote, int xml_version, raptor_si mple_message_handler error_handler, void *error_data); | int raptor_xml_any_escape_string(const unsigned char *string, size_t len, u nsigned char *buffer, size_t length, char quote, int xml_version, raptor_si mple_message_handler error_handler, void *error_data); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_iostream_write_xml_any_escaped_string(raptor_iostream* iostr, co nst unsigned char *string, size_t len, char quote, int xml_version, raptor_ simple_message_handler error_handler, void *error_data); | int raptor_iostream_write_xml_any_escaped_string(raptor_iostream* iostr, co nst unsigned char *string, size_t len, char quote, int xml_version, raptor_ simple_message_handler error_handler, void *error_data); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_xml_escape_string(const unsigned char *string, size_t len, unsig ned char *buffer, size_t length, char quote, raptor_simple_message_handler error_handler, void *error_data); | int raptor_xml_escape_string(const unsigned char *string, size_t len, unsig ned char *buffer, size_t length, char quote, raptor_simple_message_handler error_handler, void *error_data); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_iostream_write_xml_escaped_string(raptor_iostream* iostr, const unsigned char *string, size_t len, char quote, raptor_simple_message_handle r error_handler, void *error_data); | int raptor_iostream_write_xml_escaped_string(raptor_iostream* iostr, const unsigned char *string, size_t len, char quote, raptor_simple_message_handle r error_handler, void *error_data); | |||
RAPTOR_API | RAPTOR_API | |||
char* raptor_vsnprintf(const char *message, va_list arguments) RAPTOR_PRINT F_FORMAT(1, 0); | char* raptor_vsnprintf(const char *message, va_list arguments) RAPTOR_PRINT F_FORMAT(1, 0); | |||
skipping to change at line 1045 | skipping to change at line 1265 | |||
RAPTOR_API | RAPTOR_API | |||
char *raptor_uri_uri_string_to_filename(const unsigned char *uri_string); | char *raptor_uri_uri_string_to_filename(const unsigned char *uri_string); | |||
RAPTOR_API | RAPTOR_API | |||
char *raptor_uri_uri_string_to_filename_fragment(const unsigned char *uri_s tring, unsigned char **fragment_p); | char *raptor_uri_uri_string_to_filename_fragment(const unsigned char *uri_s tring, unsigned char **fragment_p); | |||
#ifndef RAPTOR_DISABLE_DEPRECATED | #ifndef RAPTOR_DISABLE_DEPRECATED | |||
RAPTOR_API RAPTOR_DEPRECATED | RAPTOR_API RAPTOR_DEPRECATED | |||
int raptor_uri_is_file_uri(const unsigned char* uri_string); | int raptor_uri_is_file_uri(const unsigned char* uri_string); | |||
#endif | #endif | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_uri_uri_string_is_file_uri(const unsigned char* uri_string); | int raptor_uri_uri_string_is_file_uri(const unsigned char* uri_string); | |||
RAPTOR_API | #ifndef RAPTOR_DISABLE_V1 | |||
RAPTOR_API RAPTOR_V1 | ||||
unsigned char* raptor_uri_to_relative_counted_uri_string(raptor_uri *base_u ri, raptor_uri *reference_uri, size_t *length_p); | unsigned char* raptor_uri_to_relative_counted_uri_string(raptor_uri *base_u ri, raptor_uri *reference_uri, size_t *length_p); | |||
RAPTOR_API | RAPTOR_API RAPTOR_V1 | |||
unsigned char* raptor_uri_to_relative_uri_string(raptor_uri *base_uri, rap tor_uri *reference_uri); | unsigned char* raptor_uri_to_relative_uri_string(raptor_uri *base_uri, rap tor_uri *reference_uri); | |||
RAPTOR_API | RAPTOR_API RAPTOR_V1 | |||
void raptor_uri_print(const raptor_uri* uri, FILE *stream); | void raptor_uri_print(const raptor_uri* uri, FILE *stream); | |||
RAPTOR_API | RAPTOR_API RAPTOR_V1 | |||
unsigned char* raptor_uri_to_counted_string(raptor_uri *uri, size_t *len_p) ; | unsigned char* raptor_uri_to_counted_string(raptor_uri *uri, size_t *len_p) ; | |||
RAPTOR_API | RAPTOR_API RAPTOR_V1 | |||
unsigned char* raptor_uri_to_string(raptor_uri *uri); | unsigned char* raptor_uri_to_string(raptor_uri *uri); | |||
RAPTOR_API RAPTOR_V1 | ||||
void raptor_uri_set_handler(const raptor_uri_handler *handler, void *contex | ||||
t); | ||||
RAPTOR_API RAPTOR_V1 | ||||
void raptor_uri_get_handler(const raptor_uri_handler **handler, void **cont | ||||
ext); | ||||
#endif | ||||
#ifdef RAPTOR_V2_AVAILABLE | ||||
RAPTOR_API | ||||
unsigned char* raptor_uri_to_relative_counted_uri_string_v2(raptor_world* w | ||||
orld, raptor_uri *base_uri, raptor_uri *reference_uri, size_t *length_p); | ||||
RAPTOR_API | ||||
unsigned char* raptor_uri_to_relative_uri_string_v2(raptor_world* world, ra | ||||
ptor_uri *base_uri, raptor_uri *reference_uri); | ||||
RAPTOR_API | RAPTOR_API | |||
void raptor_uri_set_handler(const raptor_uri_handler *handler, void *contex t); | void raptor_uri_print_v2(raptor_world* world, const raptor_uri* uri, FILE * stream); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_uri_get_handler(const raptor_uri_handler **handler, void **cont | unsigned char* raptor_uri_to_counted_string_v2(raptor_world* world, raptor_ | |||
ext); | uri *uri, size_t *len_p); | |||
RAPTOR_API | ||||
unsigned char* raptor_uri_to_string_v2(raptor_world* world, raptor_uri *uri | ||||
); | ||||
RAPTOR_API | ||||
void raptor_uri_set_handler_v2(raptor_world* world, const raptor_uri_handle | ||||
r *handler, void *context); | ||||
RAPTOR_API | ||||
void raptor_uri_get_handler_v2(raptor_world* world, const raptor_uri_handle | ||||
r **handler, void **context); | ||||
#endif | ||||
/** | /** | |||
* RAPTOR_RDF_MS_URI: | * RAPTOR_RDF_MS_URI: | |||
* | * | |||
* RDF Namespace URI (rdf:). | * RDF Namespace URI (rdf:). | |||
* | * | |||
* Copy with raptor_uri_copy() to use. | * Copy with raptor_uri_copy() to use. | |||
*/ | */ | |||
#define RAPTOR_RDF_MS_URI raptor_rdf_namespace_uri | #define RAPTOR_RDF_MS_URI raptor_rdf_namespace_uri | |||
skipping to change at line 1098 | skipping to change at line 1337 | |||
/** | /** | |||
* RAPTOR_OWL_URI: | * RAPTOR_OWL_URI: | |||
* | * | |||
* OWL Namespace URI (owl:). | * OWL Namespace URI (owl:). | |||
* | * | |||
* Copy with raptor_uri_copy() to use. | * Copy with raptor_uri_copy() to use. | |||
*/ | */ | |||
#define RAPTOR_OWL_URI raptor_owl_namespace_uri | #define RAPTOR_OWL_URI raptor_owl_namespace_uri | |||
/* raptor_www */ | /* raptor_www */ | |||
RAPTOR_API | #ifndef RAPOR_DISABLE_V1 | |||
RAPTOR_API RAPTOR_V1 | ||||
void raptor_www_init(void); | void raptor_www_init(void); | |||
RAPTOR_API | RAPTOR_API RAPTOR_V1 | |||
void raptor_www_finish(void); | void raptor_www_finish(void); | |||
RAPTOR_API RAPTOR_V1 | ||||
RAPTOR_API | ||||
void raptor_www_no_www_library_init_finish(void); | void raptor_www_no_www_library_init_finish(void); | |||
#endif | ||||
#ifdef RAPTOR_V2_AVAILABLE | ||||
RAPTOR_API | RAPTOR_API | |||
raptor_www *raptor_www_new(void); | int raptor_www_init_v2(raptor_world* world); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_www_finish_v2(raptor_world* world); | ||||
RAPTOR_API | ||||
void raptor_www_no_www_library_init_finish_v2(raptor_world* world); | ||||
#endif | ||||
#ifndef RAPTOR_DISABLE_V1 | ||||
RAPTOR_API RAPTOR_V1 | ||||
raptor_www *raptor_www_new(void); | ||||
RAPTOR_API RAPTOR_V1 | ||||
raptor_www *raptor_www_new_with_connection(void* connection); | raptor_www *raptor_www_new_with_connection(void* connection); | |||
#endif | ||||
#ifdef RAPTOR_V2_AVAILABLE | ||||
RAPTOR_API | ||||
raptor_www *raptor_www_new_v2(raptor_world* world); | ||||
RAPTOR_API | ||||
raptor_www *raptor_www_new_with_connection_v2(raptor_world* world, void* co | ||||
nnection); | ||||
#endif | ||||
RAPTOR_API | RAPTOR_API | |||
void raptor_www_free(raptor_www *www); | void raptor_www_free(raptor_www *www); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_www_set_user_agent(raptor_www *www, const char *user_agent); | void raptor_www_set_user_agent(raptor_www *www, const char *user_agent); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_www_set_proxy(raptor_www *www, const char *proxy); | void raptor_www_set_proxy(raptor_www *www, const char *proxy); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_www_set_http_accept(raptor_www *www, const char *value); | void raptor_www_set_http_accept(raptor_www *www, const char *value); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_www_set_write_bytes_handler(raptor_www *www, raptor_www_write_b ytes_handler handler, void *user_data); | void raptor_www_set_write_bytes_handler(raptor_www *www, raptor_www_write_b ytes_handler handler, void *user_data); | |||
skipping to change at line 1146 | skipping to change at line 1402 | |||
RAPTOR_API | RAPTOR_API | |||
void* raptor_www_get_connection(raptor_www *www); | void* raptor_www_get_connection(raptor_www *www); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_www_abort(raptor_www *www, const char *reason); | void raptor_www_abort(raptor_www *www, const char *reason); | |||
RAPTOR_API | RAPTOR_API | |||
raptor_uri* raptor_www_get_final_uri(raptor_www* www); | raptor_uri* raptor_www_get_final_uri(raptor_www* www); | |||
/* raptor_qname - XML qnames */ | /* raptor_qname - XML qnames */ | |||
RAPTOR_API | RAPTOR_API | |||
raptor_qname* raptor_new_qname(raptor_namespace_stack *nstack, const unsign ed char *name, const unsigned char *value, raptor_simple_message_handler er ror_handler, void *error_data); | raptor_qname* raptor_new_qname(raptor_namespace_stack *nstack, const unsign ed char *name, const unsigned char *value, raptor_simple_message_handler er ror_handler, void *error_data); | |||
RAPTOR_API | #ifndef RAPTOR_DISABLE_V1 | |||
RAPTOR_API RAPTOR_V1 | ||||
raptor_qname* raptor_new_qname_from_namespace_local_name(raptor_namespace * ns, const unsigned char *local_name, const unsigned char *value); | raptor_qname* raptor_new_qname_from_namespace_local_name(raptor_namespace * ns, const unsigned char *local_name, const unsigned char *value); | |||
#endif | ||||
#ifdef RAPTOR_V2_AVAILABLE | ||||
RAPTOR_API | ||||
raptor_qname* raptor_new_qname_from_namespace_local_name_v2(raptor_world* w | ||||
orld, raptor_namespace *ns, const unsigned char *local_name, const unsigned | ||||
char *value); | ||||
#endif | ||||
RAPTOR_API | RAPTOR_API | |||
raptor_qname* raptor_qname_copy(raptor_qname *qname); | raptor_qname* raptor_qname_copy(raptor_qname *qname); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_free_qname(raptor_qname* name); | void raptor_free_qname(raptor_qname* name); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_qname_equal(raptor_qname *name1, raptor_qname *name2); | int raptor_qname_equal(raptor_qname *name1, raptor_qname *name2); | |||
/* utility function */ | /* utility function */ | |||
RAPTOR_API | RAPTOR_API | |||
raptor_uri* raptor_qname_string_to_uri(raptor_namespace_stack *nstack, con st unsigned char *name, size_t name_len, raptor_simple_message_handler erro r_handler, void *error_data); | raptor_uri* raptor_qname_string_to_uri(raptor_namespace_stack *nstack, con st unsigned char *name, size_t name_len, raptor_simple_message_handler erro r_handler, void *error_data); | |||
RAPTOR_API | RAPTOR_API | |||
skipping to change at line 1173 | skipping to change at line 1435 | |||
RAPTOR_API | RAPTOR_API | |||
const unsigned char* raptor_qname_get_local_name(raptor_qname* name); | const unsigned char* raptor_qname_get_local_name(raptor_qname* name); | |||
RAPTOR_API | RAPTOR_API | |||
const unsigned char* raptor_qname_get_value(raptor_qname* name); | const unsigned char* raptor_qname_get_value(raptor_qname* name); | |||
RAPTOR_API | RAPTOR_API | |||
const unsigned char* raptor_qname_get_counted_value(raptor_qname* name, siz e_t* length_p); | const unsigned char* raptor_qname_get_counted_value(raptor_qname* name, siz e_t* length_p); | |||
/* raptor_namespace_stack - stack of XML namespaces */ | /* raptor_namespace_stack - stack of XML namespaces */ | |||
RAPTOR_API | RAPTOR_API | |||
raptor_namespace* raptor_new_namespace_from_uri(raptor_namespace_stack *nst ack, const unsigned char *prefix, raptor_uri* ns_uri, int depth); | raptor_namespace* raptor_new_namespace_from_uri(raptor_namespace_stack *nst ack, const unsigned char *prefix, raptor_uri* ns_uri, int depth); | |||
RAPTOR_API | #ifndef RAPTOR_DISABLE_V1 | |||
RAPTOR_API RAPTOR_V1 | ||||
raptor_namespace_stack* raptor_new_namespaces(const raptor_uri_handler *uri _handler, void *uri_context, raptor_simple_message_handler error_handler, v oid *error_data, int defaults); | raptor_namespace_stack* raptor_new_namespaces(const raptor_uri_handler *uri _handler, void *uri_context, raptor_simple_message_handler error_handler, v oid *error_data, int defaults); | |||
RAPTOR_API RAPTOR_V1 | ||||
RAPTOR_API | ||||
int raptor_namespaces_init(raptor_namespace_stack *nstack, const raptor_uri _handler *uri_handler, void *uri_context, raptor_simple_message_handler err or_handler, void *error_data, int defaults); | int raptor_namespaces_init(raptor_namespace_stack *nstack, const raptor_uri _handler *uri_handler, void *uri_context, raptor_simple_message_handler err or_handler, void *error_data, int defaults); | |||
#endif | ||||
#ifdef RAPTOR_V2_AVAILABLE | ||||
RAPTOR_API | ||||
raptor_namespace_stack* raptor_new_namespaces_v2(raptor_world* world, rapto | ||||
r_simple_message_handler error_handler, void *error_data, int defaults); | ||||
RAPTOR_API | ||||
int raptor_namespaces_init_v2(raptor_world* world, raptor_namespace_stack * | ||||
nstack, raptor_simple_message_handler error_handler, void *error_data, int | ||||
defaults); | ||||
#endif | ||||
RAPTOR_API | RAPTOR_API | |||
void raptor_namespaces_clear(raptor_namespace_stack *nstack); | void raptor_namespaces_clear(raptor_namespace_stack *nstack); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_free_namespaces(raptor_namespace_stack *nstack); | void raptor_free_namespaces(raptor_namespace_stack *nstack); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_namespaces_start_namespace(raptor_namespace_stack *nstack, rapt or_namespace *nspace); | void raptor_namespaces_start_namespace(raptor_namespace_stack *nstack, rapt or_namespace *nspace); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_namespaces_start_namespace_full(raptor_namespace_stack *nstack, const unsigned char *prefix, const unsigned char *ns_uri_string, int depth) ; | int raptor_namespaces_start_namespace_full(raptor_namespace_stack *nstack, const unsigned char *prefix, const unsigned char *ns_uri_string, int depth) ; | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_namespaces_end_for_depth(raptor_namespace_stack *nstack, int de pth); | void raptor_namespaces_end_for_depth(raptor_namespace_stack *nstack, int de pth); | |||
skipping to change at line 1243 | skipping to change at line 1512 | |||
/** | /** | |||
* raptor_sequence_free_handler: | * raptor_sequence_free_handler: | |||
* @object: object to free | * @object: object to free | |||
* | * | |||
* Handler function for freeing a sequence item. | * Handler function for freeing a sequence item. | |||
* | * | |||
* Set by raptor_new_sequence(). | * Set by raptor_new_sequence(). | |||
*/ | */ | |||
typedef void (raptor_sequence_free_handler(void* object)); | typedef void (raptor_sequence_free_handler(void* object)); | |||
#ifdef RAPTOR_V2_AVAILABLE | ||||
/** | ||||
* raptor_sequence_free_handler_v2: | ||||
* @context: context data for the free handler | ||||
* @object: object to free | ||||
* | ||||
* Handler function for freeing a sequence item. | ||||
* | ||||
* Set by raptor_new_sequence_v2(). | ||||
*/ | ||||
typedef void (raptor_sequence_free_handler_v2(void* context, void* object)) | ||||
; | ||||
#endif | ||||
/** | /** | |||
* raptor_sequence_print_handler: | * raptor_sequence_print_handler: | |||
* @object: object to print | * @object: object to print | |||
* @fh: FILE* to print to | * @fh: FILE* to print to | |||
* | * | |||
* Handler function for printing a sequence item. | * Handler function for printing a sequence item. | |||
* | * | |||
* Set by raptor_new_sequence() or raptor_sequence_set_print_handler(). | * Set by raptor_new_sequence() or raptor_sequence_set_print_handler(). | |||
*/ | */ | |||
typedef void (raptor_sequence_print_handler(void *object, FILE *fh)); | typedef void (raptor_sequence_print_handler(void *object, FILE *fh)); | |||
#ifdef RAPTOR_V2_AVAILABLE | ||||
/** | ||||
* raptor_sequence_print_handler_v2: | ||||
* @context: context data for the print handler | ||||
* @object: object to print | ||||
* @fh: FILE* to print to | ||||
* | ||||
* Handler function for printing a sequence item. | ||||
* | ||||
* Set by raptor_new_sequence_v2() or raptor_sequence_set_print_handler_v2( | ||||
). | ||||
*/ | ||||
typedef void (raptor_sequence_print_handler_v2(void *context, void *object, | ||||
FILE *fh)); | ||||
#endif | ||||
/* Create */ | /* Create */ | |||
RAPTOR_API | RAPTOR_API | |||
raptor_sequence* raptor_new_sequence(raptor_sequence_free_handler* free_han dler, raptor_sequence_print_handler* print_handler); | raptor_sequence* raptor_new_sequence(raptor_sequence_free_handler* free_han dler, raptor_sequence_print_handler* print_handler); | |||
#ifdef RAPTOR_V2_AVAILABLE | ||||
RAPTOR_API | ||||
raptor_sequence* raptor_new_sequence_v2(raptor_sequence_free_handler_v2* fr | ||||
ee_handler, raptor_sequence_print_handler_v2* print_handler, void* handler_ | ||||
context); | ||||
#endif | ||||
/* Destroy */ | /* Destroy */ | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_free_sequence(raptor_sequence* seq); | void raptor_free_sequence(raptor_sequence* seq); | |||
/* Methods */ | /* Methods */ | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_sequence_size(raptor_sequence* seq); | int raptor_sequence_size(raptor_sequence* seq); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_sequence_set_at(raptor_sequence* seq, int idx, void *data); | int raptor_sequence_set_at(raptor_sequence* seq, int idx, void *data); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_sequence_push(raptor_sequence* seq, void *data); | int raptor_sequence_push(raptor_sequence* seq, void *data); | |||
skipping to change at line 1287 | skipping to change at line 1588 | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_compare_strings(const void *a, const void *b); | int raptor_compare_strings(const void *a, const void *b); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_sequence_sort(raptor_sequence* seq, int(*compare)(const void *, const void *)); | void raptor_sequence_sort(raptor_sequence* seq, int(*compare)(const void *, const void *)); | |||
/* helper for printing sequences of strings */ | /* helper for printing sequences of strings */ | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_sequence_print_string(char *data, FILE *fh); | void raptor_sequence_print_string(char *data, FILE *fh); | |||
RAPTOR_API | RAPTOR_API RAPTOR_DEPRECATED | |||
void raptor_sequence_print_uri(char *data, FILE *fh); | void raptor_sequence_print_uri(char *data, FILE *fh); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_sequence_set_print_handler(raptor_sequence *seq, raptor_sequenc e_print_handler *print_handler); | void raptor_sequence_set_print_handler(raptor_sequence *seq, raptor_sequenc e_print_handler *print_handler); | |||
#ifdef RAPTOR_V2_AVAILABLE | ||||
RAPTOR_API | ||||
void raptor_sequence_set_print_handler_v2(raptor_sequence *seq, raptor_sequ | ||||
ence_print_handler_v2 *print_handler); | ||||
#endif | ||||
RAPTOR_API | RAPTOR_API | |||
void raptor_sequence_print(raptor_sequence* seq, FILE* fh); | void raptor_sequence_print(raptor_sequence* seq, FILE* fh); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_sequence_join(raptor_sequence* dest, raptor_sequence *src); | int raptor_sequence_join(raptor_sequence* dest, raptor_sequence *src); | |||
/* Unicode and UTF8 */ | /* Unicode and UTF8 */ | |||
/** | /** | |||
* raptor_unichar: | * raptor_unichar: | |||
* | * | |||
skipping to change at line 1516 | skipping to change at line 1821 | |||
size_t raptor_iostream_get_bytes_written_count(raptor_iostream *iostr); | size_t raptor_iostream_get_bytes_written_count(raptor_iostream *iostr); | |||
#endif | #endif | |||
RAPTOR_API | RAPTOR_API | |||
unsigned long raptor_iostream_tell(raptor_iostream *iostr); | unsigned long raptor_iostream_tell(raptor_iostream *iostr); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_iostream_write_decimal(raptor_iostream* iostr, int integer); | int raptor_iostream_write_decimal(raptor_iostream* iostr, int integer); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_iostream_format_hexadecimal(raptor_iostream* iostr, unsigned int integer, int width); | int raptor_iostream_format_hexadecimal(raptor_iostream* iostr, unsigned int integer, int width); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_iostream_write_stringbuffer(raptor_iostream* iostr, raptor_strin gbuffer *sb); | int raptor_iostream_write_stringbuffer(raptor_iostream* iostr, raptor_strin gbuffer *sb); | |||
RAPTOR_API | #ifndef RAPTOR_DISABLE_V1 | |||
RAPTOR_API RAPTOR_V1 | ||||
int raptor_iostream_write_uri(raptor_iostream *iostr, raptor_uri *uri); | int raptor_iostream_write_uri(raptor_iostream *iostr, raptor_uri *uri); | |||
#endif | ||||
#ifdef RAPTOR_V2_AVAILABLE | ||||
RAPTOR_API | ||||
int raptor_iostream_write_uri_v2(raptor_world* world, raptor_iostream *iost | ||||
r, raptor_uri *uri); | ||||
#endif | ||||
RAPTOR_API | RAPTOR_API | |||
int raptor_iostream_read_bytes(raptor_iostream* iostr, void *ptr, size_t si ze, size_t nmemb); | int raptor_iostream_read_bytes(raptor_iostream* iostr, void *ptr, size_t si ze, size_t nmemb); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_iostream_read_eof(raptor_iostream *iostr); | int raptor_iostream_read_eof(raptor_iostream *iostr); | |||
/* Parser and Serializer features */ | /* Parser and Serializer features */ | |||
RAPTOR_API | #ifndef RAPTOR_DISABLE_V1 | |||
RAPTOR_API RAPTOR_V1 | ||||
raptor_feature raptor_feature_from_uri(raptor_uri *uri); | raptor_feature raptor_feature_from_uri(raptor_uri *uri); | |||
#endif | ||||
#ifdef RAPTOR_V2_AVAILABLE | ||||
RAPTOR_API | ||||
raptor_feature raptor_feature_from_uri_v2(raptor_world* world, raptor_uri * | ||||
uri); | ||||
#endif | ||||
RAPTOR_API | RAPTOR_API | |||
int raptor_feature_value_type(const raptor_feature feature); | int raptor_feature_value_type(const raptor_feature feature); | |||
/* SAX2 element Class (raptor_xml_element) */ | /* SAX2 element Class (raptor_xml_element) */ | |||
RAPTOR_API | RAPTOR_API | |||
raptor_xml_element* raptor_new_xml_element(raptor_qname* name, const unsign ed char* xml_language, raptor_uri* xml_base); | raptor_xml_element* raptor_new_xml_element(raptor_qname* name, const unsign ed char* xml_language, raptor_uri* xml_base); | |||
RAPTOR_API | RAPTOR_API | |||
raptor_xml_element* raptor_new_xml_element_from_namespace_local_name(raptor _namespace *ns, const unsigned char *name, const unsigned char *xml_languag e, raptor_uri *xml_base); | raptor_xml_element* raptor_new_xml_element_from_namespace_local_name(raptor _namespace *ns, const unsigned char *name, const unsigned char *xml_languag e, raptor_uri *xml_base); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_free_xml_element(raptor_xml_element *element); | void raptor_free_xml_element(raptor_xml_element *element); | |||
skipping to change at line 1554 | skipping to change at line 1871 | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_xml_element_declare_namespace(raptor_xml_element* xml_element, r aptor_namespace *nspace); | int raptor_xml_element_declare_namespace(raptor_xml_element* xml_element, r aptor_namespace *nspace); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_iostream_write_xml_element(raptor_iostream *iostr, raptor_xml_el ement *element, raptor_namespace_stack *nstack, int is_empty, int is_end, r aptor_simple_message_handler error_handler, void *error_data, int depth); | int raptor_iostream_write_xml_element(raptor_iostream *iostr, raptor_xml_el ement *element, raptor_namespace_stack *nstack, int is_empty, int is_end, r aptor_simple_message_handler error_handler, void *error_data, int depth); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_xml_element_is_empty(raptor_xml_element* xml_element); | int raptor_xml_element_is_empty(raptor_xml_element* xml_element); | |||
RAPTOR_API | RAPTOR_API | |||
const unsigned char* raptor_xml_element_get_language(raptor_xml_element* xm l_element); | const unsigned char* raptor_xml_element_get_language(raptor_xml_element* xm l_element); | |||
/* XML Writer Class (raptor_xml_writer) */ | /* XML Writer Class (raptor_xml_writer) */ | |||
RAPTOR_API | #ifndef RAPTOR_DISABLE_V1 | |||
RAPTOR_API RAPTOR_V1 | ||||
raptor_xml_writer* raptor_new_xml_writer(raptor_namespace_stack *nstack, co nst raptor_uri_handler *uri_handler, void *uri_context, raptor_iostream* io str, raptor_simple_message_handler error_handler, void *error_data, int can onicalize); | raptor_xml_writer* raptor_new_xml_writer(raptor_namespace_stack *nstack, co nst raptor_uri_handler *uri_handler, void *uri_context, raptor_iostream* io str, raptor_simple_message_handler error_handler, void *error_data, int can onicalize); | |||
#endif | ||||
#ifdef RAPTOR_V2_AVAILABLE | ||||
RAPTOR_API | ||||
raptor_xml_writer* raptor_new_xml_writer_v2(raptor_world* world, raptor_nam | ||||
espace_stack *nstack, raptor_iostream* iostr, raptor_simple_message_handler | ||||
error_handler, void *error_data, int canonicalize); | ||||
#endif | ||||
RAPTOR_API | RAPTOR_API | |||
void raptor_free_xml_writer(raptor_xml_writer* xml_writer); | void raptor_free_xml_writer(raptor_xml_writer* xml_writer); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_xml_writer_empty_element(raptor_xml_writer* xml_writer, raptor_ xml_element *element); | void raptor_xml_writer_empty_element(raptor_xml_writer* xml_writer, raptor_ xml_element *element); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_xml_writer_start_element(raptor_xml_writer* xml_writer, raptor_ xml_element *element); | void raptor_xml_writer_start_element(raptor_xml_writer* xml_writer, raptor_ xml_element *element); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_xml_writer_end_element(raptor_xml_writer* xml_writer, raptor_xm l_element *element); | void raptor_xml_writer_end_element(raptor_xml_writer* xml_writer, raptor_xm l_element *element); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_xml_writer_newline(raptor_xml_writer* xml_writer); | void raptor_xml_writer_newline(raptor_xml_writer* xml_writer); | |||
skipping to change at line 1580 | skipping to change at line 1903 | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_xml_writer_raw(raptor_xml_writer* xml_writer, const unsigned ch ar *s); | void raptor_xml_writer_raw(raptor_xml_writer* xml_writer, const unsigned ch ar *s); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_xml_writer_raw_counted(raptor_xml_writer* xml_writer, const uns igned char *s, unsigned int len); | void raptor_xml_writer_raw_counted(raptor_xml_writer* xml_writer, const uns igned char *s, unsigned int len); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_xml_writer_comment(raptor_xml_writer* xml_writer, const unsigne d char *s); | void raptor_xml_writer_comment(raptor_xml_writer* xml_writer, const unsigne d char *s); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_xml_writer_comment_counted(raptor_xml_writer* xml_writer, const unsigned char *s, unsigned int len); | void raptor_xml_writer_comment_counted(raptor_xml_writer* xml_writer, const unsigned char *s, unsigned int len); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_xml_writer_flush(raptor_xml_writer* xml_writer); | void raptor_xml_writer_flush(raptor_xml_writer* xml_writer); | |||
RAPTOR_API | #ifndef RAPTOR_DISABLE_V1 | |||
RAPTOR_API RAPTOR_V1 | ||||
int raptor_xml_writer_features_enumerate(const raptor_feature feature, cons t char **name, raptor_uri **uri, const char **label); | int raptor_xml_writer_features_enumerate(const raptor_feature feature, cons t char **name, raptor_uri **uri, const char **label); | |||
#endif | ||||
#ifdef RAPTOR_V2_AVAILABLE | ||||
RAPTOR_API | ||||
int raptor_xml_writer_features_enumerate_v2(raptor_world* world, const rapt | ||||
or_feature feature, const char **name, raptor_uri **uri, const char **labe | ||||
l); | ||||
#endif | ||||
RAPTOR_API | RAPTOR_API | |||
int raptor_xml_writer_set_feature(raptor_xml_writer *xml_writer, raptor_fea ture feature, int value); | int raptor_xml_writer_set_feature(raptor_xml_writer *xml_writer, raptor_fea ture feature, int value); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_xml_writer_set_feature_string(raptor_xml_writer *xml_writer, rap tor_feature feature, const unsigned char *value); | int raptor_xml_writer_set_feature_string(raptor_xml_writer *xml_writer, rap tor_feature feature, const unsigned char *value); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_xml_writer_get_feature(raptor_xml_writer *xml_writer, raptor_fea ture feature); | int raptor_xml_writer_get_feature(raptor_xml_writer *xml_writer, raptor_fea ture feature); | |||
RAPTOR_API | RAPTOR_API | |||
const unsigned char *raptor_xml_writer_get_feature_string(raptor_xml_writer *xml_writer, raptor_feature feature); | const unsigned char *raptor_xml_writer_get_feature_string(raptor_xml_writer *xml_writer, raptor_feature feature); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_xml_writer_get_depth(raptor_xml_writer *xml_writer); | int raptor_xml_writer_get_depth(raptor_xml_writer *xml_writer); | |||
skipping to change at line 1686 | skipping to change at line 2015 | |||
* @RAPTOR_LOG_LEVEL_WARNING: Warning message | * @RAPTOR_LOG_LEVEL_WARNING: Warning message | |||
* @RAPTOR_LOG_LEVEL_LAST: Internal | * @RAPTOR_LOG_LEVEL_LAST: Internal | |||
* | * | |||
* Log levels | * Log levels | |||
*/ | */ | |||
typedef enum { | typedef enum { | |||
RAPTOR_LOG_LEVEL_NONE, | RAPTOR_LOG_LEVEL_NONE, | |||
RAPTOR_LOG_LEVEL_FATAL, | RAPTOR_LOG_LEVEL_FATAL, | |||
RAPTOR_LOG_LEVEL_ERROR, | RAPTOR_LOG_LEVEL_ERROR, | |||
RAPTOR_LOG_LEVEL_WARNING, | RAPTOR_LOG_LEVEL_WARNING, | |||
/* RAPTOR V2 FIXME - this enum list cannot be extended before V2 | ||||
* API is released else binary compatibility will be broken in the | ||||
* #raptor_error_handlers structure - it causes an array to grow. | ||||
*/ | ||||
RAPTOR_LOG_LEVEL_LAST=RAPTOR_LOG_LEVEL_WARNING | RAPTOR_LOG_LEVEL_LAST=RAPTOR_LOG_LEVEL_WARNING | |||
} raptor_log_level; | } raptor_log_level; | |||
/** | /** | |||
* raptor_error_handlers: | * raptor_error_handlers: | |||
* @magic: magic value - must use raptor_error_handlers_init() to set this | * @magic: magic value - must use raptor_error_handlers_init() to set this | |||
* @locator: raptor locator of the error | * @locator: raptor locator of the error | |||
* @last_log_level: number of log levels; size of @handlers arrays | * @last_log_level: number of log levels; size of @handlers arrays | |||
* @handlers: user handlers per log level | * @handlers: user handlers per log level | |||
* @world: raptor_world object | ||||
* | * | |||
* Error handlers structure | * Error handlers structure | |||
*/ | */ | |||
typedef struct { | typedef struct { | |||
unsigned int magic; | unsigned int magic; | |||
raptor_locator* locator; | raptor_locator* locator; | |||
/* size of handlers array */ | /* size of handlers array */ | |||
raptor_log_level last_log_level; | raptor_log_level last_log_level; | |||
raptor_message_handler_closure handlers[RAPTOR_LOG_LEVEL_LAST+1]; | raptor_message_handler_closure handlers[RAPTOR_LOG_LEVEL_LAST+1]; | |||
/* Raptor V2 FIXME - this should NOT be at the end of the structure | ||||
* since it prevents increasing the size of the @handlers array but | ||||
* it it is here to preserve Raptor V1 ABI. | ||||
*/ | ||||
raptor_world *world; | ||||
} raptor_error_handlers; | } raptor_error_handlers; | |||
RAPTOR_API | #ifndef RAPTOR_DISABLE_V1 | |||
RAPTOR_API RAPTOR_V1 | ||||
void raptor_error_handlers_init(raptor_error_handlers* error_handlers); | void raptor_error_handlers_init(raptor_error_handlers* error_handlers); | |||
#endif | ||||
#ifdef RAPTOR_V2_AVAILABLE | ||||
RAPTOR_API | ||||
void raptor_error_handlers_init_v2(raptor_world* world, raptor_error_handle | ||||
rs* error_handlers); | ||||
#endif | ||||
/* SAX2 API */ | /* SAX2 API */ | |||
RAPTOR_API | RAPTOR_API | |||
raptor_sax2* raptor_new_sax2(void *user_data, raptor_error_handlers* error_ handlers); | raptor_sax2* raptor_new_sax2(void *user_data, raptor_error_handlers* error_ handlers); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_free_sax2(raptor_sax2 *sax2); | void raptor_free_sax2(raptor_sax2 *sax2); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_sax2_set_start_element_handler(raptor_sax2* sax2, raptor_sax2_s tart_element_handler handler); | void raptor_sax2_set_start_element_handler(raptor_sax2* sax2, raptor_sax2_s tart_element_handler handler); | |||
RAPTOR_API | RAPTOR_API | |||
End of changes. 101 change blocks. | ||||
62 lines changed or deleted | 477 lines changed or added | |||