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.80 2003/08/21 16:55:48 cmdjb Exp $ | * $Id: raptor.h,v 1.84 2003/09/08 12:49:42 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 56 | skipping to change at line 56 | |||
#else | #else | |||
#define RAPTOR_DEPRECATED __attribute__((deprecated)) | #define RAPTOR_DEPRECATED __attribute__((deprecated)) | |||
#endif | #endif | |||
#else | #else | |||
#define RAPTOR_DEPRECATED | #define RAPTOR_DEPRECATED | |||
#endif | #endif | |||
typedef void* raptor_uri; | typedef void* raptor_uri; | |||
/* Public statics */ | /* Public statics */ | |||
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; | |||
/* Public structure */ | /* Public structure */ | |||
typedef struct raptor_parser_s raptor_parser; | typedef struct raptor_parser_s raptor_parser; | |||
skipping to change at line 102 | skipping to change at line 103 | |||
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_ALLOW_BAGID, | |||
RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST | RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST, | |||
RAPTOR_FEATURE_NORMALIZE_LANGUAGE | ||||
} 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 197 | skipping to change at line 199 | |||
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_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 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); | |||
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(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 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); | |||
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 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 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); | RAPTOR_API void raptor_set_parser_strict(raptor_parser* rdf_parser, int is_ strict); | |||
skipping to change at line 275 | skipping to change at line 277 | |||
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); | |||
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); | |||
/* OLD RDF/XML Parser Public functions */ | ||||
RAPTOR_API raptor_parser* RAPTOR_DEPRECATED raptor_new(void); | ||||
RAPTOR_API void RAPTOR_DEPRECATED raptor_free(raptor_parser *rdf_parser); | ||||
/* OLD N-Triples Parser Public functions */ | ||||
RAPTOR_API raptor_parser* RAPTOR_DEPRECATED raptor_ntriples_new(void); | ||||
RAPTOR_API void RAPTOR_DEPRECATED raptor_ntriples_free(raptor_parser *parse | ||||
r); | ||||
RAPTOR_API void RAPTOR_DEPRECATED raptor_ntriples_set_error_handler(raptor_ | ||||
parser* parser, void *user_data, raptor_message_handler handler); | ||||
RAPTOR_API void RAPTOR_DEPRECATED raptor_ntriples_set_fatal_error_handler(r | ||||
aptor_parser* parser, void *user_data, raptor_message_handler handler); | ||||
RAPTOR_API void RAPTOR_DEPRECATED raptor_ntriples_set_statement_handler(rap | ||||
tor_parser* parser, void *user_data, raptor_statement_handler handler); | ||||
RAPTOR_API int RAPTOR_DEPRECATED raptor_ntriples_parse_file(raptor_parser* | ||||
parser, raptor_uri *uri, raptor_uri *base_uri); | ||||
#ifdef __cplusplus | #ifdef __cplusplus | |||
} | } | |||
#endif | #endif | |||
#endif | #endif | |||
End of changes. 6 change blocks. | ||||
24 lines changed or deleted | 5 lines changed or added | |||