4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Hocheol Seo <hocheol.seo@samsung.com>
7 * Girishashok Joshi <girish.joshi@samsung.com>
8 * Chanyeol Park <chanyeol.park@samsung.com>
10 * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
16 * Unless required by applicable law or agreed to in writing, software
17 * 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.
25 #ifndef _BT_INTERNAL_TYPES_H_
26 #define _BT_INTERNAL_TYPES_H_
28 #include <sys/types.h>
33 #include "bluetooth-api.h"
37 #endif /* __cplusplus */
52 BT_MANAGER_EVENT = 0x01,
63 BT_RFCOMM_CLIENT_EVENT,
64 BT_RFCOMM_SERVER_EVENT,
66 BT_OBJECT_MANAGER_EVENT,
67 BT_MEDIA_TRANSFER_EVENT,
69 BT_AVRCP_CONTROL_EVENT,
75 BT_OBEX_SERVER = 0x00,
76 BT_RFCOMM_SERVER = 0x01,
77 } bt_osp_server_type_t;
80 BT_BLUEZ_SERVICE = 0x00,
88 BT_RFCOMM_UUID = 0x00,
90 } bt_rfcomm_connect_type_t;
93 BT_ADAPTER_DISABLED = 0x00,
95 } bt_adapter_status_t;
98 BT_ADAPTER_LE_DISABLED = 0x00,
99 BT_ADAPTER_LE_ENABLED,
100 } bt_adapter_le_status_t;
102 #define BT_ADDRESS_STR_LEN 18
103 #define BT_DBUS_TIMEOUT_MAX 50000
104 #define BT_SERVER_ACCEPT_TIMEOUT 2000 /* 2 seconds */
105 #define BT_FILE_PATH_MAX 256
106 #define BT_META_DATA_MAX_LEN 512 + 1
108 #define BT_HFP_AUDIO_GATEWAY_UUID "0000111f-0000-1000-8000-00805f9b34fb"
109 #define BT_A2DP_UUID "0000110D-0000-1000-8000-00805F9B34FB"
110 #define BT_AVRCP_TARGET_UUID "0000110c-0000-1000-8000-00805f9b34fb"
111 #define BT_OPP_UUID "00001105-0000-1000-8000-00805f9b34fb"
112 #define BT_FTP_UUID "00001106-0000-1000-8000-00805f9b34fb"
113 #define BT_SPP_UUID "00001101-0000-1000-8000-00805f9b34fb"
114 #define BT_HID_UUID "00001124-0000-1000-8000-00805f9b34fb"
115 #define BT_PAN_PANU_UUID "00001115-0000-1000-8000-00805f9b34fb"
116 #define BT_PAN_NAP_UUID "00001116-0000-1000-8000-00805f9b34fb"
117 #define BT_PAN_GN_UUID "00001117-0000-1000-8000-00805f9b34fb"
119 #define BT_FUNC_BASE ((int)(0x0000))
120 #define BT_FUNC_DEVICE_BASE ((int)(BT_FUNC_BASE + 0x0050))
121 #define BT_FUNC_HID_BASE ((int)(BT_FUNC_DEVICE_BASE + 0x0020))
122 #define BT_FUNC_NETWORK_BASE ((int)(BT_FUNC_HID_BASE + 0x0020))
123 #define BT_FUNC_AUDIO_BASE ((int)(BT_FUNC_NETWORK_BASE + 0x0020))
124 #define BT_FUNC_OOB_BASE ((int)(BT_FUNC_AUDIO_BASE + 0x0020))
125 #define BT_FUNC_AVRCP_BASE ((int)(BT_FUNC_OOB_BASE + 0x0020))
126 #define BT_FUNC_OPP_BASE ((int)(BT_FUNC_AVRCP_BASE + 0x0020))
127 #define BT_FUNC_RFCOMM_BASE ((int)(BT_FUNC_OPP_BASE + 0x0020))
128 #define BT_FUNC_PBAP_BASE ((int)(BT_FUNC_RFCOMM_BASE + 0x0020))
129 #define BT_FUNC_HDP_BASE ((int)(BT_FUNC_PBAP_BASE + 0x0020))
130 #define BT_FUNC_GATT_BASE ((int)(BT_FUNC_HDP_BASE + 0x0020))
133 BT_CHECK_ADAPTER = BT_FUNC_BASE,
137 BT_SET_DISCOVERABLE_TIME,
138 BT_GET_DISCOVERABLE_TIME,
139 BT_IGNORE_AUTO_PAIRING,
140 BT_GET_LOCAL_ADDRESS,
141 BT_GET_LOCAL_VERSION,
145 BT_GET_DISCOVERABLE_MODE,
146 BT_SET_DISCOVERABLE_MODE,
148 BT_START_CUSTOM_DISCOVERY,
150 BT_START_LE_DISCOVERY,
151 BT_STOP_LE_DISCOVERY,
153 BT_IS_LE_DISCOVERYING,
158 BT_GET_BONDED_DEVICES,
161 BT_SET_CUSTOM_ADVERTISING,
162 BT_SET_ADVERTISING_PARAMETERS,
163 BT_GET_ADVERTISING_DATA,
164 BT_SET_ADVERTISING_DATA,
165 BT_SET_SCAN_PARAMETERS,
166 BT_GET_SCAN_RESPONSE_DATA,
167 BT_SET_SCAN_RESPONSE_DATA,
169 BT_SET_MANUFACTURER_DATA,
172 BT_REMOVE_WHITE_LIST,
174 BT_REGISTER_SCAN_FILTER,
175 BT_UNREGISTER_SCAN_FILTER,
176 BT_UNREGISTER_ALL_SCAN_FILTERS,
177 BT_BOND_DEVICE = BT_FUNC_DEVICE_BASE,
178 BT_BOND_DEVICE_BY_TYPE,
182 BT_CANCEL_SEARCH_SERVICE,
183 BT_GET_BONDED_DEVICE,
185 BT_SET_AUTHORIZATION,
186 BT_UNSET_AUTHORIZATION,
187 BT_IS_DEVICE_CONNECTED,
188 BT_GET_CONNECTED_LINK_TYPE,
189 BT_HID_CONNECT = BT_FUNC_HID_BASE,
191 BT_NETWORK_ACTIVATE = BT_FUNC_NETWORK_BASE,
192 BT_NETWORK_DEACTIVATE,
194 BT_NETWORK_DISCONNECT,
195 BT_NETWORK_SERVER_DISCONNECT,
196 BT_AUDIO_CONNECT = BT_FUNC_AUDIO_BASE,
202 BT_AV_SOURCE_CONNECT,
203 BT_AV_SOURCE_DISCONNECT,
208 BT_SET_CONTENT_PROTECT,
209 BT_OOB_READ_LOCAL_DATA = BT_FUNC_OOB_BASE,
210 BT_OOB_ADD_REMOTE_DATA,
211 BT_OOB_REMOVE_REMOTE_DATA,
212 BT_AVRCP_SET_TRACK_INFO = BT_FUNC_AVRCP_BASE,
213 BT_AVRCP_SET_PROPERTY,
214 BT_AVRCP_SET_PROPERTIES,
215 BT_AVRCP_CONTROL_CONNECT,
216 BT_AVRCP_CONTROL_DISCONNECT,
217 BT_AVRCP_HANDLE_CONTROL,
218 BT_AVRCP_CONTROL_SET_PROPERTY,
219 BT_AVRCP_CONTROL_GET_PROPERTY,
220 BT_AVRCP_GET_TRACK_INFO,
221 BT_OPP_PUSH_FILES = BT_FUNC_OPP_BASE,
223 BT_OPP_IS_PUSHING_FILES,
224 BT_OBEX_SERVER_ALLOCATE,
225 BT_OBEX_SERVER_DEALLOCATE,
226 BT_OBEX_SERVER_IS_ACTIVATED,
227 BT_OBEX_SERVER_ACCEPT_CONNECTION,
228 BT_OBEX_SERVER_REJECT_CONNECTION,
229 BT_OBEX_SERVER_ACCEPT_FILE,
230 BT_OBEX_SERVER_REJECT_FILE,
231 BT_OBEX_SERVER_SET_PATH,
232 BT_OBEX_SERVER_SET_ROOT,
233 BT_OBEX_SERVER_CANCEL_TRANSFER,
234 BT_OBEX_SERVER_CANCEL_ALL_TRANSFERS,
235 BT_OBEX_SERVER_IS_RECEIVING,
236 BT_RFCOMM_CLIENT_CONNECT = BT_FUNC_RFCOMM_BASE,
237 BT_RFCOMM_CLIENT_CANCEL_CONNECT,
238 BT_RFCOMM_CLIENT_IS_CONNECTED,
239 BT_RFCOMM_SOCKET_DISCONNECT,
240 BT_RFCOMM_SOCKET_WRITE,
241 BT_RFCOMM_CREATE_SOCKET,
242 BT_RFCOMM_REMOVE_SOCKET,
244 BT_RFCOMM_IS_UUID_AVAILABLE,
245 BT_RFCOMM_ACCEPT_CONNECTION,
246 BT_RFCOMM_REJECT_CONNECTION,
247 BT_RFCOMM_CREATE_SOCKET_EX,
248 BT_RFCOMM_REMOVE_SOCKET_EX,
249 BT_PBAP_CONNECT = BT_FUNC_PBAP_BASE,
251 BT_PBAP_GET_PHONEBOOK_SIZE,
252 BT_PBAP_GET_PHONEBOOK,
255 BT_PBAP_PHONEBOOK_SEARCH,
257 BT_ENABLE_ADAPTER_LE,
258 BT_DISABLE_ADAPTER_LE,
263 BT_HDP_CONNECT = BT_FUNC_HDP_BASE,
266 BT_GATT_GET_PRIMARY_SERVICES = BT_FUNC_GATT_BASE,
267 BT_GATT_DISCOVER_CHARACTERISTICS,
268 BT_GATT_SET_PROPERTY_REQUEST,
269 BT_GATT_READ_CHARACTERISTIC,
270 BT_GATT_DISCOVER_CHARACTERISTICS_DESCRIPTOR,
274 char title[BT_META_DATA_MAX_LEN];
275 char artist[BT_META_DATA_MAX_LEN];
276 char album[BT_META_DATA_MAX_LEN];
277 char genre[BT_META_DATA_MAX_LEN];
278 unsigned int total_tracks;
280 unsigned int duration;
283 #define BT_COMMON_PKG "ug-setting-bluetooth-efl"
285 /* Need to convert the design ID */
286 #define BT_STR_NOT_SUPPORT "Not support"
288 #ifndef TIZEN_WEARABLE
289 #define BT_FILE_VISIBLE_TIME "file/private/libug-setting-bluetooth-efl/visibility_time"
292 #define BT_OFF_DUE_TO_FLIGHT_MODE "file/private/bt-core/flight_mode_deactivated"
293 #define BT_OFF_DUE_TO_POWER_SAVING_MODE "file/private/bt-core/powersaving_mode_deactivated"
294 #define BT_OFF_DUE_TO_TIMEOUT "file/private/bt-service/bt_off_due_to_timeout"
296 #define BT_EVENT_SERVICE "org.projectx.bt_event"
297 #define BT_HF_AGENT_SERVICE "org.bluez.HandsfreeAgent"
298 #define BT_HF_SERVICE_INTERFACE "org.tizen.HfApp"
299 #define BT_CORE_EVENT_INTERFACE "org.projectx.bt_core_event"
300 #define BT_HF_LOCAL_TERM_EVENT_INTERFACE "org.projectx.bt_hf_local_term"
302 #define BT_ADAPTER_PATH "/org/projectx/bt/adapter"
303 #define BT_LE_ADAPTER_PATH "/org/projectx/bt/le/adapter"
304 #define BT_DEVICE_PATH "/org/projectx/bt/device"
305 #define BT_HID_PATH "/org/projectx/bt/hid"
306 #define BT_HEADSET_PATH "/org/projectx/bt/headset"
307 #define BT_AVRCP_PATH "/org/projectx/bt/avrcp"
308 #define BT_NETWORK_PATH "/org/projectx/bt/newtork"
309 #define BT_OPP_CLIENT_PATH "/org/projectx/bt/opp_client"
310 #define BT_OPP_SERVER_PATH "/org/projectx/bt/opp_server"
311 #define BT_PBAP_CLIENT_PATH "/org/projectx/bt/pbap_client"
312 #define BT_RFCOMM_CLIENT_PATH "/org/projectx/bt/rfcomm_client"
313 #define BT_RFCOMM_SERVER_PATH "/org/projectx/bt/rfcomm_server"
314 #define BT_HF_AGENT_PATH "/org/bluez/handsfree_agent"
315 #define BT_CORE_EVENT_PATH "/org/projectx/bt/bt_core"
316 #define BT_HF_LOCAL_TERM_EVENT_PATH "/org/projectx/bt/hf_local_term"
317 #define BT_AVRCP_CONTROL_PATH "/org/projectx/bt/avrcp_control"
318 #define BT_A2DP_SOURCE_PATH "/org/projectx/bt/a2dp_source"
320 #define BT_ENABLED "Enabled"
321 #define BT_DISABLED "Disabled"
322 #define BT_LE_ENABLED "LeEnabled"
323 #define BT_LE_DISABLED "LeDisabled"
324 #define BT_DISCOVERABLE_MODE_CHANGED "DiscoverableModeChanged"
325 #define BT_DISCOVERABLE_TIMEOUT_CHANGED "DiscoverableTimeoutChanged"
326 #define BT_CONNECTABLE_CHANGED "ConnectableChanged"
327 #define BT_ADAPTER_NAME_CHANGED "AdapterNameChanged"
328 #define BT_DISCOVERY_STARTED "DiscoveryStarted"
329 #define BT_DISCOVERY_FINISHED "DiscoveryFinished"
330 #define BT_DEVICE_FOUND "DeviceFound"
331 #define BT_LE_DISCOVERY_STARTED "LEDiscoveryStarted"
332 #define BT_LE_DISCOVERY_FINISHED "LEDiscoveryFinished"
333 #define BT_LE_DEVICE_FOUND "LEDeviceFound"
334 #define BT_ADVERTISING_STARTED "AdvertisingStarted"
335 #define BT_ADVERTISING_STOPPED "AdvertisingStopped"
336 #define BT_ADVERTISING_MANUFACTURER_DATA_CHANGED "AdvertisingManufacturerDataChanged"
337 #define BT_SCAN_RESPONSE_MANUFACTURER_DATA_CHANGED "ScanResponseManufacturerDataChanged"
338 #define BT_MANUFACTURER_DATA_CHANGED "ManufacturerDataChanged"
339 #define BT_DEVICE_CONNECTED "DeviceConnected"
340 #define BT_DEVICE_DISCONNECTED "DeviceDisconnected"
341 #define BT_DEVICE_PROFILE_STATE_CHANGED "ProfileStateChanged"
342 #define BT_BOND_CREATED "BondCreated"
343 #define BT_BOND_DESTROYED "BondDestroyed"
344 #define BT_DEVICE_AUTHORIZED "DeviceAuthorized"
345 #define BT_DEVICE_UNAUTHORIZED "DeviceUnauthorized"
346 #define BT_RSSI_MONITORING_ENABLED "RssiMonitoringEnabled"
347 #define BT_RSSI_ALERT "RssiMonitoringAlert"
348 #define BT_RAW_RSSI_EVENT "RawRssiEvent"
349 #define BT_SERVICE_SEARCHED "ServiceSearched"
350 #define BT_INPUT_CONNECTED "InputConnected"
351 #define BT_INPUT_DISCONNECTED "InputDisconnected"
352 #define BT_PBAP_CONNECTED "PbapConnected"
353 #define BT_PBAP_DISCONNECTED "PbapDisconnected"
354 #define BT_PBAP_PHONEBOOK_SIZE "PbapPhonebookSize"
355 #define BT_PBAP_PHONEBOOK_PULL "PbapPhonebookPull"
356 #define BT_PBAP_VCARD_LIST "PbapvCardList"
357 #define BT_PBAP_VCARD_PULL "PbapvCardPull"
358 #define BT_PBAP_SEARCH_PHONEBOOK "PbapSearchPhonebook"
359 #define BT_HEADSET_CONNECTED "HeadsetConnected"
360 #define BT_HEADSET_DISCONNECTED "HeadsetDisconnected"
361 #define BT_STEREO_HEADSET_CONNECTED "StereoHeadsetConnected"
362 #define BT_STEREO_HEADSET_DISCONNECTED "StereoHeadsetDisconnected"
363 #define BT_A2DP_SOURCE_CONNECTED "A2DPSourceConnected"
364 #define BT_A2DP_SOURCE_DISCONNECTED "A2DPSourceDisconnected"
365 #define BT_SCO_CONNECTED "ScoConnected"
366 #define BT_SCO_DISCONNECTED "ScoDisconnected"
367 #define BT_SPEAKER_GAIN "SpeakerGain"
368 #define BT_MICROPHONE_GAIN "MicrophoneGain"
369 #define BT_HF_RING "Ring"
370 #define BT_HF_CALL_TERMINATED "CallTerminated"
371 #define BT_HF_CALL_STARTED "CallStarted"
372 #define BT_HF_CALL_ENDED "CallEnded"
373 #define BT_NETWORK_CONNECTED "NetworkConnected"
374 #define BT_NETWORK_DISCONNECTED "NetworkDisconnected"
375 #define BT_NETWORK_SERVER_CONNECTED "NetworkServerConnected"
376 #define BT_NETWORK_SERVER_DISCONNECTED "NetworkServerDisconnected"
377 #define BT_OPP_CONNECTED "OppConnected"
378 #define BT_OPP_DISCONNECTED "OppDisconnected"
379 #define BT_TRANSFER_CONNECTED "TransferConnected"
380 #define BT_TRANSFER_DISCONNECTED "TransferDisonnected"
381 #define BT_TRANSFER_STARTED "TransferStarted"
382 #define BT_TRANSFER_PROGRESS "TransferProgress"
383 #define BT_TRANSFER_COMPLETED "TransferCompleted"
384 #define BT_TRANSFER_AUTHORIZED "TransferAuthorized"
385 #define BT_CONNECTION_AUTHORIZED "ConnectionAuthorized"
386 #define BT_RFCOMM_SERVER_REMOVED "RfcommServerRemoved"
387 #define BT_RFCOMM_DATA_RECEIVED "RfcommDataReceived"
388 #define BT_RFCOMM_CONNECTED "RfcommConnected"
389 #define BT_RFCOMM_DISCONNECTED "RfcommDisconnected"
390 #define BT_AVRCP_CONNECTED "AvrcpConnected"
391 #define BT_AVRCP_DISCONNECTED "AvrcpDisconnected"
392 #define BT_MEDIA_SHUFFLE_STATUS "MediaShuffleStatus"
393 #define BT_MEDIA_EQUALIZER_STATUS "MediaEqualizerStatus"
394 #define BT_MEDIA_REPEAT_STATUS "MediaRepeatStatus"
395 #define BT_MEDIA_SCAN_STATUS "MediaScanStatus"
396 #define BT_MEDIA_PLAY_STATUS "MediaPlayStatus"
397 #define BT_MEDIA_POSITION_STATUS "MediaPositionStatus"
398 #define BT_MEDIA_TRACK_CHANGE "MediaTrackStatus"
399 #define BT_NAME_OWNER_CHANGED "NameOwnerChanged"
400 #define BT_GATT_CONNECTED "GattConnected"
401 #define BT_GATT_DISCONNECTED "GattDisconnected"
402 #define BT_GATT_CHAR_VAL_CHANGED "GattCharValueChanged"
403 #define BT_HARDWARE_ERROR "HardwareError"
404 #define BT_TX_TIMEOUT_ERROR "TxTimeoutError"
405 #define BT_HF_LOCAL_TERM "HandsfreeLocalTermination"
409 #endif /* __cplusplus */
410 #endif /*_BT_INTERNAL_TYPES_H_*/