|
4 | 4 | #include "communication/ISendMessageAsync.h" |
5 | 5 | #include "pluginSystem/Manager.h" |
6 | 6 |
|
7 | | -namespace web |
| 7 | +namespace web::rest::service |
8 | 8 | { |
9 | | - namespace rest |
| 9 | + class CKeyword final : public IRestService |
10 | 10 | { |
11 | | - namespace service |
| 11 | + public: |
| 12 | + explicit CKeyword(boost::shared_ptr<database::IDataProvider> dataProvider, |
| 13 | + boost::shared_ptr<dataAccessLayer::IKeywordManager> keywordManager, |
| 14 | + communication::ISendMessageAsync& messageSender); |
| 15 | + |
| 16 | + CKeyword(const CKeyword&) = delete; |
| 17 | + CKeyword(CKeyword&&) = delete; |
| 18 | + CKeyword& operator=(const CKeyword&) = delete; |
| 19 | + CKeyword& operator=(CKeyword&&) = delete; |
| 20 | + ~CKeyword() override = default; |
| 21 | + |
| 22 | + // IRestService implementation |
| 23 | + void configurePocoDispatcher(poco::CRestDispatcher& dispatcher) override |
12 | 24 | { |
13 | | - class CKeyword final : public IRestService |
14 | | - { |
15 | | - public: |
16 | | - CKeyword(boost::shared_ptr<database::IDataProvider> dataProvider, |
17 | | - boost::shared_ptr<dataAccessLayer::IKeywordManager> keywordManager, |
18 | | - communication::ISendMessageAsync& messageSender); |
19 | | - ~CKeyword() override = default; |
20 | | - |
21 | | - // IRestService implementation |
22 | | - void configurePocoDispatcher(poco::CRestDispatcher& dispatcher) override{} |
23 | | - boost::shared_ptr<std::vector<boost::shared_ptr<IRestEndPoint>>> endPoints() override; |
24 | | - // [END] IRestService implementation |
25 | | - |
26 | | - private: |
27 | | - boost::shared_ptr<IAnswer> getKeywordsV2(const boost::shared_ptr<IRequest>& request) const; |
28 | | - boost::shared_ptr<IAnswer> getKeywordsAcquisitionsV2(const boost::shared_ptr<IRequest>& request) const; |
29 | | - boost::shared_ptr<IAnswer> updateKeywordV2(const boost::shared_ptr<IRequest>& request) const; |
30 | | - boost::shared_ptr<IAnswer> sendCommandV2(const boost::shared_ptr<IRequest>& request) const; |
31 | | - |
32 | | - //----------------------------------------- |
33 | | - ///\brief Data provider |
34 | | - //----------------------------------------- |
35 | | - boost::shared_ptr<database::IDataProvider> m_dataProvider; |
36 | | - |
37 | | - //----------------------------------------- |
38 | | - ///\brief Keyword manager |
39 | | - //----------------------------------------- |
40 | | - boost::shared_ptr<dataAccessLayer::IKeywordManager> m_keywordManager; |
41 | | - boost::shared_ptr<std::vector<boost::shared_ptr<IRestEndPoint>>> m_endPoints; |
42 | | - |
43 | | - //----------------------------------------- |
44 | | - ///\brief The rest keyword which identifies this rule |
45 | | - //----------------------------------------- |
46 | | - static std::string m_restKeyword; |
47 | | - |
48 | | - //----------------------------------------- |
49 | | - ///\brief The send message interface |
50 | | - //----------------------------------------- |
51 | | - communication::ISendMessageAsync& m_messageSender; |
52 | | - }; |
53 | | - } //namespace service |
54 | | - } //namespace rest |
55 | | -} //namespace web |
| 25 | + } |
| 26 | + |
| 27 | + boost::shared_ptr<std::vector<boost::shared_ptr<IRestEndPoint>>> endPoints() override; |
| 28 | + // [END] IRestService implementation |
| 29 | + |
| 30 | + private: |
| 31 | + boost::shared_ptr<IAnswer> getKeywordsV2(const boost::shared_ptr<IRequest>& request) const; |
| 32 | + boost::shared_ptr<IAnswer> getKeywordsAcquisitionsV2(const boost::shared_ptr<IRequest>& request) const; |
| 33 | + boost::shared_ptr<IAnswer> updateKeywordV2(const boost::shared_ptr<IRequest>& request) const; |
| 34 | + boost::shared_ptr<IAnswer> sendCommandV2(const boost::shared_ptr<IRequest>& request) const; |
| 35 | + |
| 36 | + //----------------------------------------- |
| 37 | + ///\brief Data provider |
| 38 | + //----------------------------------------- |
| 39 | + boost::shared_ptr<database::IDataProvider> m_dataProvider; |
| 40 | + |
| 41 | + //----------------------------------------- |
| 42 | + ///\brief Keyword manager |
| 43 | + //----------------------------------------- |
| 44 | + boost::shared_ptr<dataAccessLayer::IKeywordManager> m_keywordManager; |
| 45 | + boost::shared_ptr<std::vector<boost::shared_ptr<IRestEndPoint>>> m_endPoints; |
| 46 | + |
| 47 | + //----------------------------------------- |
| 48 | + ///\brief The rest keyword which identifies this rule |
| 49 | + //----------------------------------------- |
| 50 | + static std::string m_restKeyword; |
| 51 | + |
| 52 | + //----------------------------------------- |
| 53 | + ///\brief The send message interface |
| 54 | + //----------------------------------------- |
| 55 | + communication::ISendMessageAsync& m_messageSender; |
| 56 | + }; |
| 57 | +} |
0 commit comments