${CMAKE_SOURCE_DIR}/src/base/inc
${CMAKE_SOURCE_DIR}/src/io/inc
${CMAKE_SOURCE_DIR}/src/system/inc
- ${CMAKE_SOURCE_DIR}/src/security/inc
- inc
+ ${CMAKE_SOURCE_DIR}/src/security/inc
+ inc
)
SET (${this_target}_SOURCE_FILES
FAppAppControlProviderManager.cpp
FApp_AppControlProviderManagerImpl.cpp
FApp_AppControlManager.cpp
+ FApp_DataControlManager.cpp
FApp_AppMessageImpl.cpp
FAppAppSetting.cpp
FApp_AppSettingImpl.cpp
std::unique_ptr<char[]> pId(_StringConverter::CopyToCharArrayN(appId));
SysTryReturnVoidResult(NID_APP, pId != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Converting %ls failed.", appId.GetPointer());
- bundle_add(b, OSP_K_APPID, pId.get());
+ int res = bundle_add(b, OSP_K_APPID, pId.get());
+ if (res < 0 && errno == EPERM) // key exists
+ {
+ bundle_del(b, OSP_K_APPID);
+ bundle_add(b, OSP_K_APPID, pId.get());
+ }
appsvc_set_appid(b, pId.get());
}
char buffer[32] = {0, };
snprintf(buffer, 32, "%d", reqId);
- bundle_add(pBundle, OSP_K_REQUEST_ID, buffer);
+ int res = bundle_add(pBundle, OSP_K_REQUEST_ID, buffer);
+ if (res < 0 && errno == EPERM) // key exists
+ {
+ bundle_del(pBundle, OSP_K_REQUEST_ID);
+ bundle_add(pBundle, OSP_K_REQUEST_ID, buffer);
+ }
}
+void
+_AppArg::UpdateKeyValue(bundle* pBundle, const char* pKey, const String& value)
+{
+ SysTryReturnVoidResult(NID_APP, pBundle != null, E_INVALID_STATE, "[E_INVALID_STATE] Improper bundle state.");
+
+ char pBuffer[128] = {0, };
+ snprintf(pBuffer, 128, "%ls", value.GetPointer());
+ int res = bundle_add(pBundle, pKey, pBuffer);
+ if (res < 0 && errno == EPERM) // key exists
+ {
+ bundle_del(pBundle, pKey);
+ bundle_add(pBundle, pKey, pBuffer);
+ }
+}
int
_AppArg::GetRequestIdFromBundle(bundle* pBundle)
--- /dev/null
+//
+// Open Service Platform
+// Copyright (c) 2013 Samsung Electronics Co., Ltd.
+//
+// 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.
+//
+
+/**
+ * @file FApp_DataControlManager.cpp
+ * @brief This is the implementation for the _DataControlManager class.
+ */
+
+#include <new>
+
+#include <FBaseInteger.h>
+#include "FApp_DataControlManager.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+
+namespace Tizen { namespace App
+{
+
+_DataControlManager::_DataControlManager(void)
+{
+ __pDataControlRequestList.Construct();
+}
+
+_DataControlManager::~_DataControlManager(void)
+{
+}
+
+_DataControlManager*
+_DataControlManager::GetInstance(void)
+{
+ static _DataControlManager inst;
+ return &inst;
+}
+
+void
+_DataControlManager::AddEvent(int reqId, Object* pObj)
+{
+ __pDataControlRequestList.Add(new (std::nothrow) Integer(reqId), pObj);
+}
+
+Object*
+_DataControlManager::GetEvent(int reqId)
+{
+ Integer key(reqId);
+ return __pDataControlRequestList.GetValue(key);
+}
+
+}} // Tizen::App
+
--- /dev/null
+//
+// Open Service Platform
+// Copyright (c) 2013 Samsung Electronics Co., Ltd.
+//
+// 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.
+//
+
+/**
+ * @file FApp_DataControlManager.h
+ * @brief This is the header file for the _DataControlManager class.
+ */
+
+#ifndef _FAPP_INTERNAL_DATA_CONTROL_MANAGER_H_
+#define _FAPP_INTERNAL_DATA_CONTROL_MANAGER_H_
+
+#include <FBaseObject.h>
+#include <FBaseColHashMap.h>
+
+namespace Tizen { namespace App
+{
+
+class _DataControlManager
+ : public Tizen::Base::Object
+{
+public:
+ static _DataControlManager* GetInstance(void);
+
+ void AddEvent(int reqId, Tizen::Base::Object* pObj);
+
+ Tizen::Base::Object* GetEvent(int reqId);
+
+private:
+ _DataControlManager(void);
+
+ virtual ~_DataControlManager(void);
+
+private:
+ Tizen::Base::Collection::HashMap __pDataControlRequestList;
+
+}; // _DataControlManager
+
+}} // Tizen::App
+
+#endif // _FAPP_INTERNAL_DATA_CONTROL_MANAGER_H_
+
{
ArrayList* pList = null;
String* pAppId = null;
- String* pRequestType = null;
+ String reqType;
int type = 0;
_DataControlRequestType requestType = _DATACONTROL_REQUEST_TYPE_UNDEFINED;
String* pProviderId = null;
- String* pReqId = null;
+ String* pCallerReqId = null;
+ int callerReqId = -1;
ArrayList* pResultArgList = null;
String* pResult = null;
String* pErrorMessage = null;
String* pResultCount = null;
String* pResultValue = null;
_AppArg resultArg;
+ String* pDataId = null;
result r = E_SUCCESS;
_AppControlManager* pAppMgr = _AppControlManager::GetInstance();
pAppId = dynamic_cast< String* >(pList->GetAt(0)); // request key[0]
SysTryCatch(NID_APP, pAppId, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] invalid result object");
- pRequestType = dynamic_cast< String* >(pList->GetAt(1)); // request key[1]
- SysTryCatch(NID_APP, pRequestType, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] invalid result object");
- Integer::Parse(*pRequestType, type);
+ reqType = arg.GetValue(OSP_K_DATACONTROL_REQUEST_TYPE);
+ Integer::Parse(reqType, type);
requestType = static_cast< _DataControlRequestType >(type);
if (providerResult == true && apiType != requestType)
}
}
- pReqId = dynamic_cast< String* >(pList->GetAt(2)); // request key[2]
- SysTryCatch(NID_APP, pReqId, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] invalid result object");
+ pCallerReqId = dynamic_cast< String* >(pList->GetAt(2)); // request key[2]
+ SysTryCatch(NID_APP, pCallerReqId, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] invalid result object");
+ Integer::Parse(*pCallerReqId, callerReqId);
pProviderId = dynamic_cast< String* >(pList->GetAt(3)); // request key[3]
SysTryCatch(NID_APP, pProviderId, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] invalid result object");
+ pDataId = dynamic_cast< String* >(pList->GetAt(4)); // list[0]
+ SysTryCatch(NID_APP, pDataId, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] invalid result object");
+
// Serializes the result
pResultArgList = new (std::nothrow) ArrayList();
SysTryCatch(NID_APP, pResultArgList, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY,
String tempFilePath(_DATACONTROL_RESULTSET_DIR);
tempFilePath.Append(*pAppId);
- tempFilePath.Append(*pReqId);
+ tempFilePath.Append(*pCallerReqId);
pTempFilePath = new (std::nothrow) String(tempFilePath);
}
else
r = resultArg.ConstructResult(arg, pResultArgList);
SysTryCatch(NID_APP, !IsFailed(r), r = E_SYSTEM, r, "[%s] Propagating.", GetErrorMessage(r));
+ resultArg.UpdateRequestId(callerReqId);
+ resultArg.UpdateKeyValue(OSP_K_DATACONTROL_REQUEST_TYPE, reqType);
+ resultArg.UpdateKeyValue(OSP_K_DATACONTROL_PROVIDER, *pProviderId);
+ resultArg.UpdateKeyValue(OSP_K_DATACONTROL_DATA, *pDataId);
//resultArg.Print();
r = _Aul::SendResult(resultArg.GetBundle(), static_cast< appsvc_result_val >(0));
#include "FApp_AppControlManager.h"
#include "FApp_MapDataControlImpl.h"
#include "FApp_AppArg.h"
+#include "FApp_DataControlManager.h"
using namespace std;
if (__pMapDataControlEvent)
{
// reqId is system-wide id because the bundle is system-wide.
- _AppControlManager::_RequestGuard reqObj = _AppControlManager::_RequestGuard(*pAppManagerImpl, pArg, MapDataControlCallback, __pMapDataControlEvent, -1);
- req = reqObj.GetRequestNumber();
+ _DataControlManager* pDcMgr = _DataControlManager::GetInstance();
+ _AppControlManager::_RequestGuard reqObj = _AppControlManager::_RequestGuard(*pAppManagerImpl, pArg, MapDataControlCallback, pDcMgr, -1);
+ req = reqObj.GetRequestNumber();
+ pDcMgr->AddEvent(req, __pMapDataControlEvent);
r = pAppManagerImpl->LaunchApp(__appId, pArg, req);
SysTryCatch(NID_APP, r == E_SUCCESS, reqObj.Invalidate(), r, "[%s] Propgated.", GetErrorMessage(r));
ArrayList* pResultValueList = null;
int resultCount = 0;
int requestType = 0;
- int reqId = 0;
+ int callerReqId = -1;
int providerRes = 0;
bool providerResult = true;
bundle* origBundle = null;
resBundle = pResArg->GetBundle();
if (resBundle)
{
- _MapDataControlEvent* pMapDataControlEvent = static_cast< _MapDataControlEvent* >(data);
+ const char* pCallerReqId = appsvc_get_data(resBundle, OSP_K_REQUEST_ID);
+ callerReqId = atoi(pCallerReqId);
+ _DataControlManager* pDcMgr = static_cast< _DataControlManager* >(data);
+ _MapDataControlEvent* pMapDataControlEvent = dynamic_cast< _MapDataControlEvent* >(pDcMgr->GetEvent(callerReqId));
if (pMapDataControlEvent != null && typeid(pMapDataControlEvent) == typeid(_MapDataControlEvent*))
{
// request info
origBundle = pArg->GetBundle();
- p = appsvc_get_data(origBundle, OSP_K_DATACONTROL_REQUEST_TYPE);
+ p = appsvc_get_data(resBundle, OSP_K_DATACONTROL_REQUEST_TYPE);
SysTryCatch(NID_APP, p, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] invalid bundle");
pRequestType = new (std::nothrow) String(p);
SysTryCatch(NID_APP, pRequestType, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY,
"[E_OUT_OF_MEMORY] The memory is insufficient.");
Integer::Parse(*pRequestType, requestType);
- p = appsvc_get_data(origBundle, OSP_K_REQUEST_ID);
- SysTryCatch(NID_APP, p, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] invalid bundle");
- pReqId = new (std::nothrow) String(p);
- SysTryCatch(NID_APP, pReqId, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY,
- "[E_OUT_OF_MEMORY] The memory is insufficient.");
- Integer::Parse(*pReqId, reqId);
- p = appsvc_get_data(origBundle, OSP_K_DATACONTROL_PROVIDER);
+ p = appsvc_get_data(resBundle, OSP_K_DATACONTROL_PROVIDER);
SysTryCatch(NID_APP, p, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] invalid bundle");
pProviderId = new (std::nothrow) String(p);
SysTryCatch(NID_APP, pProviderId, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY,
"[E_OUT_OF_MEMORY] The memory is insufficient.");
- pOrigList = _AppArg::GetListN(origBundle, OSP_K_ARG);
- SysTryCatch(NID_APP, pOrigList, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] invalid bundle");
- pDataId = dynamic_cast <String*>(pOrigList->GetAt(0));
- SysTryCatch(NID_APP, pDataId, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] invalid bundle");
+ p = appsvc_get_data(resBundle, OSP_K_DATACONTROL_DATA);
+ SysTryCatch(NID_APP, p, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] invalid bundle");
+ pDataId = new (std::nothrow) String(p);
+ SysTryCatch(NID_APP, pDataId, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY,
+ "[E_OUT_OF_MEMORY] The memory is insufficient.");
+#if 0
SysLog(NID_APP, "result: %ld, requestType: %d, reqId: %d, providerId: %ls, dataId: %ls, errorMsg: %ls ",
providerRes, requestType, reqId, pProviderId->GetPointer(), pDataId->GetPointer(), pErrorMsg->GetPointer());
+#else
+ SysLog(NID_APP, "result: %ld, requestType: %d, reqId: %d, providerId: %ls, dataId: %ls, errorMsg: %ls ",
+ providerRes, requestType, callerReqId, pProviderId->GetPointer(), pDataId->GetPointer(), pErrorMsg->GetPointer());
+#endif
switch (static_cast< _DataControlRequestType >(requestType))
{
}
}
- pEventArg = new (std::nothrow) _MapDataControlEventArg(_DATACONTROL_REQUEST_TYPE_MAP_QUERY, static_cast <RequestId>(reqId),
+ pEventArg = new (std::nothrow) _MapDataControlEventArg(_DATACONTROL_REQUEST_TYPE_MAP_QUERY, static_cast <RequestId>(callerReqId),
*pProviderId, *pDataId, pResultValueList, providerResult, pErrorMsg);
SysTryCatch(NID_APP, pEventArg != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
pMapDataControlEvent->Fire(*pEventArg);
}
case _DATACONTROL_REQUEST_TYPE_MAP_INSERT:
{
- pEventArg = new (std::nothrow) _MapDataControlEventArg(_DATACONTROL_REQUEST_TYPE_MAP_INSERT, static_cast <RequestId>(reqId),
+ pEventArg = new (std::nothrow) _MapDataControlEventArg(_DATACONTROL_REQUEST_TYPE_MAP_INSERT, static_cast <RequestId>(callerReqId),
*pProviderId, *pDataId, null, providerResult, pErrorMsg);
SysTryCatch(NID_APP, pEventArg != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
pMapDataControlEvent->Fire(*pEventArg);
}
case _DATACONTROL_REQUEST_TYPE_MAP_UPDATE:
{
- pEventArg = new (std::nothrow) _MapDataControlEventArg(_DATACONTROL_REQUEST_TYPE_MAP_UPDATE, static_cast <RequestId>(reqId),
+ pEventArg = new (std::nothrow) _MapDataControlEventArg(_DATACONTROL_REQUEST_TYPE_MAP_UPDATE, static_cast <RequestId>(callerReqId),
*pProviderId, *pDataId, null, providerResult, pErrorMsg);
SysTryCatch(NID_APP, pEventArg != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
pMapDataControlEvent->Fire(*pEventArg);
}
case _DATACONTROL_REQUEST_TYPE_MAP_DELETE:
{
- pEventArg = new (std::nothrow) _MapDataControlEventArg(_DATACONTROL_REQUEST_TYPE_MAP_DELETE, static_cast <RequestId>(reqId),
+ pEventArg = new (std::nothrow) _MapDataControlEventArg(_DATACONTROL_REQUEST_TYPE_MAP_DELETE, static_cast <RequestId>(callerReqId),
*pProviderId, *pDataId, null, providerResult, pErrorMsg);
SysTryCatch(NID_APP, pEventArg != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
pMapDataControlEvent->Fire(*pEventArg);
pResultList->RemoveAll(true);
delete pResultList;
- pOrigList->RemoveAll(true);
- delete pOrigList;
delete pRequestType;
delete pReqId;
}
// Remove the request count
+#if 0
SysLog(NID_APP, "Remove a launch request: reqId: %d", reqId);
_AppControlManager::GetInstance()->RemoveLaunchRequest(reqId);
+#else
+ SysLog(NID_APP, "Remove a launch request: reqId: %d", callerReqId);
+ _AppControlManager::GetInstance()->RemoveLaunchRequest(callerReqId);
+#endif
return E_SUCCESS;
delete pResultList;
}
- if (pOrigList)
- {
- pOrigList->RemoveAll(true);
- delete pOrigList;
- }
delete pRequestType;
delete pReqId;
#include "FApp_AppControlManager.h"
#include "FApp_SqlDataControlImpl.h"
#include "FApp_AppArg.h"
+#include "FApp_DataControlManager.h"
using namespace std;
if (__pSqlDataControlEvent)
{
// reqId is system-wide id because the bundle is system-wide.
- _AppControlManager::_RequestGuard reqObj = _AppControlManager::_RequestGuard(*pAppManagerImpl, pArg, SqlDataControlCallback, __pSqlDataControlEvent, -1);
- req = reqObj.GetRequestNumber();
+ _DataControlManager* pDcMgr = _DataControlManager::GetInstance();
+ _AppControlManager::_RequestGuard reqObj = _AppControlManager::_RequestGuard(*pAppManagerImpl, pArg, SqlDataControlCallback, pDcMgr, -1);
+ req = reqObj.GetRequestNumber();
+ pDcMgr->AddEvent(req, __pSqlDataControlEvent);
r = pAppManagerImpl->LaunchApp(__appId, pArg, req);
SysTryCatch(NID_APP, r == E_SUCCESS, reqObj.Invalidate(), r, "[%s] Propagating.", GetErrorMessage(r));
String* pInsertRowId = null;
_DataControlResultSetEnumerator* pResultSetEnum = null;
int requestType = 0;
- int reqId = 0;
+ int callerReqId = -1;
int providerRes = 0;
bool providerResult = true;
bundle* origBundle = null;
resBundle = pResArg->GetBundle();
if (resBundle)
{
- //ISqlDataControlResponseListener* pListener = static_cast< ISqlDataControlResponseListener* >(data);
- _SqlDataControlEvent* pSqlDataControlEvent = static_cast< _SqlDataControlEvent* >(data);
+ const char* pCallerReqId = appsvc_get_data(resBundle, OSP_K_REQUEST_ID);
+ callerReqId = atoi(pCallerReqId);
+ _DataControlManager* pDcMgr = static_cast< _DataControlManager* >(data);
+ _SqlDataControlEvent* pSqlDataControlEvent = dynamic_cast< _SqlDataControlEvent* >(pDcMgr->GetEvent(callerReqId));
if (pSqlDataControlEvent != null && typeid(pSqlDataControlEvent) == typeid(_SqlDataControlEvent*))
{
origBundle = pArg->GetBundle();
// request info
- p = appsvc_get_data(origBundle, OSP_K_DATACONTROL_REQUEST_TYPE);
+ p = appsvc_get_data(resBundle, OSP_K_DATACONTROL_REQUEST_TYPE);
SysTryCatch(NID_APP, p, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] invalid bundle");
pRequestType = new (std::nothrow) String(p);
SysTryCatch(NID_APP, pRequestType, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY,
"[E_OUT_OF_MEMORY] The memory is insufficient.");
Integer::Parse(*pRequestType, requestType);
- p = appsvc_get_data(origBundle, OSP_K_REQUEST_ID);
- SysTryCatch(NID_APP, p, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] invalid bundle");
- pReqId = new (std::nothrow) String(p);
- SysTryCatch(NID_APP, pReqId, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY,
- "[E_OUT_OF_MEMORY] The memory is insufficient.");
- Integer::Parse(*pReqId, reqId);
- p = appsvc_get_data(origBundle, OSP_K_DATACONTROL_PROVIDER);
+ p = appsvc_get_data(resBundle, OSP_K_DATACONTROL_PROVIDER);
SysTryCatch(NID_APP, p, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] invalid bundle");
pProviderId = new (std::nothrow) String(p);
SysTryCatch(NID_APP, pProviderId, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY,
"[E_OUT_OF_MEMORY] The memory is insufficient.");
- pOrigList = _AppArg::GetListN(origBundle, OSP_K_ARG);
- SysTryCatch(NID_APP, pOrigList, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] invalid bundle");
- pDataId = dynamic_cast <String*>(pOrigList->GetAt(0));
- SysTryCatch(NID_APP, pDataId, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] invalid bundle");
+ p = appsvc_get_data(resBundle, OSP_K_DATACONTROL_DATA);
+ SysTryCatch(NID_APP, p, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] invalid bundle");
+ pDataId = new (std::nothrow) String(p);
+ SysTryCatch(NID_APP, pDataId, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY,
+ "[E_OUT_OF_MEMORY] The memory is insufficient.");
+#if 0
SysLog(NID_APP, "providerResult: %ld, requestType: %d, reqId: %d, providerId: %ls, dataId: %ls, errorMsg: %ls ",
providerRes, requestType, reqId, pProviderId->GetPointer(), pDataId->GetPointer(), pErrorMsg->GetPointer());
+#else
+ SysLog(NID_APP, "providerResult: %ld, requestType: %d, reqId: %d, providerId: %ls, dataId: %ls, errorMsg: %ls ",
+ providerRes, requestType, callerReqId, pProviderId->GetPointer(), pDataId->GetPointer(), pErrorMsg->GetPointer());
+#endif
switch (static_cast <_DataControlRequestType>(requestType))
{
}
}
- pEventArg = new (std::nothrow) _SqlDataControlEventArg(_DATACONTROL_REQUEST_TYPE_SQL_QUERY, static_cast <RequestId>(reqId),
+ pEventArg = new (std::nothrow) _SqlDataControlEventArg(_DATACONTROL_REQUEST_TYPE_SQL_QUERY, static_cast <RequestId>(callerReqId),
*pProviderId, *pDataId, pResultSetEnum, -1, providerResult, pErrorMsg);
SysTryCatch(NID_APP, pEventArg != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
pSqlDataControlEvent->Fire(*pEventArg);
LongLong::Parse(*pInsertRowId, insertRowId);
}
- pEventArg = new (std::nothrow) _SqlDataControlEventArg(_DATACONTROL_REQUEST_TYPE_SQL_INSERT, static_cast <RequestId>(reqId),
+ pEventArg = new (std::nothrow) _SqlDataControlEventArg(_DATACONTROL_REQUEST_TYPE_SQL_INSERT, static_cast <RequestId>(callerReqId),
*pProviderId, *pDataId, null, insertRowId, providerResult, pErrorMsg);
SysTryCatch(NID_APP, pEventArg != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
pSqlDataControlEvent->Fire(*pEventArg);
}
case _DATACONTROL_REQUEST_TYPE_SQL_UPDATE:
{
- pEventArg = new (std::nothrow) _SqlDataControlEventArg(_DATACONTROL_REQUEST_TYPE_SQL_UPDATE, static_cast <RequestId>(reqId),
+ pEventArg = new (std::nothrow) _SqlDataControlEventArg(_DATACONTROL_REQUEST_TYPE_SQL_UPDATE, static_cast <RequestId>(callerReqId),
*pProviderId, *pDataId, null, -1, providerResult, pErrorMsg);
SysTryCatch(NID_APP, pEventArg != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
pSqlDataControlEvent->Fire(*pEventArg);
}
case _DATACONTROL_REQUEST_TYPE_SQL_DELETE:
{
- pEventArg = new (std::nothrow) _SqlDataControlEventArg(_DATACONTROL_REQUEST_TYPE_SQL_DELETE, static_cast <RequestId>(reqId),
+ pEventArg = new (std::nothrow) _SqlDataControlEventArg(_DATACONTROL_REQUEST_TYPE_SQL_DELETE, static_cast <RequestId>(callerReqId),
*pProviderId, *pDataId, null, -1, providerResult, pErrorMsg);
SysTryCatch(NID_APP, pEventArg != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
pSqlDataControlEvent->Fire(*pEventArg);
pResultList->RemoveAll(true);
delete pResultList;
- pOrigList->RemoveAll(true);
- delete pOrigList;
delete pRequestType;
delete pReqId;
}
// Remove the request count
+#if 0
SysLog(NID_APP, "Remove a launch request: reqId: %d", reqId);
_AppControlManager::GetInstance()->RemoveLaunchRequest(reqId);
+#else
+ SysLog(NID_APP, "Remove a launch request: reqId: %d", callerReqId);
+ _AppControlManager::GetInstance()->RemoveLaunchRequest(callerReqId);
+#endif
return E_SUCCESS;
delete pResultList;
}
- if (pOrigList)
- {
- pOrigList->RemoveAll(true);
- delete pOrigList;
- }
delete pRequestType;
delete pReqId;
#define OSP_K_APPID "__OSP_APPID__"
#define OSP_K_REQUEST_ID "__OSP_REQUEST_ID__"
#define OSP_K_APPCONTROL_INTERNAL_OPERATION "__OSP_APPCONTROL_INTERNAL_INTERNAL_OPERATION__"
-#define OSP_K_DATACONTROL_PROVIDER "__OSP_DATACONTROL_PROVIDER__"
+#define OSP_K_DATACONTROL_PROVIDER "__OSP_DATACONTROL_PROVIDER__"
+#define OSP_K_DATACONTROL_DATA "__OSP_DATACONTROL_DATA__"
#define OSP_K_DATACONTROL_REQUEST_TYPE "__OSP_DATACONTROL_REQUEST_TYPE__"
/**
UpdateRequestId(__pBundle, reqId);
}
+ void UpdateKeyValue(const char* pKey, const Tizen::Base::String& value)
+ {
+ UpdateKeyValue(__pBundle, pKey, value);
+ }
+
result UpdateWindowHandle(long handle)
{
return UpdateWindowHandle(__pBundle, handle);
static void UpdateRequestId(bundle* b, int reqId);
+ static void UpdateKeyValue(bundle* b, const char* pKey, const Tizen::Base::String& value);
+
static result UpdateWindowHandle(bundle* b, long handle);
static Tizen::Base::Collection::ArrayList* GetListN(bundle* b, const char* key);