{
ClearLastResult();
result r = E_SUCCESS;
-
ContentInfo* pContentInfo = null;
- ImageContentInfo* pImageContentInfo = null;
- AudioContentInfo* pAudioContentInfo = null;
- VideoContentInfo* pVideoContentInfo = null;
- OtherContentInfo* pOtherContentInfo = null;
- ContentType contentType;
// Checks the privilege
r = _AccessController::CheckUserPrivilege(_PRV_CONTENT_READ);
_AudioContentInfoImpl::Construct(const String& contentPath, const String& thumbnailPath, bool setGps)
{
result r = E_SUCCESS;
- int contentLength = 0;
- FileAttributes attribute;
+ String tempPath(contentPath);
+
+ if (_AppInfo::GetApiVersion() == _API_VERSION_2_0 && _AppInfo::IsOspCompat())
+ {
+ if (contentPath.StartsWith(OSP_MEDIA_PHONE, 0))
+ {
+ // Because the content path is saved like /opt/media or /opt/storage/sdcard/ in SLP database,
+ // it should be converted in 2.0.
+ r = tempPath.Replace(OSP_MEDIA_PHONE, Environment::GetMediaPath());
+ SysTryReturnResult(NID_CNT, !IsFailed(r), E_INVALID_ARG, "Construct() failed.");
+ }
+ else if (contentPath.StartsWith(OSP_MEDIA_MMC, 0))
+ {
+ r = tempPath.Replace(OSP_MEDIA_MMC, Environment::GetExternalStoragePath());
+ SysTryReturnResult(NID_CNT, !IsFailed(r), E_INVALID_ARG, "Construct() failed.");
+ }
+ else
+ {
+ SysLogException(NID_CNT, E_INVALID_ARG,
+ "[E_INVALID_ARG] The contentPath should start with /Media or /Storagecard/Media.");
+ return E_INVALID_ARG;
+ }
+ }
// checks parameters
- contentLength = contentPath.GetLength();
SysTryReturnResult(NID_CNT, _FileImpl::IsMediaPath(contentPath), E_INVALID_ARG,
"The contentPath should start with /Media or /Storagecard/Media.");
SysTryReturnResult(NID_CNT, File::IsFileExist(contentPath), E_FILE_NOT_FOUND,
SysLog(NID_CNT, "The setGps is not supported.");
}
- SetContentPath(contentPath);
+ SetContentPath(tempPath);
SetContentType(CONTENT_TYPE_AUDIO);
return r;
int length = contentPath.GetLength();
SysTryReturnResult(NID_CNT, length != 0, E_INVALID_ARG,
"The length of pContentPath is 0.");
- SysTryReturnResult(NID_CNT, File::IsFileExist(contentPath), E_FILE_NOT_FOUND,
+ SysTryReturnResult(NID_CNT, File::IsFileExist(*pContentPath), E_FILE_NOT_FOUND,
"The file corresponding to pContentPath could not be found.");
SetContentPath(contentPath);
#include <FGrpBitmap.h>
#include <FMediaImage.h>
#include <FApp_AppInfo.h>
+#include <FIo_FileImpl.h>
#include "FCnt_ContentInfoImpl.h"
using namespace std;
+using namespace Tizen::App;
using namespace Tizen::Base;
using namespace Tizen::Io;
using namespace Tizen::Locations;
using namespace Tizen::Graphics;
using namespace Tizen::Media;
-using namespace Tizen::App;
namespace Tizen { namespace Content
{
String
_ContentInfoImpl::GetContentPath(void) const
{
+ String changedPath(L"");
+ result r = GetCompatContentPath(__contentPath, changedPath);
+ SysTryLogReturn(NID_CNT, !IsFailed(r), L"", "Failed to perform GetCompatContentPath.");
+
+ return changedPath;
+}
+
+String
+_ContentInfoImpl::GetPhysicalContentPath(void) const
+{
return __contentPath;
}
SysTryReturn(NID_CNT, !__thumbnailPath.IsEmpty(), null, E_DATA_NOT_FOUND,
"[E_DATA_NOT_FOUND] GetThumbnailN() failed.");
+ String changedPath(L"");
+ r = GetCompatContentPath(__thumbnailPath, changedPath);
+ SysTryReturn(NID_CNT, !IsFailed(r), null, E_DATA_NOT_FOUND, "[%s] Failed to perform GetCompatContentPath.", GetErrorMessage(E_DATA_NOT_FOUND));
+
if (__contentType == CONTENT_TYPE_IMAGE || __contentType == CONTENT_TYPE_AUDIO
|| __contentType == CONTENT_TYPE_VIDEO)
{
if (_AppInfo::GetApiVersion() == _API_VERSION_2_0 && _AppInfo::IsOspCompat())
{
- pBitmap = image.DecodeN(__thumbnailPath, BITMAP_PIXEL_FORMAT_ARGB8888, _THUMBNAIL_IMAGE_WIDTH, _THUMBNAIL_IMAGE_HEIGHT);
+ pBitmap = image.DecodeN(changedPath, BITMAP_PIXEL_FORMAT_ARGB8888, _THUMBNAIL_IMAGE_WIDTH, _THUMBNAIL_IMAGE_HEIGHT);
}
else
{
- pBitmap = image.DecodeN(__thumbnailPath, BITMAP_PIXEL_FORMAT_ARGB8888);
+ pBitmap = image.DecodeN(changedPath, BITMAP_PIXEL_FORMAT_ARGB8888);
}
if (pBitmap == null)
__modifiedTime = modifiedTime;
}
+result
+_ContentInfoImpl::GetCompatContentPath(const String& contentPath, String& changedPath) const
+{
+ result r = E_SUCCESS;
+ changedPath = contentPath;
+
+ // If the api version is 2.0, the content path has to be changed.
+ if (_AppInfo::GetApiVersion() == _API_VERSION_2_0 && _AppInfo::IsOspCompat())
+ {
+ r = _FileImpl::ConvertPhysicalToVirtualPath(contentPath, changedPath);
+ SysTryReturnResult(NID_CNT, !IsFailed(r), E_INVALID_ARG,
+ "[%s] Failed to convert physical path to virtual path.", GetErrorMessage(E_INVALID_ARG));
+ }
+
+ return r;
+}
+
}}
SysTryReturn(NID_CNT, pInfoImpl != null, UuId::GetInvalidUuId(), E_INVALID_ARG,
"[E_INVALID_ARG] Invalid argument is used. ContentInfo is invalid.");
- SysTryReturn(NID_CNT, VerifyMediaFilePathCompatibility(pInfoImpl->GetContentPath(), true), UuId::GetInvalidUuId(),
- E_INVALID_ARG, "[E_INVALID_ARG] The contentPath is not compatible.");
- SysTryReturn(NID_CNT, _FileImpl::IsFileExist(pInfoImpl->GetContentPath()), UuId::GetInvalidUuId(), E_FILE_NOT_FOUND,
- "[E_FILE_NOT_FOUND] The file corresponding to contentInfo could not be found.");
+ String contentPath(pInfoImpl->GetPhysicalContentPath());
+ String changedPath(L"");
+
+ result r = ChangeTizenPathToCompat(contentPath, changedPath);
+ SysTryReturn(NID_CNT, !IsFailed(r), null, r, "[%s] Failed to perform ChangeTizenPathToCompat.", GetErrorMessage(r));
+
+ SysTryReturn(NID_CNT, _FileImpl::IsFileExist(changedPath), UuId::GetInvalidUuId(), E_FILE_NOT_FOUND,
+ "[%s] The file cound not be found.", GetErrorMessage(E_FILE_NOT_FOUND));
+
SysTryReturn(NID_CNT, pInfoImpl->GetContentId() == UuId::GetInvalidUuId(), UuId::GetInvalidUuId(),
E_INVALID_ARG, "[E_INVALID_ARG] The contentId is not empty.");
// Compare the type of input parameter and system
ContentType inputType = pInfoImpl->GetContentType();
- ContentType sysType = _ContentManagerUtilImpl::CheckContentType(pInfoImpl->GetContentPath(), true);
+ ContentType sysType = _ContentManagerUtilImpl::CheckContentType(contentPath, true);
ClearLastResult();
}
// Save data to database with contentPath.
- unique_ptr<char[]> pStr(_StringConverter::CopyToCharArrayN(contentInfo.GetContentPath()));
+ unique_ptr<char[]> pStr(_StringConverter::CopyToCharArrayN(contentPath));
SysTryReturn(NID_CNT, pStr != null, UuId::GetInvalidUuId(), E_OUT_OF_MEMORY,
"[E_OUT_OF_MEMORY] The memory is insufficient.");
pMediaInfo.reset(tempMediaInfo);
ContentId contentId = SaveDataToDatabase(pMediaInfo.get(), pInfoImpl);
- result r = GetLastResult();
+ r = GetLastResult();
SysTryCatch(NID_CNT, contentId != UuId::GetInvalidUuId(), , r,
"[%s] The registration to database failed.", GetErrorMessage(r));
"[E_INVALID_ARG] byteBuffer is invalid.");
// Check parameters(for path compatibility)
- SysTryReturn(NID_CNT, VerifyMediaFilePathCompatibility(destinationPath, false), UuId::GetInvalidUuId(),
+ SysTryReturn(NID_CNT, VerifyMediaFilePathCompatibility(destinationPath), UuId::GetInvalidUuId(),
E_INVALID_ARG, "[E_INVALID_ARG] %ls is not compatible.", destinationPath.GetPointer());
SysTryReturn(NID_CNT, !_FileImpl::IsFileExist(destinationPath), UuId::GetInvalidUuId(), E_FILE_ALREADY_EXIST,
"[E_FILE_ALREADY_EXIST] The specified file already exists.");
media_info_h tempMediaInfo = null;
unique_ptr<media_info_s, _MediaInfoDeleter> pMediaInfo(null);
unique_ptr<char[]> pStr(null);
+ String destPath(L"");
+
+ r = ChangeCompatPathToTizen(destinationPath, destPath);
+ SysTryCatch(NID_CNT, !IsFailed(r), , r, "[%s] Failed to perform ChangedCompatPathToTizen.", GetErrorMessage(r));
if (pContentInfo != null)
{
}
// Sets the content path
- pInfoImpl->SetContentPath(destinationPath);
+ pInfoImpl->SetContentPath(destPath);
}
else
{
SysTryCatch(NID_CNT, !IsFailed(r), , E_OUT_OF_MEMORY,
"[E_OUT_OF_MEMORY] Failed to perform Construct for ImageContentInfoImpl.");
- imageContentInfoImpl.SetContentPath(destinationPath);
+ imageContentInfoImpl.SetContentPath(destPath);
pInfoImpl = dynamic_cast< _ContentInfoImpl* >(&imageContentInfoImpl);
}
else if (contentType == CONTENT_TYPE_AUDIO)
SysTryCatch(NID_CNT, !IsFailed(r), , E_OUT_OF_MEMORY,
"[E_OUT_OF_MEMORY] Failed to perform Construct for AudioContentInfoImpl.");
- audioContentInfoImpl.SetContentPath(destinationPath);
+ audioContentInfoImpl.SetContentPath(destPath);
pInfoImpl = dynamic_cast< _ContentInfoImpl* >(&audioContentInfoImpl);
}
else if (contentType == CONTENT_TYPE_VIDEO)
SysTryCatch(NID_CNT, !IsFailed(r), , E_OUT_OF_MEMORY,
"[E_OUT_OF_MEMORY] Failed to perform Construct for VideoContentInfoImpl.");
- videoContentInfoImpl.SetContentPath(destinationPath);
+ videoContentInfoImpl.SetContentPath(destPath);
pInfoImpl = dynamic_cast< _ContentInfoImpl* >(&videoContentInfoImpl);
}
else
SysTryCatch(NID_CNT, !IsFailed(r), , E_OUT_OF_MEMORY,
"[E_OUT_OF_MEMORY] Failed to perform Construct for OtherContentInfoImpl.");
- otherContentInfoImpl.SetContentPath(destinationPath);
+ otherContentInfoImpl.SetContentPath(destPath);
pInfoImpl = dynamic_cast< _ContentInfoImpl* >(&otherContentInfoImpl);
}
}
// Register the content to database directly.
- pStr.reset(_StringConverter::CopyToCharArrayN(destinationPath));
+ pStr.reset(_StringConverter::CopyToCharArrayN(destPath));
SysTryCatch(NID_CNT, pStr != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
val = media_info_insert_to_db(pStr.get(), &tempMediaInfo);
// Check parameters(for path compatibility)
SysTryReturn(NID_CNT, VerifyHomeFilePathCompatibility(sourcePath), UuId::GetInvalidUuId(), E_INVALID_ARG,
"[E_INVALID_ARG] %ls is not compatible.", sourcePath.GetPointer());
- SysTryReturn(NID_CNT, VerifyMediaFilePathCompatibility(destinationPath, false), UuId::GetInvalidUuId(),
+ SysTryReturn(NID_CNT, VerifyMediaFilePathCompatibility(destinationPath), UuId::GetInvalidUuId(),
E_INVALID_ARG, "[E_INVALID_ARG] %ls is not compatible.", destinationPath.GetPointer());
result r = E_SUCCESS;
media_info_h tempMediaInfo = null;
unique_ptr<media_info_s, _MediaInfoDeleter> pMediaInfo(null);
unique_ptr<char[]> pStr(null);
+ String destPath(L"");
+
+ r = ChangeCompatPathToTizen(destinationPath, destPath);
+ SysTryCatch(NID_CNT, !IsFailed(r), , r, "[%s] Failed to perform ChangedCompatPathToTizen.", GetErrorMessage(r));
if (pContentInfo != null)
{
}
// Set the content path
- pInfoImpl->SetContentPath(destinationPath);
+ pInfoImpl->SetContentPath(destPath);
}
else
{
SysTryCatch(NID_CNT, !IsFailed(r), , E_OUT_OF_MEMORY,
"[E_OUT_OF_MEMORY] Failed to perform Construct for ImageContentInfoImpl.");
- imageContentInfoImpl.SetContentPath(destinationPath);
+ imageContentInfoImpl.SetContentPath(destPath);
pInfoImpl = dynamic_cast< _ContentInfoImpl* >(&imageContentInfoImpl);
}
else if (contentType == CONTENT_TYPE_AUDIO)
SysTryCatch(NID_CNT, !IsFailed(r), , E_OUT_OF_MEMORY,
"[E_OUT_OF_MEMORY] Failed to perform Construct for AudioContentInfoImpl.");
- audioContentInfoImpl.SetContentPath(destinationPath);
+ audioContentInfoImpl.SetContentPath(destPath);
pInfoImpl = dynamic_cast< _ContentInfoImpl* >(&audioContentInfoImpl);
}
else if (contentType == CONTENT_TYPE_VIDEO)
SysTryCatch(NID_CNT, !IsFailed(r), , E_OUT_OF_MEMORY,
"[E_OUT_OF_MEMORY] Failed to perform Construct for VideoContentInfoImpl.");
- videoContentInfoImpl.SetContentPath(destinationPath);
+ videoContentInfoImpl.SetContentPath(destPath);
pInfoImpl = dynamic_cast< _ContentInfoImpl* >(&videoContentInfoImpl);
}
else
SysTryCatch(NID_CNT, !IsFailed(r), , E_OUT_OF_MEMORY,
"[E_OUT_OF_MEMORY] Failed to perform Construct for OtherContentInfoImpl.");
- otherContentInfoImpl.SetContentPath(destinationPath);
+ otherContentInfoImpl.SetContentPath(destPath);
pInfoImpl = dynamic_cast< _ContentInfoImpl* >(&otherContentInfoImpl);
}
}
- pStr.reset(_StringConverter::CopyToCharArrayN(destinationPath));
+ pStr.reset(_StringConverter::CopyToCharArrayN(destPath));
SysTryCatch(NID_CNT, pStr != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
val = media_info_insert_to_db(pStr.get(), &tempMediaInfo);
unique_ptr<char, CharDeleter> pFilePath(pTempFilePath);
String contentPath(pFilePath.get());
-
- SysTryReturn(NID_CNT, _FileImpl::IsFileExist(contentPath), null, E_FILE_NOT_FOUND,
- "[E_FILE_NOT_FOUND] The file corresponding to contentId could not be found.");
+ String changedPath(L"");
result r = E_SUCCESS;
+ r = ChangeTizenPathToCompat(contentPath, changedPath);
+ SysTryReturn(NID_CNT, !IsFailed(r), null, r, "[%s] Failed to perform ChangeTizenPathToCompat.", GetErrorMessage(r));
+
+ SysTryReturn(NID_CNT, _FileImpl::IsFileExist(changedPath), null, E_FILE_NOT_FOUND,
+ "[E_FILE_NOT_FOUND] The file corresponding to contentId could not be found.");
+
if (systemType == SYSTEM_TYPE_IMAGE)
{
unique_ptr< ImageContentInfo > pImageContentInfo(new (nothrow) ImageContentInfo);
SysTryReturn(NID_CNT, pImageContentInfo != null, null, E_OUT_OF_MEMORY,
"[E_OUT_OF_MEMORY] The memory is insufficient.");
- r = pImageContentInfo->Construct(&contentPath);
+ r = pImageContentInfo->Construct(&changedPath);
r = ConvertErrorToResult(r);
SysTryReturn(NID_CNT, !IsFailed(r), null, r,
"[%s] Failed to perform Construct operation to ImageContentInfo.", GetErrorMessage(r));
SysTryReturn(NID_CNT, pAudioContentInfo != null, null, E_OUT_OF_MEMORY,
"[E_OUT_OF_MEMORY] The memory is insufficient.");
- r = pAudioContentInfo->Construct(&contentPath);
+ r = pAudioContentInfo->Construct(&changedPath);
r = ConvertErrorToResult(r);
SysTryReturn(NID_CNT, !IsFailed(r), null, r,
"[%s] Failed to perform Construct operation to AudioContentInfo.", GetErrorMessage(r));
SysTryReturn(NID_CNT, pVideoContentInfo != null, null, E_OUT_OF_MEMORY,
"[E_OUT_OF_MEMORY] The memory is insufficient.");
- r = pVideoContentInfo->Construct(&contentPath);
+ r = pVideoContentInfo->Construct(&changedPath);
r = ConvertErrorToResult(r);
SysTryReturn(NID_CNT, !IsFailed(r), null, r,
"[%s] Failed to perform Construct operation to VideoContentInfo.", GetErrorMessage(r));
SysTryReturn(NID_CNT, pOtherContentInfo != null, null, E_OUT_OF_MEMORY,
"[E_OUT_OF_MEMORY] The memory is insufficient.");
- r = pOtherContentInfo->Construct(&contentPath);
+ r = pOtherContentInfo->Construct(&changedPath);
r = ConvertErrorToResult(r);
SysTryReturn(NID_CNT, !IsFailed(r), null, r,
"[%s] Failed to perform Construct operation to OtherContentInfo.", GetErrorMessage(r));
result
_ContentManagerImpl::UpdateContent(const ContentInfo& contentInfo)
{
- ContentId contentId = contentInfo.GetContentId();
- SysTryReturnResult(NID_CNT, contentId != UuId::GetInvalidUuId(), E_INVALID_ARG, "The content id is invalid.");
- SysTryReturnResult(NID_CNT, _FileImpl::IsFileExist(contentInfo.GetContentPath()), E_FILE_NOT_FOUND,
- "The file corresponding to contentInfo could not be found.");
-
const _ContentInfoImpl* pInfoImpl = _ContentInfoImpl::GetInstance(contentInfo);
SysTryReturnResult(NID_CNT, pInfoImpl != null, E_INVALID_ARG, "Invalid argument is used. ContentInfo is invalid.");
+ ContentId contentId = pInfoImpl->GetContentId();
+ SysTryReturnResult(NID_CNT, contentId != UuId::GetInvalidUuId(), E_INVALID_ARG, "The content id is invalid.");
+ SysTryReturnResult(NID_CNT, _FileImpl::IsFileExist(pInfoImpl->GetContentPath()), E_FILE_NOT_FOUND,
+ "The file corresponding to contentInfo could not be found.");
+
result r = UpdateDataToDatabase(pInfoImpl);
SysTryReturnResult(NID_CNT, !IsFailed(r), r, "UpdateDataToDatabase failed.");
"media_info_get_file_path failed[%d].", val);
unique_ptr<char, CharDeleter> pContentPath(pTempPath);
+ String contentPath(pContentPath.get());
+ String changedPath(L"");
- String contentPath = String(pContentPath.get());
- SysTryReturnResult(NID_CNT, _FileImpl::IsFileExist(contentPath), E_FILE_NOT_FOUND,
+ r = ChangeTizenPathToCompat(contentPath, changedPath);
+ SysTryReturnResult(NID_CNT, !IsFailed(r), r, "[%s] Failed to perform ChangeTizenPathToCompat.", GetErrorMessage(r));
+
+ SysTryReturnResult(NID_CNT, _FileImpl::IsFileExist(changedPath), E_FILE_NOT_FOUND,
"The file corresponding to contentId could not be found.");
val = media_info_delete_from_db(pContentId.get());
SysTryReturnResult(NID_CNT, val == MEDIA_CONTENT_ERROR_NONE, ConvertError(val),
"media_info_delete_From_db failed[%d].", val);
- r = _FileImpl::Remove(contentPath);
+ r = _FileImpl::Remove(changedPath);
SysTryReturnResult(NID_CNT, !IsFailed(r), E_INVALID_ARG, "The file is not deleted.");
return r;
_ContentInfoImpl* pContentInfoImpl) const
{
ClearLastResult();
+ result r = E_SUCCESS;
SysTryReturn(NID_CNT, pContentInfoImpl != null, UuId::GetInvalidUuId(), E_INVALID_ARG,
"[E_INVALID_ARG] Invalid argument is used. ContentInfo is invalid.");
+ String contentPath(pContentInfoImpl->GetPhysicalContentPath());
+ String changedPath(L"");
+
+ r = ChangeTizenPathToCompat(contentPath, changedPath);
+ SysTryReturn(NID_CNT, !IsFailed(r), UuId::GetInvalidUuId(), r,
+ "[%s] Failed to perform ChangeTizenPathToCompat.", GetErrorMessage(r));
+
String mimeType(L"");
- String extension = _FileImpl::GetFileExtension(pContentInfoImpl->GetContentPath());
- result r = GetLastResult();
+ String extension = _FileImpl::GetFileExtension(changedPath);
+ r = GetLastResult();
if (IsFailed(r))
{
ClearLastResult();
SysLog(NID_CNT, "[%s] Failed to perform GetFileExtension operation.", GetErrorMessage(r));
- unique_ptr<char[]> pTempPath(_StringConverter::CopyToCharArrayN(pContentInfoImpl->GetContentPath()));
+ unique_ptr<char[]> pTempPath(_StringConverter::CopyToCharArrayN(contentPath));
SysTryReturn(NID_CNT, pTempPath != null, UuId::GetInvalidUuId(), E_OUT_OF_MEMORY,
"[E_OUT_OF_MEMORY] The memory is insufficient.");
{
SysLog(NID_CNT, "The format of content is jpg.");
- ImageMetadata* pImageMetadata = _ContentManagerUtilImpl::GetImageMetaN(pContentInfoImpl->GetContentPath(), true);
+ ImageMetadata* pImageMetadata = _ContentManagerUtilImpl::GetImageMetaN(changedPath, true);
if (pImageMetadata != null)
{
pContentInfoImpl->SetLatitude(pImageMetadata->GetLatitude());
String strFilePath(pStrValue.get());
- // If the api version is 2.0, the content path has to be changed.
- if (_AppInfo::GetApiVersion() == _API_VERSION_2_0 && _AppInfo::IsOspCompat())
- {
- if (strFilePath.StartsWith(Environment::GetMediaPath(), 0))
- {
- r = strFilePath.Replace(Environment::GetMediaPath(), OSP_MEDIA_PHONE);
- SysTryReturnResult(NID_CNT, !IsFailed(r), E_INVALID_ARG, "The content path is not changed.");
- }
- else if (strFilePath.StartsWith(Environment::GetExternalStoragePath(), 0))
- {
- r = strFilePath.Replace(Environment::GetExternalStoragePath(), OSP_MEDIA_MMC);
- SysTryReturnResult(NID_CNT, !IsFailed(r), E_INVALID_ARG, "Replace failed.");
- }
- else
- {
- SysLogException(NID_CNT, E_INVALID_ARG,
- "[E_INVALID_ARG] The content path is not supported.");
- return E_INVALID_ARG;
- }
- }
-
pContentInfoImpl->SetContentPath(strFilePath);
-
- SysSecureLog(NID_CNT, "INFO: contentPath[%ls]", strFilePath.GetPointer());
+ SysSecureLog(NID_CNT, "INFO: contentPath[%ls]", (pContentInfoImpl->GetContentPath()).GetPointer());
}
// mimeType
String thumbnailPath(pStrValue.get());
pContentInfoImpl->SetThumbnailPath(thumbnailPath);
-
SysLog(NID_CNT, "INFO: thumbnailPath[%ls]", (pContentInfoImpl->GetThumbnailPath()).GetPointer());
}
}
bool
-_ContentManagerImpl::VerifyMediaFilePathCompatibility(const String& contentPath, bool checkVersion) const
+_ContentManagerImpl::VerifyMediaFilePathCompatibility(const String& contentPath) const
{
ClearLastResult();
- result r = E_SUCCESS;
-
if (!_AppInfo::IsOspCompat())
{
- if (contentPath.StartsWith(OSP_MEDIA_PHONE, 0) || contentPath.StartsWith(OSP_MEDIA_MMC, 0))
- {
- SysLogException(NID_CNT, E_INVALID_ARG, "[E_INVALID_ARG] /Media or /Storagecard/Media is not supported.");
- return false;
- }
if (!(contentPath.StartsWith(Environment::GetMediaPath(), 0) ||
contentPath.StartsWith(Environment::GetExternalStoragePath(), 0)))
{
- SysLogException(NID_CNT, E_INVALID_ARG, "[E_INVALID_ARG] This path is not supported.");
+ SysLogException(NID_CNT, E_INVALID_ARG, "[%s] This path is not supported.", GetErrorMessage(E_INVALID_ARG));
return false;
}
}
else
{
- String tempPath(contentPath);
-
// prior to 2.0
- if (contentPath.StartsWith(OSP_MEDIA_PHONE, 0))
- {
- r = tempPath.Replace(OSP_MEDIA_PHONE, Environment::GetMediaPath());
- SysTryReturn(NID_CNT, !IsFailed(r), false, E_INVALID_ARG, "[E_INVALID_ARG] Replace failed.");
- }
- else if (contentPath.StartsWith(OSP_MEDIA_MMC, 0))
+ if (!(contentPath.StartsWith(OSP_MEDIA_PHONE, 0)) ||
+ (contentPath.StartsWith(OSP_MEDIA_MMC, 0)))
{
- r = tempPath.Replace(OSP_MEDIA_MMC, Environment::GetExternalStoragePath());
- SysTryReturn(NID_CNT, !IsFailed(r), false, E_INVALID_ARG, "[E_INVALID_ARG] Replace failed.");
- }
- else
- {
- // CreateContent(const ByteBuffer&, ...) and CreateContent (const Sring&, ...) can receive old path like /Media/.
- // but CreateContent(const ContentInfo&) always receive new path like /opt/media/ because ContentInfo class convert the path from /Media/ to /opt/media.
- if (!checkVersion)
- {
- SysLogException(NID_CNT, E_INVALID_ARG,
- "[E_INVALID_ARG] The path should start with /Home, /Media, or /Storagecard/Media.");
- return false;
- }
+ SysLogException(NID_CNT, E_INVALID_ARG, "[%s] The path should start with /Media, or /Storagecard/Media.", GetErrorMessage(E_INVALID_ARG));
+ return false;
}
}
return true;
}
+result
+_ContentManagerImpl::ChangeTizenPathToCompat(const String& contentPath, String& changedPath) const
+{
+ result r = E_SUCCESS;
+ changedPath = contentPath;
+
+ // If the api version is 2.0, the content path has to be changed.
+ if (_AppInfo::GetApiVersion() == _API_VERSION_2_0 && _AppInfo::IsOspCompat())
+ {
+ r = _FileImpl::ConvertPhysicalToVirtualPath(contentPath, changedPath);
+ SysTryReturnResult(NID_CNT, !IsFailed(r), E_INVALID_ARG,
+ "[%s] Failed to convert physical path to virtual path.", GetErrorMessage(E_INVALID_ARG));
+ }
+
+ return r;
+}
+
+result
+_ContentManagerImpl::ChangeCompatPathToTizen(const String& contentPath, String& changedPath) const
+{
+ result r = E_SUCCESS;
+ changedPath = contentPath;
+
+ // If the api version is 2.0, the content path has to be changed.
+ if (_AppInfo::GetApiVersion() == _API_VERSION_2_0 && _AppInfo::IsOspCompat())
+ {
+ r = _FileImpl::ConvertVirtualToPhysicalPath(contentPath, changedPath);
+ SysTryReturnResult(NID_CNT, !IsFailed(r), E_INVALID_ARG,
+ "[%s] Failed to convert virtual path to physical path.", GetErrorMessage(E_INVALID_ARG));
+ }
+
+ return r;
+}
+
void
_ContentManagerImpl::SetListener(IContentUpdateEventListener* pListener)
{
pMetadata->height = dim.height;
pMetadata->contentPath = contentPath;
+ String tizenPath(L"");
+ String changedPath(L"");
+ r = ChangeMediaFilePath(contentPath, tizenPath, changedPath);
+ SysTryReturn(NID_CNT, r == E_SUCCESS, null, r, "[%s] Failed to perform ChangeMediaFilePath.", GetErrorMessage(r));
+
if (imgType == IMG_FORMAT_JPG)
{
- unique_ptr<char[]> pFileName(_StringConverter::CopyToCharArrayN(contentPath));
+ unique_ptr<char[]> pFileName(_StringConverter::CopyToCharArrayN(tizenPath));
SysTryReturn(NID_CNT, pFileName != null, null, E_OUT_OF_MEMORY,
"[E_OUT_OF_MEMORY] The memory is insufficient.");
pMetadata->contentPath = contentPath;
+ String tizenPath(L"");
+ String changedPath(L"");
+ result r = ChangeMediaFilePath(contentPath, tizenPath, changedPath);
+ SysTryReturn(NID_CNT, r == E_SUCCESS, null, r, "[%s] Failed to perform ChangeMediaFilePath.", GetErrorMessage(r));
+
// Create the metadata extractor handle
metadata_extractor_h tempExtractor = NULL;
int retVal = metadata_extractor_create(&tempExtractor);
- result r = ErrorMapToRetVal(retVal);
+ r = ErrorMapToRetVal(retVal);
SysTryReturn(NID_CNT, retVal == METADATA_EXTRACTOR_ERROR_NONE, null, r,
"[%s] metadata_extractor_create failed.", GetErrorMessage(r));
"[E_OUT_OF_MEMORY] The memory is insufficient.");
// Set file path of content to extract the metadata
- unique_ptr<char[]> pFileName(_StringConverter::CopyToCharArrayN(contentPath));
+ unique_ptr<char[]> pFileName(_StringConverter::CopyToCharArrayN(tizenPath));
SysTryReturn(NID_CNT, pFileName != null, null, E_OUT_OF_MEMORY,
"[E_OUT_OF_MEMORY] The memory is insufficient.");
pMetadata->contentPath = contentPath;
+ String tizenPath(L"");
+ String changedPath(L"");
+ result r = ChangeMediaFilePath(contentPath, tizenPath, changedPath);
+ SysTryReturn(NID_CNT, r == E_SUCCESS, null, r, "[%s] Failed to perform ChangeMediaFilePath.", GetErrorMessage(r));
+
// Create the metadata extractor handle
metadata_extractor_h tempExtractor = NULL;
int retVal = metadata_extractor_create(&tempExtractor);
- result r = ErrorMapToRetVal(retVal);
+ r = ErrorMapToRetVal(retVal);
SysTryReturn(NID_CNT, retVal == METADATA_EXTRACTOR_ERROR_NONE, null, r,
"[%s] metadata_extractor_create failed.", GetErrorMessage(r));
"[E_OUT_OF_MEMORY] The memory insufficient.");
// Set file path of content to extract the metadata
- unique_ptr<char[]> pFileName(_StringConverter::CopyToCharArrayN(contentPath));
+ unique_ptr<char[]> pFileName(_StringConverter::CopyToCharArrayN(tizenPath));
SysTryReturn(NID_CNT, pFileName != null, null, E_OUT_OF_MEMORY,
"[E_OUT_OF_MEMORY] The memory is insufficient.");
SysTryReturn(NID_CNT, VerifyFilePathCompatibility(contentPath), contentType, E_INVALID_ARG,
"[E_INVALID_ARG] The path is not compatible.");
}
- SysTryReturn(NID_CNT, contentPath.GetLength() != 0, contentType, E_INVALID_ARG,
+
+ String tizenPath(L"");
+ String changedPath(L"");
+ result r = ChangeMediaFilePath(contentPath, tizenPath, changedPath);
+ SysTryReturn(NID_CNT, !IsFailed(r), contentType, r, "[%s] Failed to perform ChangeMediaFilePathCompat.", GetErrorMessage(r));
+
+ SysTryReturn(NID_CNT, changedPath.GetLength() != 0, contentType, E_INVALID_ARG,
"[E_INVALID_ARG] The length of contentPath is 0.");
- SysTryReturn(NID_CNT, _FileImpl::IsFileExist(contentPath), contentType, E_FILE_NOT_FOUND,
+ SysTryReturn(NID_CNT, _FileImpl::IsFileExist(changedPath), contentType, E_FILE_NOT_FOUND,
"[E_FILE_NOT_FOUND] The file corresponding to contentPath could not be found.");
- String fileExt = _FileImpl::GetFileExtension(contentPath);
- result r = GetLastResult();
+ String fileExt = _FileImpl::GetFileExtension(changedPath);
+ r = GetLastResult();
if (!IsFailed(r))
{
SysLog(NID_CNT, "[%s] Failed to perform GetFileExtension operation.", GetErrorMessage(r));
- unique_ptr<char[]> pTempPath(_StringConverter::CopyToCharArrayN(contentPath));
+ unique_ptr<char[]> pTempPath(_StringConverter::CopyToCharArrayN(tizenPath));
SysTryReturn(NID_CNT, pTempPath != null, contentType, E_OUT_OF_MEMORY,
"[E_OUT_OF_MEMORY] The memory is insufficient.");
{
if (mimeType == L"video/3gpp" || mimeType == L"video/mp4")
{
- return CheckStream(contentPath);
+ return CheckStream(tizenPath);
}
return CONTENT_TYPE_VIDEO;
}
return r;
}
+result
+_ContentManagerUtilImpl::ChangeMediaFilePath(const String& contentPath, String& tizenPath, String& changedPath)
+{
+ result r = E_SUCCESS;
+
+ tizenPath = contentPath;
+ changedPath = contentPath;
+
+ // If the api version is 2.0, the content path has to be changed.
+ if (_AppInfo::GetApiVersion() == _API_VERSION_2_0 && _AppInfo::IsOspCompat())
+ {
+ if ((contentPath.StartsWith(Environment::GetMediaPath(), 0)) || (contentPath.StartsWith(Environment::GetExternalStoragePath(), 0)))
+ {
+ tizenPath = contentPath;
+
+ r = _FileImpl::ConvertPhysicalToVirtualPath(contentPath, changedPath);
+ SysTryReturnResult(NID_CNT, !IsFailed(r), E_INVALID_ARG,
+ "[%s] Failed to convert physical path to virtual path.", GetErrorMessage(E_INVALID_ARG));
+ }
+ else if ((contentPath.StartsWith(OSP_MEDIA_PHONE, 0)) || (contentPath.StartsWith(OSP_MEDIA_MMC, 0)) || (contentPath.StartsWith(OSP_HOME, 0)))
+ {
+ changedPath = contentPath;
+
+ r = _FileImpl::ConvertVirtualToPhysicalPath(contentPath, tizenPath);
+ SysTryReturnResult(NID_CNT, !IsFailed(r), E_INVALID_ARG,
+ "[%s] Failed to convert virtual path to physical path.", GetErrorMessage(E_INVALID_ARG));
+ }
+ else
+ {
+ SysLogException(NID_CNT, E_INVALID_ARG, "[%s] The path is not supported.", GetErrorMessage(E_INVALID_ARG));
+ return E_INVALID_ARG;
+ }
+ }
+
+ return r;
+}
+
}}
#include <FBaseUtilStringTokenizer.h>
#include <FCntContentSearch.h>
#include <FCntContentSearchResult.h>
+#include <FSysEnvironment.h>
+#include <FApp_AppInfo.h>
#include <FBase_StringConverter.h>
#include <FBase_LocalizedNumParser.h>
+#include <FIo_FileImpl.h>
#include "FCnt_ContentUtility.h"
#include "FCnt_ContentSearchImpl.h"
#include "FCnt_ContentInfoImpl.h"
#include "FCnt_OtherContentInfoImpl.h"
#include "FCnt_ContentInfoHelper.h"
+using namespace Tizen::App;
using namespace Tizen::Base;
using namespace Tizen::Base::Collection;
using namespace Tizen::Base::Utility;
using namespace Tizen::Io;
+using namespace Tizen::System;
namespace Tizen { namespace Content
{
int maxCols = 0;
int indexOf = 0;
-
+
String strToBeReplaced(L"\\'");
int strLen = strToBeReplaced.GetLength();
int startIndex = 0;
SysTryReturnResult(NID_CNT, r == E_SUCCESS, r, "Failed to parse DateTime.");
int year = dt.GetYear();
- int month = dt.GetMonth();
+ int month = dt.GetMonth();
int day = dt.GetDay();
int hour = dt.GetHour();
- int minute = dt.GetMinute();
+ int minute = dt.GetMinute();
int second = dt.GetSecond();
-
+
time_t rawTime;
struct tm* timeInfo;
pMediaPath.reset(pTempPath);
String contentPath(pMediaPath.get());
+ String changedPath(contentPath);
+
+ // If the api version is 2.0, the content path has to be changed.
+ if (_AppInfo::GetApiVersion() == _API_VERSION_2_0 && _AppInfo::IsOspCompat())
+ {
+ r = _FileImpl::ConvertPhysicalToVirtualPath(contentPath, changedPath);
+ SysTryReturnResult(NID_CNT, !IsFailed(r), E_INVALID_ARG,
+ "[%s] Failed to convert physical path to virtual path.", GetErrorMessage(E_INVALID_ARG));
+ }
switch (mediaType)
{
pOtherContentInfo = std::unique_ptr<OtherContentInfo>(new (std::nothrow) OtherContentInfo);
SysTryReturnResult(NID_CNT, pOtherContentInfo.get() != null, E_OUT_OF_MEMORY, "Failed to create pOtherContentInfo.");
- r = pOtherContentInfo->Construct(&contentPath);
+ r = pOtherContentInfo->Construct(&changedPath);
r = ConvertErrorToResult(r);
SysTryReturnResult(NID_CNT, !IsFailed(r), r, "Failed to perform Construct operation to OtherContentInfo.");
pImageContentInfo = std::unique_ptr<ImageContentInfo>(new (std::nothrow) ImageContentInfo);
SysTryReturnResult(NID_CNT, pImageContentInfo.get() != null, E_OUT_OF_MEMORY, "Failed to create pImageContentInfo.");
- r = pImageContentInfo->Construct(&contentPath);
+ r = pImageContentInfo->Construct(&changedPath);
r = ConvertErrorToResult(r);
SysTryReturnResult(NID_CNT, !IsFailed(r), r, "Failed to perform Construct operation to ImageContentInfo.");
pAudioContentInfo = std::unique_ptr<AudioContentInfo>(new (std::nothrow) AudioContentInfo);
SysTryReturnResult(NID_CNT, pAudioContentInfo.get() != null, E_OUT_OF_MEMORY, "Failed to create pAudioContentInfo.");
- r = pAudioContentInfo->Construct(&contentPath);
+ r = pAudioContentInfo->Construct(&changedPath);
r = ConvertErrorToResult(r);
SysTryReturnResult(NID_CNT, !IsFailed(r), r, "Failed to perform Construct operation to AudioContentInfo.");
pVideoContentInfo = std::unique_ptr<VideoContentInfo>(new (std::nothrow) VideoContentInfo);
SysTryReturnResult(NID_CNT, pVideoContentInfo.get() != null, E_OUT_OF_MEMORY, "Failed to create pVideoContentInfo.");
- r = pVideoContentInfo->Construct(&contentPath);
+ r = pVideoContentInfo->Construct(&changedPath);
r = ConvertErrorToResult(r);
SysTryReturnResult(NID_CNT, !IsFailed(r), r, "Failed to perform Construct operation to VideoContentInfo.");
totalPageCount = (totalCount / countPerPage) + 1;
}
- if ((pageNo < 1) || (pageNo > totalPageCount))
- {
- r = E_INVALID_ARG;
- SysTryReturnResult(NID_CNT, !IsFailed(r), r, "(pageNo < 1) || (pageNo > totalPageCount).");
- }
+ SysTryReturnResult(NID_CNT, ((pageNo >= 1) && (pageNo <= totalPageCount)) , r, "(pageNo < 1) || (pageNo > totalPageCount).");
offset = (pageNo * countPerPage) - countPerPage;
_ImageContentInfoImpl::Construct(const String& contentPath, const String& thumbnailPath, bool setGps)
{
result r = E_SUCCESS;
- int contentLength = 0;
- FileAttributes attribute;
+ String tempPath(contentPath);
+
+ if (_AppInfo::GetApiVersion() == _API_VERSION_2_0 && _AppInfo::IsOspCompat())
+ {
+ if (contentPath.StartsWith(OSP_MEDIA_PHONE, 0))
+ {
+ // Because the content path is saved like /opt/media or /opt/storage/sdcard/ in SLP database,
+ // it should be converted in 2.0.
+ r = tempPath.Replace(OSP_MEDIA_PHONE, Environment::GetMediaPath());
+ SysTryReturnResult(NID_CNT, !IsFailed(r), E_INVALID_ARG, "Construct() failed.");
+ }
+ else if (contentPath.StartsWith(OSP_MEDIA_MMC, 0))
+ {
+ r = tempPath.Replace(OSP_MEDIA_MMC, Environment::GetExternalStoragePath());
+ SysTryReturnResult(NID_CNT, !IsFailed(r), E_INVALID_ARG, "Construct() failed.");
+ }
+ else
+ {
+ SysLogException(NID_CNT, E_INVALID_ARG,
+ "[E_INVALID_ARG] The contentPath should start with /Media or /Storagecard/Media.");
+ return E_INVALID_ARG;
+ }
+ }
// checks parameters
- contentLength = contentPath.GetLength();
SysTryReturnResult(NID_CNT, _FileImpl::IsMediaPath(contentPath), E_INVALID_ARG,
"The contentPath should start with /Media or /Storagecard/Media.");
SysTryReturnResult(NID_CNT, File::IsFileExist(contentPath), E_FILE_NOT_FOUND,
SysLog(NID_CNT, "The setGps is not supported.");
}
- SetContentPath(contentPath);
+ SetContentPath(tempPath);
SetContentType(CONTENT_TYPE_IMAGE);
return r;
int length = contentPath.GetLength();
SysTryReturnResult(NID_CNT, length != 0, E_INVALID_ARG,
"The length of pContentPath is 0.");
- SysTryReturnResult(NID_CNT, File::IsFileExist(contentPath), E_FILE_NOT_FOUND,
+ SysTryReturnResult(NID_CNT, File::IsFileExist(*pContentPath), E_FILE_NOT_FOUND,
"The file corresponding to pContentPath could not be found.");
SetContentPath(contentPath);
_OtherContentInfoImpl::Construct(const String& contentPath, const String& thumbnailPath, bool setGps)
{
result r = E_SUCCESS;
- int contentLength = 0;
- FileAttributes attribute;
+ String tempPath(contentPath);
+
+ if (_AppInfo::GetApiVersion() == _API_VERSION_2_0 && _AppInfo::IsOspCompat())
+ {
+ if (contentPath.StartsWith(OSP_MEDIA_PHONE, 0))
+ {
+ // Because the content path is saved like /opt/media or /opt/storage/sdcard/ in SLP database,
+ // it should be converted in 2.0.
+ r = tempPath.Replace(OSP_MEDIA_PHONE, Environment::GetMediaPath());
+ SysTryReturnResult(NID_CNT, !IsFailed(r), E_INVALID_ARG, "Construct() failed.");
+ }
+ else if (contentPath.StartsWith(OSP_MEDIA_MMC, 0))
+ {
+ r = tempPath.Replace(OSP_MEDIA_MMC, Environment::GetExternalStoragePath());
+ SysTryReturnResult(NID_CNT, !IsFailed(r), E_INVALID_ARG, "Construct() failed.");
+ }
+ else
+ {
+ SysLogException(NID_CNT, E_INVALID_ARG,
+ "[E_INVALID_ARG] The contentPath should start with /Media or /Storagecard/Media.");
+ return E_INVALID_ARG;
+ }
+ }
// checks parameters
- contentLength = contentPath.GetLength();
SysTryReturnResult(NID_CNT, _FileImpl::IsMediaPath(contentPath), E_INVALID_ARG,
"The contentPath should start with /Media or /Storagecard/Media.");
SysTryReturnResult(NID_CNT, File::IsFileExist(contentPath), E_FILE_NOT_FOUND,
SysLog(NID_CNT, "The setGps is not supported.");
}
- SetContentPath(contentPath);
+ SetContentPath(tempPath);
SetContentType(CONTENT_TYPE_OTHER);
return r;
int length = contentPath.GetLength();
SysTryReturnResult(NID_CNT, length != 0, E_INVALID_ARG,
"The length of pContentPath is 0.");
- SysTryReturnResult(NID_CNT, File::IsFileExist(contentPath), E_FILE_NOT_FOUND,
+ SysTryReturnResult(NID_CNT, File::IsFileExist(*pContentPath), E_FILE_NOT_FOUND,
"The file corresponding to pContentPath could not be found.");
SetContentPath(contentPath);
_VideoContentInfoImpl::Construct(const String& contentPath, const String& thumbnailPath, bool setGps)
{
result r = E_SUCCESS;
- int contentLength = 0;
- FileAttributes attribute;
+ String tempPath(contentPath);
+
+ if (_AppInfo::GetApiVersion() == _API_VERSION_2_0 && _AppInfo::IsOspCompat())
+ {
+ if (contentPath.StartsWith(OSP_MEDIA_PHONE, 0))
+ {
+ // Because the content path is saved like /opt/media or /opt/storage/sdcard/ in SLP database,
+ // it should be converted in 2.0.
+ r = tempPath.Replace(OSP_MEDIA_PHONE, Environment::GetMediaPath());
+ SysTryReturnResult(NID_CNT, !IsFailed(r), E_INVALID_ARG, "Construct() failed.");
+ }
+ else if (contentPath.StartsWith(OSP_MEDIA_MMC, 0))
+ {
+ r = tempPath.Replace(OSP_MEDIA_MMC, Environment::GetExternalStoragePath());
+ SysTryReturnResult(NID_CNT, !IsFailed(r), E_INVALID_ARG, "Construct() failed.");
+ }
+ else
+ {
+ SysLogException(NID_CNT, E_INVALID_ARG,
+ "[E_INVALID_ARG] The contentPath should start with /Media or /Storagecard/Media.");
+ return E_INVALID_ARG;
+ }
+ }
// checks parameters
- contentLength = contentPath.GetLength();
SysTryReturnResult(NID_CNT, _FileImpl::IsMediaPath(contentPath), E_INVALID_ARG,
"The contentPath should start with /Media or /Storagecard/Media.");
SysTryReturnResult(NID_CNT, File::IsFileExist(contentPath), E_FILE_NOT_FOUND,
SysLog(NID_CNT, "The setGps is not supported.");
}
- SetContentPath(contentPath);
+ SetContentPath(tempPath);
SetContentType(CONTENT_TYPE_VIDEO);
return r;
int length = contentPath.GetLength();
SysTryReturnResult(NID_CNT, length != 0, E_INVALID_ARG,
"The length of pContentPath is 0.");
- SysTryReturnResult(NID_CNT, File::IsFileExist(contentPath), E_FILE_NOT_FOUND,
+ SysTryReturnResult(NID_CNT, File::IsFileExist(*pContentPath), E_FILE_NOT_FOUND,
"The file corresponding to pContentPath could not be found.");
SetContentPath(contentPath);
Tizen::Base::String GetContentName(void) const;
- virtual Tizen::Base::String GetContentPath(void) const;
+ Tizen::Base::String GetContentPath(void) const;
+
+ Tizen::Base::String GetPhysicalContentPath(void) const;
Tizen::Base::String GetLocationTag(void) const;
void SetModifiedTime(const Tizen::Base::DateTime& modifiedTime);
+ result GetCompatContentPath(const Tizen::Base::String& contentPath, Tizen::Base::String& changedPath) const;
+
static _ContentInfoImpl* GetInstance(ContentInfo& contentInfo);
static const _ContentInfoImpl* GetInstance(const ContentInfo& contentInfo);
result MakeImageContentInfo(const media_info_h pMediaInfo, void* pInfoImpl) const;
result MakeAudioContentInfo(const media_info_h pMediaInfo, void* pInfoImpl) const;
result MakeVideoContentInfo(const media_info_h pMediaInfo, void* pInfoImpl) const;
- bool VerifyMediaFilePathCompatibility(const Tizen::Base::String& contentPath, bool checkVersion) const;
+ bool VerifyMediaFilePathCompatibility(const Tizen::Base::String& contentPath) const;
bool VerifyHomeFilePathCompatibility(const Tizen::Base::String& contentPath) const;
+ result ChangeTizenPathToCompat(const Tizen::Base::String& contentPath, Tizen::Base::String& changedPath) const;
+ result ChangeCompatPathToTizen(const Tizen::Base::String& contentPath, Tizen::Base::String& changedPath) const;
+
+
result ConvertErrorToResult(result res) const;
_ContentManagerImpl& operator =(const _ContentManagerImpl& rhs);
_ContentManagerUtilImpl& operator =(const _ContentManagerUtilImpl& rhs);
static result ErrorMapToRetVal(int retVal);
static ContentType CheckStream(const Tizen::Base::String& contentPath);
+ static result ChangeMediaFilePath(const Tizen::Base::String& contentPath, Tizen::Base::String& tizenPath, Tizen::Base::String& changedPath);
}; // class _ContentManagerUtilImpl