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.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License
20 * @brief Service to provide data exchange between security server and control application
21 * @date Created Jul 11, 2017
22 * @author Mail to: <A HREF="mailto:d.lomtev@samsung.com">Dmytro Lomtev, d.lomtev@samsung.com</A>
28 #include "irestservice.h"
30 namespace communication
34 * @brief REST interface to DSM server
36 class RestService: public IRestService
41 * @param server_address DSM server host address
43 RestService(const std::string& server_address);
47 std::string getUpdates(const SessionInfo& info) override;
49 std::string registerDevice(const SessionInfo& info, const Json::Value& data) override;
51 std::string auth(const SessionInfo& info, const std::string& secret) override;
53 std::string doGet(const SessionInfo& info, const std::string& uri) override;
55 void doPost(const SessionInfo& info, const std::string& uri, const std::string& data) override;
57 void sendData(const SessionInfo& info, const std::string& data) override;
59 void sendData(const SessionInfo& info, const Json::Value& data) override;
66 #endif // RESTSERVICE_H