Add extention named header 91/41891/1 accepted/tizen/mobile/20150619.041445 accepted/tizen/tv/20150619.041501 accepted/tizen/wearable/20150619.041528 submit/tizen_mobile/20150619.010702 submit/tizen_tv/20150619.010705 submit/tizen_wearable/20150619.010709
authorDoHyun Pyun <dh79.pyun@samsung.com>
Fri, 19 Jun 2015 01:04:41 +0000 (10:04 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Fri, 19 Jun 2015 01:04:41 +0000 (10:04 +0900)
UTC and other application is referencing this header file.
After changing the header name in referenced app, we will remove this.

Change-Id: Ia741ebdceeee75fe3d73a96d26a348be57ed1fae
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
include/bluetooth_extention.h [new file with mode: 0644]
include/bluetooth_type_extention.h [new file with mode: 0644]
packaging/capi-network-bluetooth.spec

diff --git a/include/bluetooth_extention.h b/include/bluetooth_extention.h
new file mode 100644 (file)
index 0000000..724a4f8
--- /dev/null
@@ -0,0 +1,167 @@
+/*
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __TIZEN_NETWORK_BLUETOOTH_EXTENSION_H__
+#define __TIZEN_NETWORK_BLUETOOTH_EXTENSION_H__
+
+#include "bluetooth_type.h"
+#include "bluetooth_type_extension.h"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+/**
+ * @file        bluetooth_extension.h
+ */
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
+ * @brief Opens a SCO(Synchronous Connection Oriented link) to connected remote device, asynchronously.
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED  Remote device is not connected
+ * @retval #BT_ERROR_ALREADY_DONE  Operation is already done
+ * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
+ * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
+ *
+ * @pre The Bluetooth audio device must be connected with bt_audio_connect().
+ * @post bt_ag_sco_state_changed_cb() will be invoked.
+ * @see bt_ag_close_sco()
+ * @see bt_ag_sco_state_changed_cb()
+ * @see bt_audio_connect()
+ */
+int bt_ag_open_sco(void);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
+ * @brief Closes an opened SCO(Synchronous Connection Oriented link), asynchronously.
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED  Remote device is not connected
+ * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
+ * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
+ *
+ * @pre The SCO must be opened with bt_ag_open_sco().
+ * @post bt_ag_sco_state_changed_cb() will be invoked.
+ * @see bt_ag_open_sco()
+ * @see bt_ag_sco_state_changed_cb()
+ */
+int bt_ag_close_sco(void);
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
+ * @brief Checks whether an opened SCO(Synchronous Connection Oriented link) exists or not.
+ * @since_tizen 2.3
+ * @param[out] opened The SCO status: (@c true = opened, @c  false = not opened)
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
+ * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
+ *
+ * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
+ * @see bt_ag_open_sco()
+ * @see bt_ag_close_sco()
+ */
+int bt_ag_is_sco_opened(bool *opened);
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
+ * @brief  Registers a callback function that will be invoked when the SCO(Synchronous Connection Oriented link) state is changed.
+ * @since_tizen 2.3
+ * @param[in] callback The callback function to register
+ * @param[in] user_data The user data to be passed to the callback function
+ * @return   0 on success, otherwise a negative error value.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
+ * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
+ *
+ * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
+ * @see bt_audio_initialize()
+ * @see bt_ag_sco_state_changed_cb()
+ * @see bt_ag_unset_sco_state_changed_cb()
+ */
+int bt_ag_set_sco_state_changed_cb(bt_ag_sco_state_changed_cb callback, void *user_data);
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
+ * @brief  Unregisters a callback function that will be invoked when the SCO(Synchronous Connection Oriented link) state is changed.
+ * @since_tizen 2.3
+ * @return   0 on success, otherwise a negative error value.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
+ * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
+ *
+ * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
+ * @see bt_audio_initialize()
+ * @see bt_ag_sco_state_changed_cb()
+ * @see bt_ag_set_sco_state_changed_cb()
+ */
+int bt_ag_unset_sco_state_changed_cb(void);
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
+ * @brief Notifies the state of voice recognition.
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ * @param[in] state  The state of voice recognition: (@c true = enabled, @c  false = disabled)
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
+ * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED  Remote device is not connected
+ * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #BT_ERROR_PERMISSION_DENIED  Permission denied
+ * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
+ *
+ * @pre The Bluetooth audio device must be connected with bt_audio_connect().
+ * @see bt_audio_connect()
+ */
+int bt_ag_notify_voice_recognition_state(bool state);
+
+/**
+ * @}
+ */
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif // __TIZEN_NETWORK_BLUETOOTH_EXTENTION_H__
+
diff --git a/include/bluetooth_type_extention.h b/include/bluetooth_type_extention.h
new file mode 100644 (file)
index 0000000..4018e6c
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __TIZEN_NETWORK_BLUETOOTH_TYPE_EXTENSION_H__
+#define __TIZEN_NETWORK_BLUETOOTH_TYPE_EXTENSION_H__
+
+ #ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+/**
+ * @file bluetooth_type_extension.h
+ */
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
+ * @brief  Called when the SCO(Synchronous Connection Oriented link) state is changed.
+ * @since_tizen 2.3
+ *
+ * @details  This callback is called when the SCO state is changed.
+ * When you call bt_ag_open_sco() or bt_ag_close_sco(), this callback is also called with error result even though these functions failed.
+ * @param[in] result  The result of changing the connection state
+ * @param[in] opened  The state to be changed: (@c true = opened, @c  false = not opened)
+ * @param[in] user_data The user data passed from the callback registration function
+ * @see bt_ag_set_sco_state_changed_cb()
+ * @see bt_ag_unset_sco_state_changed_cb()
+ * @see bt_ag_open_sco()
+ * @see bt_ag_close_sco()
+ */
+typedef void (*bt_ag_sco_state_changed_cb) (int result, bool opened, void *user_data);
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif // __TIZEN_NETWORK_BLUETOOTH_TYPE_EXTENSION_H__
index ea3da3f74e02bbf42fdd341072f38defe8bfc407..af1abdcc5461ef5a4fa563ca78bc221ac6c3c6f9 100644 (file)
@@ -128,6 +128,8 @@ make %{?jobs:-j%jobs}
 %{_includedir}/network/bluetooth_type_internal.h
 %{_includedir}/network/bluetooth_extension.h
 %{_includedir}/network/bluetooth_type_extension.h
+%{_includedir}/network/bluetooth_extention.h
+%{_includedir}/network/bluetooth_type_extention.h
 %{_libdir}/pkgconfig/capi-network-bluetooth.pc
 %{_libdir}/libcapi-network-bluetooth.so
 #%{_datadir}/license/capi-network-bluetooth-devel