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_SERVICE_AUDIO_H_
26 #define _BT_SERVICE_AUDIO_H_
29 #include <sys/types.h>
30 #include "bluetooth-api.h"
39 int disconnection_type;
48 } bt_player_settinngs_t;
51 BT_PENDING_NONE = 0x00,
54 } bt_pending_request_t;
59 bt_pending_request_t pending;
62 } bt_audio_function_data_t;
76 BT_STATE_DISCONNECTING,
78 } bt_headset_device_state_t;
80 #define BT_CONTENT_PROTECTION_PATH "/org/tizen/bluetooth/a2dpcontentprotection"
81 #define BT_CONTENT_PROTECTION_INTERFACE "org.tizen.bluetooth.A2dpContentProtection"
83 int _bt_audio_connect(int request_id, int type,
84 bluetooth_device_address_t *device_address,
87 int _bt_audio_disconnect(int request_id, int type,
88 bluetooth_device_address_t *device_address,
91 int _bt_hf_connect(int request_id,
92 bluetooth_device_address_t *device_address,
95 int _bt_hf_disconnect(int request_id,
96 bluetooth_device_address_t *device_address,
99 int _bt_audio_get_speaker_gain(unsigned int *gain);
101 int _bt_audio_set_speaker_gain(unsigned int gain);
103 int _bt_audio_set_content_protect(gboolean status);
105 void _bt_set_audio_wait_data_flag(gboolean flag);
107 bt_headset_wait_t *_bt_get_audio_wait_data(void);
109 void _bt_rel_wait_data(void);
111 void _bt_add_headset_to_list(int type, int status, const char *address);
113 void _bt_remove_headset_from_list(int type, const char *address);
115 gboolean _bt_is_headset_type_connected(int type, char *address);
116 void _bt_remove_from_connected_list(const char *address);
118 int _bt_get_device_state_from_list(int type, const char *address);
120 void _bt_remove_from_connected_list(const char *address);
122 void _bt_audio_check_pending_connect();
124 gboolean _bt_is_service_connected(char *address, int type);
128 #endif /* __cplusplus */
129 #endif /*_BT_SERVICE_AUDIO_H_*/