change poll() timeout to -1 for power saving
[platform/core/pim/pims-ipc.git] / include / pims-ipc-svc.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_SVC_H__
21 #define __PIMS_IPC_SVC_H__
22
23 #include <pims-ipc-types.h>
24 #include <sys/stat.h>
25
26 #ifdef __cplusplus
27 extern "C"
28 {
29 #endif
30
31 int pims_ipc_svc_init(char *service, gid_t group, mode_t mode);
32 int pims_ipc_svc_deinit(void);
33 int pims_ipc_svc_register(char *module, char *function, pims_ipc_svc_call_cb callback, void *userdata);
34
35 int pims_ipc_svc_init_for_publish(char *service, gid_t group, mode_t mode);
36 int pims_ipc_svc_deinit_for_publish(void);
37 int pims_ipc_svc_publish(char *module, char *event, pims_ipc_data_h data);
38
39 void pims_ipc_svc_run_main_loop(GMainLoop* main_loop);
40 void pims_ipc_svc_set_client_disconnected_cb(pims_ipc_svc_client_disconnected_cb callback, void *userdata);
41 int pims_ipc_svc_get_smack_label(pims_ipc_h ipc, char **p_smack);
42 bool pims_ipc_svc_check_privilege(pims_ipc_h ipc, char *privilege);
43
44 #ifdef __cplusplus
45 }
46 #endif
47
48 #endif /*__PIMS_IPC_IMPL_H__*/
49