case BUNDLE_TYPE_STR_ARRAY:
{
ArrayList* pArray = _AppMessageImpl::GetValueArrayN(pBundle, SERVICE_DATA_SELECTED);
- pResult->Add(new (std::nothrow) String(L"path"), pArray);
+ if (pArray)
+ {
+ const int count = pArray->GetCount();
+ if (count > 0)
+ {
+ String tmp;
+
+ tmp = * static_cast<String*>(pArray->GetAt(0));
+ for (int i = 1; i < count; i++)
+ {
+ tmp.Append(L';');
+ tmp.Append(* static_cast<String*>(pArray->GetAt(i)));
+ }
+
+ pResult->Add(new (std::nothrow) String(L"path"), new (std::nothrow) String(tmp));
+ }
+ }
}
break;
case BUNDLE_TYPE_NONE:
type = bundle_get_type(pBundle, SERVICE_DATA_SELECTED);
switch (type)
- {
+ {
case BUNDLE_TYPE_STR:
- {
+ {
const char* pFile = appsvc_get_data(pBundle, SERVICE_DATA_SELECTED);
if (pFile)
- {
+ {
pResult->Add(new (std::nothrow) String(L"path"), new (std::nothrow) String(pFile));
- }
- }
+ }
+ }
break;
case BUNDLE_TYPE_STR_ARRAY:
- {
+ {
ArrayList* pArray = _AppMessageImpl::GetValueArrayN(pBundle, SERVICE_DATA_SELECTED);
if (pArray)
{
tmp = * static_cast<String*>(pArray->GetAt(0));
for (int i = 1; i < count; i++)
{
- tmp += L';';
- tmp = * static_cast<String*>(pArray->GetAt(i));
+ tmp.Append(L';');
+ tmp.Append(* static_cast<String*>(pArray->GetAt(i)));
}
pResult->Add(new (std::nothrow) String(L"path"), new (std::nothrow) String(tmp));
}
}
- }
+ }
break;
case BUNDLE_TYPE_NONE:
default:
break;
- }
+ }
_AppControlManager::GetInstance()->FinishAppControl(__req, res, pResult);