BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
CommandSender.h
1 #pragma once
2 
3 #include <Poco/AutoPtr.h>
4 
5 #include "core/AnswerQueue.h"
6 #include "core/CommandHandler.h"
7 #include "util/UnsafePtr.h"
8 
9 namespace BeeeOn {
10 
11 class Answer;
12 class Command;
13 class CommandDispatcher;
14 
21 public:
22  virtual ~CommandSender();
23 
29  void setCommandDispatcher(CommandDispatcher *dispatcher);
30 
34  void dispatch(Poco::AutoPtr<Command> cmd, Poco::AutoPtr<Answer> answer);
35 
40  void dispatch(Poco::AutoPtr<Command> cmd);
41 
46 
47 private:
48  CommandHandler* sendingHandler();
49 
50 private:
51  UnsafePtr<CommandDispatcher> m_commandDispatcher;
52  AnswerQueue m_answerQueue;
53 };
54 
55 }
Definition: AnswerQueue.h:22
void setCommandDispatcher(CommandDispatcher *dispatcher)
Definition: CommandSender.cpp:11
Definition: CommandHandler.h:18
Definition: UnsafePtr.h:14
void dispatch(Poco::AutoPtr< Command > cmd, Poco::AutoPtr< Answer > answer)
Definition: CommandSender.h:20
Definition: CommandDispatcher.h:12
AnswerQueue & answerQueue()
Definition: CommandSender.cpp:28