tizen 2.3 release
[framework/appfw/com-core.git] / include / com-core_thread.h
1 /*
2  * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (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://www.apache.org/licenses/LICENSE-2.0
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
18 #ifndef _COM_CORE_THREAD_H
19 #define _COM_CORE_THREAD_H
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25 extern int com_core_thread_client_create(const char *addr, int is_sync, int (*service_cb)(int fd, void *data), void *data);
26 extern int com_core_thread_server_create(const char *addr, int is_sync, int (*service_cb)(int fd, void *data), void *data);
27
28 extern int com_core_thread_server_destroy(int handle);
29 extern int com_core_thread_client_destroy(int handle);
30
31 extern int com_core_thread_recv(int handle, char *buffer, int size, int *sender_pid, double timeout);
32 extern int com_core_thread_send(int handle, const char *buffer, int size, double timeout);
33
34 extern int com_core_thread_recv_with_fd(int handle, char *buffer, int size, int *sender_pid, double timeout, int *fd);
35 extern int com_core_thread_send_with_fd(int handle, const char *buffer, int size, double timeout, int fd);
36
37 #ifdef __cplusplus
38 }
39 #endif
40
41 #endif
42 /* End of a file */