summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJinkun Jang <jinkun.jang@samsung.com>2013-03-16 01:16:38 +0900
committerJinkun Jang <jinkun.jang@samsung.com>2013-03-16 01:16:38 +0900
commit028da7ec563549004cd62b0494b40e540fcac48a (patch)
tree020af5d89df35c059049ffbb41999f160736374d
parente70f973489e55f3f1ec0b3d5ead368aafebf1dfb (diff)
downloadbluetooth-028da7ec563549004cd62b0494b40e540fcac48a.tar.gz
bluetooth-028da7ec563549004cd62b0494b40e540fcac48a.tar.bz2
bluetooth-028da7ec563549004cd62b0494b40e540fcac48a.zip
merge with master
-rwxr-xr-xinc/FNetBtBluetoothDevice.h25
-rwxr-xr-xinc/FNetBtBluetoothHealth.h15
-rwxr-xr-xinc/FNetBtBluetoothManager.h35
-rwxr-xr-xinc/FNetBtBluetoothOppClient.h6
-rwxr-xr-xinc/FNetBtBluetoothOppServer.h15
-rwxr-xr-xinc/FNetBtBluetoothSppAcceptor.h21
-rwxr-xr-xinc/FNetBtBluetoothSppInitiator.h12
-rwxr-xr-xinc/FNetBtBluetoothTypes.h23
-rwxr-xr-xpackaging/osp-bluetooth.spec2
-rwxr-xr-xsrc/FNetBtBluetoothDevice.cpp120
-rwxr-xr-xsrc/inc/FNetBt_BluetoothManagerImpl.h2
11 files changed, 220 insertions, 56 deletions
diff --git a/inc/FNetBtBluetoothDevice.h b/inc/FNetBtBluetoothDevice.h
index 5448190..c25bb55 100755
--- a/inc/FNetBtBluetoothDevice.h
+++ b/inc/FNetBtBluetoothDevice.h
@@ -36,6 +36,7 @@ class String;
namespace Collection
{
class IList;
+class IMap;
}
} }
@@ -234,6 +235,11 @@ public:
/**
* Gets a new instance of %BluetoothDevice generated using the result of the %Bluetooth AppControl.
*
+ * @brief <i> [Deprecated] </i>
+ * @deprecated This method is deprecated because the type of AppControl result is changed. Instead of using this
+ * method, GetInstanceFromAppControlResultN(const Tizen::Base::Collection::IMap& appControlResult) is
+ * recommended.
+ *
* @since 2.0
* @return The %Bluetooth device containing the specified information extracted from the input data if successful,
* @n
@@ -243,11 +249,28 @@ public:
* @exception E_INVALID_ARG The specified @c appControlResult contains an invalid value. @n
* The result of %Bluetooth AppControl is only permitted to be used as an input
* argument.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
static BluetoothDevice* GetInstanceFromAppControlResultN(const Tizen::Base::Collection::IList& appControlResult);
+ /**
+ * Gets a new instance of %BluetoothDevice generated using the result of the %Bluetooth AppControl.
+ *
+ * @since 2.1
+ * @return The %Bluetooth device containing the specified information extracted from the input data if successful,
+ * @n
+ * else @c null
+ * @param[in] appControlResult The data map, which is the result of the %Bluetooth AppControl
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG The specified @c appControlResult contains an invalid value. @n
+ * The result of %Bluetooth AppControl is only permitted to be used as an input
+ * argument.
+ * @remarks The specific error code can be accessed using the GetLastResult() method.
+ * @see <a href="../org.tizen.native.appprogramming/html/guide/app/appcontrol_bluetooth.htm">Bluetooth
+ * AppControl</a>.
+ */
+ static BluetoothDevice* GetInstanceFromAppControlResultN(const Tizen::Base::Collection::IMap& appControlResult);
+
/**
* Copying of objects using this copy assignment operator is allowed.
*
diff --git a/inc/FNetBtBluetoothHealth.h b/inc/FNetBtBluetoothHealth.h
index 838d4bc..fefe268 100755
--- a/inc/FNetBtBluetoothHealth.h
+++ b/inc/FNetBtBluetoothHealth.h
@@ -95,7 +95,8 @@ public:
* Starts %Bluetooth health as a role of sink with the specified data type.
*
* @since 2.0
- * @privilege %http://tizen.org/privilege/bluetooth.health
+ * @privlevel public
+ * @privilege http://tizen.org/privilege/bluetooth.health
*
* @return An error code
* @param[in] dataType The type of data used in communication which is defined in ISO/IEEE
@@ -122,7 +123,8 @@ public:
* This method disconnects all established channels before stop.
*
* @since 2.0
- * @privilege %http://tizen.org/privilege/bluetooth.health
+ * @privlevel public
+ * @privilege http://tizen.org/privilege/bluetooth.health
*
* @return An error code
* @exception E_SUCCESS The method is successful.
@@ -140,7 +142,8 @@ public:
* This method establishes a channel after the source device accepts the request.
*
* @since 2.0
- * @privilege %http://tizen.org/privilege/bluetooth.health
+ * @privlevel public
+ * @privilege http://tizen.org/privilege/bluetooth.health
*
* @return An error code
* @param[in] remoteDevice The remote device to connect
@@ -164,7 +167,8 @@ public:
* whether this method is called during connection or before connection is established.
*
* @since 2.0
- * @privilege %http://tizen.org/privilege/bluetooth.health
+ * @privlevel public
+ * @privilege http://tizen.org/privilege/bluetooth.health
*
* @return An error code
* @param[in] channelId The ID of the specified channel to disconnect
@@ -185,7 +189,8 @@ public:
* Sends the specified data on the specified channel.
*
* @since 2.0
- * @privilege %http://tizen.org/privilege/bluetooth.health
+ * @privlevel public
+ * @privilege http://tizen.org/privilege/bluetooth.health
*
* @return An error code
* @param[in] channelId The ID of the specified channel on which the data is sent
diff --git a/inc/FNetBtBluetoothManager.h b/inc/FNetBtBluetoothManager.h
index 0e78d3c..47477c1 100755
--- a/inc/FNetBtBluetoothManager.h
+++ b/inc/FNetBtBluetoothManager.h
@@ -96,7 +96,8 @@ public:
* Activates %Bluetooth on a device.
*
* @since 2.0
- * @privilege %http://tizen.org/privilege/bluetooth.admin
+ * @privlevel public
+ * @privilege http://tizen.org/privilege/bluetooth.admin
*
* @return An error code
* @exception E_SUCCESS The method is successful.
@@ -115,7 +116,8 @@ public:
* Deactivates %Bluetooth on a device.
*
* @since 2.0
- * @privilege %http://tizen.org/privilege/bluetooth.admin
+ * @privlevel public
+ * @privilege http://tizen.org/privilege/bluetooth.admin
*
* @return An error code
* @exception E_SUCCESS The method is successful.
@@ -156,7 +158,7 @@ public:
* @brief <i> [Deprecated] </i>
* @deprecated This method is deprecated because the return value of this method is a dangling pointer if this
* instance of %BluetoothManager is deleted. In addition to this, the %BluetoothDevice class
- * represents only remote devices since 2.0. Instead of using this method, the GetLocalDeviceAddress()
+ * represents only remote devices since Tizen. Instead of using this method, the GetLocalDeviceAddress()
* and GetLocalDeviceName() methods are recommended.
* @since 2.0
*
@@ -277,7 +279,8 @@ public:
* Sets the name of the local device.
*
* @since 2.0
- * @privilege %http://tizen.org/privilege/bluetooth.admin
+ * @privlevel public
+ * @privilege http://tizen.org/privilege/bluetooth.admin
*
* @return An error code
* @param[in] deviceName The new device name
@@ -293,12 +296,11 @@ public:
result SetLocalDeviceName(const Tizen::Base::String& deviceName);
/**
- * @if VISPARTNER-MANUFACTURER
* Sets the discoverable mode of the local device.
*
* @since 2.0
- * @visibility partner-manufacturer
- * @privilege %http://tizen.org/privilege/bluetoothmanager
+ * @privlevel platform
+ * @privilege http://tizen.org/privilege/bluetoothmanager
*
* @return An error code
* @param[in] mode The new discoverable mode
@@ -311,7 +313,6 @@ public:
* @exception E_SYSTEM A system error has occurred.
* @see IBluetoothManagerEventListener::OnBluetoothDiscoverableModeChanged()
* @remarks @c seconds is adopted only if the specified @c mode is @c BT_DISC_MODE_TIME_LIMITED_DISCOVERABLE.
- * @endif
*/
result SetDiscoverableMode(BluetoothDiscoverableMode mode, int seconds = 0);
@@ -454,7 +455,8 @@ public:
* Starts the device discovery process.
*
* @since 2.0
- * @privilege %http://tizen.org/privilege/bluetooth.gap
+ * @privlevel public
+ * @privilege http://tizen.org/privilege/bluetooth.gap
*
* @return An error code
* @exception E_SUCCESS The method is successful.
@@ -473,7 +475,8 @@ public:
* Cancels the device discovery process.
*
* @since 2.0
- * @privilege %http://tizen.org/privilege/bluetooth.gap
+ * @privlevel public
+ * @privilege http://tizen.org/privilege/bluetooth.gap
*
* @return An error code
* @exception E_SUCCESS The method is successful.
@@ -491,7 +494,8 @@ public:
* Retrieves the service list from a remote device.
*
* @since 2.0
- * @privilege %http://tizen.org/privilege/bluetooth.gap
+ * @privlevel public
+ * @privilege http://tizen.org/privilege/bluetooth.gap
*
* @return An error code
* @param[in] pairedDevice A remote device that is already paired with the local device
@@ -512,7 +516,8 @@ public:
* Pairs with the specified remote device.
*
* @since 2.0
- * @privilege %http://tizen.org/privilege/bluetooth.gap
+ * @privlevel public
+ * @privilege http://tizen.org/privilege/bluetooth.gap
*
* @return An error code
* @param[in] remoteDevice The remote %Bluetooth device to pair with
@@ -532,7 +537,8 @@ public:
* Stops the pairing process.
*
* @since 2.0
- * @privilege %http://tizen.org/privilege/bluetooth.gap
+ * @privlevel public
+ * @privilege http://tizen.org/privilege/bluetooth.gap
*
* @return An error code
* @exception E_SUCCESS The method is successful.
@@ -551,7 +557,8 @@ public:
* Unpairs with the paired device.
*
* @since 2.0
- * @privilege %http://tizen.org/privilege/bluetooth.gap
+ * @privlevel public
+ * @privilege http://tizen.org/privilege/bluetooth.gap
*
* @return An error code
* @param[in] pairedDevice The paired device to unpair
diff --git a/inc/FNetBtBluetoothOppClient.h b/inc/FNetBtBluetoothOppClient.h
index 1d73037..d911528 100755
--- a/inc/FNetBtBluetoothOppClient.h
+++ b/inc/FNetBtBluetoothOppClient.h
@@ -98,7 +98,8 @@ public:
* @compatibility This method has compatibility issues@n
* For more information, see @ref CompIoPathPage "here".
* @endif
- * @privilege %http://tizen.org/privilege/bluetooth.opp
+ * @privlevel public
+ * @privilege http://tizen.org/privilege/bluetooth.opp
*
* @return An error code
* @param[in] remoteDevice The remote OPP server
@@ -127,7 +128,8 @@ public:
* method is called with @c isCompleted as @c false.
*
* @since 2.0
- * @privilege %http://tizen.org/privilege/bluetooth.opp
+ * @privlevel public
+ * @privilege http://tizen.org/privilege/bluetooth.opp
*
* @return An error code
* @exception E_SUCCESS The method is successful.
diff --git a/inc/FNetBtBluetoothOppServer.h b/inc/FNetBtBluetoothOppServer.h
index 896a2c3..fe75dac 100755
--- a/inc/FNetBtBluetoothOppServer.h
+++ b/inc/FNetBtBluetoothOppServer.h
@@ -90,7 +90,8 @@ public:
* This method starts the file transfer.
*
* @since 2.0
- * @privilege %http://tizen.org/privilege/bluetooth.opp
+ * @privlevel public
+ * @privilege http://tizen.org/privilege/bluetooth.opp
*
* @return An error code
* @exception E_SUCCESS The method is successful.
@@ -111,7 +112,8 @@ public:
* Rejects a push request from a remote OPP client.
*
* @since 2.0
- * @privilege %http://tizen.org/privilege/bluetooth.opp
+ * @privlevel public
+ * @privilege http://tizen.org/privilege/bluetooth.opp
*
* @return An error code
* @exception E_SUCCESS The method is successful.
@@ -162,7 +164,8 @@ public:
* @compatibility This method has compatibility issues. @n
* For more information, see @ref CompIoPathPage "here".
* @endif
- * @privilege %http://tizen.org/privilege/bluetooth.opp
+ * @privlevel public
+ * @privilege http://tizen.org/privilege/bluetooth.opp
*
* @return An error code
* @param[in] dstPath The new destination file path
@@ -185,7 +188,8 @@ public:
* This method cancels the file transfer before stopping the service.
*
* @since 2.0
- * @privilege %http://tizen.org/privilege/bluetooth.opp
+ * @privlevel public
+ * @privilege http://tizen.org/privilege/bluetooth.opp
*
* @return An error code
* @exception E_SUCCESS The method is successful.
@@ -206,7 +210,8 @@ public:
* method is called with @c isCompleted as @c false.
*
* @since 2.0
- * @privilege %http://tizen.org/privilege/bluetooth.opp
+ * @privlevel public
+ * @privilege http://tizen.org/privilege/bluetooth.opp
*
* @return An error code
* @exception E_SUCCESS The method is successful.
diff --git a/inc/FNetBtBluetoothSppAcceptor.h b/inc/FNetBtBluetoothSppAcceptor.h
index 11f90b4..56ec725 100755
--- a/inc/FNetBtBluetoothSppAcceptor.h
+++ b/inc/FNetBtBluetoothSppAcceptor.h
@@ -91,7 +91,8 @@ public:
* This method establishes a connection.
*
* @since 2.0
- * @privilege %http://tizen.org/privilege/bluetooth.spp
+ * @privlevel public
+ * @privilege http://tizen.org/privilege/bluetooth.spp
*
* @return An error code
* @exception E_SUCCESS The method is successful.
@@ -112,7 +113,8 @@ public:
* Rejects a connection request from a remote SPP initiator.
*
* @since 2.0
- * @privilege %http://tizen.org/privilege/bluetooth.spp
+ * @privlevel public
+ * @privilege http://tizen.org/privilege/bluetooth.spp
*
* @return An error code
* @exception E_SUCCESS The method is successful.
@@ -133,7 +135,8 @@ public:
* Starts the SPP service with the default service UUID - BT_SVC_UUID_SPP.
*
* @since 2.0
- * @privilege %http://tizen.org/privilege/bluetooth.spp
+ * @privlevel public
+ * @privilege http://tizen.org/privilege/bluetooth.spp
*
* @return An error code
* @exception E_SUCCESS The method is successful.
@@ -152,7 +155,8 @@ public:
* Starts the SPP service with the specified service UUID.
*
* @since 2.0
- * @privilege %http://tizen.org/privilege/bluetooth.spp
+ * @privlevel public
+ * @privilege http://tizen.org/privilege/bluetooth.spp
*
* @return An error code
* @param[in] serviceUuid The UUID of SPP service
@@ -174,7 +178,8 @@ public:
* This method disconnects the current connection before stopping the service.
*
* @since 2.0
- * @privilege %http://tizen.org/privilege/bluetooth.spp
+ * @privlevel public
+ * @privilege http://tizen.org/privilege/bluetooth.spp
*
* @return An error code
* @exception E_SUCCESS The method is successful.
@@ -193,7 +198,8 @@ public:
* Disconnects the current connection.
*
* @since 2.0
- * @privilege %http://tizen.org/privilege/bluetooth.spp
+ * @privlevel public
+ * @privilege http://tizen.org/privilege/bluetooth.spp
*
* @return An error code
* @exception E_SUCCESS The method is successful.
@@ -215,7 +221,8 @@ public:
* Sends the data.
*
* @since 2.0
- * @privilege %http://tizen.org/privilege/bluetooth.spp
+ * @privlevel public
+ * @privilege http://tizen.org/privilege/bluetooth.spp
*
* @return An error code
* @param[in] buffer The data to send
diff --git a/inc/FNetBtBluetoothSppInitiator.h b/inc/FNetBtBluetoothSppInitiator.h
index 89b3311..9cd0343 100755
--- a/inc/FNetBtBluetoothSppInitiator.h
+++ b/inc/FNetBtBluetoothSppInitiator.h
@@ -92,7 +92,8 @@ public:
* This method establishes a connection after the SPP acceptor accepts the request.
*
* @since 2.0
- * @privilege %http://tizen.org/privilege/bluetooth.spp
+ * @privlevel public
+ * @privilege http://tizen.org/privilege/bluetooth.spp
*
* @return An error code
* @param[in] remoteDevice The remote device to connect
@@ -118,7 +119,8 @@ public:
* This method establishes a connection after the SPP acceptor accepts the request.
*
* @since 2.0
- * @privilege %http://tizen.org/privilege/bluetooth.spp
+ * @privlevel public
+ * @privilege http://tizen.org/privilege/bluetooth.spp
*
* @return An error code
* @param[in] remoteDevice The remote device to connect
@@ -149,7 +151,8 @@ public:
* E_SUCCESS is thrown.
*
* @since 2.0
- * @privilege %http://tizen.org/privilege/bluetooth.spp
+ * @privlevel public
+ * @privilege http://tizen.org/privilege/bluetooth.spp
*
* @return An error code
* @exception E_SUCCESS The method is successful.
@@ -172,7 +175,8 @@ public:
* Sends the specified data.
*
* @since 2.0
- * @privilege %http://tizen.org/privilege/bluetooth.spp
+ * @privlevel public
+ * @privilege http://tizen.org/privilege/bluetooth.spp
*
* @return An error code
* @param[in] buffer The data to send
diff --git a/inc/FNetBtBluetoothTypes.h b/inc/FNetBtBluetoothTypes.h
index 3aa555f..01d2771 100755
--- a/inc/FNetBtBluetoothTypes.h
+++ b/inc/FNetBtBluetoothTypes.h
@@ -44,9 +44,9 @@ namespace Tizen { namespace Net { namespace Bluetooth
*/
enum BluetoothDeviceStateType
{
- BT_DEVICE_STATE_OFF, /**< @if OSPDEPREC The OFF state @endif */
- BT_DEVICE_STATE_DISCOVERABLE, /**< @if OSPDEPREC The DISCOVERABLE state @endif */
- BT_DEVICE_STATE_NOT_DISCOVERABLE /**< @if OSPDEPREC The NOT DISCOVERABLE state @endif */
+ BT_DEVICE_STATE_OFF, /**< The OFF state */
+ BT_DEVICE_STATE_DISCOVERABLE, /**< The DISCOVERABLE state */
+ BT_DEVICE_STATE_NOT_DISCOVERABLE /**< The NOT DISCOVERABLE state*/
};
/**
@@ -60,7 +60,6 @@ enum BluetoothDiscoverableMode
BT_DISC_MODE_NOT_DISCOVERABLE, /**< The mode NOT DISCOVERABLE by other devices */
BT_DISC_MODE_DISCOVERABLE, /**< The mode DISCOVERABLE by other devices */
BT_DISC_MODE_TIME_LIMITED_DISCOVERABLE /**< The mode DISCOVERABLE by other devices during a certain amount of time
- * @if OSPCOMPAT @b Since: @b 2.0 @endif
*/
};
@@ -213,18 +212,10 @@ enum BluetoothServiceType
BT_SVC_PBAP_SERVICE = 0x00400000, /**< The PhoneBook Access service type */
BT_SVC_HSP_HS_SERVICE = 0x00800000, /**< The Headset service type */
BT_SVC_HFP_HS_SERVICE = 0x01000000, /**< The Hands-free Headset service type */
- BT_SVC_HCRP_SERVICE = 0x02000000, /**< The Hardcopy cable replacement profile service type
- * @if OSPCOMPAT @b Since: @b 2.0 @endif
- */
- BT_SVC_DID_SERVICE = 0x04000000, /**< The device identification profile service type
- * @if OSPCOMPAT @b Since: @b 2.0 @endif
- */
- BT_SVC_HDP_SERVICE = 0x08000000, /**< The health device profile service type
- * @if OSPCOMPAT @b Since: @b 2.0 @endif
- */
- BT_SVC_MAP_SERVICE = 0x10000000, /**< The message access profile service type
- * @if OSPCOMPAT @b Since: @b 2.0 @endif
- */
+ BT_SVC_HCRP_SERVICE = 0x02000000, /**< The Hardcopy cable replacement profile service type */
+ BT_SVC_DID_SERVICE = 0x04000000, /**< The device identification profile service type */
+ BT_SVC_HDP_SERVICE = 0x08000000, /**< The health device profile service type */
+ BT_SVC_MAP_SERVICE = 0x10000000, /**< The message access profile service type */
BT_SVC_ALL_SERVICE = 0x01FFFFFF, /**< The All-services-supported-by-BTA service type
* @if OSPDEPREC
* @deprecated This enumeration field is deprecated.
diff --git a/packaging/osp-bluetooth.spec b/packaging/osp-bluetooth.spec
index ba9a2f6..4576329 100755
--- a/packaging/osp-bluetooth.spec
+++ b/packaging/osp-bluetooth.spec
@@ -3,7 +3,7 @@
Name: osp-bluetooth
Summary: osp bluetooth library
-Version: 1.2.0.0
+Version: 1.2.1.0
Release: 2
Group: System/Libraries
License: TO_BE/FILLED_IN
diff --git a/src/FNetBtBluetoothDevice.cpp b/src/FNetBtBluetoothDevice.cpp
index 3221c7b..51d4f07 100755
--- a/src/FNetBtBluetoothDevice.cpp
+++ b/src/FNetBtBluetoothDevice.cpp
@@ -22,6 +22,9 @@
#include <FNetBtBluetoothDevice.h>
#include <FAppAppControl.h>
#include <FBaseColIList.h>
+#include <FBaseColIMap.h>
+#include <FBaseBoolean.h>
+#include <FBaseInteger.h>
#include <FBaseLong.h>
#include <FBaseShort.h>
#include <FBaseSysLog.h>
@@ -466,4 +469,121 @@ CATCH:
return null;
}
+BluetoothDevice*
+BluetoothDevice::GetInstanceFromAppControlResultN(const Tizen::Base::Collection::IMap& appControlResult)
+{
+ result r = E_SUCCESS;
+ BluetoothDevice* pNewBtDevice = null;
+ _BluetoothDeviceImpl* pNewBtDeviceImpl = null;
+ String* pResultStrPtr = null;
+ String dataStr;
+ ByteBuffer btAddrBytes;
+ String deviceName;
+ int rssi = 0;
+ bool isPaired = false;
+ long majClassType = 0;
+ long minClassType = 0;
+ long svcClassType = 0;
+ long svcType = 0;
+
+ ClearLastResult();
+
+ // Gets the address as a String. E.g. 00-1E-2B-72-08-DB
+ pResultStrPtr = (String*) appControlResult.GetValue(String("http://tizen.org/appcontrol/data/bluetooth/address"));
+ SysTryReturn(NID_NET_BT, pResultStrPtr != null, null, E_INVALID_ARG, "[E_INVALID_ARG] exception occurred on parsing input data.")
+
+ dataStr.Insert(*pResultStrPtr, 0);
+
+ // Convert the type of the address to ByteBuffer
+ btAddrBytes.Construct(6);
+ r = _BluetoothDeviceImpl::GetAddressByteBuffer(dataStr, L"-", btAddrBytes);
+ SysTryReturn(NID_NET_BT, r == E_SUCCESS, null, E_INVALID_ARG, "[E_INVALID_ARG] exception occurred on parsing input data.")
+
+ dataStr.Clear();
+
+ // Gets the name
+ pResultStrPtr = (String*) appControlResult.GetValue(String("http://tizen.org/appcontrol/data/bluetooth/name"));
+ SysTryReturn(NID_NET_BT, pResultStrPtr != null, null, E_INVALID_ARG, "[E_INVALID_ARG] exception occurred on parsing input data.")
+ deviceName.Insert(*pResultStrPtr, 0);
+
+ // Gets the rssi value
+ pResultStrPtr = (String*) appControlResult.GetValue(String("http://tizen.org/appcontrol/data/bluetooth/rssi"));
+ SysTryReturn(NID_NET_BT, pResultStrPtr != null, null, E_INVALID_ARG, "[E_INVALID_ARG] exception occurred on parsing input data.")
+ dataStr.Insert(*pResultStrPtr, 0);
+
+ r = Integer::Decode(dataStr, rssi);
+ SysTryReturn(NID_NET_BT, r == E_SUCCESS, null, E_INVALID_ARG, "[E_INVALID_ARG] exception occurred on parsing input data.")
+
+ dataStr.Clear();
+
+ // Gets the ispaired
+ pResultStrPtr = (String*) appControlResult.GetValue(String("http://tizen.org/appcontrol/data/bluetooth/is_paired"));
+ SysTryReturn(NID_NET_BT, pResultStrPtr != null, null, E_INVALID_ARG, "[E_INVALID_ARG] exception occurred on parsing input data.")
+ dataStr.Insert(*pResultStrPtr, 0);
+
+ isPaired = Boolean::Parse(dataStr);
+
+ dataStr.Clear();
+
+ // Gets the major device class
+ pResultStrPtr = (String*) appControlResult.GetValue(String("http://tizen.org/appcontrol/data/bluetooth/major_class"));
+ SysTryReturn(NID_NET_BT, pResultStrPtr != null, null, E_INVALID_ARG, "[E_INVALID_ARG] exception occurred on parsing input data.")
+ dataStr.Insert(*pResultStrPtr, 0);
+
+ r = Long::Decode(dataStr, majClassType);
+ SysTryReturn(NID_NET_BT, r == E_SUCCESS, null, E_INVALID_ARG, "[E_INVALID_ARG] exception occurred on parsing input data.")
+
+ dataStr.Clear();
+
+ // Gets the minor device class
+ pResultStrPtr = (String*) appControlResult.GetValue(String("http://tizen.org/appcontrol/data/bluetooth/minor_class"));
+ SysTryReturn(NID_NET_BT, pResultStrPtr != null, null, E_INVALID_ARG, "[E_INVALID_ARG] exception occurred on parsing input data.")
+ dataStr.Insert(*pResultStrPtr, 0);
+
+ r = Long::Decode(dataStr, minClassType);
+ SysTryReturn(NID_NET_BT, r == E_SUCCESS, null, E_INVALID_ARG, "[E_INVALID_ARG] exception occurred on parsing input data.")
+
+ dataStr.Clear();
+
+ // Gets the service classes as a bit-mask
+ pResultStrPtr = (String*) appControlResult.GetValue(String("http://tizen.org/appcontrol/data/bluetooth/service_class"));
+ SysTryReturn(NID_NET_BT, pResultStrPtr != null, null, E_INVALID_ARG, "[E_INVALID_ARG] exception occurred on parsing input data.")
+ dataStr.Insert(*pResultStrPtr, 0);
+
+ r = Long::Decode(dataStr, svcClassType);
+ SysTryReturn(NID_NET_BT, r == E_SUCCESS, null, E_INVALID_ARG, "[E_INVALID_ARG] exception occurred on parsing input data.")
+
+ dataStr.Clear();
+
+ // Gets the service types as a bit-mask
+ pResultStrPtr = (String*) appControlResult.GetValue(String("http://tizen.org/appcontrol/data/bluetooth/service_type"));
+ SysTryReturn(NID_NET_BT, pResultStrPtr != null, null, E_INVALID_ARG, "[E_INVALID_ARG] exception occurred on parsing input data.")
+ dataStr.Insert(*pResultStrPtr, 0);
+
+ r = Long::Decode(dataStr, svcType);
+ SysTryReturn(NID_NET_BT, r == E_SUCCESS, null, E_INVALID_ARG, "[E_INVALID_ARG] exception occurred on parsing input data.")
+
+ // Create an instance of BluetoothDevice.
+ pNewBtDevice = new (std::nothrow) BluetoothDevice();
+ if (pNewBtDevice == null)
+ {
+ SysLogException(NID_NET_BT, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] exception occurred on creating BluetoothDevice.");
+ SetLastResult(E_OUT_OF_MEMORY);
+ return null;
+ }
+
+ pNewBtDeviceImpl = _BluetoothDeviceImpl::GetInstance(*pNewBtDevice);
+
+ pNewBtDeviceImpl->SetAddress(btAddrBytes);
+ pNewBtDeviceImpl->SetName(deviceName);
+ pNewBtDeviceImpl->SetPaired(isPaired);
+ pNewBtDeviceImpl->SetRssi(rssi);
+ pNewBtDeviceImpl->SetMajorDeviceClassType((BluetoothMajorDeviceClassType) majClassType);
+ pNewBtDeviceImpl->SetMinorDeviceClassType((BluetoothMinorDeviceClassType) minClassType);
+ pNewBtDeviceImpl->SetServiceClassList(svcClassType);
+ pNewBtDeviceImpl->SetServiceList(svcType);
+
+ return pNewBtDevice;
+}
+
} } } // Tizen::Net::Bluetooth
diff --git a/src/inc/FNetBt_BluetoothManagerImpl.h b/src/inc/FNetBt_BluetoothManagerImpl.h
index 89d57d1..aa78864 100755
--- a/src/inc/FNetBt_BluetoothManagerImpl.h
+++ b/src/inc/FNetBt_BluetoothManagerImpl.h
@@ -256,7 +256,7 @@ public:
* Sets the discoverable mode of the local device.
*
* @visibility partner-manufacturer
- * @privlevel system
+ * @privlevel platform
* @privilege http://tizen.org/privilege/bluetoothmanager
*
* @return An error code