WWW

WWW — Retrieval of URI content from the web.

Functions

Types and Values

typedef raptor_www

Description

Provides a wrapper to the resolution of URIs to give content using an underlying WWW-retrieval library. The content is delivered by callbacks and includes returning content type for handling content-negotation by the caller as well as chunks of byte content.

Functions

raptor_new_www ()

raptor_www *
raptor_new_www (raptor_world *world);

Returns


raptor_new_www_with_connection ()

raptor_www *
raptor_new_www_with_connection (raptor_world *world,
                                void *connection);

Returns


raptor_free_www ()

void
raptor_free_www (raptor_www *www);


raptor_www_write_bytes_handler ()

void
(*raptor_www_write_bytes_handler) (raptor_www *www,
                                   void *userdata,
                                   const void *ptr,
                                   size_t size,
                                   size_t nmemb);

Receiving bytes of data from WWW retrieval handler.

Set by raptor_www_set_write_bytes_handler().

Parameters

www

WWW object

 

userdata

user data

 

ptr

data pointer

 

size

size of individual item

 

nmemb

number of items

 

raptor_www_content_type_handler ()

void
(*raptor_www_content_type_handler) (raptor_www *www,
                                    void *userdata,
                                    const char *content_type);

Receiving Content-Type: header from WWW retrieval handler.

Set by raptor_www_set_content_type_handler().

Parameters

www

WWW object

 

userdata

user data

 

content_type

content type seen

 

raptor_www_set_user_agent ()

void
raptor_www_set_user_agent (raptor_www *www,
                           const char *user_agent);


raptor_www_set_proxy ()

void
raptor_www_set_proxy (raptor_www *www,
                      const char *proxy);


raptor_www_set_http_accept ()

void
raptor_www_set_http_accept (raptor_www *www,
                            const char *value);


raptor_www_set_http_cache_control ()

int
raptor_www_set_http_cache_control (raptor_www *www,
                                   const char *cache_control);

Returns


raptor_www_set_write_bytes_handler ()

void
raptor_www_set_write_bytes_handler (raptor_www *www,
                                    raptor_www_write_bytes_handler handler,
                                    void *user_data);


raptor_www_set_connection_timeout ()

void
raptor_www_set_connection_timeout (raptor_www *www,
                                   int timeout);


raptor_www_set_content_type_handler ()

void
raptor_www_set_content_type_handler (raptor_www *www,
                                     raptor_www_content_type_handler handler,
                                     void *user_data);


raptor_uri_filter_func ()

int
(*raptor_uri_filter_func) (void *user_data,
                           raptor_uri *uri);

Callback function for raptor_www_set_uri_filter

Parameters

user_data

user data

 

uri

raptor_uri URI to check

 

Returns

non-0 to filter the URI


raptor_www_set_uri_filter ()

void
raptor_www_set_uri_filter (raptor_www *www,
                           raptor_uri_filter_func filter,
                           void *user_data);


raptor_www_final_uri_handler ()

void
(*raptor_www_final_uri_handler) (raptor_www *www,
                                 void *userdata,
                                 raptor_uri *final_uri);

Receiving the final resolved URI from a WWW retrieval

Set by raptor_www_set_final_uri_handler().

Parameters

www

WWW object

 

userdata

user data

 

final_uri

final URI seen

 

raptor_www_get_final_uri ()

raptor_uri *
raptor_www_get_final_uri (raptor_www *www);

Returns


raptor_www_set_final_uri_handler ()

void
raptor_www_set_final_uri_handler (raptor_www *www,
                                  raptor_www_final_uri_handler handler,
                                  void *user_data);


raptor_www_fetch ()

int
raptor_www_fetch (raptor_www *www,
                  raptor_uri *uri);

Returns


raptor_www_fetch_to_string ()

int
raptor_www_fetch_to_string (raptor_www *www,
                            raptor_uri *uri,
                            void **string_p,
                            size_t *length_p,
                            raptor_data_malloc_handler const malloc_handler);

Returns


raptor_www_get_connection ()

void *
raptor_www_get_connection (raptor_www *www);

Returns


raptor_www_set_ssl_cert_options ()

int
raptor_www_set_ssl_cert_options (raptor_www *www,
                                 const char *cert_filename,
                                 const char *cert_type,
                                 const char *cert_passphrase);

Returns


raptor_www_set_ssl_verify_options ()

int
raptor_www_set_ssl_verify_options (raptor_www *www,
                                   int verify_peer,
                                   int verify_host);

Returns


raptor_www_abort ()

void
raptor_www_abort (raptor_www *www,
                  const char *reason);

Types and Values

raptor_www

raptor_www* raptor_www;

Raptor WWW class