[FEATURE] Implement kernel -> user connection
[platform/core/system/swap-manager.git] / daemon / da_data.h
1 /*
2  *  DA manager
3  *
4  * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact:
7  *
8  * Cherepanov Vitaliy <v.cherepanov@samsung.com>
9  * Nikita Kalyazin    <n.kalyazin@samsung.com>
10  *
11  * Licensed under the Apache License, Version 2.0 (the "License");
12  * you may not use this file except in compliance with the License.
13  * You may obtain a copy of the License at
14  *
15  * http://www.apache.org/licenses/LICENSE-2.0
16  *
17  * Unless required by applicable law or agreed to in writing, software
18  * distributed under the License is distributed on an "AS IS" BASIS,
19  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20  * See the License for the specific language governing permissions and
21  * limitations under the License.
22  *
23  * Contributors:
24  * - Samsung RnD Institute Russia
25  *
26  */
27
28
29 #ifndef _DA_DATA_H_
30 #define _DA_DATA_H_
31 int fill_data_msg_head (struct msg_data_t *data, uint32_t msgid,
32                                                 uint32_t seq, uint32_t len);
33 //allocate memory, need free!!!
34 struct msg_data_t *gen_message_terminate(uint32_t id);
35
36 //allocatr memory, need free!!!
37 struct msg_data_t *gen_message_event(
38                       struct input_event *events,
39                       uint32_t events_count,
40                       uint32_t id);
41
42
43 struct msg_data_t *gen_message_error(const char * err_msg);
44
45 struct msg_data_t *gen_message_event(
46                       struct input_event *events,
47                       uint32_t events_count,
48                       uint32_t id);
49
50 int reset_data_msg(struct msg_data_t *data);
51
52 //DEBUGS
53 int print_sys_info(struct system_info_t * sys_info);
54 #endif //#ifndef _DA_DATA_H_