change poll() timeout to -1 for power saving
[platform/core/pim/pims-ipc.git] / include / pims-ipc-types.h
1 /*
2  * PIMS IPC
3  *
4  * Copyright (c) 2012 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
5  *
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
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
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.
17  */
18
19
20 #ifndef __PIMS_IPC_TYPES_H__
21 #define __PIMS_IPC_TYPES_H__
22
23 #include <glib.h>
24 #include <stdbool.h>
25
26
27 #ifdef __cplusplus
28 extern "C"
29 {
30 #endif
31
32 #define PIMS_IPC_DATA_FLAGS_NONE        0x00000000
33 #define PIMS_IPC_DATA_FLAGS_WITH_TYPE   0x00000001
34
35 typedef void* pims_ipc_h;
36 typedef void* pims_ipc_data_h;
37
38 typedef enum {
39         PIMS_IPC_DATA_TYPE_INVALID,
40         PIMS_IPC_DATA_TYPE_CHAR,
41         PIMS_IPC_DATA_TYPE_UCHAR,
42         PIMS_IPC_DATA_TYPE_INT,
43         PIMS_IPC_DATA_TYPE_UINT,
44         PIMS_IPC_DATA_TYPE_LONG,
45         PIMS_IPC_DATA_TYPE_ULONG,
46         PIMS_IPC_DATA_TYPE_FLOAT,
47         PIMS_IPC_DATA_TYPE_DOUBLE,
48         PIMS_IPC_DATA_TYPE_STRING,
49         PIMS_IPC_DATA_TYPE_MEMORY,
50 } pims_ipc_data_type_e;
51
52 typedef void (*pims_ipc_svc_call_cb)(pims_ipc_h ipc, pims_ipc_data_h data_in,
53                 pims_ipc_data_h *data_out, void *user_data);
54 typedef void (*pims_ipc_svc_client_disconnected_cb)(pims_ipc_h ipc, void *user_data);
55
56 typedef void (*pims_ipc_call_async_cb)(pims_ipc_h ipc, pims_ipc_data_h data_out, void *user_data);
57 typedef void (*pims_ipc_subscribe_cb)(pims_ipc_h ipc, pims_ipc_data_h data, void *user_data);
58 typedef void (*pims_ipc_server_disconnected_cb)(void *user_data);
59
60
61 #ifdef __cplusplus
62 }
63 #endif
64
65 #endif /* __PIMS_IPC_TYPES_H__ */
66