refines receiver and receiver udp module
[apps/native/gear-racing-car.git] / inc / receiver_internal.h
1 /*
2  * Copyright (c) 2017 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 __CAR_APP_RECEIVER_INTERNAL_H__
18 #define __CAR_APP_RECEIVER_INTERNAL_H__
19
20 #include "receiver_type.h"
21
22 /* TODO */
23 typedef int (*receiver_init_func) (void *data);
24 typedef int (*receiver_fini_func) (void *data);
25 typedef int (*receiver_start_func) (void *data);
26 typedef int (*receiver_stop_func) (void *data);
27 typedef receiver_state_e (*receiver_get_state_func) (void *data);
28
29 typedef struct __receiver_module_h receiver_module_h;
30
31 int receiver_set_module_data(receiver_module_h *handle, void *module_data);
32 void *receiver_get_module_data(receiver_module_h *handle);
33
34 int receiver_set_module_init_function(
35         receiver_module_h *handle, receiver_init_func func);
36
37 int receiver_set_module_fini_function(
38         receiver_module_h *handle, receiver_fini_func func);
39
40 int receiver_set_module_start_function(
41         receiver_module_h *handle, receiver_start_func func);
42
43 int receiver_set_module_stop_function(
44         receiver_module_h *handle, receiver_stop_func func);
45
46 int receiver_set_module_get_state_function(
47         receiver_module_h *handle, receiver_get_state_func func);
48
49 void receiver_module_state_changed(
50         receiver_module_h *handle, receiver_state_e state);
51
52 #endif /* __CAR_APP_RECEIVER_INTERNAL_H__ */