Sending lap time to cloud
[apps/native/gear-racing-car.git] / inc / cloud / cloud_communication.h
1 /*
2  * Copyright (c) 2018 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Flora License, Version 1.1 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://floralicense.org/license/
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 /**
18  * @brief Initializes cloud communication.
19  * @return 0 on success, other value on failure.
20 */
21 int cloud_communication_init();
22
23 /**
24  * @brief Starts sending POST request with car data to the cloud.
25  * @param[in] interval Interval in seconds between POST requests.
26 */
27 void cloud_communication_start(int interval);
28
29 /**
30  * @brief Stops sending POST request with car data to the cloud.
31 */
32 void cloud_communication_stop();
33
34 /**
35  * @brief Finalize all resources used by cloud communication.
36 */
37 void cloud_communication_fini();
38
39 void cloud_communication_post_lap(const long laptime, const char *driver_name);