Remove the devider of genlist for IOT profile
[apps/native/ug-bluetooth-efl.git] / standard / bt-ipc-handler.h
1 /*
2 * ug-bluetooth-efl
3 *
4 * Copyright 2012 Samsung Electronics Co., Ltd
5 *
6 * Contact: Hocheol Seo <hocheol.seo@samsung.com>
7 *           GirishAshok Joshi <girish.joshi@samsung.com>
8 *           DoHyun Pyun <dh79.pyun@samsung.com>
9 *
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
13 *
14 * http://www.tizenopensource.org/license
15 *
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.
21 *
22 */
23
24 #ifndef __BT_IPC_HANDLER_H__
25 #define __BT_IPC_HANDLER_H__
26
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30
31 #include "bt-type-define.h"
32
33 /* ================= IPC interface define  ================= */
34
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"
45
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"
49
50 #define BT_UG_IPC_MSG_LEN                               256
51
52 typedef enum {
53         BT_AUDIO_DEVICE,
54         BT_HEADSET_DEVICE,
55         BT_STEREO_HEADSET_DEVICE,
56         BT_MUSIC_PLAYER_DEVICE,
57         BT_HID_DEVICE,
58         BT_NETWORK_DEVICE,
59         BT_DEVICE_MAX,
60 } bt_device_type;
61
62 typedef enum {
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,
73 } bt_ipc_response_t;
74
75 typedef enum {
76         BT_IPC_SUCCESS,
77         BT_IPC_FAIL,
78 } bt_ipc_result_t;
79
80 typedef struct {
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;
84
85 typedef struct {
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 */
90         char **filepath;
91 } __attribute__ ((packed)) obex_ipc_param_t;
92
93 /**
94   * Structure to pass notification from BT application
95   */
96 typedef struct {
97         int param1;
98         int param2;
99 } bt_ug_param_info_t;
100
101 int _bt_ipc_register_popup_event_signal(bt_ug_data *ugd);
102
103 int _bt_ipc_unregister_popup_event_signal(bt_ug_data *ugd);
104
105 int _bt_ipc_send_message(char *method_type, bt_ug_ipc_param_t *param,
106                          void *data);
107
108 int _bt_ipc_send_obex_message(obex_ipc_param_t *param, void *data);
109
110 void _bt_ipc_update_connected_status(void *data, int connected_type,
111                                                 bool connected, int result,
112                                                 bt_address_t *addr);
113
114
115 #ifdef __cplusplus
116 }
117 #endif
118 #endif                          /* __BT_IPC_HANDLER_H__ */