FreeSWITCH API Documentation  1.7.0
Functions
switch_buffer.h File Reference

Data Buffering Code. More...

#include <switch.h>
+ Include dependency graph for switch_buffer.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

switch_status_t switch_buffer_create_partition (switch_memory_pool_t *pool, switch_buffer_t **buffer, void *data, switch_size_t datalen)
 
switch_status_t switch_buffer_set_partition_data (switch_buffer_t *buffer, void *data, switch_size_t datalen)
 
switch_status_t switch_buffer_reset_partition_data (switch_buffer_t *buffer)
 
switch_status_t switch_buffer_create (_In_ switch_memory_pool_t *pool, _Out_ switch_buffer_t **buffer, _In_ switch_size_t max_len)
 Allocate a new switch_buffer. More...
 
switch_status_t switch_buffer_create_dynamic (_Out_ switch_buffer_t **buffer, _In_ switch_size_t blocksize, _In_ switch_size_t start_len, _In_ switch_size_t max_len)
 Allocate a new dynamic switch_buffer. More...
 
void switch_buffer_add_mutex (_In_ switch_buffer_t *buffer, _In_ switch_mutex_t *mutex)
 
void switch_buffer_lock (_In_ switch_buffer_t *buffer)
 
switch_status_t switch_buffer_trylock (_In_ switch_buffer_t *buffer)
 
void switch_buffer_unlock (_In_ switch_buffer_t *buffer)
 
switch_size_t switch_buffer_len (_In_ switch_buffer_t *buffer)
 Get the length of a switch_buffer_t. More...
 
switch_size_t switch_buffer_freespace (_In_ switch_buffer_t *buffer)
 Get the freespace of a switch_buffer_t. More...
 
switch_size_t switch_buffer_inuse (_In_ switch_buffer_t *buffer)
 Get the in use amount of a switch_buffer_t. More...
 
switch_size_t switch_buffer_read (_In_ switch_buffer_t *buffer, _In_ void *data, _In_ switch_size_t datalen)
 Read data from a switch_buffer_t up to the ammount of datalen if it is available. Remove read data from buffer. More...
 
switch_size_t switch_buffer_peek (_In_ switch_buffer_t *buffer, _In_ void *data, _In_ switch_size_t datalen)
 Read data from a switch_buffer_t up to the ammount of datalen if it is available, without removing read data from buffer. More...
 
switch_size_t switch_buffer_peek_zerocopy (_In_ switch_buffer_t *buffer, _Out_ const void **ptr)
 
switch_size_t switch_buffer_read_loop (_In_ switch_buffer_t *buffer, _In_ void *data, _In_ switch_size_t datalen)
 Read data endlessly from a switch_buffer_t. More...
 
void switch_buffer_set_loops (_In_ switch_buffer_t *buffer, _In_ int32_t loops)
 Assign a number of loops to read. More...
 
switch_size_t switch_buffer_write (_In_ switch_buffer_t *buffer, _In_bytecount_(datalen) const void *data, _In_ switch_size_t datalen)
 Write data into a switch_buffer_t up to the length of datalen. More...
 
switch_size_t switch_buffer_toss (_In_ switch_buffer_t *buffer, _In_ switch_size_t datalen)
 Remove data from the buffer. More...
 
void switch_buffer_zero (_In_ switch_buffer_t *buffer)
 Remove all data from the buffer. More...
 
switch_size_t switch_buffer_slide_write (switch_buffer_t *buffer, const void *data, switch_size_t datalen)
 
void switch_buffer_destroy (switch_buffer_t **buffer)
 Destroy the buffer. More...
 
switch_size_t switch_buffer_zwrite (_In_ switch_buffer_t *buffer, _In_bytecount_(datalen) const void *data, _In_ switch_size_t datalen)
 

Detailed Description

Data Buffering Code.

See also
switch_buffer

Definition in file switch_buffer.h.