Add uuid_list of AppControl.
authordukan.kim <dukan.kim@samsung.com>
Wed, 3 Apr 2013 08:08:12 +0000 (17:08 +0900)
committerdukan.kim <dukan.kim@samsung.com>
Wed, 3 Apr 2013 08:08:12 +0000 (17:08 +0900)
Change-Id: Id89dfecb65dce0e4ea1c02b531b774f83daaab47
Signed-off-by: dukan.kim <dukan.kim@samsung.com>
src/FNetBtBluetoothDevice.cpp

index 51d4f07..9676592 100755 (executable)
@@ -21,6 +21,7 @@
 #include <FNetBtBluetoothTypes.h>
 #include <FNetBtBluetoothDevice.h>
 #include <FAppAppControl.h>
+#include <FBaseColArrayList.h>
 #include <FBaseColIList.h>
 #include <FBaseColIMap.h>
 #include <FBaseBoolean.h>
@@ -31,6 +32,7 @@
 #include "FNetBt_BluetoothDeviceImpl.h"
 
 using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
 using namespace Tizen::Base::Runtime;
 
 namespace Tizen { namespace Net { namespace Bluetooth
@@ -485,6 +487,7 @@ BluetoothDevice::GetInstanceFromAppControlResultN(const Tizen::Base::Collection:
        long minClassType = 0;
        long svcClassType = 0;
        long svcType = 0;
+       ArrayList* pUuidList = null;
 
        ClearLastResult();
 
@@ -563,6 +566,10 @@ BluetoothDevice::GetInstanceFromAppControlResultN(const Tizen::Base::Collection:
        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.")
 
+       // Gets the service UUID list
+       pUuidList = (ArrayList*) appControlResult.GetValue(String("http://tizen.org/appcontrol/data/bluetooth/uuid_list"));
+       SysTryReturn(NID_NET_BT, pUuidList != null, 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)
@@ -582,6 +589,7 @@ BluetoothDevice::GetInstanceFromAppControlResultN(const Tizen::Base::Collection:
        pNewBtDeviceImpl->SetMinorDeviceClassType((BluetoothMinorDeviceClassType) minClassType);
        pNewBtDeviceImpl->SetServiceClassList(svcClassType);
        pNewBtDeviceImpl->SetServiceList(svcType);
+       pNewBtDeviceImpl->SetServiceUuidList(pUuidList, true);
 
        return pNewBtDevice;
 }