4 * Copyright 2012 Samsung Electronics Co., Ltd
6 * Contact: Hocheol Seo <hocheol.seo@samsung.com>
7 * GirishAshok Joshi <girish.joshi@samsung.com>
8 * DoHyun Pyun <dh79.pyun@samsung.com>
10 * Licensed under the Flora License, Version 1.1 (the "License");
11 * you may not use this file except in compliance with the License.
12 * You may obtain a copy of the License at
14 * http://www.tizenopensource.org/license
16 * Unless required by applicable law or agreed to in writing,
17 * software distributed under the License is distributed on an "AS IS" BASIS,
18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 * See the License for the specific language governing permissions and
20 * limitations under the License.
24 #ifndef __BT_IPC_HANDLER_H__
25 #define __BT_IPC_HANDLER_H__
31 #include "bt-type-define.h"
33 /* ================= IPC interface define ================= */
35 #define BT_UG_IPC_INTERFACE "User.Bluetooth.UG"
36 #define BT_UG_IPC_RECIEVER "org.projectx.bluetooth"
37 #define BT_UG_IPC_REQUEST_OBJECT "/org/projectx/connect_device"
38 #define BT_UG_IPC_RESPONSE_OBJECT "/org/projectx/response_event"
39 #define BT_UG_IPC_METHOD_CONNECT "Connect"
40 #define BT_UG_IPC_METHOD_DISCONNECT "Disconnect"
41 #define BT_UG_IPC_METHOD_RESPONSE "Response"
42 #define BT_UG_IPC_METHOD_SEND "Send"
43 #define BT_UG_IPC_EVENT_CONNECTED "Connected"
44 #define BT_UG_IPC_EVENT_DISCONNECTED "Disconnected"
46 #define BT_SYSPOPUP_IPC_RESPONSE_OBJECT "/org/projectx/bt_syspopup_res"
47 #define BT_SYSPOPUP_INTERFACE "User.Bluetooth.syspopup"
48 #define BT_SYSPOPUP_METHOD_RESPONSE "Response"
50 #define BT_UG_IPC_MSG_LEN 256
55 BT_STEREO_HEADSET_DEVICE,
56 BT_MUSIC_PLAYER_DEVICE,
63 BT_IPC_AG_CONNECT_RESPONSE,
64 BT_IPC_AG_DISCONNECT_RESPONSE,
65 BT_IPC_AV_CONNECT_RESPONSE,
66 BT_IPC_AV_DISCONNECT_RESPONSE,
67 BT_IPC_HID_CONNECT_RESPONSE,
68 BT_IPC_HID_DISCONNECT_RESPONSE,
69 BT_IPC_SENDING_RESPONSE,
70 BT_IPC_BROWSING_RESPONSE,
71 BT_IPC_PRINTING_RESPONSE,
72 BT_IPC_PAIRING_RESPONSE,
81 int param1; /* Connect type: Headset / Stereo Headset / HID device */
82 unsigned char param2[BT_ADDRESS_LENGTH_MAX]; /* Device address */
83 } __attribute__ ((packed)) bt_ug_ipc_param_t;
86 unsigned char addr[BT_ADDRESS_LENGTH_MAX]; /* Device address */
87 int file_cnt; /* file count */
88 char *dev_name; /* Device name */
89 char *type; /* sending type */
91 } __attribute__ ((packed)) obex_ipc_param_t;
94 * Structure to pass notification from BT application
101 int _bt_ipc_register_popup_event_signal(bt_ug_data *ugd);
103 int _bt_ipc_unregister_popup_event_signal(bt_ug_data *ugd);
105 int _bt_ipc_send_message(char *method_type, bt_ug_ipc_param_t *param,
108 int _bt_ipc_send_obex_message(obex_ipc_param_t *param, void *data);
110 void _bt_ipc_update_connected_status(void *data, int connected_type,
111 bool connected, int result,
118 #endif /* __BT_IPC_HANDLER_H__ */