aboutsummaryrefslogtreecommitdiff
path: root/src/linkmessenger.h
blob: ed526390595a8eea17a87c6f2c7a3f3e3680c26c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef LINK_MESSENGER_H
#define LINK_MESSENGER_H

#include <stdlib.h>
#include <stdint.h>
#include "linkmessage.h"

class LinkMessenger
{
public:
	LinkMessenger();
	virtual ~LinkMessenger();

	void enqueueMessage( LinkMessage *pMsg );
	LinkMessage *dequeueMessage();
	bool hasMessages()
	{
		return (pFirst != NULL);
	}

private:
	typedef struct Link
	{
		LinkMessage *pMsg;
		Link *pNext;
	};
	Link *pFirst;
	Link *pLast;

};

#endif