Ported messages from gear racing controller
[apps/native/gear-racing-car.git] / inc / messages / message_keep_alive.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 #ifndef MESSAGE_KEEP_ALIVE_H
18 #define MESSAGE_KEEP_ALIVE_H
19
20 #include "messages/message.h"
21
22 /**
23  * @brief Keep alive message data
24  */
25 typedef struct message_keep_alive {
26         message_t base; /** Base class */
27 } message_keep_alive_t;
28
29 /**
30  * @brief Initializes message_keep_alive_t object.
31  *
32  * @param[in] message ack message.
33  */
34 void message_keep_alive_init(message_keep_alive_t *message);
35
36 /**
37  * @brief Destroys message_keep_alive_t object.
38  *
39  * @param[in] message ack message.
40  */
41 void message_keep_alive_destroy(message_keep_alive_t *message);
42
43 /**
44  * @brief Deserializes message_keep_alive_t from reader's buffer.
45  *
46  * @param[in] message ack message.
47  * @param[in] reader reader object.
48  *
49  * @return 0 on success, other value on failure.
50  */
51 int message_keep_alive_deserialize(message_keep_alive_t *message, reader_t *reader);
52
53 /**
54  * @brief Serializes message_keep_alive_t into writer's buffer.
55  *
56  * @param[in] message message object.
57  * @param[in] writer writer object.
58  *
59  * @return 0 on success, other value on failure.
60  */
61 int message_keep_alive_serialize(message_keep_alive_t *message, writer_t *writer);
62
63 #endif /* end of include guard: MESSAGE_KEEP_ALIVE_H */
64