Release version 1.3.20
[platform/core/appfw/message-port.git] / src / inc / message_port_remote.h
1 /*
2  * Copyright (c) 2017 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 #ifndef __TIZEN_APPFW_MESSAGE_PORT_REMOTE_H__
18 #define __TIZEN_APPFW_MESSAGE_PORT_REMOTE_H__
19
20 #include <bundle.h>
21 #include <message_port.h>
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 typedef struct message_port_local_port_info {
28         message_port_message_cb callback;
29         void *user_data;
30         bool is_trusted;
31         char *port_name;
32         int local_id;
33 } message_port_local_port_info_s;
34
35 int get_local_port_info(int id, message_port_local_port_info_s **info);
36 int register_message_port(const char *local_port, bool is_trusted, message_port_message_cb callback, void *user_data);
37 int unregister_local_port(int local_port_id, bool trusted_port);
38 bool is_local_port_registed(const char *local_port, bool trusted, int *local_id, message_port_local_port_info_s **lpi);
39
40 /**
41  * @}
42  */
43
44 #ifdef __cplusplus
45 }
46 #endif
47
48 #endif /*  __TIZEN_APPFW_MESSAGE_PORT_REMOTE_H__ */