#ifndef _MSGQUEUE_H_
#define _MSGQUEUE_H_

#ifdef __cplusplus
extern          "C" {
#endif

#include "sys/types.h"
#include "sys/ipc.h"
#include "sys/msg.h"

#include "umap_ipc_struct.h"
#include "umap_ipc_def.h"

typedef struct 
{
	long type;
	UMAP_IPCStruct data;
}UMAP_Msg;


int create_msgqueue(key_t key);
int open_msgqueue(key_t key);
int delete_msgqueue(key_t key);
int send_message(key_t key,UMAP_Msg* pMsg);
int recv_message(key_t key,long type,UMAP_Msg* pMsg);

#ifdef __cplusplus
}
#endif

#endif

