//////////////////////////////////////////////////////////////////////
// MessageQ.h: interface for the MessageQ class.
//
//////////////////////////////////////////////////////////////////////

#ifndef MESSAGEQ_H
#define MESSAGEQ_H


#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

#define QSIZE 10
#define MAX_QMSG_SIZE 80
#define OK_RESPONSE 1
#define OK_CANCEL_RESPONSE 2

#include "stdafx.h"

struct QRecord
{
	int maxsize;
	int front;
	int rear;
	int size;
	char msgArray[QSIZE][MAX_QMSG_SIZE];
	int msgType[QSIZE];
};

class MessageQ  
{
private:
	QRecord theQ;
	BOOL MsgQIsFull();
	BOOL MsgQIsEmpty();
	int Succ(int value);

public:
	MessageQ();
	virtual ~MessageQ(){
		TRACE("Destructing MessageQ Class \n");
	}

	BOOL EnqueueMsg(char* msg, int type);
	BOOL DequeueMsg(char* msg, int type);

};

#endif
