/*
 * CircularQueue.h
 * 
 * Simple circular queue used to buffer incoming messages (DataSet handles) from the Gocator.
 *
 * Copyright (C) 2014 by LMI Technologies Inc.
 * 
 * Licensed under The MIT License.
 * Redistributions of files must retain the above copyright notice.
 *
 */

#include <stdio.h>
#include <stdlib.h>

struct CircularQueue {
   int front,rear;
   int capacity;
   void** buffer;
};

struct CircularQueue* CircularQueue_Construct(int size);
void CircularQueue_Destroy(struct CircularQueue* q);
int CircularQueue_IsEmpty(struct CircularQueue* q);
int CircularQueue_IsFull(struct CircularQueue* q);
int CircularQueue_Size(struct CircularQueue* q);
void CircularQueue_Add(struct CircularQueue* q, void* item);
void* CircularQueue_Remove(struct CircularQueue* q);
void* CircularQueue_Peek(struct CircularQueue* q);
