2 * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 * Licensed under the Flora License, Version 1.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
8 * http://floralicense.org/license/
10 * Unless required by applicable law or agreed to in writing,
11 * software 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.
17 #ifndef __BT_IPC_HANDLER_H__
18 #define __BT_IPC_HANDLER_H__
24 #include "bt-type-define.h"
26 /* ================= IPC interface define ================= */
28 #define BT_UG_IPC_INTERFACE "User.Bluetooth.UG"
29 #define BT_UG_IPC_RECIEVER "org.projectx.bluetooth"
30 #define BT_UG_IPC_REQUEST_OBJECT "/org/projectx/connect_device"
31 #define BT_UG_IPC_RESPONSE_OBJECT "/org/projectx/response_event"
32 #define BT_UG_IPC_METHOD_CONNECT "Connect"
33 #define BT_UG_IPC_METHOD_DISCONNECT "Disconnect"
34 #define BT_UG_IPC_METHOD_RESPONSE "Response"
35 #define BT_UG_IPC_METHOD_SEND "Send"
36 #define BT_UG_IPC_EVENT_CONNECTED "Connected"
37 #define BT_UG_IPC_EVENT_DISCONNECTED "Disconnected"
39 #define BT_SYSPOPUP_IPC_RESPONSE_OBJECT "/org/projectx/bt_syspopup_res"
40 #define BT_SYSPOPUP_INTERFACE "User.Bluetooth.syspopup"
41 #define BT_SYSPOPUP_METHOD_RESPONSE "Response"
43 #define BT_UG_IPC_MSG_LEN 256
48 BT_STEREO_HEADSET_DEVICE,
55 BT_IPC_AG_CONNECT_RESPONSE,
56 BT_IPC_AG_DISCONNECT_RESPONSE,
57 BT_IPC_AV_CONNECT_RESPONSE,
58 BT_IPC_AV_DISCONNECT_RESPONSE,
59 BT_IPC_HID_CONNECT_RESPONSE,
60 BT_IPC_HID_DISCONNECT_RESPONSE,
61 BT_IPC_SENDING_RESPONSE,
62 BT_IPC_BROWSING_RESPONSE,
63 BT_IPC_PRINTING_RESPONSE,
64 BT_IPC_PAIRING_RESPONSE,
73 int param1; /* Connect type: Headset / Stereo Headset / HID device */
74 char param2[BT_UG_IPC_MSG_LEN]; /* Device address */
75 } __attribute__ ((packed)) bt_ug_ipc_param_t;
78 int param1; /* Reserved */
79 char param2[BT_UG_IPC_MSG_LEN]; /* Device address */
80 int param3; /* file count */
81 char *param4; /* File path */
82 char *param5; /* mode */
83 char *param6; /* Device name */
84 } __attribute__ ((packed)) obex_ipc_param_t;
87 * Structure to pass notification from BT application
94 int _bt_ipc_init_event_signal(void *data);
96 int _bt_ipc_deinit_event_signal(void *data);
98 int _bt_ipc_register_popup_event_signal(E_DBus_Connection *conn,
101 int _bt_ipc_unregister_popup_event_signal(E_DBus_Connection *conn,
104 int _bt_ipc_send_message(char *method_type, bt_ug_ipc_param_t *param,
107 int _bt_ipc_send_obex_message(obex_ipc_param_t *param, void *data);
109 void _bt_ipc_update_connected_status(bt_ug_data *ugd, int connected_type,
110 bool connected, int result,
117 #endif /* __BT_IPC_HANDLER_H__ */