2 * Copyright (c) 2015 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
4 * Contact: Anupam Roy <anupam.r@samsung.com>
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
21 #ifndef _BT_SERVICE_CORE_ADAPTER_H_
22 #define _BT_SERVICE_CORE_ADAPTER_H_
24 #include <sys/types.h>
25 #ifdef TIZEN_FEATURE_BT_OBEX
33 ADAPTER_DISCOVERY_STOPPED,
34 ADAPTER_DISCOVERY_STARTED,
35 ADAPTER_DISCOVERY_STARTING,
36 ADAPTER_DISCOVERY_STOPPING,
37 } bt_adapter_discovery_state_t;
46 int _bt_enable_adapter(void);
48 int _bt_disable_adapter(void);
50 int _bt_enable_core(void);
52 int _bt_recover_adapter(void);
54 int _bt_start_discovery(unsigned short max_response,
55 unsigned short duration, unsigned int cod_mask);
57 int _bt_cancel_discovery(void);
59 gboolean _bt_is_discovering(void);
61 int _bt_stack_init(void);
63 int _bt_get_local_address(void);
65 int _bt_get_local_version(void);
67 int _bt_get_local_name(void);
69 int _bt_set_local_name(char *local_name);
71 int _bt_get_discoverable_mode(int *mode);
73 int _bt_get_timeout_value(int *timeout);
75 int _bt_set_discoverable_mode(int discoverable_mode, int timeout);
77 gboolean _bt_is_connectable(void);
79 int _bt_is_service_used(void);
81 int _bt_set_connectable(gboolean connectable);
83 int _bt_adapter_get_bonded_devices(void);
85 int _bt_init_profiles();
87 int _bt_cleanup_profiles(void);
89 #ifdef TIZEN_FEATURE_BT_OBEX
91 void _bt_adapter_set_status(bt_status_t status);
93 bt_status_t _bt_adapter_get_status(void);
95 void _bt_set_disabled(int result);
97 typedef int (*bt_set_alarm_cb) (alarm_id_t alarm_id, void* user_param);
98 void *_bt_get_adapter_agent(void);
100 void _bt_handle_adapter_added(void);
106 #endif /* __cplusplus */
107 #endif /*_BT_SERVICE_CORE_ADAPTER_H_*/