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;
47 int _bt_enable_adapter(void);
49 int _bt_disable_adapter(void);
51 int _bt_reset_adapter(void);
53 void _bt_start_log_dump(const char *path);
55 int _bt_check_adapter(int *status);
57 int _bt_recover_adapter(void);
59 int _bt_start_discovery(unsigned short max_response,
60 unsigned short duration, unsigned int cod_mask);
62 int _bt_start_custom_discovery(bt_discovery_role_type_t role);
64 int _bt_cancel_discovery(void);
66 void _bt_service_register_vconf_handler(void);
68 void _bt_service_unregister_vconf_handler(void);
70 gboolean _bt_is_discovering(void);
72 int _bt_stack_init(void);
74 int _bt_get_local_address(void);
76 int _bt_get_local_version(void);
78 int _bt_get_local_name(void);
80 int _bt_set_local_name(char *local_name);
82 int _bt_get_discoverable_mode(int *mode);
84 int _bt_get_timeout_value(int *timeout);
86 int _bt_set_discoverable_mode(int discoverable_mode, int timeout);
88 gboolean _bt_is_connectable(void);
90 int _bt_is_service_used(void);
92 int _bt_get_connectable(void);
94 int _bt_set_connectable(gboolean connectable);
96 int _bt_adapter_get_bonded_devices(void);
98 int _bt_get_profile_connected_devices(const char *profile_uuid);
100 int _bt_init_profiles();
102 int _bt_cleanup_profiles(void);
104 void _bt_adapter_set_status(bt_status_t status);
106 bt_status_t _bt_adapter_get_status(void);
108 void _bt_set_disabled(int result);
110 int _bt_set_adapter_request_state(int enable);
112 int _bt_set_le_request_state(int enable);
114 int _bt_get_energy_info(unsigned int *tx_time, unsigned int *rx_time,
115 unsigned int *idle_time, unsigned int *energy_used);
117 void _bt_adapter_start_enable_timer(void);
121 #endif /* __cplusplus */
122 #endif /*_BT_SERVICE_CORE_ADAPTER_H_*/