blob: e11e38e7c285c54751bec9994d015b173a9b1ba0 (
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
|
#include "drape_frontend/message_acceptor.hpp"
#include "drape_frontend/message.hpp"
namespace df
{
void MessageAcceptor::ProcessSingleMessage(unsigned maxTimeWait)
{
dp::TransferPointer<Message> transferMessage = m_messageQueue.PopMessage(maxTimeWait);
dp::MasterPointer<Message> message(transferMessage);
if (message.IsNull())
return;
AcceptMessage(message.GetRefPointer());
message.Destroy();
}
void MessageAcceptor::PostMessage(dp::TransferPointer<Message> message)
{
m_messageQueue.PushMessage(message);
}
void MessageAcceptor::CloseQueue()
{
m_messageQueue.CancelWait();
m_messageQueue.ClearQuery();
}
} // namespace df
|