StreamLinkforC
7.0.3-308369
|
Functions | |
int | sl_get_serviceurl (streamlink *client, const char *service_name, sl_fieldlist *user_params, char **url_ptr, char **body_ptr) |
Obtain a URL and HTTP post body for a service hosted on the Liberator. More... | |
void | sl_set_allocator (void *(*malloc_func)(size_t size), void *(*realloc_func)(void *orig, size_t size), void(*free_func)(void *)) |
Set the allocator that will be used by the library. More... | |
char * | sl_strdup (const char *orig) |
Duplicate the supplied string. More... | |
void * | sl_calloc (size_t nmemb, size_t size) |
Allocate and zero an array of elements. More... | |
void * | sl_malloc (size_t size) |
Allocate a chunk of memory. More... | |
void * | sl_realloc (void *orig, size_t size) |
Reallocate the supplied memory. More... | |
void | sl_free (void *block) |
Free the supplied memory block. More... | |
void* sl_calloc | ( | size_t | nmemb, |
size_t | size | ||
) |
Allocate and zero an array of elements.
nmemb | - Number of elements |
size | - Size of each element |
void sl_free | ( | void * | block | ) |
Free the supplied memory block.
block | - Memory block to release |
int sl_get_serviceurl | ( | streamlink * | client, |
const char * | service_name, | ||
sl_fieldlist * | user_params, | ||
char ** | url_ptr, | ||
char ** | body_ptr | ||
) |
Obtain a URL and HTTP post body for a service hosted on the Liberator.
client | - The streamlink client |
service_name | - The servicename to create the parameters for (for example "blotterexport") |
user_params | - Parameters that should be used to build the URL and post body |
url_ptr | - Pointer to where the URL will be placed |
body_ptr | - Pointer to where trhe body will be placed |
This function can be used to obtain to interact with the blotterexport service hosted by the Liberator.
void* sl_malloc | ( | size_t | size | ) |
Allocate a chunk of memory.
size | - Amount of memory to allocate |
void* sl_realloc | ( | void * | orig, |
size_t | size | ||
) |
Reallocate the supplied memory.
orig | - The original memory block (may be NULL) |
size | - New size of the memory block |
void sl_set_allocator | ( | void *(*)(size_t size) | malloc_func, |
void *(*)(void *orig, size_t size) | realloc_func, | ||
void(*)(void *) | free_func | ||
) |
Set the allocator that will be used by the library.
malloc_func | - Function for malloc() |
realloc_func | - Function for realloc() |
free_func | - Function for free() |
By default the library will use the standard library allocation functions, you can use this function to redirect all memory usage by the library to a custom implementation.
char* sl_strdup | ( | const char * | orig | ) |
Duplicate the supplied string.
orig | - The string to duplicate |
This function will use the allocation routines set using sl_set_allocator() to duplicate the supplied string