NUGU SDK Linux  1.7.6
nugu_buffer.h File Reference
#include <stddef.h>
#include <nugu.h>
+ Include dependency graph for nugu_buffer.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define NUGU_BUFFER_NOT_FOUND   ((size_t) - 1)
 Not found return type of nugu_buffer_find_byte() More...
 

Typedefs

typedef struct _nugu_buffer NuguBuffer
 Buffer object.
 

Functions

NUGU_API size_t nugu_buffer_add (NuguBuffer *buf, const void *data, size_t data_len)
 Append the data to buffer object. More...
 
NUGU_API size_t nugu_buffer_add_byte (NuguBuffer *buf, unsigned char byte)
 Append the data to buffer object. More...
 
NUGU_API int nugu_buffer_clear (NuguBuffer *buf)
 Clear the buffer. More...
 
NUGU_API int nugu_buffer_clear_from (NuguBuffer *buf, size_t pos)
 Clear data from a specific position to the end. More...
 
NUGU_API size_t nugu_buffer_find_byte (NuguBuffer *buf, unsigned char want)
 Get the position of the data you want to find. More...
 
NUGU_API void * nugu_buffer_free (NuguBuffer *buf, int is_data_free)
 Destroy the buffer object. More...
 
NUGU_API size_t nugu_buffer_get_alloc_size (NuguBuffer *buf)
 Gets the size of the entire data allocated for the buffer. More...
 
NUGU_API size_t nugu_buffer_get_size (NuguBuffer *buf)
 Gets the size of the entire data added to the buffer. More...
 
NUGU_API NuguBuffernugu_buffer_new (size_t default_size)
 Create new buffer object. More...
 
NUGU_API const void * nugu_buffer_peek (NuguBuffer *buf)
 Get the internal buffer. More...
 
NUGU_API unsigned char nugu_buffer_peek_byte (NuguBuffer *buf, size_t pos)
 Get data at a specific position. More...
 
NUGU_API void * nugu_buffer_pop (NuguBuffer *buf, size_t size)
 Extract data by a certain size. More...
 
NUGU_API int nugu_buffer_set_byte (NuguBuffer *buf, size_t pos, unsigned char byte)
 Append the data to buffer object. More...
 
NUGU_API int nugu_buffer_shift_left (NuguBuffer *buf, size_t size)
 Delete a certain amount of data and move the remaining data forward. More...