# ringbuffer.h File Reference

`#include <gwenhywfar/types.h>`
`#include <gwenhywfar/gwenhywfarapi.h>`

Go to the source code of this file.

## Constructor And Destructor

GWENHYWFAR_API void | GWEN_RingBuffer_free (GWEN_RINGBUFFER *rb)
GWENHYWFAR_API GWEN_RINGBUFFER * | GWEN_RingBuffer_new (unsigned int size)

## Informational Functions

GWENHYWFAR_API GWEN_TYPE_UINT32 | GWEN_RingBuffer_GetBufferSize (const GWEN_RINGBUFFER *rb)
GWENHYWFAR_API GWEN_TYPE_UINT32 | GWEN_RingBuffer_GetBytesLeft (const GWEN_RINGBUFFER *rb)
GWENHYWFAR_API GWEN_TYPE_UINT32 | GWEN_RingBuffer_GetUsedBytes (const GWEN_RINGBUFFER *rb)

## Statistical Functions

GWENHYWFAR_API GWEN_TYPE_UINT32 | GWEN_RingBuffer_GetEmptyCounter (const GWEN_RINGBUFFER *rb)
GWENHYWFAR_API GWEN_TYPE_UINT32 | GWEN_RingBuffer_GetFullCounter (const GWEN_RINGBUFFER *rb)
GWENHYWFAR_API GWEN_TYPE_UINT32 | GWEN_RingBuffer_GetMaxUsedBytes (const GWEN_RINGBUFFER *rb)
GWENHYWFAR_API GWEN_TYPE_UINT32 | GWEN_RingBuffer_GetThroughput (GWEN_RINGBUFFER *rb)
GWENHYWFAR_API void | GWEN_RingBuffer_Reset (GWEN_RINGBUFFER *rb)
GWENHYWFAR_API void | GWEN_RingBuffer_ResetEmptyCounter (GWEN_RINGBUFFER *rb)
GWENHYWFAR_API void | GWEN_RingBuffer_ResetFullCounter (GWEN_RINGBUFFER *rb)
GWENHYWFAR_API void | GWEN_RingBuffer_ResetMaxUsedBytes (GWEN_RINGBUFFER *rb)
GWENHYWFAR_API void | GWEN_RingBuffer_ResetThroughput (GWEN_RINGBUFFER *rb)

## Functions For Direct Manipulation Of The Buffer

Please use these functions with care. These function are supported in order to avoid unnecessary copying.
GWENHYWFAR_API GWEN_TYPE_UINT32 | GWEN_RingBuffer_GetMaxUnsegmentedRead (GWEN_RINGBUFFER *rb)
GWENHYWFAR_API GWEN_TYPE_UINT32 | GWEN_RingBuffer_GetMaxUnsegmentedWrite (GWEN_RINGBUFFER *rb)
GWENHYWFAR_API const char * | GWEN_RingBuffer_GetReadPointer (const GWEN_RINGBUFFER *rb)
GWENHYWFAR_API char * | GWEN_RingBuffer_GetWritePointer (const GWEN_RINGBUFFER *rb)
GWENHYWFAR_API void | GWEN_RingBuffer_SkipBytesRead (GWEN_RINGBUFFER *rb, GWEN_TYPE_UINT32 psize)
GWENHYWFAR_API void | GWEN_RingBuffer_SkipBytesWrite (GWEN_RINGBUFFER *rb, GWEN_TYPE_UINT32 psize)

## Reading And Writing

GWENHYWFAR_API int | GWEN_RingBuffer_ReadByte (GWEN_RINGBUFFER *rb)
GWENHYWFAR_API int | GWEN_RingBuffer_ReadBytes (GWEN_RINGBUFFER *rb, char *buffer, GWEN_TYPE_UINT32 *size)
GWENHYWFAR_API int | GWEN_RingBuffer_WriteByte (GWEN_RINGBUFFER *rb, char c)
GWENHYWFAR_API int | GWEN_RingBuffer_WriteBytes (GWEN_RINGBUFFER *rb, const char *buffer, GWEN_TYPE_UINT32 *size)

## Typedefs

typedef GWEN_RINGBUFFER | GWEN_RINGBUFFER