raptor.h   raptor.h 
/* -*- Mode: c; c-basic-offset: 2 -*- /* -*- Mode: c; c-basic-offset: 2 -*-
* *
* raptor.h - Redland Parser Toolkit for RDF (Raptor) interfaces and defini tion * raptor.h - Redland Parser Toolkit for RDF (Raptor) interfaces and defini tion
* *
* Copyright (C) 2000-2008, David Beckett http://purl.org/net/dajobe/ * Copyright (C) 2000-2008, David Beckett http://www.dajobe.org/
* Copyright (C) 2000-2005, University of Bristol, UK http://www.bristol.ac .uk/ * Copyright (C) 2000-2005, University of Bristol, UK http://www.bristol.ac .uk/
* *
* This package is Free Software and part of Redland http://librdf.org/ * This package is Free Software and part of Redland http://librdf.org/
* *
* It is licensed under the following three licenses as alternatives: * It is licensed under the following three licenses as alternatives:
* 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version
* 2. GNU General Public License (GPL) V2 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version
* 3. Apache License, V2.0 or any newer version * 3. Apache License, V2.0 or any newer version
* *
* You may not use this file except in compliance with at least one of * You may not use this file except in compliance with at least one of
skipping to change at line 368 skipping to change at line 368
* @RAPTOR_FEATURE_MICROFORMATS: Look for microformats for GRDDL parser. * @RAPTOR_FEATURE_MICROFORMATS: Look for microformats for GRDDL parser.
* @RAPTOR_FEATURE_HTML_LINK: Look for head <link> to type rdf/xml * @RAPTOR_FEATURE_HTML_LINK: Look for head <link> to type rdf/xml
* 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_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_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 406 skipping to change at line 408
RAPTOR_FEATURE_BNODE_FILL, RAPTOR_FEATURE_BNODE_FILL,
RAPTOR_FEATURE_HTML_TAG_SOUP, RAPTOR_FEATURE_HTML_TAG_SOUP,
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_LAST=RAPTOR_FEATURE_JSON_EXTRA_DATA RAPTOR_FEATURE_RSS_TRIPLES,
RAPTOR_FEATURE_ATOM_ENTRY_URI,
RAPTOR_FEATURE_LAST=RAPTOR_FEATURE_ATOM_ENTRY_URI
} 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 817 skipping to change at line 821
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 RAPTOR_API
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
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
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
RAPTOR_API RAPTOR_API
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
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
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);
RAPTOR_API RAPTOR_API
raptor_locator* raptor_get_locator(raptor_parser* rdf_parser); raptor_locator* raptor_get_locator(raptor_parser* rdf_parser);
skipping to change at line 905 skipping to change at line 911
/* Serializing */ /* Serializing */
RAPTOR_API RAPTOR_API
raptor_serializer* raptor_new_serializer(const char *name); raptor_serializer* raptor_new_serializer(const char *name);
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);
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
int raptor_serialize_start_to_string(raptor_serializer *rdf_serializer, rap tor_uri *uri, void **string_p, size_t *length_p); int raptor_serialize_start_to_string(raptor_serializer *rdf_serializer, rap tor_uri *uri, void **string_p, size_t *length_p);
RAPTOR_API RAPTOR_API
int raptor_serialize_start_to_file_handle(raptor_serializer *rdf_serializer , raptor_uri *uri, FILE *fh); int raptor_serialize_start_to_file_handle(raptor_serializer *rdf_serializer , raptor_uri *uri, FILE *fh);
RAPTOR_API RAPTOR_API
int raptor_serialize_set_namespace(raptor_serializer* rdf_serializer, rapto r_uri *uri, const unsigned char *prefix); int raptor_serialize_set_namespace(raptor_serializer* rdf_serializer, rapto r_uri *uri, const unsigned char *prefix);
RAPTOR_API RAPTOR_API
int raptor_serialize_set_namespace_from_namespace(raptor_serializer* rdf_se rializer, raptor_namespace *nspace); int raptor_serialize_set_namespace_from_namespace(raptor_serializer* rdf_se rializer, raptor_namespace *nspace);
RAPTOR_API RAPTOR_API
skipping to change at line 987 skipping to change at line 995
RAPTOR_API RAPTOR_API
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);
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
RAPTOR_API RAPTOR_DEPRECATED RAPTOR_API RAPTOR_DEPRECATED
unsigned char* raptor_ntriples_string_as_utf8_string(raptor_parser* rdf_par ser, const unsigned char *src, int len, size_t *dest_lenp); unsigned char* raptor_ntriples_string_as_utf8_string(raptor_parser* rdf_par ser, const unsigned char *src, int len, size_t *dest_lenp);
#endif
#ifndef RAPTOR_DISABLE_DEPRECATED
RAPTOR_API RAPTOR_DEPRECATED RAPTOR_API RAPTOR_DEPRECATED
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
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
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
RAPTOR_API RAPTOR_API
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
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);
skipping to change at line 1025 skipping to change at line 1039
RAPTOR_API RAPTOR_API
void raptor_uri_resolve_uri_reference(const unsigned char *base_uri, const unsigned char *reference_uri, unsigned char* buffer, size_t length); void raptor_uri_resolve_uri_reference(const unsigned char *base_uri, const unsigned char *reference_uri, unsigned char* buffer, size_t length);
/* raptor_uri.c */ /* raptor_uri.c */
RAPTOR_API RAPTOR_API
unsigned char *raptor_uri_filename_to_uri_string(const char *filename); unsigned char *raptor_uri_filename_to_uri_string(const char *filename);
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
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
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 RAPTOR_API
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
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
void raptor_uri_print(const raptor_uri* uri, FILE *stream); void raptor_uri_print(const raptor_uri* uri, FILE *stream);
RAPTOR_API RAPTOR_API
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) ;
skipping to change at line 1144 skipping to change at line 1160
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
int raptor_iostream_write_qname(raptor_iostream* iostr, raptor_qname *qname ); int raptor_iostream_write_qname(raptor_iostream* iostr, raptor_qname *qname );
RAPTOR_API RAPTOR_API
unsigned char* raptor_qname_to_counted_name(raptor_qname *qname, size_t* le
ngth_p);
RAPTOR_API
const raptor_namespace* raptor_qname_get_namespace(raptor_qname* name); const raptor_namespace* raptor_qname_get_namespace(raptor_qname* name);
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
skipping to change at line 1257 skipping to change at line 1275
RAPTOR_API RAPTOR_API
int raptor_sequence_push(raptor_sequence* seq, void *data); int raptor_sequence_push(raptor_sequence* seq, void *data);
RAPTOR_API RAPTOR_API
int raptor_sequence_shift(raptor_sequence* seq, void *data); int raptor_sequence_shift(raptor_sequence* seq, void *data);
RAPTOR_API RAPTOR_API
void* raptor_sequence_get_at(raptor_sequence* seq, int idx); void* raptor_sequence_get_at(raptor_sequence* seq, int idx);
RAPTOR_API RAPTOR_API
void* raptor_sequence_pop(raptor_sequence* seq); void* raptor_sequence_pop(raptor_sequence* seq);
RAPTOR_API RAPTOR_API
void* raptor_sequence_unshift(raptor_sequence* seq); void* raptor_sequence_unshift(raptor_sequence* seq);
RAPTOR_API
void* raptor_sequence_delete_at(raptor_sequence* seq, int idx);
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);
skipping to change at line 1398 skipping to change at line 1418
/** /**
* raptor_iostream_read_eof_func: * raptor_iostream_read_eof_func:
* @context: stream context data * @context: stream context data
* *
* Handler function for implementing raptor_iostream_read_eof(). * Handler function for implementing raptor_iostream_read_eof().
* *
* Return value: non-0 if EOF * Return value: non-0 if EOF
*/ */
typedef int (*raptor_iostream_read_eof_func) (void *context); typedef int (*raptor_iostream_read_eof_func) (void *context);
#ifndef RAPTOR_DISABLE_DEPRECATED
/** /**
* raptor_iostream_handler: * raptor_iostream_handler:
* @init: initialisation handler - optional, called at most once * @init: initialisation handler - optional, called at most once
* @finish: finishing handler - optional, called at most once * @finish: finishing handler - optional, called at most once
* @write_byte: write byte handler - required (for writing) * @write_byte: write byte handler - required (for writing)
* @write_bytes: write bytes handler - required (for writing) * @write_bytes: write bytes handler - required (for writing)
* @write_end: write end handler - optional (for writing), called at most o nce * @write_end: write end handler - optional (for writing), called at most o nce
* *
* I/O stream implementation handler structure. * I/O stream implementation handler structure.
* *
* DEPRECATED: Use #raptor_iostream_handler2 * DEPRECATED: Use #raptor_iostream_handler2
*/ */
typedef struct { typedef struct {
raptor_iostream_init_func init; raptor_iostream_init_func init;
raptor_iostream_finish_func finish; raptor_iostream_finish_func finish;
raptor_iostream_write_byte_func write_byte; raptor_iostream_write_byte_func write_byte;
raptor_iostream_write_bytes_func write_bytes; raptor_iostream_write_bytes_func write_bytes;
raptor_iostream_write_end_func write_end; raptor_iostream_write_end_func write_end;
} raptor_iostream_handler; } raptor_iostream_handler;
#endif
/** /**
* raptor_iostream_handler2: * raptor_iostream_handler2:
* @version: interface version. Presently 1 or 2. * @version: interface version. Presently 1 or 2.
* @init: initialisation handler - optional, called at most once (V1) * @init: initialisation handler - optional, called at most once (V1)
* @finish: finishing handler - optional, called at most once (V1) * @finish: finishing handler - optional, called at most once (V1)
* @write_byte: write byte handler - required (for writing) (V1) * @write_byte: write byte handler - required (for writing) (V1)
* @write_bytes: write bytes handler - required (for writing) (V1) * @write_bytes: write bytes handler - required (for writing) (V1)
* @write_end: write end handler - optional (for writing), called at most o nce (V1) * @write_end: write end handler - optional (for writing), called at most o nce (V1)
* @read_bytes: read bytes handler - required (for reading) (V2) * @read_bytes: read bytes handler - required (for reading) (V2)
skipping to change at line 1447 skipping to change at line 1469
raptor_iostream_finish_func finish; raptor_iostream_finish_func finish;
raptor_iostream_write_byte_func write_byte; raptor_iostream_write_byte_func write_byte;
raptor_iostream_write_bytes_func write_bytes; raptor_iostream_write_bytes_func write_bytes;
raptor_iostream_write_end_func write_end; raptor_iostream_write_end_func write_end;
/* V2 functions */ /* V2 functions */
raptor_iostream_read_bytes_func read_bytes; raptor_iostream_read_bytes_func read_bytes;
raptor_iostream_read_eof_func read_eof; raptor_iostream_read_eof_func read_eof;
} raptor_iostream_handler2; } raptor_iostream_handler2;
#ifndef RAPTOR_DISABLE_DEPRECATED
RAPTOR_API RAPTOR_DEPRECATED RAPTOR_API RAPTOR_DEPRECATED
raptor_iostream* raptor_new_iostream_from_handler(void *context, const rapt or_iostream_handler *handler); raptor_iostream* raptor_new_iostream_from_handler(void *context, const rapt or_iostream_handler *handler);
#endif
RAPTOR_API RAPTOR_API
raptor_iostream* raptor_new_iostream_from_handler2(void *user_data, const r aptor_iostream_handler2* const handler2); raptor_iostream* raptor_new_iostream_from_handler2(void *user_data, const r aptor_iostream_handler2* const handler2);
RAPTOR_API RAPTOR_API
raptor_iostream* raptor_new_iostream_to_sink(void); raptor_iostream* raptor_new_iostream_to_sink(void);
RAPTOR_API RAPTOR_API
raptor_iostream* raptor_new_iostream_to_filename(const char *filename); raptor_iostream* raptor_new_iostream_to_filename(const char *filename);
RAPTOR_API RAPTOR_API
raptor_iostream* raptor_new_iostream_to_file_handle(FILE *handle); raptor_iostream* raptor_new_iostream_to_file_handle(FILE *handle);
RAPTOR_API RAPTOR_API
raptor_iostream* raptor_new_iostream_to_string(void **string_p, size_t *len gth_p, void *(*malloc_handler)(size_t size)); raptor_iostream* raptor_new_iostream_to_string(void **string_p, size_t *len gth_p, void *(*malloc_handler)(size_t size));
skipping to change at line 1480 skipping to change at line 1504
RAPTOR_API RAPTOR_API
int raptor_iostream_write_bytes(raptor_iostream *iostr, const void *ptr, si ze_t size, size_t nmemb); int raptor_iostream_write_bytes(raptor_iostream *iostr, const void *ptr, si ze_t size, size_t nmemb);
RAPTOR_API RAPTOR_API
int raptor_iostream_write_byte(raptor_iostream *iostr, const int byte); int raptor_iostream_write_byte(raptor_iostream *iostr, const int byte);
RAPTOR_API RAPTOR_API
void raptor_iostream_write_end(raptor_iostream *iostr); void raptor_iostream_write_end(raptor_iostream *iostr);
RAPTOR_API RAPTOR_API
int raptor_iostream_write_string(raptor_iostream *iostr, const void *string ); int raptor_iostream_write_string(raptor_iostream *iostr, const void *string );
RAPTOR_API RAPTOR_API
int raptor_iostream_write_counted_string(raptor_iostream *iostr, const void *string, size_t len); int raptor_iostream_write_counted_string(raptor_iostream *iostr, const void *string, size_t len);
#ifndef RAPTOR_DISABLE_DEPRECATED
RAPTOR_API RAPTOR_DEPRECATED RAPTOR_API RAPTOR_DEPRECATED
size_t raptor_iostream_get_bytes_written_count(raptor_iostream *iostr); size_t raptor_iostream_get_bytes_written_count(raptor_iostream *iostr);
#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 RAPTOR_API
int raptor_iostream_write_uri(raptor_iostream *iostr, raptor_uri *uri); int raptor_iostream_write_uri(raptor_iostream *iostr, raptor_uri *uri);
skipping to change at line 1539 skipping to change at line 1565
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);
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);
RAPTOR_API
void raptor_xml_writer_cdata(raptor_xml_writer* xml_writer, const unsigned char *s); void raptor_xml_writer_cdata(raptor_xml_writer* xml_writer, const unsigned char *s);
RAPTOR_API RAPTOR_API
void raptor_xml_writer_cdata_counted(raptor_xml_writer* xml_writer, const u nsigned char *s, unsigned int len); void raptor_xml_writer_cdata_counted(raptor_xml_writer* xml_writer, const u nsigned char *s, unsigned int len);
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);
RAPTOR_API
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);
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
int raptor_xml_writer_get_depth(raptor_xml_writer *xml_writer);
/** /**
* raptor_sax2_start_element_handler: * raptor_sax2_start_element_handler:
* @user_data: user data * @user_data: user data
* @xml_element: XML element * @xml_element: XML element
* *
* SAX2 start element handler * SAX2 start element handler
*/ */
typedef void (*raptor_sax2_start_element_handler)(void *user_data, raptor_x ml_element *xml_element); typedef void (*raptor_sax2_start_element_handler)(void *user_data, raptor_x ml_element *xml_element);
 End of changes. 24 change blocks. 
2 lines changed or deleted 39 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/