diff options
-rw-r--r-- | src/raptor.h | 222 | ||||
-rw-r--r-- | src/raptor_feature.c | 3 | ||||
-rw-r--r-- | src/raptor_general.c | 9 | ||||
-rw-r--r-- | src/raptor_identifier.c | 3 | ||||
-rw-r--r-- | src/raptor_internal.h | 4 | ||||
-rw-r--r-- | src/raptor_iostream.c | 2 | ||||
-rw-r--r-- | src/raptor_locator.c | 7 | ||||
-rw-r--r-- | src/raptor_namespace.c | 4 | ||||
-rw-r--r-- | src/raptor_parse.c | 12 | ||||
-rw-r--r-- | src/raptor_qname.c | 2 | ||||
-rw-r--r-- | src/raptor_sequence.c | 2 | ||||
-rw-r--r-- | src/raptor_serialize.c | 11 | ||||
-rw-r--r-- | src/raptor_serialize_ntriples.c | 3 | ||||
-rw-r--r-- | src/raptor_statement.c | 18 | ||||
-rw-r--r-- | src/raptor_uri.c | 42 | ||||
-rw-r--r-- | src/raptor_www.c | 4 | ||||
-rw-r--r-- | src/raptor_xml_writer.c | 4 |
17 files changed, 262 insertions, 90 deletions
diff --git a/src/raptor.h b/src/raptor.h index 30720183..284b37ee 100644 --- a/src/raptor.h +++ b/src/raptor.h @@ -78,6 +78,14 @@ extern "C" { #define RAPTOR_DEPRECATED #endif +/* Flag for clients: raptor v2 functions/structs available */ +#define RAPTOR_V2_AVAILABLE + +/* Allow to flag V1 functions as deprecated */ +#ifndef RAPTOR_V1 +#define RAPTOR_V1 +#endif + /** * RAPTOR_PRINTF_FORMAT: * @string_index: ignore me @@ -816,39 +824,46 @@ raptor_world* raptor_new_world(void); RAPTOR_API void raptor_free_world(raptor_world* world); -RAPTOR_API +#ifndef RAPTOR_DISABLE_V1 +RAPTOR_API RAPTOR_V1 void raptor_init(void); -RAPTOR_API +RAPTOR_API RAPTOR_V1 void raptor_finish(void); +#endif /* 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); +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_string); +RAPTOR_API RAPTOR_V1 +int raptor_syntax_name_check(const char *name); +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); +#endif RAPTOR_API int raptor_parsers_enumerate_v2(raptor_world* world, const unsigned int counter, const char **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 char **uri_string); -RAPTOR_API int raptor_syntaxes_enumerate_v2(raptor_world* world, const unsigned int counter, const char **name, const char **label, const char **mime_type, const unsigned char **uri_string); RAPTOR_API -int raptor_syntax_name_check(const char *name); -RAPTOR_API int raptor_syntax_name_check_v2(raptor_world* world, 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); -RAPTOR_API const char* raptor_guess_parser_name_v2(raptor_world* world, raptor_uri *uri, const char *mime_type, const unsigned char *buffer, size_t len, const unsigned char *identifier); /* Create */ -RAPTOR_API +#ifndef RAPTOR_DISABLE_V1 +RAPTOR_API RAPTOR_V1 raptor_parser* raptor_new_parser(const char *name); +RAPTOR_API RAPTOR_V1 +raptor_parser* raptor_new_parser_for_content(raptor_uri *uri, const char *mime_type, const unsigned char *buffer, size_t len, const unsigned char *identifier); +#endif RAPTOR_API raptor_parser* raptor_new_parser_v2(raptor_world* world, const char *name); RAPTOR_API -raptor_parser* raptor_new_parser_for_content(raptor_uri *uri, const char *mime_type, const unsigned char *buffer, size_t len, const unsigned char *identifier); -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); + RAPTOR_API int raptor_start_parse(raptor_parser *rdf_parser, raptor_uri *uri); @@ -874,29 +889,33 @@ void raptor_set_namespace_handler(raptor_parser* parser, void *user_data, raptor RAPTOR_API 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 *stream); +RAPTOR_API RAPTOR_V1 +void raptor_print_statement_as_ntriples(const raptor_statement * statement, FILE *stream); +#endif RAPTOR_API void raptor_print_statement_v2(const raptor_statement_v2 * statement, FILE *stream); RAPTOR_API -void raptor_print_statement_as_ntriples(const raptor_statement * statement, FILE *stream); -RAPTOR_API void raptor_print_statement_as_ntriples_v2(const raptor_statement_v2 * statement, FILE *stream); -#ifndef RAPTOR_DISABLE_DEPRECATED +#if !defined(RAPTOR_DISABLE_DEPRECATED) && !defined(RAPTOR_DISABLE_V1) RAPTOR_API RAPTOR_DEPRECATED void raptor_print_statement_detailed(const raptor_statement * statement, int detailed, FILE *stream); #endif -RAPTOR_API +#ifndef RAPTOR_DISABLE_V1 +RAPTOR_API RAPTOR_V1 unsigned char* raptor_statement_part_as_counted_string(const void *term, raptor_identifier_type type, raptor_uri* literal_datatype, const unsigned char *literal_language, size_t* len_p); +RAPTOR_API RAPTOR_V1 +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_V1 +int raptor_statement_compare(const raptor_statement *s1, const raptor_statement *s2); +#endif RAPTOR_API unsigned char* raptor_statement_part_as_counted_string_v2(raptor_world* world, const void *term, raptor_identifier_type type, raptor_uri* literal_datatype, const unsigned 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_v2(raptor_world* world, const void *term, raptor_identifier_type type, raptor_uri* literal_datatype, const unsigned char *literal_language); RAPTOR_API -int raptor_statement_compare(const raptor_statement *s1, const raptor_statement *s2); -RAPTOR_API int raptor_statement_compare_v2(const raptor_statement_v2 *s1, const raptor_statement_v2 *s2); @@ -921,13 +940,17 @@ RAPTOR_API void raptor_parse_abort(raptor_parser* rdf_parser); /* Utility functions */ -RAPTOR_API +#ifndef RAPTOR_DISABLE_V1 +RAPTOR_API RAPTOR_V1 void raptor_print_locator(FILE *stream, raptor_locator* locator); +RAPTOR_API RAPTOR_V1 +int raptor_format_locator(char *buffer, size_t length, raptor_locator* locator); +RAPTOR_API RAPTOR_V1 +const char * raptor_locator_uri(raptor_locator *locator); +#endif RAPTOR_API void raptor_print_locator_v2(raptor_world* world, FILE *stream, raptor_locator* locator); RAPTOR_API -int raptor_format_locator(char *buffer, size_t length, raptor_locator* locator); -RAPTOR_API int raptor_format_locator_v2(raptor_world* world, char *buffer, size_t length, raptor_locator* locator); RAPTOR_API int raptor_locator_line(raptor_locator *locator); @@ -938,8 +961,6 @@ int raptor_locator_byte(raptor_locator *locator); RAPTOR_API const char * raptor_locator_file(raptor_locator *locator); RAPTOR_API -const char * raptor_locator_uri(raptor_locator *locator); -RAPTOR_API const char * raptor_locator_uri_v2(raptor_world* world, raptor_locator *locator); @@ -952,8 +973,10 @@ const char* raptor_get_mime_type(raptor_parser *rdf_parser); RAPTOR_API 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 **name, raptor_uri **uri, const char **label); +#endif RAPTOR_API int raptor_features_enumerate_v2(raptor_world* world, const raptor_feature feature, const char **name, raptor_uri **uri, const char **label); RAPTOR_API @@ -974,18 +997,22 @@ 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); /* Get serializer names */ -RAPTOR_API +#ifndef RAPTOR_DISABLE_V1 +RAPTOR_API RAPTOR_V1 int raptor_serializers_enumerate(const unsigned int counter, const char **name, const char **label, const char **mime_type, const unsigned char **uri_string); +RAPTOR_API RAPTOR_V1 +int raptor_serializer_syntax_name_check(const char *name); +#endif RAPTOR_API int raptor_serializers_enumerate_v2(raptor_world* world, const unsigned int counter, const char **name, const char **label, const char **mime_type, const unsigned char **uri_string); RAPTOR_API -int raptor_serializer_syntax_name_check(const char *name); -RAPTOR_API int raptor_serializer_syntax_name_check_v2(raptor_world* world, const char *name); /* Serializing */ -RAPTOR_API +#ifndef RAPTOR_DISABLE_V1 +RAPTOR_API RAPTOR_V1 raptor_serializer* raptor_new_serializer(const char *name); +#endif RAPTOR_API raptor_serializer* raptor_new_serializer_v2(raptor_world* world, const char *name); RAPTOR_API @@ -1017,8 +1044,10 @@ RAPTOR_API void raptor_serializer_set_warning_handler(raptor_serializer* serializer, void *user_data, raptor_message_handler handler); RAPTOR_API raptor_locator* raptor_serializer_get_locator(raptor_serializer *rdf_serializer); -RAPTOR_API +#ifndef RAPTOR_DISABLE_V1 +RAPTOR_API RAPTOR_V1 int raptor_serializer_features_enumerate(const raptor_feature feature, const char **name, raptor_uri **uri, const char **label); +#endif RAPTOR_API int raptor_serializer_features_enumerate_v2(raptor_world* world, const raptor_feature feature, const char **name, raptor_uri **uri, const char **label); RAPTOR_API @@ -1039,65 +1068,73 @@ RAPTOR_API void* raptor_calloc_memory(size_t nmemb, size_t size); /* URI functions */ -RAPTOR_API +#ifndef RAPTOR_DISABLE_V1 +RAPTOR_API RAPTOR_V1 raptor_uri* raptor_new_uri(const unsigned char *uri_string); +RAPTOR_API RAPTOR_V1 +raptor_uri* raptor_new_uri_from_uri_local_name(raptor_uri *uri, const unsigned char *local_name); +RAPTOR_API RAPTOR_V1 +raptor_uri* raptor_new_uri_relative_to_base(raptor_uri *base_uri, const unsigned char *uri_string); +RAPTOR_API RAPTOR_V1 +raptor_uri* raptor_new_uri_from_id(raptor_uri *base_uri, const unsigned char *id); +RAPTOR_API RAPTOR_V1 +raptor_uri* raptor_new_uri_for_rdf_concept(const char *name); +RAPTOR_API RAPTOR_V1 +void raptor_free_uri(raptor_uri *uri); +RAPTOR_API RAPTOR_V1 +int raptor_uri_equals(raptor_uri* uri1, raptor_uri* uri2); +RAPTOR_API RAPTOR_V1 +int raptor_uri_compare(raptor_uri* uri1, raptor_uri* uri2); +RAPTOR_API RAPTOR_V1 +raptor_uri* raptor_uri_copy(raptor_uri *uri); +RAPTOR_API RAPTOR_V1 +unsigned char* raptor_uri_as_string(raptor_uri *uri); +RAPTOR_API RAPTOR_V1 +unsigned char* raptor_uri_as_counted_string(raptor_uri *uri, size_t* len_p); +#endif 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(raptor_uri *uri, const unsigned char *local_name); -RAPTOR_API raptor_uri* raptor_new_uri_from_uri_local_name_v2(raptor_world* world, 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_v2(raptor_world* world, raptor_uri *base_uri, const unsigned char *uri_string); RAPTOR_API -raptor_uri* raptor_new_uri_from_id(raptor_uri *base_uri, const unsigned char *id); -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(const char *name); -RAPTOR_API raptor_uri* raptor_new_uri_for_rdf_concept_v2(raptor_world* world, const char *name); RAPTOR_API -void raptor_free_uri(raptor_uri *uri); -RAPTOR_API void raptor_free_uri_v2(raptor_world* world, raptor_uri *uri); RAPTOR_API -int raptor_uri_equals(raptor_uri* uri1, raptor_uri* uri2); -RAPTOR_API int raptor_uri_equals_v2(raptor_world* world, raptor_uri* uri1, raptor_uri* uri2); RAPTOR_API -int raptor_uri_compare(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(raptor_uri *uri); -RAPTOR_API raptor_uri* raptor_uri_copy_v2(raptor_world* world, raptor_uri *uri); RAPTOR_API -unsigned char* raptor_uri_as_string(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(raptor_uri *uri, size_t* len_p); -RAPTOR_API unsigned char* raptor_uri_as_counted_string_v2(raptor_world* world, raptor_uri *uri, size_t* len_p); /* 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); +#endif RAPTOR_API raptor_uri* raptor_new_uri_for_xmlbase_v2(raptor_world* world, raptor_uri* old_uri); /* Make a URI suitable for retrieval (no fragment, has path) from an existing one */ -RAPTOR_API +#ifndef RAPTOR_DISABLE_V1 +RAPTOR_API RAPTOR_V1 raptor_uri* raptor_new_uri_for_retrieval(raptor_uri* old_uri); +#endif RAPTOR_API raptor_uri* raptor_new_uri_for_retrieval_v2(raptor_world* world, raptor_uri* old_uri); /* Identifier functions */ -RAPTOR_API +#ifndef RAPTOR_DISBALE_V1 +RAPTOR_API RAPTOR_V1 raptor_identifier* raptor_new_identifier(raptor_identifier_type type, raptor_uri *uri, raptor_uri_source uri_source, const unsigned char *id, const unsigned char *literal, raptor_uri *literal_datatype, const unsigned char *literal_language); +#endif RAPTOR_API raptor_identifier* raptor_new_identifier_v2(raptor_world* world, raptor_identifier_type type, raptor_uri *uri, raptor_uri_source uri_source, const unsigned char *id, const unsigned char *literal, raptor_uri *literal_datatype, const unsigned char *literal_language); RAPTOR_API @@ -1124,9 +1161,11 @@ int raptor_iostream_write_string_python(raptor_iostream *iostr, const unsigned c RAPTOR_API RAPTOR_DEPRECATED void raptor_iostream_write_string_turtle(raptor_iostream *iostr, const unsigned char *string, size_t len); #endif -RAPTOR_API +#ifndef RAPTOR_DISABLE_V1 +RAPTOR_API RAPTOR_V1 void raptor_iostream_write_statement_ntriples(raptor_iostream* iostr, const raptor_statement *statement); RAPTOR_API +#endif void raptor_iostream_write_statement_ntriples_v2(raptor_world* world, raptor_iostream* iostr, const raptor_statement *statement); RAPTOR_API int raptor_xml_any_escape_string(const unsigned char *string, size_t len, unsigned char *buffer, size_t length, char quote, int xml_version, raptor_simple_message_handler error_handler, void *error_data); @@ -1160,32 +1199,34 @@ int raptor_uri_is_file_uri(const unsigned char* uri_string); #endif RAPTOR_API 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_uri, raptor_uri *reference_uri, size_t *length_p); +RAPTOR_API RAPTOR_V1 +void raptor_uri_print(const raptor_uri* uri, FILE *stream); +RAPTOR_API RAPTOR_V1 +unsigned char* raptor_uri_to_counted_string(raptor_uri *uri, size_t *len_p); +RAPTOR_API RAPTOR_V1 +unsigned char* raptor_uri_to_string(raptor_uri *uri); +RAPTOR_API RAPTOR_V1 +void raptor_uri_set_handler(const raptor_uri_handler *handler, void *context); +RAPTOR_API RAPTOR_V1 +void raptor_uri_get_handler(const raptor_uri_handler **handler, void **context); +#endif RAPTOR_API unsigned char* raptor_uri_to_relative_counted_uri_string_v2(raptor_world* world, raptor_uri *base_uri, raptor_uri *reference_uri, size_t *length_p); RAPTOR_API unsigned char* raptor_uri_to_relative_uri_string(raptor_uri *base_uri, raptor_uri *reference_uri); RAPTOR_API -void raptor_uri_print(const raptor_uri* uri, FILE *stream); -RAPTOR_API void raptor_uri_print_v2(raptor_world* world, const raptor_uri* uri, FILE *stream); RAPTOR_API -unsigned char* raptor_uri_to_counted_string(raptor_uri *uri, size_t *len_p); -RAPTOR_API unsigned char* raptor_uri_to_counted_string_v2(raptor_world* world, raptor_uri *uri, size_t *len_p); RAPTOR_API -unsigned char* raptor_uri_to_string(raptor_uri *uri); -RAPTOR_API unsigned char* raptor_uri_to_string_v2(raptor_world* world, raptor_uri *uri); RAPTOR_API -void raptor_uri_set_handler(const raptor_uri_handler *handler, void *context); -RAPTOR_API void raptor_uri_set_handler_v2(raptor_world* world, const raptor_uri_handler *handler, void *context); RAPTOR_API -void raptor_uri_get_handler(const raptor_uri_handler **handler, void **context); -RAPTOR_API void raptor_uri_get_handler_v2(raptor_world* world, const raptor_uri_handler **handler, void **context); /** @@ -1234,13 +1275,15 @@ void raptor_www_finish(void); RAPTOR_API void raptor_www_no_www_library_init_finish(void); -RAPTOR_API +#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); +#endif RAPTOR_API raptor_www *raptor_www_new_v2(raptor_world* world); RAPTOR_API -raptor_www *raptor_www_new_with_connection(void* connection); -RAPTOR_API raptor_www *raptor_www_new_with_connection_v2(raptor_world* world, void* connection); RAPTOR_API void raptor_www_free(raptor_www *www); @@ -1279,8 +1322,10 @@ raptor_uri* raptor_www_get_final_uri(raptor_www* www); /* raptor_qname - XML qnames */ RAPTOR_API raptor_qname* raptor_new_qname(raptor_namespace_stack *nstack, const unsigned char *name, const unsigned char *value, raptor_simple_message_handler error_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); +#endif RAPTOR_API raptor_qname* raptor_new_qname_from_namespace_local_name_v2(raptor_world* world, raptor_namespace *ns, const unsigned char *local_name, const unsigned char *value); RAPTOR_API @@ -1308,13 +1353,14 @@ const unsigned char* raptor_qname_get_counted_value(raptor_qname* name, size_t* /* raptor_namespace_stack - stack of XML namespaces */ RAPTOR_API raptor_namespace* raptor_new_namespace_from_uri(raptor_namespace_stack *nstack, 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, void *error_data, int defaults); +RAPTOR_API RAPTOR_V1 +int raptor_namespaces_init(raptor_namespace_stack *nstack, const raptor_uri_handler *uri_handler, void *uri_context, raptor_simple_message_handler error_handler, void *error_data, int defaults); +#endif RAPTOR_API raptor_namespace_stack* raptor_new_namespaces_v2(raptor_world* world, raptor_simple_message_handler error_handler, void *error_data, int defaults); - -RAPTOR_API -int raptor_namespaces_init(raptor_namespace_stack *nstack, const raptor_uri_handler *uri_handler, void *uri_context, raptor_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); RAPTOR_API @@ -1390,7 +1436,7 @@ typedef void (raptor_sequence_free_handler(void* object)); * * Handler function for freeing a sequence item. * - * Set by raptor_new_sequence_v2(). + * Set by raptor_new_sequence_with_handler_context(). */ typedef void (raptor_sequence_free_handler_v2(void* context, void* object)); @@ -1413,7 +1459,7 @@ typedef void (raptor_sequence_print_handler(void *object, FILE *fh)); * * Handler function for printing a sequence item. * - * Set by raptor_new_sequence_v2() or raptor_sequence_set_print_handler_v2(). + * Set by raptor_new_sequence_with_handler_context() or raptor_sequence_set_print_handler_v2(). */ typedef void (raptor_sequence_print_handler_v2(void *context, void *object, FILE *fh)); @@ -1685,8 +1731,10 @@ RAPTOR_API int raptor_iostream_format_hexadecimal(raptor_iostream* iostr, unsigned int integer, int width); RAPTOR_API int raptor_iostream_write_stringbuffer(raptor_iostream* iostr, raptor_stringbuffer *sb); -RAPTOR_API +#ifndef RAPTOR_DISABLE_V1 +RAPTOR_API RAPTOR_V1 int raptor_iostream_write_uri(raptor_iostream *iostr, raptor_uri *uri); +#endif RAPTOR_API int raptor_iostream_write_uri_v2(raptor_world* world, raptor_iostream *iostr, raptor_uri *uri); RAPTOR_API @@ -1695,8 +1743,10 @@ RAPTOR_API int raptor_iostream_read_eof(raptor_iostream *iostr); /* Parser and Serializer features */ -RAPTOR_API +#ifndef RAPTOR_DISABLE_V1 +RAPTOR_API RAPTOR_V1 raptor_feature raptor_feature_from_uri(raptor_uri *uri); +#endif RAPTOR_API raptor_feature raptor_feature_from_uri_v2(raptor_world* world, raptor_uri *uri); RAPTOR_API @@ -1727,8 +1777,10 @@ RAPTOR_API const unsigned char* raptor_xml_element_get_language(raptor_xml_element* xml_element); /* 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, const raptor_uri_handler *uri_handler, void *uri_context, raptor_iostream* iostr, raptor_simple_message_handler error_handler, void *error_data, int canonicalize); +#endif RAPTOR_API raptor_xml_writer* raptor_new_xml_writer_v2(raptor_world* world, raptor_namespace_stack *nstack, raptor_iostream* iostr, raptor_simple_message_handler error_handler, void *error_data, int canonicalize); RAPTOR_API @@ -1755,8 +1807,10 @@ RAPTOR_API void raptor_xml_writer_comment_counted(raptor_xml_writer* xml_writer, const unsigned char *s, unsigned int len); RAPTOR_API 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, const char **name, raptor_uri **uri, const char **label); +#endif RAPTOR_API int raptor_xml_writer_features_enumerate_v2(raptor_world* world, const raptor_feature feature, const char **name, raptor_uri **uri, const char **label); RAPTOR_API @@ -1890,8 +1944,10 @@ typedef struct { raptor_message_handler_closure handlers[RAPTOR_LOG_LEVEL_LAST+1]; } raptor_error_handlers; -RAPTOR_API +#ifndef RAPTOR_DISABLE_V1 +RAPTOR_API RAPTOR_V1 void raptor_error_handlers_init(raptor_error_handlers* error_handlers); +#endif RAPTOR_API void raptor_error_handlers_init_v2(raptor_world* world, raptor_error_handlers* error_handlers); diff --git a/src/raptor_feature.c b/src/raptor_feature.c index 0b167737..57c94c2a 100644 --- a/src/raptor_feature.c +++ b/src/raptor_feature.c @@ -175,6 +175,7 @@ raptor_feature_value_type(const raptor_feature feature) { } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_feature_from_uri: * @uri: feature URI @@ -193,6 +194,8 @@ raptor_feature_from_uri(raptor_uri *uri) { return raptor_feature_from_uri_v2(raptor_world_instance(), uri); } +#endif + /** * raptor_feature_from_uri_v2: diff --git a/src/raptor_general.c b/src/raptor_general.c index a26589ca..937b9671 100644 --- a/src/raptor_general.c +++ b/src/raptor_general.c @@ -49,7 +49,9 @@ /* statics */ +#ifndef RAPTOR_DISABLE_V1 static raptor_world* Raptor_World=NULL; +#endif const char * const raptor_short_copyright_string = "Copyright 2000-2008 David Beckett. Copyright 2000-2005 University of Bristol"; @@ -109,8 +111,6 @@ const unsigned int raptor_version_decimal = RAPTOR_VERSION_DECIMAL; * * The returned world object is used with subsequent raptor API calls. * - * FIXME: Does not initialize the whole library yet. Use raptor_init() instead. - * * Return value: raptor_world object or NULL on failure */ raptor_world * @@ -170,6 +170,7 @@ raptor_free_world(raptor_world* world) } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_init: * @@ -180,7 +181,6 @@ raptor_free_world(raptor_world* world) void raptor_init(void) { - if(Raptor_World) { Raptor_World->static_usage++; return; @@ -231,6 +231,7 @@ raptor_world_instance(void) { return Raptor_World; } +#endif /* @@ -429,6 +430,7 @@ raptor_check_ordinal(const unsigned char *name) { } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_error_handlers_init: * @error_handlers: error handlers object @@ -443,6 +445,7 @@ raptor_error_handlers_init(raptor_error_handlers* error_handlers) { raptor_error_handlers_init_v2(raptor_world_instance(), error_handlers); } +#endif /** diff --git a/src/raptor_identifier.c b/src/raptor_identifier.c index 24560f33..3140a9ca 100644 --- a/src/raptor_identifier.c +++ b/src/raptor_identifier.c @@ -45,6 +45,7 @@ #include "raptor_internal.h" +#ifndef RAPTOR_DISABLE_V1 /** * raptor_new_identifier: * @type: raptor_identifier_type of identifier @@ -83,6 +84,8 @@ raptor_new_identifier(raptor_identifier_type type, literal_datatype, literal_language); } +#endif + /** * raptor_new_identifier_v2: diff --git a/src/raptor_internal.h b/src/raptor_internal.h index 0672a4b9..2d8507b1 100644 --- a/src/raptor_internal.h +++ b/src/raptor_internal.h @@ -649,7 +649,9 @@ const char* raptor_basename(const char *name); raptor_statement* raptor_statement_copy(const raptor_statement *statement); raptor_statement_v2* raptor_statement_copy_v2(const raptor_statement_v2 *statement); raptor_statement_v2* raptor_statement_copy_v2_from_v1(raptor_world* world, const raptor_statement *statement); +#ifdef RAPTOR_DISABLE_V1 void raptor_free_statement(raptor_statement *statement); +#endif void raptor_free_statement_v2(raptor_statement_v2 *statement); /* raptor_parse.c */ @@ -1325,7 +1327,9 @@ struct raptor_world_s { }; /* raptor_world legacy accessor */ +#ifndef RAPTOR_DISABLE_V1 raptor_world* raptor_world_instance(void); +#endif /* end of RAPTOR_INTERNAL */ #endif diff --git a/src/raptor_iostream.c b/src/raptor_iostream.c index 987a5847..a6b66a16 100644 --- a/src/raptor_iostream.c +++ b/src/raptor_iostream.c @@ -773,6 +773,7 @@ raptor_iostream_write_counted_string(raptor_iostream *iostr, } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_iostream_write_uri: * @iostr: raptor iostream @@ -790,6 +791,7 @@ raptor_iostream_write_uri(raptor_iostream* iostr, raptor_uri* uri) { return raptor_iostream_write_uri_v2(raptor_world_instance(), iostr, uri); } +#endif /** diff --git a/src/raptor_locator.c b/src/raptor_locator.c index 9722a55e..bdbb369a 100644 --- a/src/raptor_locator.c +++ b/src/raptor_locator.c @@ -48,6 +48,7 @@ #include "raptor_internal.h" +#ifndef RAPTOR_DISABLE_V1 /** * raptor_print_locator: * @stream: stream to print to @@ -63,6 +64,7 @@ raptor_print_locator(FILE *stream, raptor_locator* locator) { raptor_print_locator_v2(raptor_world_instance(), stream, locator); } +#endif /** @@ -94,6 +96,7 @@ raptor_print_locator_v2(raptor_world* world, FILE *stream, raptor_locator* locat } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_format_locator: * @buffer: buffer to store format @@ -116,6 +119,7 @@ raptor_format_locator(char *buffer, size_t length, raptor_locator* locator) { return raptor_format_locator_v2(raptor_world_instance(), buffer, length, locator); } +#endif /** @@ -244,6 +248,8 @@ raptor_locator_file(raptor_locator *locator) return locator->file; } + +#ifndef RAPTOR_DISABLE_V1 /** * raptor_locator_uri: * @locator: locator @@ -263,6 +269,7 @@ raptor_locator_uri(raptor_locator *locator) { return raptor_locator_uri_v2(raptor_world_instance(), locator); } +#endif /** diff --git a/src/raptor_namespace.c b/src/raptor_namespace.c index dbf42908..6dab4f3e 100644 --- a/src/raptor_namespace.c +++ b/src/raptor_namespace.c @@ -97,6 +97,7 @@ const unsigned char * const raptor_xmlschema_datatypes_namespace_uri=(const unsi const unsigned char * const raptor_owl_namespace_uri=(const unsigned char *)"http://www.w3.org/2002/07/owl#"; +#ifndef RAPTOR_DISABLE_V1 /** * raptor_namespaces_init: * @nstack: #raptor_namespace_stack to initialise @@ -134,6 +135,7 @@ raptor_namespaces_init(raptor_namespace_stack *nstack, error_data, defaults); } +#endif /** @@ -200,6 +202,7 @@ raptor_namespaces_init_v2(raptor_world* world, } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_new_namespaces: * @uri_handler: URI handler function (ignored) @@ -233,6 +236,7 @@ raptor_new_namespaces(const raptor_uri_handler *uri_handler, error_data, defaults); } +#endif /** diff --git a/src/raptor_parse.c b/src/raptor_parse.c index 4b1fedba..6f1bbcfc 100644 --- a/src/raptor_parse.c +++ b/src/raptor_parse.c @@ -385,6 +385,7 @@ raptor_get_parser_factory(raptor_world *world, const char *name) } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_syntaxes_enumerate: * @counter: index into the list of syntaxes @@ -409,6 +410,7 @@ raptor_syntaxes_enumerate(const unsigned int counter, return raptor_syntaxes_enumerate_v2(raptor_world_instance(), counter, name, label, mime_type, uri_string); } +#endif /** @@ -459,6 +461,7 @@ raptor_syntaxes_enumerate_v2(raptor_world* world, } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_parsers_enumerate: * @counter: index to list of parsers @@ -492,6 +495,7 @@ int raptor_syntax_name_check(const char *name) { return raptor_syntax_name_check_v2(raptor_world_instance(), name); } +#endif /** @@ -509,6 +513,7 @@ raptor_syntax_name_check_v2(raptor_world* world, const char *name) { } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_new_parser: * @name: the parser name @@ -524,6 +529,7 @@ raptor_parser* raptor_new_parser(const char *name) { return raptor_new_parser_v2(raptor_world_instance(), name); } +#endif /** @@ -581,6 +587,7 @@ raptor_new_parser_v2(raptor_world* world, const char *name) { } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_new_parser_for_content: * @uri: URI identifying the syntax (or NULL) @@ -611,6 +618,7 @@ raptor_new_parser_for_content(raptor_uri *uri, const char *mime_type, buffer, len, identifier); } +#endif /** @@ -1345,6 +1353,7 @@ raptor_parser_set_uri_filter(raptor_parser* parser, } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_features_enumerate: * @feature: feature enumeration (0+) @@ -1370,6 +1379,7 @@ raptor_features_enumerate(const raptor_feature feature, return raptor_features_enumerate_v2(raptor_world_instance(), feature, name, uri, label); } +#endif /** @@ -1905,6 +1915,7 @@ compare_syntax_score(const void *a, const void *b) { } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_guess_parser_name: * @uri: URI identifying the syntax (or NULL) @@ -1932,6 +1943,7 @@ raptor_guess_parser_name(raptor_uri *uri, const char *mime_type, return raptor_guess_parser_name_v2(raptor_world_instance(), uri, mime_type, buffer, len, identifier); } +#endif /** diff --git a/src/raptor_qname.c b/src/raptor_qname.c index 49cc04e2..215eb6ce 100644 --- a/src/raptor_qname.c +++ b/src/raptor_qname.c @@ -219,6 +219,7 @@ raptor_new_qname(raptor_namespace_stack *nstack, } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_new_qname_from_namespace_local_name: * @ns: namespace of qname (or NULL) @@ -245,6 +246,7 @@ raptor_new_qname_from_namespace_local_name(raptor_namespace *ns, local_name, value); } +#endif /** diff --git a/src/raptor_sequence.c b/src/raptor_sequence.c index 6c6c2438..fb5b8c53 100644 --- a/src/raptor_sequence.c +++ b/src/raptor_sequence.c @@ -540,7 +540,7 @@ raptor_sequence_print_string(char *data, FILE *fh) } -#ifndef RAPTOR_DISABLE_DEPRECATED +#if !defined(RAPTOR_DISABLE_DEPRECATED) && !defined(RAPTOR_DISABLE_V1) /** * raptor_sequence_print_uri: * @data: data item (a #raptor_uri) diff --git a/src/raptor_serialize.c b/src/raptor_serialize.c index 4d5f360a..bcb5f4e5 100644 --- a/src/raptor_serialize.c +++ b/src/raptor_serialize.c @@ -290,6 +290,7 @@ raptor_get_serializer_factory(raptor_world* world, const char *name) } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_serializers_enumerate: * @counter: index into the list of syntaxes @@ -317,6 +318,7 @@ raptor_serializers_enumerate(const unsigned int counter, mime_type, uri_string); } +#endif /** @@ -360,6 +362,7 @@ raptor_serializers_enumerate_v2(raptor_world* world, } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_serializer_syntax_name_check: * @name: the syntax name @@ -377,6 +380,8 @@ raptor_serializer_syntax_name_check(const char *name) return raptor_serializer_syntax_name_check_v2(raptor_world_instance(), name); } +#endif + /** * raptor_serializer_syntax_name_check_v2: @@ -394,6 +399,7 @@ raptor_serializer_syntax_name_check_v2(raptor_world* world, const char *name) } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_new_serializer: * @name: the serializer name @@ -410,6 +416,7 @@ raptor_new_serializer(const char *name) { return raptor_new_serializer_v2(raptor_world_instance(), name); } +#endif /** @@ -847,7 +854,7 @@ raptor_serializer_get_iostream(raptor_serializer *serializer) } - +#ifndef RAPTOR_DISABLE_V1 /** * raptor_serializer_features_enumerate: * @feature: feature enumeration (0+) @@ -873,6 +880,8 @@ raptor_serializer_features_enumerate(const raptor_feature feature, return raptor_serializer_features_enumerate_v2(raptor_world_instance(), feature, name, uri, label); } +#endif + /** * raptor_serializer_features_enumerate_v2: diff --git a/src/raptor_serialize_ntriples.c b/src/raptor_serialize_ntriples.c index bbe16896..34dbbd21 100644 --- a/src/raptor_serialize_ntriples.c +++ b/src/raptor_serialize_ntriples.c @@ -176,6 +176,7 @@ raptor_iostream_write_statement_part_ntriples(raptor_world* world, } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_iostream_write_statement_ntriples: * @iostr: raptor iostream @@ -195,6 +196,8 @@ raptor_iostream_write_statement_ntriples(raptor_iostream* iostr, iostr, statement); } +#endif + /** * raptor_iostream_write_statement_ntriples_v2: diff --git a/src/raptor_statement.c b/src/raptor_statement.c index a04db9c9..6d20da75 100644 --- a/src/raptor_statement.c +++ b/src/raptor_statement.c @@ -51,6 +51,7 @@ static void raptor_print_statement_as_ntriples_common(raptor_world* world, const static int raptor_statement_compare_common(raptor_world* world, const raptor_statement *s1, const raptor_statement *s2); +#ifndef RAPTOR_DISABLE_V1 /** * raptor_statement_copy: * @statement: statement to copy @@ -67,6 +68,7 @@ raptor_statement_copy(const raptor_statement *statement) { return raptor_statement_copy_common(raptor_world_instance(), statement); } +#endif /** @@ -192,6 +194,7 @@ raptor_statement_copy_common(raptor_world* world, const raptor_statement *statem } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_free_statement: * @statement: statement @@ -208,6 +211,7 @@ raptor_free_statement(raptor_statement *statement) raptor_free_statement_common(raptor_world_instance(), statement); RAPTOR_FREE(raptor_statement, statement); } +#endif /** @@ -259,6 +263,7 @@ raptor_free_statement_common(raptor_world *world, raptor_statement *statement) } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_print_statement: * @statement: #raptor_statement object to print @@ -274,6 +279,7 @@ raptor_print_statement(const raptor_statement * statement, FILE *stream) { raptor_print_statement_common(raptor_world_instance(), statement, stream); } +#endif /** @@ -349,7 +355,7 @@ raptor_print_statement_common(raptor_world* world, const raptor_statement * stat } -#ifndef RAPTOR_DISABLE_DEPRECATED +#if !defined(RAPTOR_DISABLE_DEPRECATED) && !defined(RAPTOR_DISABLE_V1) /** * raptor_print_statement_detailed: * @statement: #raptor_statement object to print @@ -374,6 +380,7 @@ raptor_print_statement_detailed(const raptor_statement * statement, #endif +#ifndef RAPTOR_DISABLE_V1 /** * raptor_statement_part_as_counted_string: * @term: #raptor_statement part (subject, predicate, object) @@ -414,6 +421,8 @@ raptor_statement_part_as_counted_string(const void *term, literal_language, len_p); } +#endif + /** * raptor_statement_part_as_counted_string_v2: @@ -553,6 +562,7 @@ raptor_statement_part_as_counted_string_v2(raptor_world* world, } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_statement_part_as_string: * @term: #raptor_statement part (subject, predicate, object) @@ -589,6 +599,7 @@ raptor_statement_part_as_string(const void *term, literal_datatype, literal_language); } +#endif /** @@ -681,6 +692,7 @@ raptor_print_statement_part_as_ntriples(raptor_world* world, } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_print_statement_as_ntriples: * @statement: #raptor_statement to print @@ -700,6 +712,7 @@ raptor_print_statement_as_ntriples(const raptor_statement * statement, statement, stream); } +#endif /** @@ -747,7 +760,7 @@ raptor_print_statement_as_ntriples_common(raptor_world* world, } - +#ifndef RAPTOR_DISABLE_V1 /** * raptor_statement_compare: * @s1: first statement @@ -772,6 +785,7 @@ raptor_statement_compare(const raptor_statement *s1, { return raptor_statement_compare_common(raptor_world_instance(), s1, s2); } +#endif /** diff --git a/src/raptor_uri.c b/src/raptor_uri.c index c3124631..b4774875 100644 --- a/src/raptor_uri.c +++ b/src/raptor_uri.c @@ -63,6 +63,8 @@ #define WIN32 #endif + +#ifndef RAPTOR_DISABLE_V1 /** * raptor_uri_set_handler: * @handler: URI handler structure @@ -81,6 +83,7 @@ raptor_uri_set_handler(const raptor_uri_handler *handler, void *context) { raptor_uri_set_handler_v2(raptor_world_instance(), handler, context); } +#endif /** @@ -107,6 +110,7 @@ raptor_uri_set_handler_v2(raptor_world* world, const raptor_uri_handler *handler } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_uri_get_handler: * @handler: URI handler to return @@ -122,6 +126,7 @@ raptor_uri_get_handler(const raptor_uri_handler **handler, void **context) { raptor_uri_get_handler_v2(raptor_world_instance(), handler, context); } +#endif /** @@ -190,6 +195,7 @@ raptor_default_new_uri(void *context, const unsigned char *uri_string) } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_new_uri: * @uri_string: URI string. @@ -206,6 +212,7 @@ raptor_new_uri(const unsigned char *uri_string) { return raptor_new_uri_v2(raptor_world_instance(), uri_string); } +#endif /** @@ -245,6 +252,7 @@ raptor_default_new_uri_from_uri_local_name(void *context, } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_new_uri_from_uri_local_name: * @uri: existing #raptor_uri @@ -266,6 +274,7 @@ raptor_new_uri_from_uri_local_name(raptor_uri *uri, const unsigned char *local_n { return raptor_new_uri_from_uri_local_name_v2(raptor_world_instance(), uri, local_name); } +#endif /** @@ -317,6 +326,7 @@ raptor_default_new_uri_relative_to_base(void *context, } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_new_uri_relative_to_base: * @base_uri: existing base URI @@ -336,6 +346,7 @@ raptor_new_uri_relative_to_base(raptor_uri *base_uri, return raptor_new_uri_relative_to_base_v2(raptor_world_instance(), base_uri, uri_string); } +#endif /** @@ -360,6 +371,7 @@ raptor_new_uri_relative_to_base_v2(raptor_world* world, } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_new_uri_from_id: * @base_uri: existing base URI @@ -380,6 +392,7 @@ raptor_new_uri_from_id(raptor_uri *base_uri, const unsigned char *id) { return raptor_new_uri_from_id_v2(raptor_world_instance(), base_uri, id); } +#endif /** @@ -440,6 +453,7 @@ raptor_default_new_uri_for_rdf_concept(void *context, const char *name) } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_new_uri_for_rdf_concept: * @name: RDF namespace concept @@ -459,6 +473,7 @@ raptor_new_uri_for_rdf_concept(const char *name) { return raptor_new_uri_for_rdf_concept_v2(raptor_world_instance(), name); } +#endif /** @@ -490,6 +505,7 @@ raptor_default_free_uri(void *context, raptor_uri *uri) } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_free_uri: * @uri: URI to destroy @@ -504,6 +520,8 @@ raptor_free_uri(raptor_uri *uri) { raptor_free_uri_v2(raptor_world_instance(), uri); } +#endif + /* FIXME: Refactor the uri abstraction so that raptor_world* can be stored there. */ @@ -537,6 +555,7 @@ raptor_default_uri_compare(void *context, raptor_uri* uri1, raptor_uri* uri2) } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_uri_equals: * @uri1: URI 1 (may be NULL) @@ -556,6 +575,7 @@ raptor_uri_equals(raptor_uri* uri1, raptor_uri* uri2) { return raptor_uri_equals_v2(raptor_world_instance(), uri1, uri2); } +#endif /** @@ -585,6 +605,7 @@ raptor_uri_equals_v2(raptor_world* world, raptor_uri* uri1, raptor_uri* uri2) } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_uri_compare: * @uri1: URI 1 (may be NULL) @@ -604,6 +625,7 @@ raptor_uri_compare(raptor_uri* uri1, raptor_uri* uri2) { return raptor_uri_compare_v2(raptor_world_instance(), uri1, uri2); } +#endif /** @@ -648,6 +670,7 @@ raptor_default_uri_copy(void *context, raptor_uri *uri) } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_uri_copy: * @uri: URI object @@ -664,6 +687,7 @@ raptor_uri_copy(raptor_uri *uri) { return raptor_uri_copy_v2(raptor_world_instance(), uri); } +#endif /** @@ -692,6 +716,7 @@ raptor_default_uri_as_string(void *context, raptor_uri *uri) } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_uri_as_string: * @uri: #raptor_uri object @@ -712,6 +737,7 @@ raptor_uri_as_string(raptor_uri *uri) { return raptor_uri_as_string_v2(raptor_world_instance(), uri); } +#endif /** @@ -747,6 +773,7 @@ raptor_default_uri_as_counted_string(void *context, raptor_uri *uri, } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_uri_as_counted_string: * @uri: URI object @@ -769,6 +796,7 @@ raptor_uri_as_counted_string(raptor_uri *uri, size_t* len_p) { return raptor_uri_as_counted_string_v2(raptor_world_instance(), uri, len_p); } +#endif /** @@ -1152,6 +1180,7 @@ raptor_uri_uri_string_is_file_uri(const unsigned char* uri_string) { } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_new_uri_for_xmlbase: * @old_uri: URI to transform @@ -1171,6 +1200,8 @@ raptor_new_uri_for_xmlbase(raptor_uri* old_uri) { return raptor_new_uri_for_xmlbase_v2(raptor_world_instance(), old_uri); } +#endif + /** * raptor_new_uri_for_xmlbase_v2: @@ -1220,6 +1251,7 @@ raptor_new_uri_for_xmlbase_v2(raptor_world* world, raptor_uri* old_uri) } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_new_uri_for_retrieval: * @old_uri: URI to transform @@ -1239,6 +1271,7 @@ raptor_new_uri_for_retrieval(raptor_uri* old_uri) { return raptor_new_uri_for_retrieval_v2(raptor_world_instance(), old_uri); } +#endif /** @@ -1450,6 +1483,7 @@ raptor_uri_path_make_relative_path(const unsigned char *from_path, size_t from_p } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_uri_to_relative_counted_uri_string: * @base_uri: The base absolute URI to resolve against (or NULL) @@ -1473,6 +1507,8 @@ raptor_uri_to_relative_counted_uri_string(raptor_uri *base_uri, reference_uri, length_p); } +#endif + /** * raptor_uri_to_relative_counted_uri_string_v2: @@ -1650,6 +1686,7 @@ raptor_uri_to_relative_counted_uri_string_v2(raptor_world* world, } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_uri_to_relative_uri_string: * @base_uri: The base absolute URI to resolve against @@ -1682,6 +1719,7 @@ void raptor_uri_print(const raptor_uri* uri, FILE *stream) { raptor_uri_print_v2(raptor_world_instance(), uri, stream); } +#endif /** @@ -1704,6 +1742,7 @@ raptor_uri_print_v2(raptor_world* world, const raptor_uri* uri, FILE *stream) { } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_uri_to_counted_string: * @uri: #raptor_uri object @@ -1726,6 +1765,7 @@ raptor_uri_to_counted_string(raptor_uri *uri, size_t *len_p) { return raptor_uri_to_counted_string_v2(raptor_world_instance(), uri, len_p); } +#endif /** @@ -1769,6 +1809,7 @@ raptor_uri_to_counted_string_v2(raptor_world* world, raptor_uri *uri, size_t *le } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_uri_to_string: * @uri: #raptor_uri object @@ -1788,6 +1829,7 @@ raptor_uri_to_string(raptor_uri *uri) { return raptor_uri_to_string_v2(raptor_world_instance(), uri); } +#endif /** diff --git a/src/raptor_www.c b/src/raptor_www.c index 800fba11..11bcc2fe 100644 --- a/src/raptor_www.c +++ b/src/raptor_www.c @@ -126,6 +126,7 @@ raptor_www_finish(void) } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_www_new_with_connection: * @connection: external WWW connection object. @@ -147,6 +148,7 @@ raptor_www_new_with_connection(void *connection) { return raptor_www_new_with_connection_v2(raptor_world_instance(), connection); } +#endif /** @@ -200,6 +202,7 @@ raptor_www_new_with_connection_v2(raptor_world* world, void *connection) } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_www_new: * @@ -215,6 +218,7 @@ raptor_www_new(void) { return raptor_www_new_v2(raptor_world_instance()); } +#endif /** diff --git a/src/raptor_xml_writer.c b/src/raptor_xml_writer.c index 3b068e70..93793a96 100644 --- a/src/raptor_xml_writer.c +++ b/src/raptor_xml_writer.c @@ -416,6 +416,7 @@ raptor_xml_writer_end_element_common(raptor_xml_writer* xml_writer, } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_new_xml_writer: * @nstack: Namespace stack for the writer to start with (or NULL) @@ -453,6 +454,7 @@ raptor_new_xml_writer(raptor_namespace_stack *nstack, error_data, canonicalize); } +#endif /** @@ -835,6 +837,7 @@ raptor_xml_writer_comment_counted(raptor_xml_writer* xml_writer, } +#ifndef RAPTOR_DISABLE_V1 /** * raptor_xml_writer_features_enumerate: * @feature: feature enumeration (0+) @@ -860,6 +863,7 @@ raptor_xml_writer_features_enumerate(const raptor_feature feature, return raptor_xml_writer_features_enumerate_v2(raptor_world_instance(), feature, name, uri, label); } +#endif /** |