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.68 2003/03/24 01:11:04 cmdjb Exp $ * $Id: raptor.h,v 1.72 2003/04/05 12:18:03 cmdjb Exp $
* *
* Copyright (C) 2000-2003 David Beckett - http://purl.org/net/dajobe/ * Copyright (C) 2000-2003 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.org/
* 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)
skipping to change at line 89 skipping to change at line 89
const char *file; const char *file;
int line; int line;
int column; int column;
int byte; int byte;
} 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; } raptor_feature;
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;
} raptor_identifier; } raptor_identifier;
skipping to change at line 141 skipping to change at line 142
/* 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_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 void raptor_print_statement_detailed(const raptor_statement * st atement, int detailed, FILE *stream);
RAPTOR_API char* raptor_statement_part_as_counted_string(const void *term,
raptor_identifier_type type, raptor_uri* literal_datatype, const unsigned c
har *literal_language, size_t* len_p);
RAPTOR_API char* raptor_statement_part_as_string(const void *term, raptor_i
dentifier_type type, raptor_uri* literal_datatype, const unsigned char *lit
eral_language);
RAPTOR_API raptor_locator* raptor_get_locator(raptor_parser* rdf_parser); RAPTOR_API raptor_locator* raptor_get_locator(raptor_parser* rdf_parser);
/* Parsing functions */ /* Parsing functions */
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);
RAPTOR_API int raptor_parse_file(raptor_parser* rdf_parser, raptor_uri *uri , raptor_uri *base_uri); RAPTOR_API int raptor_parse_file(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(raptor_parser* rdf_parser, raptor_uri *uri, raptor_uri *base_uri);
RAPTOR_API void raptor_parser_abort(raptor_parser* rdf_parser, const char * RAPTOR_API int raptor_parse_uri_with_connection(raptor_parser* rdf_parser,
reason); raptor_uri *uri, raptor_uri *base_uri, void *connection);
RAPTOR_API void raptor_parse_abort(raptor_parser* rdf_parser);
RAPTOR_API RAPTOR_DEPRECATED void raptor_parser_abort(raptor_parser* rdf_pa
rser, char *reason);
/* 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 void raptor_set_feature(raptor_parser *parser, raptor_feature fe ature, int value); RAPTOR_API void raptor_set_feature(raptor_parser *parser, raptor_feature fe ature, int value);
RAPTOR_API void raptor_set_parser_strict(raptor_parser* rdf_parser, int is_ strict);
/* URI functions */ /* URI functions */
RAPTOR_API raptor_uri* raptor_new_uri(const char *uri_string); RAPTOR_API raptor_uri* raptor_new_uri(const char *uri_string);
RAPTOR_API raptor_uri* raptor_new_uri_from_uri_local_name(raptor_uri *uri, const char *local_name); RAPTOR_API raptor_uri* raptor_new_uri_from_uri_local_name(raptor_uri *uri, const char *local_name);
RAPTOR_API raptor_uri* raptor_new_uri_relative_to_base(raptor_uri *base_uri , const char *uri_string); RAPTOR_API raptor_uri* raptor_new_uri_relative_to_base(raptor_uri *base_uri , const 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);
skipping to change at line 180 skipping to change at line 186
/* Identifier functions */ /* Identifier functions */
RAPTOR_API raptor_identifier* raptor_new_identifier(raptor_identifier_type type, raptor_uri *uri, raptor_uri_source uri_source, unsigned char *id); RAPTOR_API raptor_identifier* raptor_new_identifier(raptor_identifier_type type, raptor_uri *uri, raptor_uri_source uri_source, unsigned char *id);
RAPTOR_API void raptor_init_identifier(raptor_identifier *identifier, rapto r_identifier_type type, raptor_uri *uri, raptor_uri_source uri_source, unsi gned char *id); RAPTOR_API void raptor_init_identifier(raptor_identifier *identifier, rapto r_identifier_type type, raptor_uri *uri, raptor_uri_source uri_source, unsi gned char *id);
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 char *strin g, const char delim); RAPTOR_API int raptor_print_ntriples_string(FILE *stream, const char *strin g, const char delim);
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 char* raptor_xml_escape_string(raptor_parser *rdf_parser, const unsigned char *string, size_t len, size_t *new_len_p, char quote); RAPTOR_API size_t raptor_xml_escape_string(raptor_parser *rdf_parser, const unsigned char *string, size_t len, unsigned char *buffer, size_t length, c har quote);
/* raptor_uri.c */ /* raptor_uri.c */
RAPTOR_API void raptor_uri_resolve_uri_reference (const char *base_uri, con st char *reference_uri, char *buffer, size_t length); RAPTOR_API void raptor_uri_resolve_uri_reference (const char *base_uri, con st char *reference_uri, char *buffer, size_t length);
RAPTOR_API char *raptor_uri_filename_to_uri_string(const char *filename); RAPTOR_API char *raptor_uri_filename_to_uri_string(const char *filename);
RAPTOR_API char *raptor_uri_uri_string_to_filename(const char *uri_string); RAPTOR_API char *raptor_uri_uri_string_to_filename(const char *uri_string);
RAPTOR_API int raptor_uri_is_file_uri(const char* uri_string); RAPTOR_API int raptor_uri_is_file_uri(const char* uri_string);
RAPTOR_API void raptor_uri_init(void); RAPTOR_API void raptor_uri_init(void);
typedef raptor_uri* (*raptor_new_uri_func) (void *context, const char *uri_ string); typedef raptor_uri* (*raptor_new_uri_func) (void *context, const char *uri_ string);
typedef raptor_uri* (*raptor_new_uri_from_uri_local_name_func) (void *conte xt, raptor_uri *uri, const char *local_name); typedef raptor_uri* (*raptor_new_uri_from_uri_local_name_func) (void *conte xt, raptor_uri *uri, const char *local_name);
skipping to change at line 225 skipping to change at line 231
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#"
/* 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 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 void
RAPTOR_API raptor_www_set_write_bytes_handler(raptor_www *www, raptor_www_w rite_bytes_handler handler, void *user_data); RAPTOR_API raptor_www_set_write_bytes_handler(raptor_www *www, raptor_www_w rite_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);
 End of changes. 7 change blocks. 
5 lines changed or deleted 18 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/