From 99b48786607dc3da9b4322f1802e4aa7528b791c Mon Sep 17 00:00:00 2001 From: Seokpil Park Date: Mon, 12 Aug 2013 19:43:49 +0900 Subject: [PATCH] Add Extension Properties Change-Id: Ia629078dad06686f05cf535833372d2b49640890 Signed-off-by: Seokpil Park --- CMakeLists.txt | 31 ++++---- src/FCnt_ContentInfoImpl.cpp | 26 +++++-- src/FCnt_ContentManagerImpl.cpp | 115 ++++++++++++++++++++++++++++ src/FCnt_ContentUtility.cpp | 146 ++++++++++++++++++++++++++++++------ src/FCnt_ImageContentInfoImpl.cpp | 38 ++++++++++ src/inc/FCnt_ContentInfoImpl.h | 7 ++ src/inc/FCnt_ImageContentInfoImpl.h | 15 ++++ 7 files changed, 330 insertions(+), 48 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 61e3319..3138938 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,18 +4,19 @@ SET (this_target osp-content) SET(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/cmake_build_tmp/output) +SET(pc_requires "osp-appfw osp-uifw osp-image osp-media osp-net chromium glib-2.0 aul capi-content-media-content capi-media-metadata-extractor capi-content-mime-type") + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs REQUIRED ${pc_requires}) +FOREACH(flag ${pkgs_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + INCLUDE_DIRECTORIES( inc src src/inc - /usr/include/appfw /usr/include/curl - /usr/include/glib-2.0 - /usr/lib/glib-2.0/include - /usr/include/content - /usr/include/media - /usr/include/media-content - /usr/include/osp /usr/include/osp/base /usr/include/osp/io /usr/include/osp/media @@ -87,19 +88,9 @@ ADD_LIBRARY (${this_target} SHARED ${${this_target}_SOURCE_FILES}) ## SET LINKER FLAGS SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,--as-needed") -TARGET_LINK_LIBRARIES(${this_target} "-lchromium" ) -TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp -losp-appfw" ) -TARGET_LINK_LIBRARIES(${this_target} "-losp-uifw" ) -TARGET_LINK_LIBRARIES(${this_target} "-losp-net" ) -TARGET_LINK_LIBRARIES(${this_target} "-losp-image" ) -TARGET_LINK_LIBRARIES(${this_target} "-losp-media") +TARGET_LINK_LIBRARIES(${this_target} ${pkgs_LDFLAGS}) TARGET_LINK_LIBRARIES(${this_target} "-losp-locations") -TARGET_LINK_LIBRARIES(${this_target} "-lglib-2.0" ) TARGET_LINK_LIBRARIES(${this_target} "-lexif" ) -TARGET_LINK_LIBRARIES(${this_target} "-laul" ) -TARGET_LINK_LIBRARIES(${this_target} "-lcapi-content-media-content") -TARGET_LINK_LIBRARIES(${this_target} "-lcapi-media-metadata-extractor") -TARGET_LINK_LIBRARIES(${this_target} "-lcapi-content-mime-type") TARGET_LINK_LIBRARIES(${this_target} "-lcapi-web-url-download") TARGET_LINK_LIBRARIES(${this_target} "-lpthread") @@ -133,5 +124,9 @@ INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/inc/ DESTINATION include/osp FILES_MATCHIN INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/src/inc/ DESTINATION include/osp/content FILES_MATCHING PATTERN "*.h") # pkgconfig file +SET(PC_NAME ${this_target}) +SET(VERSION ${FULLVER}) +SET(PC_REQUIRED ${pc_requires}) +SET(PC_LDFLAGS "-l${this_target} -pthread") CONFIGURE_FILE(${this_target}.pc.in ${CMAKE_SOURCE_DIR}/${this_target}.pc @ONLY) INSTALL(FILES ${CMAKE_SOURCE_DIR}/${this_target}.pc DESTINATION lib/pkgconfig) diff --git a/src/FCnt_ContentInfoImpl.cpp b/src/FCnt_ContentInfoImpl.cpp index c3874f2..2c0b6e9 100644 --- a/src/FCnt_ContentInfoImpl.cpp +++ b/src/FCnt_ContentInfoImpl.cpp @@ -88,7 +88,7 @@ _ContentInfoImpl::GetInstance(const ContentInfo& contentInfo) } result -_ContentInfoImpl::Construct(const Tizen::Base::String& contentPath, const Tizen::Base::String& thumbnailPath, bool setGps) +_ContentInfoImpl::Construct(const String& contentPath, const String& thumbnailPath, bool setGps) { return E_SUCCESS; } @@ -335,25 +335,25 @@ _ContentInfoImpl::SetContentSize(unsigned long contentSize) } void -_ContentInfoImpl::SetMimeType(const Tizen::Base::String& mimeType) +_ContentInfoImpl::SetMimeType(const String& mimeType) { __mimeType = mimeType; } void -_ContentInfoImpl::SetDateTime(const Tizen::Base::DateTime& dateTime) +_ContentInfoImpl::SetDateTime(const DateTime& dateTime) { __dateTime = dateTime; } void -_ContentInfoImpl::SetContentPath(const Tizen::Base::String& contentPath) +_ContentInfoImpl::SetContentPath(const String& contentPath) { __contentPath = contentPath; } void -_ContentInfoImpl::SetMediaFormat(const Tizen::Base::String& mediaFormat) +_ContentInfoImpl::SetMediaFormat(const String& mediaFormat) { __mediaFormat = mediaFormat; } @@ -400,14 +400,14 @@ _ContentInfoImpl::SetAltitude(double altitude) __altitude = altitude; } -Tizen::Base::String +String _ContentInfoImpl::GetThumbnailPath(void) const { return __thumbnailPath; } void -_ContentInfoImpl::SetThumbnailPath(const Tizen::Base::String& thumbnailPath) +_ContentInfoImpl::SetThumbnailPath(const String& thumbnailPath) { __thumbnailPath = thumbnailPath; } @@ -418,4 +418,16 @@ _ContentInfoImpl::SetStorageType(int storageType) __storageType = storageType; } +DateTime +_ContentInfoImpl::GetModifiedTime(void) const +{ + return __modifiedTime; +} + +void +_ContentInfoImpl::SetModifiedTime(const DateTime& modifiedTime) +{ + __modifiedTime = modifiedTime; +} + }} diff --git a/src/FCnt_ContentManagerImpl.cpp b/src/FCnt_ContentManagerImpl.cpp index 2a77bd0..7e79bf5 100644 --- a/src/FCnt_ContentManagerImpl.cpp +++ b/src/FCnt_ContentManagerImpl.cpp @@ -25,8 +25,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -56,6 +58,7 @@ using namespace std; 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::Locations; using namespace Tizen::System; @@ -1346,6 +1349,20 @@ _ContentManagerImpl::MakeContentInfo(const media_info_h pMediaInfo, int systemTy pContentInfoImpl->SetDateTime(dt); SysLog(NID_CNT, "INFO: dateTime[%ls]", ((pContentInfoImpl->GetDateTime()).ToString()).GetPointer()); + // modifiedTime + time_t modifiedTime = 0; + val = media_info_get_modified_time(pMediaInfo, &modifiedTime); + SysTryReturnResult(NID_CNT, val == MEDIA_CONTENT_ERROR_NONE, ConvertError(val), + "media_info_get_modified_time failed[%d].", val); + + r = dt.SetValue(1970, 1, 1); + SysTryReturnResult(NID_CNT, !IsFailed(r), r, "Failed to perform datetime.SetValue operation."); + r = dt.AddSeconds(modifiedTime); + SysTryReturnResult(NID_CNT, !IsFailed(r), r, "Failed to perform datetime.AddSeconds operation."); + + pContentInfoImpl->SetModifiedTime(dt); + SysLog(NID_CNT, "INFO: modifiedTime[%ls]", ((pContentInfoImpl->GetModifiedTime()).ToString()).GetPointer()); + // thumbnailPath val = media_info_get_thumbnail_path(pMediaInfo, &pTempValue); SysTryReturnResult(NID_CNT, val == MEDIA_CONTENT_ERROR_NONE, ConvertError(val), @@ -1539,7 +1556,9 @@ _ContentManagerImpl::MakeContentInfo(const media_info_h pMediaInfo, int systemTy result _ContentManagerImpl::MakeImageContentInfo(const media_info_h pMediaInfo, void* pInfoImpl) const { + result r = E_SUCCESS; int intValue = 0; + bool boolValue = false; image_meta_h pTempMeta = null; unique_ptr pImageMeta(null); @@ -1619,6 +1638,102 @@ _ContentManagerImpl::MakeImageContentInfo(const media_info_h pMediaInfo, void* p SysLog(NID_CNT, "META: title[%ls]", fileName.GetPointer()); } + // dateTaken + val = image_meta_get_date_taken(*(pImageMeta.get()), &pTempValue); + SysTryReturnResult(NID_CNT, val == MEDIA_CONTENT_ERROR_NONE, ConvertError(val), + "image_meta_get_date_taken failed[%d].", val); + + DateTime dt; + + if (pTempValue != null) + { + pStrValue.reset(pTempValue); + String dateTaken(pStrValue.get()); + String newDateTaken(L""); + + String delim(L": "); + String token; + + String year(L""); + + StringTokenizer strTok(dateTaken, delim); + + r = strTok.GetNextToken(token); + SysTryReturnResult(NID_CNT, !IsFailed(r), E_INVALID_ARG, "Failed to perform GetNextToken operation."); + + year = token; + + // Append month + r = strTok.GetNextToken(token); + SysTryReturnResult(NID_CNT, !IsFailed(r), E_INVALID_ARG, "Failed to perform GetNextToken operation."); + + r = newDateTaken.Append(token); + SysTryReturnResult(NID_CNT, !IsFailed(r), E_OUT_OF_MEMORY, "Failed to perform Append operation."); + + r = newDateTaken.Append(L"/"); + SysTryReturnResult(NID_CNT, !IsFailed(r), E_OUT_OF_MEMORY, "Failed to perform Append operation."); + + // Append day + r = strTok.GetNextToken(token); + SysTryReturnResult(NID_CNT, !IsFailed(r), E_INVALID_ARG, "Failed to perform GetNextToken operation."); + + r = newDateTaken.Append(token); + SysTryReturnResult(NID_CNT, !IsFailed(r), E_OUT_OF_MEMORY, "Failed to perform Append operation."); + + r = newDateTaken.Append(L"/"); + SysTryReturnResult(NID_CNT, !IsFailed(r), E_OUT_OF_MEMORY, "Failed to perform Append operation."); + + // Append year + r = newDateTaken.Append(year); + SysTryReturnResult(NID_CNT, !IsFailed(r), E_OUT_OF_MEMORY, "Failed to perform Append operation."); + + r = newDateTaken.Append(L" "); + SysTryReturnResult(NID_CNT, !IsFailed(r), E_OUT_OF_MEMORY, "Failed to perform Append operation."); + + String newDelim(L" "); + + r = strTok.SetDelimiters(newDelim); + SysTryReturnResult(NID_CNT, !IsFailed(r), E_INVALID_ARG, "Failed to perform SetDelimiters operation."); + + r = strTok.GetNextToken(token); + SysTryReturnResult(NID_CNT, !IsFailed(r), E_INVALID_ARG, "Failed to perform GetNextToken operation."); + + r = newDateTaken.Append(token); + SysTryReturnResult(NID_CNT, !IsFailed(r), E_OUT_OF_MEMORY, "Failed to perform Append operation."); + + r = DateTime::Parse(newDateTaken, dt); + SysTryReturnResult(NID_CNT, !IsFailed(r), E_INVALID_ARG, "Failed to perform Parse operation for DateTime."); + } + else + { + dt = DateTime::GetMinValue(); + } + + pImageContentInfoImpl->SetImageTakenDate(dt); + SysLog(NID_CNT, "META: dateTaken[%ls]", dt.ToString().GetPointer()); + + // isBurstShot + val = image_meta_is_burst_shot(*(pImageMeta.get()), &boolValue); + SysTryReturnResult(NID_CNT, val == MEDIA_CONTENT_ERROR_NONE, ConvertError(val), + "image_meta_is_burst_shot failed[%d].", val); + + pImageContentInfoImpl->SetBurstShot(boolValue); + SysLog(NID_CNT, "META: isBurstShot[%d]", boolValue); + + // burstShotId + val = image_meta_get_burst_id(*(pImageMeta.get()), &pTempValue); + SysTryReturnResult(NID_CNT, val == MEDIA_CONTENT_ERROR_NONE, ConvertError(val), + "image_meta_get_burst_id failed[%d].", val); + + if (pTempValue != null) + { + pStrValue.reset(pTempValue); + String burstShotId(pStrValue.get()); + + pImageContentInfoImpl->SetBurstShotId(burstShotId); + SysLog(NID_CNT, "META: burstShotId[%ls]", burstShotId.GetPointer()); + } + return E_SUCCESS; } diff --git a/src/FCnt_ContentUtility.cpp b/src/FCnt_ContentUtility.cpp index f336259..68d3135 100644 --- a/src/FCnt_ContentUtility.cpp +++ b/src/FCnt_ContentUtility.cpp @@ -22,9 +22,11 @@ #include #include +#include #include #include #include +#include #include #include #include "FCnt_ContentUtility.h" @@ -35,6 +37,7 @@ using namespace Tizen::Base; using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Utility; using namespace Tizen::Locations; namespace Tizen { namespace Content @@ -91,6 +94,7 @@ _ContentUtility::FillContentData(media_info_h mediaHandle, _ContentInfoImpl* pIn unsigned long long contentSize = 0; time_t addedTime = 0; + time_t modifiedTime = 0; double latitude = 0; double longitude = 0; double altitude = 0; @@ -218,6 +222,9 @@ _ContentUtility::FillContentData(media_info_h mediaHandle, _ContentInfoImpl* pIn ret = media_info_get_added_time(mediaHandle, &addedTime); SysTryReturnResult(NID_CNT, ret == MEDIA_CONTENT_ERROR_NONE, MapCoreErrorToNativeResult(ret), "Failed to perform media_info_get_added_time operation."); + ret = media_info_get_modified_time(mediaHandle, &modifiedTime); + SysTryReturnResult(NID_CNT, ret == MEDIA_CONTENT_ERROR_NONE, MapCoreErrorToNativeResult(ret), "Failed to perform media_info_get_modified_time operation."); + ret = media_info_get_storage_type(mediaHandle, &storageType); SysTryReturnResult(NID_CNT, ret == MEDIA_CONTENT_ERROR_NONE, MapCoreErrorToNativeResult(ret), "Failed to perform media_info_get_storage_type operation."); @@ -397,6 +404,7 @@ _ContentUtility::FillContentData(media_info_h mediaHandle, _ContentInfoImpl* pIn break; } + // addedTime DateTime dt; r = dt.SetValue(1970, 1, 1); @@ -410,6 +418,18 @@ _ContentUtility::FillContentData(media_info_h mediaHandle, _ContentInfoImpl* pIn SysLog(NID_CNT, "addedTime = %ld", addedTime); SysLog(NID_CNT, "pContentInfoImpl->dateTime : %ls", (pInfoImpl->GetDateTime()).ToString().GetPointer()); + // modifiedTime + r = dt.SetValue(1970, 1, 1); + SysTryReturnResult(NID_CNT, r == E_SUCCESS, r, "Failed to perform datetime.SetValue operation."); + + r = dt.AddSeconds(modifiedTime);// need to check addedTime is secs/millisec + SysTryReturnResult(NID_CNT, r == E_SUCCESS, r, "Failed to perform datetime.AddSeconds operation."); + + pInfoImpl->SetModifiedTime(dt); + + SysLog(NID_CNT, "modifiedTime = %ld", modifiedTime); + SysLog(NID_CNT, "pContentInfoImpl->modifiedTime : %ls", (pInfoImpl->GetModifiedTime()).ToString().GetPointer()); + return r; } @@ -423,20 +443,10 @@ _ContentUtility::FillImageContentData(media_info_h mediaHandle, _ImageContentInf result r = E_SUCCESS; int width = 0; int height = 0; + bool isBurst = false; media_content_orientation_e orientation; - std::unique_ptr pDisplayName; + std::unique_ptr pStrValue; - char* pDisplayValue = null; - ret = media_info_get_display_name(mediaHandle, &pDisplayValue); - if (pDisplayValue != null) - { - pDisplayName.reset(pDisplayValue); - } - else - { - SysTryReturnResult(NID_CNT, ret == MEDIA_CONTENT_ERROR_NONE, MapCoreErrorToNativeResult(ret), "Failed to perform media_info_get_display_name operation."); - } - image_meta_h tempMeta = NULL; ret = media_info_get_image(mediaHandle, &tempMeta); @@ -454,15 +464,26 @@ _ContentUtility::FillImageContentData(media_info_h mediaHandle, _ImageContentInf ret = image_meta_get_height(pImageHandle.get(), &height); SysTryReturnResult(NID_CNT, ret == MEDIA_CONTENT_ERROR_NONE, MapCoreErrorToNativeResult(ret), "Failed to perform image_meta_get_height operation."); + ret = image_meta_is_burst_shot(pImageHandle.get(), &isBurst); + SysTryReturnResult(NID_CNT, ret == MEDIA_CONTENT_ERROR_NONE, MapCoreErrorToNativeResult(ret), "Failed to perform image_meta_is_burst_shot operation."); + pImageContentInfoImpl->SetWidth(width); pImageContentInfoImpl->SetHeight(height); pImageContentInfoImpl->SetOrientation(static_cast< ImageOrientationType >(orientation)); + pImageContentInfoImpl->SetBurstShot(isBurst); + + // title + char* pTempValue = null; + ret = media_info_get_display_name(mediaHandle, &pTempValue); + SysTryReturnResult(NID_CNT, ret == MEDIA_CONTENT_ERROR_NONE, MapCoreErrorToNativeResult(ret), "Failed to perform media_info_get_display_name operation."); - if (pDisplayName != NULL) + if (pTempValue != NULL) { + pStrValue.reset(pTempValue); + int pos = 0; String fileName = L""; - String strTitle(pDisplayName.get()); + String strTitle(pStrValue.get()); r = strTitle.LastIndexOf(L'.', strTitle.GetLength() - 1, pos); if (r == E_SUCCESS) @@ -480,6 +501,94 @@ _ContentUtility::FillImageContentData(media_info_h mediaHandle, _ImageContentInf SysLog(NID_CNT, "pImageContentInfoImpl->title = %ls", (pImageContentInfoImpl->GetTitle()).GetPointer()); } + // dateTaken + ret = image_meta_get_date_taken(pImageHandle.get(), &pTempValue); + SysTryReturnResult(NID_CNT, ret == MEDIA_CONTENT_ERROR_NONE, MapCoreErrorToNativeResult(ret), + "Failed to perform image_meta_get_date_taken operation."); + + DateTime dt; + + if (pTempValue != NULL) + { + pStrValue.reset(pTempValue); + String dateTaken(pStrValue.get()); + String newDateTaken(L""); + + String delim(L": "); + String token; + + String year(L""); + + StringTokenizer strTok(dateTaken, delim); + + r = strTok.GetNextToken(token); + SysTryReturnResult(NID_CNT, !IsFailed(r), E_INVALID_ARG, "Failed to perform GetNextToken operation."); + + year = token; + + // Append month + r = strTok.GetNextToken(token); + SysTryReturnResult(NID_CNT, !IsFailed(r), E_INVALID_ARG, "Failed to perform GetNextToken operation."); + + r = newDateTaken.Append(token); + SysTryReturnResult(NID_CNT, !IsFailed(r), E_OUT_OF_MEMORY, "Failed to perform Append operation."); + + r = newDateTaken.Append(L"/"); + SysTryReturnResult(NID_CNT, !IsFailed(r), E_OUT_OF_MEMORY, "Failed to perform Append operation."); + + // Append day + r = strTok.GetNextToken(token); + SysTryReturnResult(NID_CNT, !IsFailed(r), E_INVALID_ARG, "Failed to perform GetNextToken operation."); + + r = newDateTaken.Append(token); + SysTryReturnResult(NID_CNT, !IsFailed(r), E_OUT_OF_MEMORY, "Failed to perform Append operation."); + + r = newDateTaken.Append(L"/"); + SysTryReturnResult(NID_CNT, !IsFailed(r), E_OUT_OF_MEMORY, "Failed to perform Append operation."); + + // Append year + r = newDateTaken.Append(year); + SysTryReturnResult(NID_CNT, !IsFailed(r), E_OUT_OF_MEMORY, "Failed to perform Append operation."); + + r = newDateTaken.Append(L" "); + SysTryReturnResult(NID_CNT, !IsFailed(r), E_OUT_OF_MEMORY, "Failed to perform Append operation."); + + String newDelim(L" "); + + r = strTok.SetDelimiters(newDelim); + SysTryReturnResult(NID_CNT, !IsFailed(r), E_INVALID_ARG, "Failed to perform SetDelimiters operation."); + + r = strTok.GetNextToken(token); + SysTryReturnResult(NID_CNT, !IsFailed(r), E_INVALID_ARG, "Failed to perform GetNextToken operation."); + + r = newDateTaken.Append(token); + SysTryReturnResult(NID_CNT, !IsFailed(r), E_OUT_OF_MEMORY, "Failed to perform Append operation."); + + r = DateTime::Parse(newDateTaken, dt); + SysTryReturnResult(NID_CNT, !IsFailed(r), E_INVALID_ARG, "Failed to perform Parse operation for DateTime."); + } + else + { + dt = DateTime::GetMinValue(); + } + + pImageContentInfoImpl->SetImageTakenDate(dt); + SysLog(NID_CNT, "pImageContentInfoImpl->takenDate = %ls", dt.ToString().GetPointer()); + + // burstShotId + ret = image_meta_get_burst_id(pImageHandle.get(), &pTempValue); + SysTryReturnResult(NID_CNT, ret == MEDIA_CONTENT_ERROR_NONE, MapCoreErrorToNativeResult(ret), + "Failed to perform image_meta_get_burst_id operation."); + + if (pTempValue != NULL) + { + pStrValue.reset(pTempValue); + String burstShotId(pStrValue.get()); + + pImageContentInfoImpl->SetBurstShotId(burstShotId); + SysLog(NID_CNT, "pImageContentInfoImpl->burstShotId = %ls", burstShotId.GetPointer()); + } + return r; } @@ -774,15 +883,6 @@ _ContentUtility::FillVideoContentData(media_info_h mediaHandle, _VideoContentInf pVideoContentInfoImpl->SetDuration(duration); SysLog(NID_CNT,"pVideoContentInfoImpl->duration = %d", pVideoContentInfoImpl->GetDuration()); - // Get from metadata extractor (framerate, audio bitrate, video bitrate) - VideoMetadata* pVideoMetadata = ContentManagerUtil::GetVideoMetaN(pVideoContentInfoImpl->GetContentPath()); - r = GetLastResult(); - SysTryReturnResult(NID_CNT, pVideoMetadata != null, r, "GetVideoMetadata() failed."); - - pVideoContentInfoImpl->SetFramerate(pVideoMetadata->GetFramerate()); - pVideoContentInfoImpl->SetAudioBitrate(pVideoMetadata->GetAudioBitrate()); - pVideoContentInfoImpl->SetVideoBitrate(pVideoMetadata->GetVideoBitrate()); - return r; } diff --git a/src/FCnt_ImageContentInfoImpl.cpp b/src/FCnt_ImageContentInfoImpl.cpp index 5559904..c42a94f 100644 --- a/src/FCnt_ImageContentInfoImpl.cpp +++ b/src/FCnt_ImageContentInfoImpl.cpp @@ -41,8 +41,10 @@ namespace Tizen { namespace Content _ImageContentInfoImpl::_ImageContentInfoImpl(void) : __width(0) , __height(0) + , __isBurst(false) , __orientationType(IMAGE_ORIENTATION_TYPE_UNKNOWN) , __title(L"") + , __burstShotId(L"") { } @@ -171,6 +173,12 @@ _ImageContentInfoImpl::GetOrientation(void) const return __orientationType; } +DateTime +_ImageContentInfoImpl::GetImageTakenDate(void) const +{ + return __takenDate; +} + String _ImageContentInfoImpl::GetTitle(void) const { @@ -183,6 +191,18 @@ _ImageContentInfoImpl::GetTitle(void) const return __title; } +bool +_ImageContentInfoImpl::IsBurstShot(void) const +{ + return __isBurst; +} + +String +_ImageContentInfoImpl::GetBurstShotId(void) const +{ + return __burstShotId; +} + void _ImageContentInfoImpl::SetWidth(int width) { @@ -207,4 +227,22 @@ _ImageContentInfoImpl::SetOrientation(const ImageOrientationType& orientationTyp __orientationType = orientationType; } +void +_ImageContentInfoImpl::SetImageTakenDate(const DateTime& takenDate) +{ + __takenDate = takenDate; +} + +void +_ImageContentInfoImpl::SetBurstShot(const bool isBurst) +{ + __isBurst = isBurst; +} + +void +_ImageContentInfoImpl::SetBurstShotId(const String& burstShotId) +{ + __burstShotId = burstShotId; +} + }} diff --git a/src/inc/FCnt_ContentInfoImpl.h b/src/inc/FCnt_ContentInfoImpl.h index f5291fa..81a0bd4 100644 --- a/src/inc/FCnt_ContentInfoImpl.h +++ b/src/inc/FCnt_ContentInfoImpl.h @@ -36,6 +36,8 @@ class Bitmap; namespace Tizen { namespace Content { +class ContentInfo; + class _OSP_EXPORT_ _ContentInfoImpl : public Tizen::Base::Object { @@ -81,6 +83,8 @@ public: Tizen::Locations::Coordinates GetCoordinates(void) const; + Tizen::Base::DateTime GetModifiedTime(void) const; + bool IsDrmProtected(void) const; void SetContentId(const ContentId& contentId); @@ -135,6 +139,8 @@ public: void SetStorageType(int storageType); + void SetModifiedTime(const Tizen::Base::DateTime& modifiedTime); + static _ContentInfoImpl* GetInstance(ContentInfo& contentInfo); static const _ContentInfoImpl* GetInstance(const ContentInfo& contentInfo); @@ -150,6 +156,7 @@ private: ContentType __contentType; unsigned long __contentSize; Tizen::Base::DateTime __dateTime; + Tizen::Base::DateTime __modifiedTime; double __latitude; double __longitude; double __altitude; diff --git a/src/inc/FCnt_ImageContentInfoImpl.h b/src/inc/FCnt_ImageContentInfoImpl.h index cafd785..54df201 100644 --- a/src/inc/FCnt_ImageContentInfoImpl.h +++ b/src/inc/FCnt_ImageContentInfoImpl.h @@ -51,6 +51,12 @@ public: ImageOrientationType GetOrientation(void) const; + Tizen::Base::DateTime GetImageTakenDate(void) const; + + bool IsBurstShot(void) const; + + Tizen::Base::String GetBurstShotId(void) const; + void SetWidth(int width); void SetHeight(int height); @@ -59,6 +65,12 @@ public: void SetOrientation(const ImageOrientationType& orientationType); + void SetImageTakenDate(const Tizen::Base::DateTime& takenDate); + + void SetBurstShot(bool isBurst); + + void SetBurstShotId(const Tizen::Base::String& burstShotId); + static _ImageContentInfoImpl* GetInstance(ImageContentInfo& imageContentInfo); static const _ImageContentInfoImpl* GetInstance(const ImageContentInfo& imageContentInfo); @@ -70,8 +82,11 @@ private: int __width; int __height; + bool __isBurst; ImageOrientationType __orientationType; Tizen::Base::String __title; + Tizen::Base::String __burstShotId; + Tizen::Base::DateTime __takenDate; }; // _ImageContentInfoImpl -- 2.7.4