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_CORE_ADAPTER_H_
19 #define _BT_CORE_ADAPTER_H_
21 #include <sys/types.h>
30 #define CONNMAN_DBUS_NAME "net.connman"
31 #define CONNMAN_BLUETOOTH_TECHNOLOGY_PATH "/net/connman/technology/bluetooth"
32 #define CONNMAN_BLUETOTOH_TECHNOLOGY_INTERFACE "net.connman.Technology"
34 #define BT_CORE_NAME "org.projectx.bt_core"
35 #define BT_CORE_PATH "/org/projectx/bt_core"
37 #define BT_CORE_TYPE (bt_core_get_type())
60 bt_status_t _bt_core_get_status(void);
61 bt_le_status_t _bt_core_get_le_status(void);
62 int _bt_core_get_bt_status(bt_mode_e mode); /* Get the status of BT before passed mode */
63 int _bt_core_get_bt_le_status(bt_mode_e mode); /* Get the status of BT LE before passed mode */
64 void _bt_core_set_bt_status(bt_mode_e mode, int status); /* Set the status of BT before passed mode */
65 void _bt_core_set_bt_le_status(bt_mode_e mode, int status); /* Set the status of BT LE before passed mode */
67 gboolean _bt_core_is_recovery_mode(void);
68 gboolean _bt_core_is_flight_mode_enabled(void);
70 int _bt_enable_adapter(void);
71 int _bt_disable_adapter(void);
72 int _bt_enable_adapter_le(void);
73 int _bt_disable_adapter_le(void);
74 int _bt_core_service_request_adapter(int service_function);
76 void _bt_core_adapter_added_cb(void);
77 void _bt_core_adapter_removed_cb(void);
79 gboolean _bt_core_enable_adapter(void);
80 gboolean _bt_core_disable_adapter(void);
81 gboolean _bt_core_recover_adapter(void);
82 gboolean _bt_core_enable_adapter_le(void);
83 gboolean _bt_core_disable_adapter_le(void);
84 gboolean __bt_core_reset_adapter(void);
85 gboolean _bt_core_enable_core(void);
86 gboolean _bt_core_factory_test_mode(const char *type, const char *arg);
88 void _bt_core_update_status(void);
92 #endif /* __cplusplus */
93 #endif /*_BT_CORE_ADAPTER_H_*/