#pragma once
#include <stddef.h>
#include <stdbool.h>

struct circle_buff;

typedef void (*data_free_func)(void *data);

struct circle_buff *cb_create(size_t capacity, size_t item_size, data_free_func cb);
void cb_destroy(struct circle_buff *cb);
bool cb_is_full(struct circle_buff *cb);
bool cb_is_empty(struct circle_buff *cb);
void cb_push_back(struct circle_buff *cb, void *item);
int cb_pop_front(struct circle_buff *cb, void *item);


