blob: 262818035bc5560fec53fdbed0091cd434ac0e8e (
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
33
|
#pragma once
#include "drape_frontend/message_queue.hpp"
#include "drape/pointers.hpp"
namespace df
{
class Message;
class MessageAcceptor
{
public:
virtual ~MessageAcceptor() {}
protected:
virtual void AcceptMessage(dp::RefPointer<Message> message) = 0;
/// Must be called by subclass on message target thread
void ProcessSingleMessage(unsigned maxTimeWait = -1);
void CloseQueue();
private:
friend class ThreadsCommutator;
void PostMessage(dp::TransferPointer<Message> message);
private:
MessageQueue m_messageQueue;
};
} // namespace df
|