Initialisation

Initialisation — Library startup, shutdown and configuration.

Functions

Types and Values

Description

How to initialise and terminate the library, set library-wide configuration flags and options.

Functions

raptor_new_world

#define raptor_new_world() raptor_new_world_internal(RAPTOR_VERSION)

Returns


raptor_world_open ()

int
raptor_world_open (raptor_world *world);

Returns


raptor_free_world ()

void
raptor_free_world (raptor_world *world);


raptor_world_set_flag ()

int
raptor_world_set_flag (raptor_world *world,
                       raptor_world_flag flag,
                       int value);

Returns


raptor_world_set_libxslt_security_preferences ()

int
raptor_world_set_libxslt_security_preferences
                               (raptor_world *world,
                                void *security_preferences);

Returns


raptor_world_set_log_handler ()

int
raptor_world_set_log_handler (raptor_world *world,
                              void *user_data,
                              raptor_log_handler handler);

Returns


raptor_world_get_parser_description ()

const raptor_syntax_description *
raptor_world_get_parser_description (raptor_world *world,
                                     unsigned int counter);

Returns


raptor_world_is_parser_name ()

int
raptor_world_is_parser_name (raptor_world *world,
                             const char *name);

Returns


raptor_world_guess_parser_name ()

const char *
raptor_world_guess_parser_name (raptor_world *world,
                                raptor_uri *uri,
                                const char *mime_type,
                                const unsigned char *buffer,
                                size_t len,
                                const unsigned char *identifier);

Returns


raptor_world_get_serializer_description ()

const raptor_syntax_description *
raptor_world_get_serializer_description
                               (raptor_world *world,
                                unsigned int counter);

Returns


raptor_world_is_serializer_name ()

int
raptor_world_is_serializer_name (raptor_world *world,
                                 const char *name);

Returns


raptor_world_generate_bnodeid ()

unsigned char *
raptor_world_generate_bnodeid (raptor_world *world);

Returns


raptor_world_set_generate_bnodeid_handler ()

void
raptor_world_set_generate_bnodeid_handler
                               (raptor_world *world,
                                void *user_data,
                                raptor_generate_bnodeid_handler handler);


raptor_world_set_generate_bnodeid_parameters ()

void
raptor_world_set_generate_bnodeid_parameters
                               (raptor_world *world,
                                char *prefix,
                                int base);


raptor_world_get_parsers_count ()

int
raptor_world_get_parsers_count (raptor_world *world);

Returns


raptor_world_get_serializers_count ()

int
raptor_world_get_serializers_count (raptor_world *world);

Returns

Types and Values

raptor_world

typedef struct raptor_world_s raptor_world;

Raptor world class.


enum raptor_world_flag

Raptor world flags

These are used by raptor_world_set_flags() to control raptor-wide options across classes. These must be set before raptor_world_open() is called explicitly or implicitly (by creating a raptor object). There is no enumeration function for these flags because they are not user options and must be set before the library is initialised. For similar reasons, there is no get function.

If any libxml handler saving/restoring is enabled, any existing handler and context is saved before parsing and restored afterwards. Otherwise, no saving/restoring is performed.

Members

RAPTOR_WORLD_FLAG_LIBXML_GENERIC_ERROR_SAVE

if set (non-0 value) - save/restore the libxml generic error handler when raptor library initializes (default set)

 

RAPTOR_WORLD_FLAG_LIBXML_STRUCTURED_ERROR_SAVE

if set (non-0 value) - save/restore the libxml structured error handler when raptor library terminates (default set)

 

RAPTOR_WORLD_FLAG_URI_INTERNING

if set (non-0 value) - each URI is saved interned in-memory and reused (default set)

 

RAPTOR_WORLD_FLAG_WWW_SKIP_INIT_FINISH

if set (non-0 value) the raptor will neither initialise or terminate the lower level WWW library. Usually in raptor initialising either curl_global_init (for libcurl) are called and in raptor cleanup, curl_global_cleanup is called. This flag allows the application finer control over these libraries such as setting other global options or potentially calling and terminating raptor several times. It does mean that applications which use this call must do their own extra work in order to allocate and free all resources to the system.