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
* *
* $Id: raptor.h,v 1.99 2003/12/31 21:44:55 cmdjb Exp $ * $Id: raptor.h,v 1.117 2004/05/04 22:46:31 cmdjb Exp $
* *
* Copyright (C) 2000-2003 David Beckett - http://purl.org/net/dajobe/ * Copyright (C) 2000-2004 David Beckett - http://purl.org/net/dajobe/
* Institute for Learning and Research Technology - http://www.ilrt.org/ * Institute for Learning and Research Technology - http://www.ilrt.bris.ac
.uk/
* University of Bristol - http://www.bristol.ac.uk/ * University of Bristol - http://www.bristol.ac.uk/
* *
* This package is Free Software or Open Source available under the * This package is Free Software or Open Source available under the
* following licenses (these are alternatives): * following licenses (these are alternatives):
* 1. GNU Lesser General Public License (LGPL) * 1. GNU Lesser General Public License (LGPL)
* 2. GNU General Public License (GPL) * 2. GNU General Public License (GPL)
* 3. Mozilla Public License (MPL) * 3. Mozilla Public License (MPL)
* *
* See LICENSE.html or LICENSE.txt at the top of this package for the * See LICENSE.html or LICENSE.txt at the top of this package for the
* full license terms. * full license terms.
* *
*/ */
#ifndef RAPTOR_H #ifndef RAPTOR_H
#define RAPTOR_H #define RAPTOR_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include <stdio.h>
#ifdef WIN32 #ifdef WIN32
# ifdef RAPTOR_INTERNAL # ifdef RAPTOR_INTERNAL
# define RAPTOR_API _declspec(dllexport) # define RAPTOR_API _declspec(dllexport)
# else # else
# define RAPTOR_API _declspec(dllimport) # define RAPTOR_API _declspec(dllimport)
# endif # endif
#else #else
# define RAPTOR_API # define RAPTOR_API
#endif #endif
skipping to change at line 64 skipping to change at line 66
/* Public statics */ /* Public statics */
extern const char * const raptor_short_copyright_string; extern const char * const raptor_short_copyright_string;
extern const char * const raptor_copyright_string; extern const char * const raptor_copyright_string;
extern const char * const raptor_version_string; extern const char * const raptor_version_string;
extern const unsigned int raptor_version_major; extern const unsigned int raptor_version_major;
extern const unsigned int raptor_version_minor; extern const unsigned int raptor_version_minor;
extern const unsigned int raptor_version_release; extern const unsigned int raptor_version_release;
extern const unsigned int raptor_version_decimal; extern const unsigned int raptor_version_decimal;
extern const char * const raptor_xml_literal_datatype_uri_string;
/* Public structure */ /* Public structure */
typedef struct raptor_parser_s raptor_parser; typedef struct raptor_parser_s raptor_parser;
typedef struct raptor_www_s raptor_www; typedef struct raptor_www_s raptor_www;
typedef struct raptor_sax2_element_s raptor_sax2_element; typedef struct raptor_sax2_element_s raptor_sax2_element;
typedef struct raptor_xml_writer_s raptor_xml_writer; typedef struct raptor_xml_writer_s raptor_xml_writer;
typedef struct raptor_qname_s raptor_qname; typedef struct raptor_qname_s raptor_qname;
typedef struct raptor_namespace_s raptor_namespace; typedef struct raptor_namespace_s raptor_namespace;
skipping to change at line 109 skipping to change at line 113
} raptor_locator; } raptor_locator;
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,
RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST, RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST,
RAPTOR_FEATURE_NORMALIZE_LANGUAGE, RAPTOR_FEATURE_NORMALIZE_LANGUAGE,
RAPTOR_FEATURE_NON_NFC_FATAL RAPTOR_FEATURE_NON_NFC_FATAL,
RAPTOR_FEATURE_LAST=RAPTOR_FEATURE_NON_NFC_FATAL
} raptor_feature; } raptor_feature;
typedef enum { typedef enum {
RAPTOR_GENID_TYPE_BNODEID, RAPTOR_GENID_TYPE_BNODEID,
RAPTOR_GENID_TYPE_BAGID RAPTOR_GENID_TYPE_BAGID
} raptor_genid_type; } raptor_genid_type;
typedef struct { typedef struct {
raptor_identifier_type type; raptor_identifier_type type;
raptor_uri *uri; raptor_uri *uri;
skipping to change at line 183 skipping to change at line 188
typedef void (*raptor_www_content_type_handler)(raptor_www* www, void *user data, const char *content_type); typedef void (*raptor_www_content_type_handler)(raptor_www* www, void *user data, const char *content_type);
/* Public functions */ /* Public functions */
RAPTOR_API void raptor_init(void); RAPTOR_API void raptor_init(void);
RAPTOR_API void raptor_finish(void); RAPTOR_API void raptor_finish(void);
/* Get parser names */ /* Get parser names */
RAPTOR_API int raptor_parsers_enumerate(const unsigned int counter, const c har **name, const char **label); RAPTOR_API int raptor_parsers_enumerate(const unsigned int counter, const c har **name, const char **label);
RAPTOR_API int raptor_syntaxes_enumerate(const unsigned int counter, const char **name, const char **label, const char **mime_type, const unsigned cha r **uri_string); RAPTOR_API int raptor_syntaxes_enumerate(const unsigned int counter, const char **name, const char **label, const char **mime_type, const unsigned cha r **uri_string);
RAPTOR_API int raptor_syntax_name_check(const char *name);
RAPTOR_API const char* raptor_guess_parser_name(raptor_uri *uri, const char
*mime_type, const unsigned char *buffer, size_t len, const unsigned char *
identifier);
/* Create */ /* Create */
RAPTOR_API raptor_parser* raptor_new_parser(const char *name); RAPTOR_API raptor_parser* raptor_new_parser(const char *name);
RAPTOR_API raptor_parser* raptor_new_parser_for_content(raptor_uri *uri, co nst char *mime_type, const unsigned char *buffer, size_t len, const unsigne d char *identifier);
RAPTOR_API int raptor_start_parse(raptor_parser *rdf_parser, raptor_uri *ur i); RAPTOR_API int raptor_start_parse(raptor_parser *rdf_parser, raptor_uri *ur i);
/* Destroy */ /* Destroy */
RAPTOR_API void raptor_free_parser(raptor_parser* parser); RAPTOR_API void raptor_free_parser(raptor_parser* parser);
/* Handlers */ /* Handlers */
RAPTOR_API void raptor_set_fatal_error_handler(raptor_parser* parser, void *user_data, raptor_message_handler handler); RAPTOR_API void raptor_set_fatal_error_handler(raptor_parser* parser, void *user_data, raptor_message_handler handler);
RAPTOR_API void raptor_set_error_handler(raptor_parser* parser, void *user_ data, raptor_message_handler handler); RAPTOR_API void raptor_set_error_handler(raptor_parser* parser, void *user_ data, raptor_message_handler handler);
RAPTOR_API void raptor_set_warning_handler(raptor_parser* parser, void *use r_data, raptor_message_handler handler); RAPTOR_API void raptor_set_warning_handler(raptor_parser* parser, void *use r_data, raptor_message_handler handler);
RAPTOR_API void raptor_set_statement_handler(raptor_parser* parser, void *u ser_data, raptor_statement_handler handler); RAPTOR_API void raptor_set_statement_handler(raptor_parser* parser, void *u ser_data, raptor_statement_handler handler);
RAPTOR_API void raptor_set_generate_id_handler(raptor_parser* parser, void *user_data, raptor_generate_id_handler handler); RAPTOR_API void raptor_set_generate_id_handler(raptor_parser* parser, void *user_data, raptor_generate_id_handler handler);
RAPTOR_API void raptor_print_statement(const raptor_statement * const state ment, FILE *stream); RAPTOR_API void raptor_print_statement(const raptor_statement * const state ment, FILE *stream);
RAPTOR_API void raptor_print_statement_as_ntriples(const raptor_statement * statement, FILE *stream); RAPTOR_API void raptor_print_statement_as_ntriples(const raptor_statement * statement, FILE *stream);
RAPTOR_API void raptor_print_statement_detailed(const raptor_statement * st atement, int detailed, FILE *stream); RAPTOR_API RAPTOR_DEPRECATED void raptor_print_statement_detailed(const rap tor_statement * statement, int detailed, FILE *stream);
RAPTOR_API unsigned char* raptor_statement_part_as_counted_string(const voi d *term, raptor_identifier_type type, raptor_uri* literal_datatype, const u nsigned char *literal_language, size_t* len_p); RAPTOR_API unsigned char* raptor_statement_part_as_counted_string(const voi d *term, raptor_identifier_type type, raptor_uri* literal_datatype, const u nsigned char *literal_language, size_t* len_p);
RAPTOR_API unsigned char* raptor_statement_part_as_string(const void *term, raptor_identifier_type type, raptor_uri* literal_datatype, const unsigned char *literal_language); RAPTOR_API unsigned char* raptor_statement_part_as_string(const void *term, raptor_identifier_type type, raptor_uri* literal_datatype, const unsigned char *literal_language);
RAPTOR_API raptor_locator* raptor_get_locator(raptor_parser* rdf_parser); RAPTOR_API raptor_locator* raptor_get_locator(raptor_parser* rdf_parser);
RAPTOR_API void raptor_set_default_generate_id_parameters(raptor_parser* rd f_parser, char *prefix, int base); RAPTOR_API void raptor_set_default_generate_id_parameters(raptor_parser* rd f_parser, char *prefix, int base);
/* Parsing functions */ /* Parsing functions */
RAPTOR_API int raptor_parse_chunk(raptor_parser* rdf_parser, const unsigned char *buffer, size_t len, int is_end); RAPTOR_API int raptor_parse_chunk(raptor_parser* rdf_parser, const unsigned char *buffer, size_t len, int is_end);
RAPTOR_API int raptor_parse_file_stream(raptor_parser* rdf_parser, FILE *st ream, const char *filename, raptor_uri *base_uri); RAPTOR_API int raptor_parse_file_stream(raptor_parser* rdf_parser, FILE *st ream, const char *filename, raptor_uri *base_uri);
skipping to change at line 223 skipping to change at line 231
RAPTOR_API int raptor_parse_uri(raptor_parser* rdf_parser, raptor_uri *uri, raptor_uri *base_uri); RAPTOR_API int raptor_parse_uri(raptor_parser* rdf_parser, raptor_uri *uri, raptor_uri *base_uri);
RAPTOR_API int raptor_parse_uri_with_connection(raptor_parser* rdf_parser, raptor_uri *uri, raptor_uri *base_uri, void *connection); RAPTOR_API int raptor_parse_uri_with_connection(raptor_parser* rdf_parser, raptor_uri *uri, raptor_uri *base_uri, void *connection);
RAPTOR_API void raptor_parse_abort(raptor_parser* rdf_parser); RAPTOR_API void raptor_parse_abort(raptor_parser* rdf_parser);
/* Utility functions */ /* Utility functions */
RAPTOR_API void raptor_print_locator(FILE *stream, raptor_locator* locator) ; RAPTOR_API void raptor_print_locator(FILE *stream, raptor_locator* locator) ;
RAPTOR_API int raptor_format_locator(char *buffer, size_t length, raptor_lo cator* locator); RAPTOR_API int raptor_format_locator(char *buffer, size_t length, raptor_lo cator* locator);
RAPTOR_API const char* raptor_get_name(raptor_parser *rdf_parser); RAPTOR_API const char* raptor_get_name(raptor_parser *rdf_parser);
RAPTOR_API const char* raptor_get_label(raptor_parser *rdf_parser); RAPTOR_API const char* raptor_get_label(raptor_parser *rdf_parser);
RAPTOR_API void raptor_set_feature(raptor_parser *parser, raptor_feature fe RAPTOR_API const char* raptor_get_mime_type(raptor_parser *rdf_parser);
ature, int value);
RAPTOR_API int raptor_features_enumerate(const raptor_feature feature, cons
t char **name, raptor_uri **uri, const char **label);
RAPTOR_API int raptor_set_feature(raptor_parser *parser, raptor_feature fea
ture, int value);
RAPTOR_API int raptor_get_feature(raptor_parser *parser, raptor_feature fea
ture);
RAPTOR_API raptor_feature raptor_feature_from_uri(raptor_uri *uri);
RAPTOR_API void raptor_set_parser_strict(raptor_parser* rdf_parser, int is_ strict); RAPTOR_API void raptor_set_parser_strict(raptor_parser* rdf_parser, int is_ strict);
/* memory functions */
RAPTOR_API void raptor_free_memory(void *ptr);
/* URI functions */ /* URI functions */
RAPTOR_API raptor_uri* raptor_new_uri(const unsigned char *uri_string); RAPTOR_API raptor_uri* raptor_new_uri(const unsigned char *uri_string);
RAPTOR_API raptor_uri* raptor_new_uri_from_uri_local_name(raptor_uri *uri, const unsigned char *local_name); RAPTOR_API raptor_uri* raptor_new_uri_from_uri_local_name(raptor_uri *uri, const unsigned char *local_name);
RAPTOR_API raptor_uri* raptor_new_uri_relative_to_base(raptor_uri *base_uri , const unsigned char *uri_string); RAPTOR_API raptor_uri* raptor_new_uri_relative_to_base(raptor_uri *base_uri , const unsigned char *uri_string);
RAPTOR_API raptor_uri* raptor_new_uri_from_id(raptor_uri *base_uri, const u nsigned char *id); RAPTOR_API raptor_uri* raptor_new_uri_from_id(raptor_uri *base_uri, const u nsigned char *id);
RAPTOR_API raptor_uri* raptor_new_uri_for_rdf_concept(const char *name); RAPTOR_API raptor_uri* raptor_new_uri_for_rdf_concept(const char *name);
RAPTOR_API void raptor_free_uri(raptor_uri *uri); RAPTOR_API void raptor_free_uri(raptor_uri *uri);
RAPTOR_API int raptor_uri_equals(raptor_uri* uri1, raptor_uri* uri2); RAPTOR_API int raptor_uri_equals(raptor_uri* uri1, raptor_uri* uri2);
RAPTOR_API raptor_uri* raptor_uri_copy(raptor_uri *uri); RAPTOR_API raptor_uri* raptor_uri_copy(raptor_uri *uri);
RAPTOR_API unsigned char* raptor_uri_as_string(raptor_uri *uri); RAPTOR_API unsigned char* raptor_uri_as_string(raptor_uri *uri);
skipping to change at line 254 skipping to change at line 270
RAPTOR_API raptor_identifier* raptor_new_identifier(raptor_identifier_type type, raptor_uri *uri, raptor_uri_source uri_source, const unsigned char *i d, const unsigned char *literal, raptor_uri *literal_datatype, const unsign ed char *literal_language); RAPTOR_API raptor_identifier* raptor_new_identifier(raptor_identifier_type type, raptor_uri *uri, raptor_uri_source uri_source, const unsigned char *i d, const unsigned char *literal, raptor_uri *literal_datatype, const unsign ed char *literal_language);
RAPTOR_API int raptor_copy_identifier(raptor_identifier *dest, raptor_ident ifier *src); RAPTOR_API int raptor_copy_identifier(raptor_identifier *dest, raptor_ident ifier *src);
RAPTOR_API void raptor_free_identifier(raptor_identifier *identifier); RAPTOR_API void raptor_free_identifier(raptor_identifier *identifier);
/* Utility functions */ /* Utility functions */
RAPTOR_API int raptor_print_ntriples_string(FILE *stream, const unsigned ch ar *string, const char delim); RAPTOR_API int raptor_print_ntriples_string(FILE *stream, const unsigned ch ar *string, const char delim);
RAPTOR_API unsigned char* raptor_ntriples_string_as_utf8_string(raptor_pars er* rdf_parser, unsigned char *src, int len, size_t *dest_lenp); RAPTOR_API unsigned char* raptor_ntriples_string_as_utf8_string(raptor_pars er* rdf_parser, unsigned char *src, int len, size_t *dest_lenp);
RAPTOR_API const char* raptor_ntriples_term_as_string (raptor_ntriples_term _type term); RAPTOR_API const char* raptor_ntriples_term_as_string (raptor_ntriples_term _type term);
RAPTOR_API size_t raptor_xml_escape_string(const unsigned char *string, siz e_t len, unsigned char *buffer, size_t length, char quote, raptor_simple_me ssage_handler error_handler, void *error_data); RAPTOR_API size_t raptor_xml_escape_string(const unsigned char *string, siz e_t len, unsigned char *buffer, size_t length, char quote, raptor_simple_me ssage_handler error_handler, void *error_data);
RAPTOR_API char* raptor_vsnprintf(const char *message, va_list arguments);
/* raptor_xml_writer.c */ /* raptor_xml_writer.c */
/* NOT PUBLIC YET - SEE raptor_internal.h */ /* NOT PUBLIC YET - SEE raptor_internal.h */
/* raptor_uri.c */ /* raptor_uri.c */
RAPTOR_API void raptor_uri_resolve_uri_reference (const unsigned char *base _uri, const unsigned char *reference_uri, char unsigned *buffer, size_t len gth); RAPTOR_API void raptor_uri_resolve_uri_reference (const unsigned char *base _uri, const unsigned char *reference_uri, char unsigned *buffer, size_t len gth);
RAPTOR_API unsigned char *raptor_uri_filename_to_uri_string(const char *fil ename); RAPTOR_API unsigned char *raptor_uri_filename_to_uri_string(const char *fil ename);
RAPTOR_API char *raptor_uri_uri_string_to_filename(const unsigned char *uri _string); RAPTOR_API char *raptor_uri_uri_string_to_filename(const unsigned char *uri _string);
RAPTOR_API char *raptor_uri_uri_string_to_filename_fragment(const unsigned char *uri_string, unsigned char **fragment_p); RAPTOR_API char *raptor_uri_uri_string_to_filename_fragment(const unsigned char *uri_string, unsigned char **fragment_p);
RAPTOR_API int raptor_uri_is_file_uri(const unsigned char* uri_string); RAPTOR_API int raptor_uri_is_file_uri(const unsigned char* uri_string);
RAPTOR_API void raptor_uri_init(void); RAPTOR_API void raptor_uri_init(void);
RAPTOR_API void raptor_uri_set_handler(raptor_uri_handler *handler, void *c ontext); RAPTOR_API void raptor_uri_set_handler(raptor_uri_handler *handler, void *c ontext);
RAPTOR_API void raptor_uri_get_handler(raptor_uri_handler **handler, void * *context); RAPTOR_API void raptor_uri_get_handler(raptor_uri_handler **handler, void * *context);
#define RAPTOR_RDF_MS_URI "http://www.w3.org/1999/02/22-rdf-syntax-ns#" #define RAPTOR_RDF_MS_URI "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
#define RAPTOR_RDF_SCHEMA_URI "http://www.w3.org/2000/01/rdf-schema#" #define RAPTOR_RDF_SCHEMA_URI "http://www.w3.org/2000/01/rdf-schema#"
#define RAPTOR_XMLSCHEMA_DATATYPES_URI "http://www.w3.org/2001/XMLSchema#"
#define RAPTOR_OWL_URI "http://www.w3.org/2002/07/owl#"
/* raptor_www */ /* raptor_www */
RAPTOR_API void raptor_www_init(void); RAPTOR_API void raptor_www_init(void);
RAPTOR_API void raptor_www_finish(void); RAPTOR_API void raptor_www_finish(void);
RAPTOR_API void raptor_www_no_www_library_init_finish(void); RAPTOR_API void raptor_www_no_www_library_init_finish(void);
RAPTOR_API raptor_www *raptor_www_new(void); RAPTOR_API raptor_www *raptor_www_new(void);
RAPTOR_API raptor_www *raptor_www_new_with_connection(void* connection); RAPTOR_API raptor_www *raptor_www_new_with_connection(void* connection);
RAPTOR_API void raptor_www_free(raptor_www *www); RAPTOR_API void raptor_www_free(raptor_www *www);
RAPTOR_API void raptor_www_set_user_agent(raptor_www *www, const char *user _agent); RAPTOR_API void raptor_www_set_user_agent(raptor_www *www, const char *user _agent);
RAPTOR_API void raptor_www_set_proxy(raptor_www *www, const char *proxy); RAPTOR_API void raptor_www_set_proxy(raptor_www *www, const char *proxy);
void RAPTOR_API void raptor_www_set_http_accept(raptor_www *www, const char *val
RAPTOR_API raptor_www_set_write_bytes_handler(raptor_www *www, raptor_www_w ue);
rite_bytes_handler handler, void *user_data); RAPTOR_API void raptor_www_set_write_bytes_handler(raptor_www *www, raptor_
www_write_bytes_handler handler, void *user_data);
RAPTOR_API void raptor_www_set_content_type_handler(raptor_www *www, raptor _www_content_type_handler handler, void *user_data); RAPTOR_API void raptor_www_set_content_type_handler(raptor_www *www, raptor _www_content_type_handler handler, void *user_data);
RAPTOR_API void raptor_www_set_error_handler(raptor_www *www, raptor_messag e_handler error_handler, void *error_data); RAPTOR_API void raptor_www_set_error_handler(raptor_www *www, raptor_messag e_handler error_handler, void *error_data);
RAPTOR_API int raptor_www_fetch(raptor_www *www, raptor_uri *uri); RAPTOR_API int raptor_www_fetch(raptor_www *www, raptor_uri *uri);
RAPTOR_API void* raptor_www_get_connection(raptor_www *www); RAPTOR_API void* raptor_www_get_connection(raptor_www *www);
RAPTOR_API void raptor_www_abort(raptor_www *www, const char *reason); RAPTOR_API void raptor_www_abort(raptor_www *www, const char *reason);
/* raptor_qname - XML qnames */ /* raptor_qname - XML qnames */
RAPTOR_API raptor_qname* raptor_new_qname(raptor_namespace_stack *nstack, c onst unsigned char *name, const unsigned char *value, raptor_simple_message _handler error_handler, void *error_data); RAPTOR_API raptor_qname* raptor_new_qname(raptor_namespace_stack *nstack, c onst unsigned char *name, const unsigned char *value, raptor_simple_message _handler error_handler, void *error_data);
RAPTOR_API raptor_qname* raptor_new_qname_from_namespace_local_name(raptor_ namespace *ns, const unsigned char *local_name, const unsigned char *value) ; RAPTOR_API raptor_qname* raptor_new_qname_from_namespace_local_name(raptor_ namespace *ns, const unsigned char *local_name, const unsigned char *value) ;
RAPTOR_API void raptor_free_qname(raptor_qname* name); RAPTOR_API void raptor_free_qname(raptor_qname* name);
skipping to change at line 320 skipping to change at line 341
/* raptor_namespace - XML namespace */ /* raptor_namespace - XML namespace */
RAPTOR_API raptor_namespace* raptor_new_namespace(raptor_namespace_stack *n stack, const unsigned char *prefix, const unsigned char *ns_uri_string, int depth); RAPTOR_API raptor_namespace* raptor_new_namespace(raptor_namespace_stack *n stack, const unsigned char *prefix, const unsigned char *ns_uri_string, int depth);
RAPTOR_API void raptor_free_namespace(raptor_namespace *ns); RAPTOR_API void raptor_free_namespace(raptor_namespace *ns);
RAPTOR_API int raptor_namespace_copy(raptor_namespace_stack *nstack, raptor _namespace *ns, int new_depth); RAPTOR_API int raptor_namespace_copy(raptor_namespace_stack *nstack, raptor _namespace *ns, int new_depth);
RAPTOR_API raptor_uri* raptor_namespace_get_uri(const raptor_namespace *ns) ; RAPTOR_API raptor_uri* raptor_namespace_get_uri(const raptor_namespace *ns) ;
RAPTOR_API const unsigned char* raptor_namespace_get_prefix(const raptor_na mespace *ns); RAPTOR_API const unsigned char* raptor_namespace_get_prefix(const raptor_na mespace *ns);
RAPTOR_API unsigned char *raptor_namespaces_format(const raptor_namespace * ns, size_t *length_p); RAPTOR_API unsigned char *raptor_namespaces_format(const raptor_namespace * ns, size_t *length_p);
typedef struct raptor_stringbuffer_s raptor_stringbuffer; typedef struct raptor_stringbuffer_s raptor_stringbuffer;
/* Sequence class */
typedef struct raptor_sequence_s raptor_sequence;
typedef void* (raptor_sequence_free_handler(void*));
typedef void (raptor_sequence_print_handler(void *object, FILE *fh));
/* Create */
RAPTOR_API raptor_sequence* raptor_new_sequence(raptor_sequence_free_handle
r* free_handler, raptor_sequence_print_handler* print_handler);
/* Destroy */
RAPTOR_API void raptor_free_sequence(raptor_sequence* seq);
/* Methods */
RAPTOR_API int raptor_sequence_size(raptor_sequence* seq);
RAPTOR_API int raptor_sequence_set_at(raptor_sequence* seq, int idx, void *
data);
RAPTOR_API int raptor_sequence_push(raptor_sequence* seq, void *data);
RAPTOR_API int raptor_sequence_shift(raptor_sequence* seq, void *data);
RAPTOR_API void* raptor_sequence_get_at(raptor_sequence* seq, int idx);
RAPTOR_API void* raptor_sequence_pop(raptor_sequence* seq);
RAPTOR_API void* raptor_sequence_unshift(raptor_sequence* seq);
RAPTOR_API int raptor_compare_strings(const void *a, const void *b);
RAPTOR_API void raptor_sequence_sort(raptor_sequence* seq, int(*compare)(co
nst void *, const void *));
/* helper for printing sequences of strings */
RAPTOR_API void raptor_sequence_print_string(char *data, FILE *fh);
RAPTOR_API void raptor_sequence_print_uri(char *data, FILE *fh);
RAPTOR_API void raptor_sequence_set_print_handler(raptor_sequence *seq, rap
tor_sequence_print_handler *print_handler);
RAPTOR_API void raptor_sequence_print(raptor_sequence* seq, FILE* fh);
/* raptor_utf8.c */
RAPTOR_API int raptor_unicode_char_to_utf8(unsigned long c, unsigned char *
output);
RAPTOR_API int raptor_utf8_to_unicode_char(unsigned long *output, const uns
igned char *input, int length);
/* raptor_stringbuffer */
RAPTOR_API raptor_stringbuffer* raptor_new_stringbuffer(void);
RAPTOR_API void raptor_free_stringbuffer(raptor_stringbuffer *stringbuffer)
;
RAPTOR_API int raptor_stringbuffer_append_counted_string(raptor_stringbuffe
r* stringbuffer, const unsigned char *string, size_t length, int do_copy);
RAPTOR_API int raptor_stringbuffer_append_string(raptor_stringbuffer* strin
gbuffer, const unsigned char *string, int do_copy);
RAPTOR_API int raptor_stringbuffer_append_decimal(raptor_stringbuffer* stri
ngbuffer, int integer);
RAPTOR_API int raptor_stringbuffer_append_stringbuffer(raptor_stringbuffer*
stringbuffer, raptor_stringbuffer* append);
RAPTOR_API int raptor_stringbuffer_prepend_counted_string(raptor_stringbuff
er* stringbuffer, const unsigned char *string, size_t length, int do_copy);
RAPTOR_API int raptor_stringbuffer_prepend_string(raptor_stringbuffer* stri
ngbuffer, const unsigned char *string, int do_copy);
RAPTOR_API unsigned char * raptor_stringbuffer_as_string(raptor_stringbuffe
r* stringbuffer);
RAPTOR_API size_t raptor_stringbuffer_length(raptor_stringbuffer* stringbuf
fer);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 14 change blocks. 
10 lines changed or deleted 96 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/