[content] Apply secure log
authorSeokpil Park <seokpil.park@samsung.com>
Thu, 18 Apr 2013 23:31:22 +0000 (08:31 +0900)
committerSeokpil Park <seokpil.park@samsung.com>
Thu, 18 Apr 2013 23:31:26 +0000 (08:31 +0900)
Change-Id: Idfba214169f6e175758c97006f29a2f60b97f2df
Signed-off-by: Seokpil Park <seokpil.park@samsung.com>
packaging/osp-content.spec
src/FCntAudioContentInfo.cpp
src/FCntImageContentInfo.cpp
src/FCntOtherContentInfo.cpp
src/FCntVideoContentInfo.cpp
src/FCnt_ContentManagerImpl.cpp
src/FCnt_ContentUtility.cpp
src/FCnt_ImageMetadataImpl.cpp

index a6af7da..95e9d1b 100644 (file)
@@ -85,9 +85,9 @@ osp content library (DEV)
 %build 
 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
 %ifarch %{ix86}
-CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_ -D_OSP_EMUL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
+CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_SECURE_LOG -D_OSP_X86_ -D_OSP_EMUL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
 %else
-CXXFLAGS="-O2 -g -pipe -Wall -fno-exceptions -Wformat -Wformat-security -Wl,--as-needed -fmessage-length=0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -D__SOFTFP__ -mthumb -Wa,-mimplicit-it=thumb -funwind-tables -D_OSP_DEBUG_ -D_OSP_ARMEL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
+CXXFLAGS="-O2 -g -pipe -Wall -fno-exceptions -Wformat -Wformat-security -Wl,--as-needed -fmessage-length=0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -D__SOFTFP__ -mthumb -Wa,-mimplicit-it=thumb -funwind-tables -D_OSP_DEBUG_ -D_SECURE_LOG -D_OSP_ARMEL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
 %endif
 
 # Call make instruction with smp support
index 056cfa9..6bfc37c 100644 (file)
@@ -116,7 +116,7 @@ AudioContentInfo::Construct(const String& contentPath, const String& thumbnailPa
        // checks parameters
        contentLength = contentPath.GetLength();
        SysTryReturnResult(NID_CNT, _FileImpl::IsMediaPath(contentPath), E_INVALID_ARG,
-                       "The contentPath should start with /Media or /Storagecard/Media(%ls).", contentPath.GetPointer());
+                       "The contentPath should start with /Media or /Storagecard/Media.");
        SysTryReturnResult(NID_CNT, File::IsFileExist(contentPath), E_FILE_NOT_FOUND,
                        "The file corresponding to contentPath could not be found.");
 
index 4e3e795..e7c9d00 100644 (file)
@@ -79,7 +79,7 @@ ImageContentInfo::Construct(const String& contentPath, const String& thumbnailPa
        // checks parameters
        contentLength = contentPath.GetLength();
        SysTryReturnResult(NID_CNT, _FileImpl::IsMediaPath(contentPath), E_INVALID_ARG,
-                       "The contentPath should start with /Media or /Storagecard/Media(%ls).", contentPath.GetPointer());
+                       "The contentPath should start with /Media or /Storagecard/Media.");
        SysTryReturnResult(NID_CNT, File::IsFileExist(contentPath), E_FILE_NOT_FOUND,
                        "The file corresponding to contentPath could not be found.");
 
index 5cfdb17..40af32d 100644 (file)
@@ -73,7 +73,7 @@ OtherContentInfo::Construct(const String& contentPath, const String& thumbnailPa
        // checks parameters
        contentLength = contentPath.GetLength();
        SysTryReturnResult(NID_CNT, _FileImpl::IsMediaPath(contentPath), E_INVALID_ARG,
-                       "The contentPath should start with /Media or /Storagecard/Media(%ls).", contentPath.GetPointer());
+                       "The contentPath should start with /Media or /Storagecard/Media.");
        SysTryReturnResult(NID_CNT, File::IsFileExist(contentPath), E_FILE_NOT_FOUND,
                        "The file corresponding to contentPath could not be found.");
 
index 577ecb3..f4df950 100644 (file)
@@ -101,7 +101,7 @@ VideoContentInfo::Construct(const String& contentPath, const String& thumbnailPa
        // checks parameters
        contentLength = contentPath.GetLength();
        SysTryReturnResult(NID_CNT, _FileImpl::IsMediaPath(contentPath), E_INVALID_ARG,
-                       "The contentPath should start with /Media or /Storagecard/Media(%ls).", contentPath.GetPointer());
+                       "The contentPath should start with /Media or /Storagecard/Media.");
        SysTryReturnResult(NID_CNT, File::IsFileExist(contentPath), E_FILE_NOT_FOUND,
                        "The file corresponding to contentPath could not be found.");
 
index 6c08fb3..a2f1827 100644 (file)
@@ -306,7 +306,7 @@ _ContentManagerImpl::CreateContent(const ContentInfo& contentInfo)
                        "[E_INVALID_ARG] pContentData is null.");
 
        SysTryReturn(NID_CNT, VerifyMediaFilePathCompatibility(pContentData->contentPath, true), UuId::GetInvalidUuId(),
-                       E_INVALID_ARG, "[E_INVALID_ARG] %ls is not compatible.", (pContentData->contentPath).GetPointer());
+                       E_INVALID_ARG, "[E_INVALID_ARG] The contentPath is not compatible.");
        SysTryReturn(NID_CNT, _FileImpl::IsFileExist(pContentData->contentPath), UuId::GetInvalidUuId(), E_FILE_NOT_FOUND,
                        "[E_FILE_NOT_FOUND] The file corresponding to contentInfo could not be found.");
        SysTryReturn(NID_CNT, pContentData->contentId == UuId::GetInvalidUuId(), UuId::GetInvalidUuId(),
@@ -881,7 +881,7 @@ _ContentManagerImpl::ScanFile(const Tizen::Base::String& contentPath)
 {
        ClearLastResult();
 
-       SysLog(NID_CNT, "The scan path is [%ls].", contentPath.GetPointer());
+       SysSecureLog(NID_CNT, "The scan path is [%ls].", contentPath.GetPointer());
 
        unique_ptr<char[]> pContentPath(_StringConverter::CopyToCharArrayN(contentPath));
        SysTryReturnResult(NID_CNT, pContentPath, E_SYSTEM, "pContentPath is NULL.");
@@ -1297,14 +1297,14 @@ _ContentManagerImpl::MakeContentInfo(const media_info_h pMediaInfo, ContentInfo:
                        else
                        {
                                SysLogException(NID_CNT, E_INVALID_ARG,
-                                               "[E_INVALID_ARG] The content path is not supported[%ls].", strFilePath.GetPointer());
+                                               "[E_INVALID_ARG] The content path is not supported.");
                                return E_INVALID_ARG;
                        }
                }
 
                pContentData->contentPath = strFilePath;
 
-               SysLog(NID_CNT, "INFO: contentPath[%ls]", strFilePath.GetPointer());
+               SysSecureLog(NID_CNT, "INFO: contentPath[%ls]", strFilePath.GetPointer());
        }
 
        // mimeType
@@ -1407,7 +1407,7 @@ _ContentManagerImpl::MakeContentInfo(const media_info_h pMediaInfo, ContentInfo:
 
                pContentData->pContentName = new (nothrow) String(pStrValue.get());
 
-               SysLog(NID_CNT, "INFO: contentName[%ls]", (*pContentData->pContentName).GetPointer());
+               SysSecureLog(NID_CNT, "INFO: contentName[%ls]", (*pContentData->pContentName).GetPointer());
        }
 
        // description
@@ -1449,7 +1449,7 @@ _ContentManagerImpl::MakeContentInfo(const media_info_h pMediaInfo, ContentInfo:
 
                pContentData->pLocationTag = new (nothrow) String(pStrValue.get());
 
-               SysLog(NID_CNT, "INFO: locationTag[%ls]", (*pContentData->pLocationTag).GetPointer());
+               SysSecureLog(NID_CNT, "INFO: locationTag[%ls]", (*pContentData->pLocationTag).GetPointer());
        }
 
        // provider
@@ -1490,7 +1490,7 @@ _ContentManagerImpl::MakeContentInfo(const media_info_h pMediaInfo, ContentInfo:
        {
                pContentData->latitude = doubleValue;
        }
-       SysLog(NID_CNT, "INFO: latitude[%f]", pContentData->latitude);
+       SysSecureLog(NID_CNT, "INFO: latitude[%f]", pContentData->latitude);
 
        val = media_info_get_longitude(pMediaInfo, &doubleValue);
        SysTryReturnResult(NID_CNT, val == MEDIA_CONTENT_ERROR_NONE, ConvertError(val),
@@ -1500,7 +1500,7 @@ _ContentManagerImpl::MakeContentInfo(const media_info_h pMediaInfo, ContentInfo:
        {
                pContentData->longitude = doubleValue;
        }
-       SysLog(NID_CNT, "INFO: longitude[%f]", pContentData->longitude);
+       SysSecureLog(NID_CNT, "INFO: longitude[%f]", pContentData->longitude);
 
        val = media_info_get_altitude(pMediaInfo, &doubleValue);
        SysTryReturnResult(NID_CNT, val == MEDIA_CONTENT_ERROR_NONE, ConvertError(val),
@@ -1872,7 +1872,7 @@ _ContentManagerImpl::VerifyHomeFilePathCompatibility(const String& contentPath)
                if (!(contentPath.StartsWith(App::App::GetInstance()->GetAppRootPath(), 0) ||
                                contentPath.StartsWith(Environment::GetExternalStoragePath(), 0)))
                {
-                       SysLogException(NID_CNT, E_INVALID_ARG, "[E_INVALID_ARG] %ls is not supported.", contentPath.GetPointer());
+                       SysLogException(NID_CNT, E_INVALID_ARG, "[E_INVALID_ARG] The path is not supported.");
                        return false;
                }
        }
index 244a99b..c6bb8e9 100644 (file)
@@ -278,7 +278,7 @@ _ContentUtility::FillContentData(media_info_h mediaHandle, ContentInfo::_Content
        if (pMediaPath.get() != NULL)
        {
                pContentData->contentPath       = String(pMediaPath.get());
-               SysLog(NID_CNT, "pContentData->contentPath = %ls", pContentData->contentPath.GetPointer());
+               SysSecureLog(NID_CNT, "pContentData->contentPath = %ls", pContentData->contentPath.GetPointer());
        }
 
        if (pThumbnailPath.get() != NULL)
index 23f6217..04e2f97 100644 (file)
@@ -523,7 +523,7 @@ _ImageMetadataImpl::GetThumbnailN(void) const
 
        SysTryReturn(NID_CNT, __pImageMeta != null, null, E_DATA_NOT_FOUND, "[E_DATA_NOT_FOUND] GetThumbnailN failed.");
        SysTryReturn(NID_CNT, _FileImpl::IsFileExist(__pImageMeta->contentPath), null, E_DATA_NOT_FOUND,
-                               "[E_DATA_NOT_FOUND] GetThumbnailN failed [%ls].", (__pImageMeta->contentPath).GetPointer());
+                               "[E_DATA_NOT_FOUND] GetThumbnailN from contentPath failed.");
 
        Image image;
        result r = image.Construct();