2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #ifndef BT_SERVICE_AGENT_H
19 #define BT_SERVICE_AGENT_H
28 #define LOG_TAG "BLUETOOTH_FRWK_SERVICE"
29 #define ERR(fmt, args...) SLOGE(fmt, ##args)
31 #define BT_MAX_EVENT_STR_LENGTH 50
33 #ifndef TIZEN_PROFILE_WEARABLE
34 #define BT_FILE_VISIBLE_TIME "file/private/libug-setting-bluetooth-efl/visibility_time"
38 HS_PROFILE_UUID = ((unsigned short)0x1108), /**<HS*/
39 AUDIO_SOURCE_UUID = ((unsigned short)0x110A), /**<AUDIO SOURCE*/
40 AUDIO_SINK_UUID = ((unsigned short)0x110B), /**<AUDIO SINK*/
41 AV_REMOTE_CONTROL_TARGET_UUID = ((unsigned short)0x110C),/**<AV REMOTE CONTROL TARGET*/
42 ADVANCED_AUDIO_PROFILE_UUID = ((unsigned short)0x110D), /**<A2DP*/
43 AV_REMOTE_CONTROL_UUID = ((unsigned short)0x110E), /**<AV REMOTE CONTROL UUID*/
44 HF_PROFILE_UUID = ((unsigned short)0x111E), /**<HF*/
45 } bt_agent_service_uuid_list_t;
48 BT_AGENT_EVENT_PIN_REQUEST,
49 BT_AGENT_EVENT_PASSKEY_CONFIRM_REQUEST,
50 BT_AGENT_EVENT_PASSKEY_AUTO_ACCEPTED,
51 BT_AGENT_EVENT_PASSKEY_REQUEST,
52 BT_AGENT_EVENT_PASSKEY_DISPLAY_REQUEST,
53 BT_AGENT_EVENT_AUTHORIZE_REQUEST,
54 BT_AGENT_EVENT_CONFIRM_MODE_REQUEST,
55 BT_AGENT_EVENT_APP_CONFIRM_REQUEST,
56 BT_AGENT_EVENT_FILE_RECEIVED,
57 BT_AGENT_EVENT_KEYBOARD_PASSKEY_REQUEST,
58 BT_AGENT_EVENT_SECURITY,
59 BT_AGENT_EVENT_TERMINATE,
60 BT_AGENT_EVENT_EXCHANGE_REQUEST,
61 BT_AGENT_EVENT_PBAP_REQUEST,
62 BT_AGENT_EVENT_MAP_REQUEST,
63 BT_AGENT_EVENT_SYSTEM_RESET_REQUEST,
64 BT_AGENT_EVENT_LEGACY_PAIR_FAILED_FROM_REMOTE,
65 } bt_agent_event_type_t;
72 } bt_agent_osp_server_t;
74 void* _bt_create_agent(const char *path, gboolean adapter);
76 void _bt_destroy_agent(void *agent);
78 gboolean _bt_agent_is_canceled(void);
79 void _bt_agent_set_canceled(gboolean value);
81 gboolean _bt_agent_register_osp_server(const gint type,
82 const char *uuid, char *path, int fd);
84 gboolean _bt_agent_unregister_osp_server(const gint type, const char *uuid);
86 gboolean _bt_agent_reply_authorize(gboolean accept);
88 int _bt_agent_reply_cancellation(void);
90 int _bt_launch_system_popup(bt_agent_event_type_t event_type,
91 const char *device_name,
92 const unsigned char *auth_info,
95 const char *agent_path);
97 int _bt_set_passkey_notification(const char *sender, gboolean enable);