message_queue.h
来自「这是DVD中伺服部分的核心代码」· C头文件 代码 · 共 56 行
H
56 行
/******************************************************************************
*******************************************************************************
** **
** Copyright (c) 2006 Videon Central, Inc. **
** All rights reserved. **
** **
** The computer program contained herein contains proprietary information **
** which is the property of Videon Central, Inc. The program may be used **
** and/or copied only with the written permission of Videon Central, Inc. **
** or in accordance with the terms and conditions stipulated in the **
** agreement/contract under which the programs have been supplied. **
** **
*******************************************************************************
******************************************************************************/
/**
* @file message_queue.h
*
* $Revision: 1.4 $
*
* Implements a Message Queue class
*
*/
#ifndef __MESSAGE_QUEUE_H
#define __MESSAGE_QUEUE_H
#include "mutex.h"
#include "reference_counter.h"
#include "osapi.h"
class MessageQueue : public ReferenceCounter
{
private:
Mutex m_mutex;
OS_MSG_Q_ID m_messageQueueHandle;
uint32 m_queueSize;
uint32 m_messageSize;
VDVD_ERROR Construct ( void );
VDVD_ERROR Destruct ( void );
public:
MessageQueue ( void );
VDVD_ERROR Create ( uint32 queueSize, uint32 messageSize );
VDVD_ERROR Destroy ( void );
VDVD_ERROR Send ( void* message );
VDVD_ERROR Receive ( void* message, int timeoutMilliseconds = OS_WAIT_FOREVER );
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?