Merge "Alarm Conditional AppLaunch Refactoring" into tizen_2.2
[platform/framework/native/appfw.git] / src / io / FIo_DataControlResultSetImpl.cpp
index b4a71f7..1378cdc 100644 (file)
@@ -1,5 +1,4 @@
 //
-// Open Service Platform
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Apache License, Version 2.0 (the License);
@@ -50,7 +49,8 @@ using namespace Tizen::Base::Utility;
 using namespace Tizen::Base::Collection;
 using namespace Tizen::App;
 
-const char* _DATACONTROL_RESULTSET_DIR = "/tmp/osp/DataControlResultSet/\0";
+const char* _DATACONTROL_RESULT_DIR = "/tmp/osp/data-control/result/\0";
+const char* _DATACONTROL_RESULT_COMPAT_DIR = "/tmp/osp/DataControlResult/\0";
 
 namespace Tizen { namespace Io
 {
@@ -86,11 +86,11 @@ _DataControlResultSetImpl::~_DataControlResultSetImpl(void)
 // [sizeof(int)] size
 // [  varient  ] content
 result
-_DataControlResultSetImpl::FillWith(IDbEnumerator* pDbEnum)
+_DataControlResultSetImpl::FillWith(IDbEnumerator* pDbEnum, String& version)
 {
-       String tempFilePath(_DATACONTROL_RESULTSET_DIR);
+       String tempFilePath;
        String columnName;
-       String appId;
+       String callerAppId;
        String reqType;
        String callerReqId;
        String* pNo = null;
@@ -127,7 +127,7 @@ _DataControlResultSetImpl::FillWith(IDbEnumerator* pDbEnum)
        SysTryReturnResult(NID_IO, requestType ==  _DATACONTROL_REQUEST_TYPE_SQL_QUERY, E_INVALID_ARG,
                        "The reqId should be for the data control query request.");
 
-       appId = arg.GetCallerAppId();
+       callerAppId = arg.GetCallerAppId();
        callerReqId = arg.GetValue(OSP_K_REQUEST_ID);
 
        // list-based request
@@ -149,7 +149,15 @@ _DataControlResultSetImpl::FillWith(IDbEnumerator* pDbEnum)
        Integer::Parse(*pCount, countPerPage);
 
        this->SetCapacity(pageNo, countPerPage);
-       tempFilePath.Append(appId);
+       if (version == L"ver_2.1.0.3")
+       {
+               tempFilePath.Append(_DATACONTROL_RESULT_DIR);
+       }
+       else
+       {
+               tempFilePath.Append(_DATACONTROL_RESULT_COMPAT_DIR);
+       }
+       tempFilePath.Append(callerAppId);
        tempFilePath.Append(callerReqId);
        __tmpPath = tempFilePath;
        SysSecureLog(NID_IO, "[DC_PROV_SEND] temp file path: %ls", tempFilePath.GetPointer());