326182c3e3
errors. This object should never be deleted directly as it's ref counted, only when its last ref is Release()'d. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24258 a95241bf-73f2-0310-859d-f6bbb57e9c96
40 lines
640 B
C++
40 lines
640 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();
|
|
|
|
bool AddMessage(BMessage* message);
|
|
|
|
void Close();
|
|
void Acquire();
|
|
void Release();
|
|
|
|
BMessageQueue* Queue() { return &fQueue; }
|
|
|
|
private:
|
|
~BDirectMessageTarget();
|
|
|
|
int32 fReferenceCount;
|
|
BMessageQueue fQueue;
|
|
bool fClosed;
|
|
};
|
|
|
|
} // namespace BPrivate
|
|
|
|
#endif // _DIRECT_MESSAGE_TARGET_H
|