mirror of
https://review.haiku-os.org/haiku
synced 2025-02-02 03:36:14 +01:00
39 lines
637 B
C
39 lines
637 B
C
|
/*
|
||
|
* Copyright 2007, Haiku, Inc.
|
||
|
* Distributed under the terms of the MIT License.
|
||
|
*
|
||
|
* Authors:
|
||
|
* Axel Dörfler, axeld@pinc-software.de
|
||
|
*/
|
||
|
#ifndef _DIRECT_MESSAGE_TARGET_H
|
||
|
#define _DIRECT_MESSAGE_TARGET_H
|
||
|
|
||
|
|
||
|
#include <MessageQueue.h>
|
||
|
|
||
|
|
||
|
namespace BPrivate {
|
||
|
|
||
|
class BDirectMessageTarget {
|
||
|
public:
|
||
|
BDirectMessageTarget();
|
||
|
~BDirectMessageTarget();
|
||
|
|
||
|
bool AddMessage(BMessage* message);
|
||
|
|
||
|
void Close();
|
||
|
void Acquire();
|
||
|
void Release();
|
||
|
|
||
|
BMessageQueue* Queue() { return &fQueue; }
|
||
|
|
||
|
private:
|
||
|
int32 fReferenceCount;
|
||
|
BMessageQueue fQueue;
|
||
|
bool fClosed;
|
||
|
};
|
||
|
|
||
|
} // namespace BPrivate
|
||
|
|
||
|
#endif // _DIRECT_MESSAGE_TARGET_H
|