[SECARSP-125] SysInfo class that implements system info used during the device regist...
[platform/core/security/suspicious-activity-monitor.git] / device-agent / communication / inc / restservice.h
1 /**
2  * Samsung Ukraine R&D Center (SRK under a contract between)
3  * LLC "Samsung Electronics Co", Ltd (Seoul, Republic of Korea)
4  * Copyright (C) 2018 Samsung Electronics Co., Ltd. All rights reserved.
5  */
6 /**
7  * @file   restservice.h
8  * @brief  Service to provide data exchange between security server and control application
9  * @date   Created Jul 11, 2017
10  * @author Mail to: <A HREF="mailto:d.lomtev@samsung.com">Dmytro Lomtev, d.lomtev@samsung.com</A>
11  */
12
13 #ifndef RESTSERVICE_H
14 #define RESTSERVICE_H
15
16 #include "irestservice.h"
17
18 namespace NetworkManager
19 {
20
21 /**
22  * @brief REST interface to DSM server
23  */
24 class RestService: public IRestService
25 {
26 public:
27     /**
28      * @brief Constructor
29      * @param server_address DSM server host address
30      */
31     RestService(const std::string& server_address);
32
33     ~RestService();
34
35     std::string getUpdates(const SessionInfo& info) override;
36
37     std::string registerDevice(const SessionInfo& info, const Settings& settings) override;
38
39     std::string auth(const SessionInfo& info, const std::string& secret) override;
40
41     std::string doGet(const SessionInfo& info, const std::string& uri) override;
42
43     void doPost(const SessionInfo& info, const std::string& uri, const std::string& data) override;
44
45     void sendReport(const SessionInfo& info, const std::string& report) override;
46
47     void sendReport(const SessionInfo& info, const Json::Value& report) override;
48 private:
49     std::string host;
50 };
51
52 }
53
54 #endif // RESTSERVICE_H