Vuo  1.1.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Functions
VuoUrlFetch.c File Reference

Description

VuoUrlFetch implementation.

Classes

struct  VuoUrl_curlBuffer
 A memory buffer, filled by VuoUrl_curlCallback(). More...
 

Functions

 __attribute__ ((constructor))
 Initializes the cURL library.
 
static size_t VuoUrl_curlCallback (void *contents, size_t size, size_t nmemb, void *userp)
 Reads the contents of the URL into a memory buffer.
 
bool VuoUrl_fetch (const char *url, void **data, unsigned int *dataLength)
 Receives the data at the specified url.
 

Class Documentation

struct VuoUrl_curlBuffer
Class Members
char * memory
size_t size

Function Documentation

__attribute__ ( (constructor)  )

Initializes the cURL library.

static size_t VuoUrl_curlCallback ( void *  contents,
size_t  size,
size_t  nmemb,
void *  userp 
)
static

Reads the contents of the URL into a memory buffer.

A callback function for use by curl_easy_setopt().

bool VuoUrl_fetch ( const char *  url,
void **  data,
unsigned int *  dataLength 
)

Receives the data at the specified url.

Returns
true upon success, false upon failure.
Todo:
Better error handling per https://b33p.net/kosada/node/4724