Class

PurpleCircularBuffer

unstable since: 3.0

[]

Description [src]

class Purple.CircularBuffer : GObject.Object
{
  /* No available fields */
}

A circular buffer implementation.

Available since: 3.0

[]

Ancestors

[]

Constructors

purple_circular_buffer_new

Creates a new circular buffer. This will not allocate any memory for the actual buffer until data is appended to it.

unstable since: 3.0

[]

Instance methods

purple_circular_buffer_append

Append data to the PurpleCircularBuffer. This will grow the internal buffer to fit the added data, if needed.

unstable since: 3.0

purple_circular_buffer_get_grow_size

Returns the number of bytes by which the buffer grows when more space is needed.

unstable since: 3.0

purple_circular_buffer_get_max_read

Determine the maximum number of contiguous bytes that can be read from the PurpleCircularBuffer. Note: This may not be the total number of bytes that are buffered - a subsequent call after calling purple_circular_buffer_mark_read() may indicate more data is available to read.

unstable since: 3.0

purple_circular_buffer_get_output

Returns the output pointer of the buffer, where unread data is available. Use purple_circular_buffer_get_max_read() to determine the number of contiguous bytes that can be read from this output. After reading the data, call purple_circular_buffer_mark_read() to mark the retrieved data as read.

unstable since: 3.0

purple_circular_buffer_get_used

Returns the number of bytes of this buffer that contain unread data.

unstable since: 3.0

purple_circular_buffer_grow

Increases the buffer size by a multiple of grow size, so that it can hold at least ‘len’ bytes.

unstable since: 3.0

purple_circular_buffer_mark_read

Mark the number of bytes that have been read from the buffer.

unstable since: 3.0

purple_circular_buffer_reset

Resets the buffer input and output pointers to the start of the buffer.

unstable since: 3.0

Methods inherited from GObject (43)
[]

Properties

Purple.CircularBuffer:buffer-used

How much of the buffer that has been used.

unstable since: 3.0

Purple.CircularBuffer:grow-size

The grow size of the buffer.

unstable since: 3.0

Purple.CircularBuffer:input

The input pointer of the buffer.

unstable since: 3.0

Purple.CircularBuffer:output

The output pointer of the buffer.

unstable since: 3.0

[]

Signals

Signals inherited from GObject (1)

Class structure

[]

Virtual methods

Purple.CircularBufferClass.append

Append data to the PurpleCircularBuffer. This will grow the internal buffer to fit the added data, if needed.

unstable since: 3.0

Purple.CircularBufferClass.grow

Increases the buffer size by a multiple of grow size, so that it can hold at least ‘len’ bytes.

unstable since: 3.0

Purple.CircularBufferClass.mark_read

Mark the number of bytes that have been read from the buffer.

unstable since: 3.0

Purple.CircularBufferClass.max_read_size
No description available.