diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2013-12-10 14:40:37 +0100 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2013-12-10 14:40:37 +0100 |
commit | 748407ebc8455f7df10c66790401c82e8a1ccd90 (patch) | |
tree | 6fe8b9d901c21c0052928fb9f03541dd39856c1e /src/uca-ring-buffer.h | |
parent | 5ad27e1abf2a19194adc238c125f7f595bac530f (diff) | |
download | uca-748407ebc8455f7df10c66790401c82e8a1ccd90.tar.gz uca-748407ebc8455f7df10c66790401c82e8a1ccd90.tar.bz2 uca-748407ebc8455f7df10c66790401c82e8a1ccd90.tar.xz uca-748407ebc8455f7df10c66790401c82e8a1ccd90.zip |
Make ring buffer public
Diffstat (limited to 'src/uca-ring-buffer.h')
-rw-r--r-- | src/uca-ring-buffer.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/uca-ring-buffer.h b/src/uca-ring-buffer.h new file mode 100644 index 0000000..03e2cae --- /dev/null +++ b/src/uca-ring-buffer.h @@ -0,0 +1,47 @@ +#ifndef UCA_RING_BUFFER_H +#define UCA_RING_BUFFER_H + +#include <glib-object.h> + +#define UCA_TYPE_RING_BUFFER (uca_ring_buffer_get_type()) +#define UCA_RING_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), UCA_TYPE_RING_BUFFER, UcaRingBuffer)) +#define UCA_IS_RING_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), UCA_TYPE_RING_BUFFER)) +#define UCA_RING_BUFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), UCA_TYPE_RING_BUFFER, UcaRingBufferClass)) +#define UCA_IS_RING_BUFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), UCA_TYPE_RING_BUFFER)) +#define UCA_RING_BUFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), UCA_TYPE_RING_BUFFER, UcaRingBufferClass)) + +G_BEGIN_DECLS + +typedef struct _UcaRingBuffer UcaRingBuffer; +typedef struct _UcaRingBufferClass UcaRingBufferClass; +typedef struct _UcaRingBufferPrivate UcaRingBufferPrivate; + +struct _UcaRingBuffer { + /*< private >*/ + GObject parent; + + UcaRingBufferPrivate *priv; +}; + +struct _UcaRingBufferClass { + /*< private >*/ + GObjectClass parent; +}; + +UcaRingBuffer * uca_ring_buffer_new (gsize block_size, + guint n_blocks); +void uca_ring_buffer_reset (UcaRingBuffer *buffer); +gsize uca_ring_buffer_get_block_size (UcaRingBuffer *buffer); +gpointer uca_ring_buffer_get_current_pointer (UcaRingBuffer *buffer); +void uca_ring_buffer_set_current_pointer (UcaRingBuffer *buffer, + guint index); +gpointer uca_ring_buffer_get_pointer (UcaRingBuffer *buffer, + guint index); +guint uca_ring_buffer_get_num_blocks (UcaRingBuffer *buffer); +void uca_ring_buffer_proceed (UcaRingBuffer *buffer); + +GType uca_ring_buffer_get_type (void); + +G_END_DECLS + +#endif |