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.
24 #ifndef BT_SERVICE_AGENT_H
25 #define BT_SERVICE_AGENT_H
34 #define LOG_TAG "BLUETOOTH_FRWK_SERVICE"
35 #define ERR(fmt, args...) SLOGE(fmt, ##args)
37 #define BT_MAX_EVENT_STR_LENGTH 50
39 #ifndef TIZEN_WEARABLE
40 #define BT_FILE_VISIBLE_TIME "file/private/libug-setting-bluetooth-efl/visibility_time"
44 HS_PROFILE_UUID = ((unsigned short)0x1108), /**<HS*/
45 AUDIO_SOURCE_UUID = ((unsigned short)0x110A), /**<AUDIO SOURCE*/
46 AUDIO_SINK_UUID = ((unsigned short)0x110B), /**<AUDIO SINK*/
47 AV_REMOTE_CONTROL_TARGET_UUID = ((unsigned short)0x110C),/**<AV REMOTE CONTROL TARGET*/
48 ADVANCED_AUDIO_PROFILE_UUID = ((unsigned short)0x110D), /**<A2DP*/
49 AV_REMOTE_CONTROL_UUID = ((unsigned short)0x110E), /**<AV REMOTE CONTROL UUID*/
50 HF_PROFILE_UUID = ((unsigned short)0x111E), /**<HF*/
51 } bt_agent_service_uuid_list_t;
54 BT_AGENT_EVENT_PIN_REQUEST,
55 BT_AGENT_EVENT_PASSKEY_CONFIRM_REQUEST,
56 BT_AGENT_EVENT_PASSKEY_AUTO_ACCEPTED,
57 BT_AGENT_EVENT_PASSKEY_REQUEST,
58 BT_AGENT_EVENT_PASSKEY_DISPLAY_REQUEST,
59 BT_AGENT_EVENT_AUTHORIZE_REQUEST,
60 BT_AGENT_EVENT_CONFIRM_MODE_REQUEST,
61 BT_AGENT_EVENT_APP_CONFIRM_REQUEST,
62 BT_AGENT_EVENT_FILE_RECEIVED,
63 BT_AGENT_EVENT_KEYBOARD_PASSKEY_REQUEST,
64 BT_AGENT_EVENT_SECURITY,
65 BT_AGENT_EVENT_TERMINATE,
66 BT_AGENT_EVENT_EXCHANGE_REQUEST,
67 BT_AGENT_EVENT_PBAP_REQUEST,
68 BT_AGENT_EVENT_MAP_REQUEST,
69 BT_AGENT_EVENT_SYSTEM_RESET_REQUEST,
70 BT_AGENT_EVENT_LEGACY_PAIR_FAILED_FROM_REMOTE,
71 } bt_agent_event_type_t;
78 } bt_agent_osp_server_t;
80 void* _bt_create_agent(const char *path, gboolean adapter);
82 void _bt_destroy_agent(void *agent);
84 gboolean _bt_agent_is_canceled(void);
85 void _bt_agent_set_canceled(gboolean value);
87 gboolean _bt_agent_register_osp_server(const gint type,
88 const char *uuid, char *path, int fd);
90 gboolean _bt_agent_unregister_osp_server(const gint type, const char *uuid);
92 gboolean _bt_agent_reply_authorize(gboolean accept);
94 int _bt_agent_reply_cancellation(void);
96 int _bt_launch_system_popup(bt_agent_event_type_t event_type,
97 const char *device_name,
100 const char *agent_path);