rasqal.h | rasqal.h | |||
---|---|---|---|---|
/* -*- Mode: c; c-basic-offset: 2 -*- | /* -*- Mode: c; c-basic-offset: 2 -*- | |||
* | * | |||
* rasqal.h - Rasqal RDF Query library interfaces and definition | * rasqal.h - Rasqal RDF Query library interfaces and definition | |||
* | * | |||
* $Id: rasqal.h 10872 2006-04-28 05:49:16Z dajobe $ | * $Id: rasqal.h 11498 2006-10-14 23:09:03Z dajobe $ | |||
* | * | |||
* Copyright (C) 2003-2006, David Beckett http://purl.org/net/dajobe/ | * Copyright (C) 2003-2006, David Beckett http://purl.org/net/dajobe/ | |||
* Copyright (C) 2003-2005, University of Bristol, UK http://www.bristol.ac .uk/ | * Copyright (C) 2003-2005, University of Bristol, UK http://www.bristol.ac .uk/ | |||
* | * | |||
* This package is Free Software and part of Redland http://librdf.org/ | * This package is Free Software and part of Redland http://librdf.org/ | |||
* | * | |||
* It is licensed under the following three licenses as alternatives: | * It is licensed under the following three licenses as alternatives: | |||
* 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version | * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version | |||
* 2. GNU General Public License (GPL) V2 or any newer version | * 2. GNU General Public License (GPL) V2 or any newer version | |||
* 3. Apache License, V2.0 or any newer version | * 3. Apache License, V2.0 or any newer version | |||
skipping to change at line 40 | skipping to change at line 40 | |||
extern "C" { | extern "C" { | |||
#endif | #endif | |||
/** | /** | |||
* RASQAL_API: | * RASQAL_API: | |||
* | * | |||
* Macro for wrapping API function call declarations. | * Macro for wrapping API function call declarations. | |||
* | * | |||
*/ | */ | |||
#ifdef WIN32 | #ifdef WIN32 | |||
# ifdef RASQAL_INTERNAL | # ifdef RASQAL_STATIC | |||
# define RASQAL_API _declspec(dllexport) | # define RASQAL_API | |||
# else | # else | |||
# define RASQAL_API _declspec(dllimport) | # ifdef RASQAL_INTERNAL | |||
# define RASQAL_API _declspec(dllexport) | ||||
# else | ||||
# define RASQAL_API _declspec(dllimport) | ||||
# endif | ||||
# endif | # endif | |||
#else | #else | |||
# define RASQAL_API | # define RASQAL_API | |||
#endif | #endif | |||
/* Use gcc 3.1+ feature to allow marking of deprecated API calls. | /* Use gcc 3.1+ feature to allow marking of deprecated API calls. | |||
* This gives a warning during compiling. | * This gives a warning during compiling. | |||
*/ | */ | |||
#if ( __GNUC__ == 3 && __GNUC_MINOR__ > 0 ) || __GNUC__ > 3 | #if ( __GNUC__ == 3 && __GNUC_MINOR__ > 0 ) || __GNUC__ > 3 | |||
#ifdef __APPLE_CC__ | #ifdef __APPLE_CC__ | |||
skipping to change at line 101 | skipping to change at line 105 | |||
*/ | */ | |||
typedef struct rasqal_query_s rasqal_query; | typedef struct rasqal_query_s rasqal_query; | |||
/** | /** | |||
* rasqal_query_results: | * rasqal_query_results: | |||
* | * | |||
* Rasqal query results class. | * Rasqal query results class. | |||
*/ | */ | |||
typedef struct rasqal_query_results_s rasqal_query_results; | typedef struct rasqal_query_results_s rasqal_query_results; | |||
/** | ||||
* rasqal_query_results_formatter: | ||||
* | ||||
* Rasqal query results formatter class. | ||||
*/ | ||||
typedef struct rasqal_query_results_formatter_s rasqal_query_results_format | ||||
ter; | ||||
typedef struct rasqal_literal_s rasqal_literal; | typedef struct rasqal_literal_s rasqal_literal; | |||
/** | /** | |||
* rasqal_graph_pattern: | * rasqal_graph_pattern: | |||
* | * | |||
* Rasqal graph pattern class. | * Rasqal graph pattern class. | |||
*/ | */ | |||
typedef struct rasqal_graph_pattern_s rasqal_graph_pattern; | typedef struct rasqal_graph_pattern_s rasqal_graph_pattern; | |||
/** | /** | |||
* rasqal_feature: | * rasqal_feature: | |||
* @RASQAL_FEATURE_NO_NET: Deny network requests. | ||||
* @RASQAL_FEATURE_LAST: Internal. | * @RASQAL_FEATURE_LAST: Internal. | |||
* | * | |||
* Query features. | * Query features. | |||
* | * | |||
* None currently defined. | * None currently defined. | |||
*/ | */ | |||
typedef enum { | typedef enum { | |||
RASQAL_FEATURE_LAST | RASQAL_FEATURE_NO_NET, | |||
RASQAL_FEATURE_LAST = RASQAL_FEATURE_NO_NET | ||||
} rasqal_feature; | } rasqal_feature; | |||
/** | /** | |||
* rasqal_prefix: | * rasqal_prefix: | |||
* @prefix: short prefix string | * @prefix: short prefix string | |||
* @uri: URI associated with the prefix. | * @uri: URI associated with the prefix. | |||
* @declared: Internal flag. | * @declared: Internal flag. | |||
* @depth: Internal flag. | * @depth: Internal flag. | |||
* | * | |||
* Namespace (prefix, uri) pair. | * Namespace (prefix, uri) pair. | |||
skipping to change at line 549 | skipping to change at line 562 | |||
/* RASQAL API */ | /* RASQAL API */ | |||
/* Public functions */ | /* Public functions */ | |||
RASQAL_API | RASQAL_API | |||
void rasqal_init(void); | void rasqal_init(void); | |||
RASQAL_API | RASQAL_API | |||
void rasqal_finish(void); | void rasqal_finish(void); | |||
/* Features */ | ||||
RASQAL_API | ||||
int rasqal_features_enumerate(const rasqal_feature feature, const char **na | ||||
me, raptor_uri **uri, const char **label); | ||||
RASQAL_API | ||||
unsigned int rasqal_get_feature_count(void); | ||||
RASQAL_API | ||||
rasqal_feature rasqal_feature_from_uri(raptor_uri *uri); | ||||
RASQAL_API | ||||
int rasqal_feature_value_type(const rasqal_feature feature); | ||||
RASQAL_API | RASQAL_API | |||
int rasqal_languages_enumerate(const unsigned int counter, const char **nam e, const char **label, const unsigned char **uri_string); | int rasqal_languages_enumerate(const unsigned int counter, const char **nam e, const char **label, const unsigned char **uri_string); | |||
RASQAL_API | RASQAL_API | |||
int rasqal_language_name_check(const char *name); | int rasqal_language_name_check(const char *name); | |||
/* Query class */ | /* Query class */ | |||
/* Create */ | /* Create */ | |||
RASQAL_API | RASQAL_API | |||
rasqal_query* rasqal_new_query(const char *name, const unsigned char *uri); | rasqal_query* rasqal_new_query(const char *name, const unsigned char *uri); | |||
skipping to change at line 575 | skipping to change at line 598 | |||
const char* rasqal_query_get_name(rasqal_query* query); | const char* rasqal_query_get_name(rasqal_query* query); | |||
RASQAL_API | RASQAL_API | |||
const char* rasqal_query_get_label(rasqal_query* query); | const char* rasqal_query_get_label(rasqal_query* query); | |||
RASQAL_API | RASQAL_API | |||
void rasqal_query_set_fatal_error_handler(rasqal_query* query, void *user_d ata, raptor_message_handler handler); | void rasqal_query_set_fatal_error_handler(rasqal_query* query, void *user_d ata, raptor_message_handler handler); | |||
RASQAL_API | RASQAL_API | |||
void rasqal_query_set_error_handler(rasqal_query* query, void *user_data, r aptor_message_handler handler); | void rasqal_query_set_error_handler(rasqal_query* query, void *user_data, r aptor_message_handler handler); | |||
RASQAL_API | RASQAL_API | |||
void rasqal_query_set_warning_handler(rasqal_query* query, void *user_data, raptor_message_handler handler); | void rasqal_query_set_warning_handler(rasqal_query* query, void *user_data, raptor_message_handler handler); | |||
RASQAL_API | RASQAL_API | |||
void rasqal_query_set_feature(rasqal_query* query, rasqal_feature feature, | int rasqal_query_set_feature(rasqal_query* query, rasqal_feature feature, i | |||
int value); | nt value); | |||
RASQAL_API | ||||
int rasqal_query_set_feature_string(rasqal_query *query, rasqal_feature fea | ||||
ture, const unsigned char *value); | ||||
RASQAL_API | ||||
int rasqal_query_get_feature(rasqal_query *query, rasqal_feature feature); | ||||
RASQAL_API | ||||
const unsigned char* rasqal_query_get_feature_string(rasqal_query *query, r | ||||
asqal_feature feature); | ||||
RASQAL_API | RASQAL_API | |||
void rasqal_query_set_default_generate_bnodeid_parameters(rasqal_query* rdf _query, char *prefix, int base); | void rasqal_query_set_default_generate_bnodeid_parameters(rasqal_query* rdf _query, char *prefix, int base); | |||
RASQAL_API | RASQAL_API | |||
void rasqal_query_set_generate_bnodeid_handler(rasqal_query* query, void *u ser_data, rasqal_generate_bnodeid_handler handler); | void rasqal_query_set_generate_bnodeid_handler(rasqal_query* query, void *u ser_data, rasqal_generate_bnodeid_handler handler); | |||
RASQAL_API | RASQAL_API | |||
rasqal_query_verb rasqal_query_get_verb(rasqal_query* query); | rasqal_query_verb rasqal_query_get_verb(rasqal_query* query); | |||
RASQAL_API | RASQAL_API | |||
int rasqal_query_get_wildcard(rasqal_query* query); | int rasqal_query_get_wildcard(rasqal_query* query); | |||
RASQAL_API | RASQAL_API | |||
skipping to change at line 735 | skipping to change at line 764 | |||
int rasqal_query_results_is_graph(rasqal_query_results *query_results); | int rasqal_query_results_is_graph(rasqal_query_results *query_results); | |||
RASQAL_API | RASQAL_API | |||
raptor_statement* rasqal_query_results_get_triple(rasqal_query_results *que ry_results); | raptor_statement* rasqal_query_results_get_triple(rasqal_query_results *que ry_results); | |||
RASQAL_API | RASQAL_API | |||
int rasqal_query_results_next_triple(rasqal_query_results *query_results); | int rasqal_query_results_next_triple(rasqal_query_results *query_results); | |||
RASQAL_API | RASQAL_API | |||
int rasqal_query_results_write(raptor_iostream *iostr, rasqal_query_results *results, raptor_uri *format_uri, raptor_uri *base_uri); | int rasqal_query_results_write(raptor_iostream *iostr, rasqal_query_results *results, raptor_uri *format_uri, raptor_uri *base_uri); | |||
RASQAL_API | RASQAL_API | |||
int rasqal_query_results_formats_enumerate(const unsigned int counter, cons | ||||
t char **name, const char **label, const unsigned char **uri_string); | ||||
RASQAL_API | ||||
rasqal_query_results_formatter* rasqal_new_query_results_formatter(const ch | ||||
ar *name, raptor_uri* uri); | ||||
RASQAL_API | ||||
void rasqal_free_query_results_formatter(rasqal_query_results_formatter* fo | ||||
rmatter); | ||||
RASQAL_API | ||||
int rasqal_query_results_formatter_write(raptor_iostream *iostr, rasqal_que | ||||
ry_results_formatter* formatter, rasqal_query_results* results, raptor_uri | ||||
*base_uri); | ||||
RASQAL_API | ||||
int rasqal_query_iostream_write_escaped_counted_string(rasqal_query* query, raptor_iostream* iostr, const unsigned char* string, size_t len); | int rasqal_query_iostream_write_escaped_counted_string(rasqal_query* query, raptor_iostream* iostr, const unsigned char* string, size_t len); | |||
RASQAL_API | RASQAL_API | |||
unsigned char* rasqal_query_escape_counted_string(rasqal_query* query, cons t unsigned char *string, size_t len, size_t* output_len_p); | unsigned char* rasqal_query_escape_counted_string(rasqal_query* query, cons t unsigned char *string, size_t len, size_t* output_len_p); | |||
/* Data graph class */ | /* Data graph class */ | |||
RASQAL_API | RASQAL_API | |||
rasqal_data_graph* rasqal_new_data_graph(raptor_uri* uri, raptor_uri* name_ uri, int flags); | rasqal_data_graph* rasqal_new_data_graph(raptor_uri* uri, raptor_uri* name_ uri, int flags); | |||
RASQAL_API | RASQAL_API | |||
void rasqal_free_data_graph(rasqal_data_graph* dg); | void rasqal_free_data_graph(rasqal_data_graph* dg); | |||
RASQAL_API | RASQAL_API | |||
skipping to change at line 964 | skipping to change at line 1002 | |||
{ | { | |||
/* triple (subject, predicate, object) and origin */ | /* triple (subject, predicate, object) and origin */ | |||
rasqal_variable* bindings[4]; | rasqal_variable* bindings[4]; | |||
rasqal_triples_match *triples_match; | rasqal_triples_match *triples_match; | |||
void *context; | void *context; | |||
rasqal_triple_parts parts; | rasqal_triple_parts parts; | |||
/* non-0 if the associated triple pattern contains no variables */ | ||||
int is_exact; | int is_exact; | |||
/* non-0 if the triple pattern has been fully executed */ | ||||
int executed; | ||||
} rasqal_triple_meta; | } rasqal_triple_meta; | |||
/** | /** | |||
* rasqal_triples_source: | * rasqal_triples_source: | |||
* @query: Source for this query. | * @query: Source for this query. | |||
* @user_data: Context user data passed into the factory methods. | * @user_data: Context user data passed into the factory methods. | |||
* @init_triples_match: Factory method to initalise a new #rasqal_triples_m atch. | * @init_triples_match: Factory method to initalise a new #rasqal_triples_m atch. | |||
* @triple_present: Factory method to return presence or absence of a compl ete triple. | * @triple_present: Factory method to return presence or absence of a compl ete triple. | |||
* @free_triples_source: Factory method to deallocate resources. | * @free_triples_source: Factory method to deallocate resources. | |||
* | * | |||
End of changes. 11 change blocks. | ||||
7 lines changed or deleted | 58 lines changed or added | |||