{L"osp.appcontrol.provider.bluetooth", L"osp.appcontrol.operation.pick"},
{L"http://tizen.org/appcontrol/provider/bluetooth", L"http://tizen.org/appcontrol/operation/pick"},
{L"tizen.bluetooth", L"http://tizen.org/appcontrol/operation/pick"},
+ {L"tizen.bluetooth", L"http://tizen.org/appcontrol/operation/bluetooth/pick"},
};
result
StartAppControl(int req, const String& aId, const String& oId, const String* pUri, const String* pMime, const IMap* pMap)
{
- SysLog(NID_APP, "StartAppControl: Entry to Bluetooth AppControl");
+ SysLog(NID_APP, "Entry to Bluetooth AppControl");
result r = E_SUCCESS;
bool isBtSupported = false;
r = Tizen::System::_SystemInfoImpl::GetSysInfo(L"http://tizen.org/feature/network.bluetooth", isBtSupported);
SysTryReturnResult(NID_APP, (r == E_SUCCESS) && (isBtSupported == true), E_SYSTEM, "[%s] Bluetooth is not supported.", GetErrorMessage(r));
- const bool isAllowed = _AppControlManager::IsAllowedAppControl(__allowedAppControlTable, 4, aId, oId);
+ const bool isAllowed = _AppControlManager::IsAllowedAppControl(__allowedAppControlTable, 5, aId, oId);
SysTryReturnResult(NID_APP, isAllowed, E_SYSTEM, "Invalid AppControl entry for (%ls, %ls).", aId.GetPointer(), oId.GetPointer());
SysLog(NID_APP, "Bluetooth AppControl.");
__processId = _AppControlManager::GetInstance()->Launch(msg, "ug-bluetooth-efl", APPSVC_OPERATION_PICK, NULL, NULL, OnAppControlResult, 0);
SysTryReturnResult(NID_APP, __processId >= 0, E_SYSTEM, "StartAppControl: Launching Bluetooth AppControl is failed.");
- SysLog(NID_APP, "StartAppControl: Launching Bluetooth AppControl succeeded.");
+ SysLog(NID_APP, "Launching Bluetooth AppControl succeeded.");
__req = req;
result = SERVICE_RESULT_FAILED;
}
+ SysLog(NID_APP, "The service result %s", result == SERVICE_RESULT_SUCCEEDED? "succeeded." : "failed.");
+
switch (result)
{
case SERVICE_RESULT_SUCCEEDED:
int len = 0;
char** ppArrayBuf = (char**)appsvc_get_data_array(pBundle, "uuids", &len);
+ ArrayList* pUuidList = null;
- // TODO: Parsing routine for uuid_list should be added.
if (len > 0 && ppArrayBuf != null)
{
svcType = _BluetoothAdapterUtility::ConvertToServiceList(ppArrayBuf, len);
+ pUuidList = dynamic_cast<ArrayList*>(_BluetoothAdapterUtility::ConvertServiceUuidListN(ppArrayBuf, len));
for (int i = 0; i < len; i++)
{
if (ppArrayBuf[i])
}
}
free(ppArrayBuf);
- }
- // TODO: the uuid_list value should be added to pResult.
- pResult->Add(new (std::nothrow) String(L"http://tizen.org/appcontrol/data/bluetooth/service_type"), new (std::nothrow) String(Long::ToString(svcType)));
+ pResult->Add(new (std::nothrow) String(L"http://tizen.org/appcontrol/data/bluetooth/service_type"), new (std::nothrow) String(Long::ToString(svcType)));
+ pResult->Add(new (std::nothrow) String(L"http://tizen.org/appcontrol/data/bluetooth/uuid_list"), pUuidList);
+ }
}
break;
case SERVICE_RESULT_FAILED: