2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://floralicense.org/license/
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 * @file GlFileListPresentationModel.cpp
19 * @brief This is the implementation file for FileListPresentationModel class.
25 #include "GlCommonUtil.h"
26 #include "GlFileListPresentationModel.h"
27 #include "GlContentUpdateEventListener.h"
28 #include "GlGalleryApp.h"
29 #include "GlThumbnailEvent.h"
30 #include "GlThumbnailEventArg.h"
31 #include "GlThumbnailProvider.h"
34 using namespace Tizen::App;
35 using namespace Tizen::Base;
36 using namespace Tizen::Base::Collection;
37 using namespace Tizen::Base::Runtime;
38 using namespace Tizen::Base::Utility;
39 using namespace Tizen::Content;
40 using namespace Tizen::Graphics;
41 using namespace Tizen::Io;
42 using namespace Tizen::Media;
43 using namespace Tizen::System;
45 static const String CONTENT_INFO_ORDER = L"ContentFileName";
47 static const int SIZE_PAGE_NO = 1;
48 static const int SIZE_CONUNT_PER_PAGE = 3000;
49 static const int SIZE_ICON_LIST_CACHE = 50;
50 static const int W_DURATION_TEXT = 44;
51 static const int H_DURATION_TEXT = 4;
52 static const int W_DURATION = 171;
53 static const int H_DURATION = 32;
54 static const int W_DEFAULT_THUMBNAIL = 171;
55 static const int H_DEFAULT_THUMBNAIL = 127;
56 static const int W_WIDE_THUMBNAIL = 171;
57 static const int H_WIDE_THUMBNAIL = 127;
58 static const int W_PLAY_FG = 64;
59 static const int H_PLAY_FG = 64;
60 static const int GAP_W_PLAY_FG = (W_DEFAULT_THUMBNAIL -W_PLAY_FG)/2 ;
61 static const int GAP_H_PLAY_FG = (H_DEFAULT_THUMBNAIL - H_PLAY_FG)/2;
62 static const int GAP_H_DURATION = H_DEFAULT_THUMBNAIL - H_DURATION;
63 static const int ALPHA_DURATION = 70;
64 static const int FONT_SIZE_DURATION = 24;
65 static const Dimension DIMENSION_REAL_ICON (171,127);
66 static const Rectangle RECTANGLE_THUMBNAIL_OFFSET_POSION (1, 1, 171, 127);
67 static const Rectangle RECTANGLE_VIDEO_THUMBNAIL_OFFSET_POSION (1, 1, 171, 127);
68 static const Color COLOR_DURATION_BG (Color::GetColor(COLOR_ID_BLACK));
69 static const Color COLOR_TEXT_OUTLINE (Color::GetColor(COLOR_ID_WHITE));
71 static const String RESERVED_CAMERA_PATH = Environment::GetMediaPath() + L"Camera";
72 static const String RESERVED_CAMERA_PATH_EXT = Environment::GetExternalStoragePath() + L"Camera";
73 static const String RESERVED_DOWNLOAD_PATH = Environment::GetMediaPath() + L"Downloads";
75 FileListPresentationModel* FileListPresentationModel::__pPresentationModelInstance = null;
76 ThumbnailProvider* FileListPresentationModel::__pThumbnailProvider = null;
77 ThumbnailEvent* FileListPresentationModel::__pThumbnailEvent = null;
78 ArrayList* FileListPresentationModel::__pPresentationModelListener = null;
79 ArrayList* FileListPresentationModel::__pContentEventListener = null;
80 ArrayList* FileListPresentationModel::__pIconListViewCache = null;
81 IList* FileListPresentationModel::__pDirectoryList = null;
82 IList* FileListPresentationModel::__pContentInfoList = null;
84 FileListPresentationModel::FileListPresentationModel(void)
85 : __albumContentType(CONTENT_TYPE_ALL)
86 , __appControlMode(APP_CONTROL_MODE_MAIN)
87 , __appControlMediaType(APPCONTROL_MEDIA_TYPE_IMAGE)
88 , __appControlSelectionMode(APPCONTROL_SELECTION_MODE_SINGLE)
91 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
94 FileListPresentationModel::~FileListPresentationModel(void)
97 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
100 FileListPresentationModel*
101 FileListPresentationModel::GetInstance(void)
103 AppLogDebug("ENTER");
104 if (__pPresentationModelInstance == null)
108 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
110 return __pPresentationModelInstance;
114 FileListPresentationModel::Construct(void)
116 AppLogDebug("ENTER");
118 IThumbnailEventListener* pThumbnailEventListener = static_cast<IThumbnailEventListener*>(this);
119 __pThumbnailEvent = new (std::nothrow) ThumbnailEvent();
120 __pThumbnailEvent->AddListener(*pThumbnailEventListener, true);
122 ContentUpdateEventListener::GetInstance();
123 __pContentManager = new (std::nothrow) ContentManager();
124 __pContentManager->Construct();
126 if (__pIconListViewCache != null)
128 delete __pIconListViewCache;
130 __pIconListViewCache = new (std::nothrow) ArrayList(SingleObjectDeleter);
131 __pIconListViewCache->Construct(SIZE_ICON_LIST_CACHE);
133 if (__pDirectoryList != null)
135 delete __pDirectoryList;
137 __pDirectoryList = new (std::nothrow) ArrayList(SingleObjectDeleter);
139 if (__pContentInfoList != null)
141 delete __pContentInfoList;
143 __pContentInfoList = new (std::nothrow) ArrayList(SingleObjectDeleter);
145 __pPresentationModelListener = new (std::nothrow) ArrayList();
146 __pPresentationModelListener->Construct();
148 __pContentEventListener = new (std::nothrow) ArrayList();
149 __pContentEventListener->Construct();
151 __pThumbnailProvider = ThumbnailProvider::GetInstance();
153 GalleryApp* pApp = static_cast<GalleryApp*>(GalleryApp::GetInstance());
154 const IMap* pArguments = pApp->GetAppControlArguments();
155 String operationId = pApp->GetAppControlOperationId();
157 if (operationId.CompareTo(APPCONTROL_OPERATION_ID_MAIN) == 0)
159 __appControlMode = APP_CONTROL_MODE_MAIN;
161 else if (operationId.CompareTo(APPCONTROL_OPERATION_ID_PICK) == 0)
163 __appControlMode = APP_CONTROL_MODE_PICK;
165 if (pArguments != null)
167 const String* selectionMode = static_cast<const String*>(pArguments->GetValue(String(APPCONTROL_KEY_SELECTION_MODE)));
169 if (pApp->GetMimeType().StartsWith(APPCONTROL_DATA_VIDEO, 0) == 0)
171 __appControlMediaType = APPCONTROL_MEDIA_TYPE_VIDEO;
174 if (selectionMode != null && selectionMode->CompareTo(APPCONTROL_DATA_MULTIPLE) == 0)
176 __appControlSelectionMode = APPCONTROL_SELECTION_MODE_MULTIPLE;
180 else if (operationId.CompareTo(APPCONTROL_OPERATION_ID_CONFIGURE) == 0)
182 __appControlMode = APP_CONTROL_MODE_SETTING;
185 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
191 FileListPresentationModel::CreateInstance(void)
193 AppLogDebug("ENTER");
194 __pPresentationModelInstance = new (std::nothrow) FileListPresentationModel();
195 result r = __pPresentationModelInstance->Construct();
196 if (IsFailed(r) == true)
198 delete __pPresentationModelInstance;
199 __pPresentationModelInstance = null;
200 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
205 std::atexit(DestroyInstance);
206 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
210 FileListPresentationModel::DestroyInstance(void)
212 AppLogDebug("ENTER");
214 delete __pThumbnailEvent;
215 __pIconListViewCache = null;
217 if (__pIconListViewCache != null)
219 delete __pIconListViewCache;
220 __pIconListViewCache = null;
223 if (__pDirectoryList != null)
225 delete __pDirectoryList;
226 __pDirectoryList = null;
229 if (__pContentInfoList != null)
231 delete __pContentInfoList;
232 __pContentInfoList = null;
235 if (__pPresentationModelListener != null)
237 delete __pPresentationModelListener;
238 __pPresentationModelListener = null;
241 if (__pContentEventListener != null)
243 delete __pContentEventListener;
244 __pContentEventListener = null;
247 delete __pPresentationModelInstance;
248 __pPresentationModelInstance = null;
250 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
254 FileListPresentationModel::GetFileNameFromFullPath(const String& fullPath, bool withExt) const
256 AppLogDebug("ENTER");
257 if (fullPath.CompareTo(EMPTY_SPACE) == 0)
259 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
264 String delim(DIRECTORY_SEPARATOR);
265 StringTokenizer st(fullPath,delim);
267 while (st.HasMoreTokens())
269 st.GetNextToken(token);
274 AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult()));
280 String subDelim(FILE_EXT_SEPARATOR);
281 StringTokenizer subSt(token, subDelim);
283 subSt.GetNextToken(subToken);
284 AppLogDebug("EXIT 3(%s)", GetErrorMessage(GetLastResult()));
291 FileListPresentationModel::GetDirecotyNameFromFullPath(const String& fullPath)const
293 AppLogDebug("ENTER");
294 if (fullPath == null)
296 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
300 String delim(DIRECTORY_SEPARATOR);
301 StringTokenizer st(fullPath,delim);
303 while (st.HasMoreTokens())
305 st.GetNextToken(token);
307 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
313 FileListPresentationModel::IsContainContentInDirectory(const String& directoryPath, ContentType contentType) const
315 AppLogDebug("ENTER");
316 IListT<ContentType>* pContentTypeList = new (std::nothrow) ArrayListT<ContentType>();
317 if (&directoryPath == null || pContentTypeList == null)
319 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
324 if (contentType == CONTENT_TYPE_IMAGE || contentType == CONTENT_TYPE_ALL)
326 pContentTypeList->Add(CONTENT_TYPE_IMAGE);
328 if (contentType == CONTENT_TYPE_VIDEO || contentType == CONTENT_TYPE_ALL)
330 pContentTypeList->Add(CONTENT_TYPE_VIDEO);
333 ContentDirectory contentDirectory;
334 result r = contentDirectory.Construct(*pContentTypeList);
335 if (pContentTypeList != null)
337 delete pContentTypeList;
339 TryReturn(r == E_SUCCESS, false, "[%s] Unable to construct ContentDirectory", GetErrorMessage(r));
341 bool returnValue = false;
342 int pageNo = SIZE_PAGE_NO;
343 int countPerPage = SIZE_CONUNT_PER_PAGE;
345 IList* pContentList = contentDirectory.GetContentDirectoryItemListN(directoryPath, pageNo, countPerPage,
346 CONTENT_INFO_ORDER, SORT_ORDER_ASCENDING);
348 if (pContentList == null || pContentList->GetCount() <= 0)
357 if (pContentList != null)
361 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
367 FileListPresentationModel::GetThumbnailInSyncCacheN(const int index, String*& pName, Bitmap*& pThumbnail)
369 AppLogDebug("ENTER : index(%d)", index);
370 Bitmap* pOrgBitmap = null;
371 Bitmap* pDstBitmap = null;
372 ContentInfo* pContentInfo = null;
374 if (__pContentInfoList != null && index < __pContentInfoList->GetCount())
376 pContentInfo = static_cast<ContentInfo*>(__pContentInfoList->GetAt(index));
377 if (pContentInfo == null)
379 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
386 AppLogDebug("EXIT 2 __pContentInfoList(%x) index(%d)", __pContentInfoList, index);
390 ThumbnailInfo* pThumbnailInfo = GetThumbnailInfoFromInternalBufferN(pContentInfo->GetContentId());
391 if (pThumbnailInfo != null)
393 pName = new (std::nothrow) String(pThumbnailInfo->GetFilePath());
394 pOrgBitmap = pThumbnailInfo->GetBitmapN();
397 if ((pThumbnailInfo != null)&&(pThumbnailInfo->GetContentType() == CONTENT_TYPE_VIDEO))
399 if (pOrgBitmap != null)
401 pDstBitmap = CoverVideoOverlayedImageOnThumbnailN(*pOrgBitmap, *pThumbnailInfo);
407 pDstBitmap = pOrgBitmap;
410 if (pDstBitmap != null)
412 Bitmap* pThumbnailBgBitmap = ResourceManager::GetBitmapN(IDB_VIDEOTHUMBNAIL_BG);
413 Rectangle thumbnailRect(RECTANGLE_THUMBNAIL_OFFSET_POSION);
414 pDstBitmap->Scale(Dimension(RECTANGLE_THUMBNAIL_OFFSET_POSION.width - RECTANGLE_THUMBNAIL_OFFSET_POSION.x
415 , RECTANGLE_THUMBNAIL_OFFSET_POSION.height - RECTANGLE_THUMBNAIL_OFFSET_POSION.y));
416 if (pThumbnailBgBitmap != null)
418 pThumbnailBgBitmap->Scale(DIMENSION_REAL_ICON);
419 pThumbnail = GetShadedBackgroundBitmapN(*pThumbnailBgBitmap, *pDstBitmap, thumbnailRect);
420 delete pThumbnailBgBitmap;
425 pThumbnail = pDstBitmap;
433 if (pThumbnailInfo != null)
435 delete pThumbnailInfo;
437 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
443 FileListPresentationModel::GetThumbnailVideoInSyncCacheN(const int index, String*& pName, Bitmap*& pThumbnail, String*& pDuration)
445 AppLogDebug("ENTER : index(%d)", index);
446 ContentInfo* pContentInfo = null;
447 Bitmap* pOrgBitmap = null;
449 if (__pContentInfoList != null && index < __pContentInfoList->GetCount())
451 pContentInfo = static_cast<ContentInfo*>(__pContentInfoList->GetAt(index));
452 if (pContentInfo == null)
454 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
460 AppLogDebug("EXIT 2 __pContentInfoList(%x) index(%d)", __pContentInfoList, index);
464 ThumbnailInfo* pThumbnailInfo = GetThumbnailInfoFromInternalBufferN(pContentInfo->GetContentId());
465 if (pThumbnailInfo != null)
467 pName = new (std::nothrow) String(pThumbnailInfo->GetFilePath());
468 pOrgBitmap = pThumbnailInfo->GetBitmapN();
469 pDuration = new (std::nothrow) String(CommonUtil::DurationToTimeString(pThumbnailInfo->GetDuration()));
473 pName = new (std::nothrow) String(EMPTY_SPACE);
474 pDuration = new (std::nothrow) String(CommonUtil::DurationToTimeString(0));
477 if (pOrgBitmap != null)
479 Bitmap* pThumbnailBgBitmap = ResourceManager::GetBitmapN(IDB_VIDEOTHUMBNAIL_BG);
480 Rectangle thumbnailRect(RECTANGLE_VIDEO_THUMBNAIL_OFFSET_POSION);
481 pOrgBitmap->Scale(Dimension(RECTANGLE_VIDEO_THUMBNAIL_OFFSET_POSION.width - RECTANGLE_VIDEO_THUMBNAIL_OFFSET_POSION.x
482 , RECTANGLE_VIDEO_THUMBNAIL_OFFSET_POSION.height - RECTANGLE_VIDEO_THUMBNAIL_OFFSET_POSION.y));
483 if (pThumbnailBgBitmap != null)
485 pThumbnailBgBitmap->Scale(Dimension(W_WIDE_THUMBNAIL, H_WIDE_THUMBNAIL));
486 pThumbnail = GetShadedBackgroundBitmapN(*pThumbnailBgBitmap, *pOrgBitmap, thumbnailRect);
487 delete pThumbnailBgBitmap;
496 if (pThumbnail != null)
498 pThumbnail->Scale(Dimension(W_WIDE_THUMBNAIL, H_WIDE_THUMBNAIL));
501 if (pThumbnailInfo != null)
503 delete pThumbnailInfo;
505 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
511 FileListPresentationModel::RequestThumbnail(const int index)
513 AppLogDebug("ENTER : index(%d)", index);
514 ContentInfo* pContentInfo = null;
516 if (__pContentInfoList != null && index < __pContentInfoList->GetCount())
518 pContentInfo = static_cast<ContentInfo*>(__pContentInfoList->GetAt(index));
519 if (pContentInfo == null)
521 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
527 AppLogDebug("EXIT 2 __pContentInfoList(%x) index(%d)", __pContentInfoList, index);
532 __pThumbnailProvider->RequestThumbnail(pContentInfo->GetContentId(), __pThumbnailEvent);
537 FileListPresentationModel::CancelThumbnailRequest(const int index)
539 AppLogDebug("ENTER : index(%d)", index);
540 /*ContentInfo* pContentInfo = null;
542 if (__pContentInfoList != null && index < __pContentInfoList->GetCount())
544 pContentInfo = static_cast<ContentInfo*>(__pContentInfoList->GetAt(index));
545 if (pContentInfo == null)
547 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
550 __pThumbnailProvider->CancelThumbnailRequest(pContentInfo->GetContentId(), __pThumbnailEvent);
556 FileListPresentationModel::ClearThumbnailRequests(bool appTerminating)
558 AppLogDebug("ENTER");
560 if (__pThumbnailProvider != null)
562 __pThumbnailProvider->ClearThumbnailRequests(appTerminating);
569 FileListPresentationModel::OnThumbnailReceivedN(IEventArg& eventArg)
571 AppLogDebug("ENTER");
573 if (&eventArg != null)
575 ThumbnailEventArg* pThumbnailEventArg = static_cast<ThumbnailEventArg*>(&eventArg);
576 if (pThumbnailEventArg == null)
578 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
582 ThumbnailInfo* pThumbnailInfo = pThumbnailEventArg->GetThumbnailInfoN();
583 if (pThumbnailInfo == null)
585 AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult()));
590 bool isMatch = false;
591 ContentId contentId = pThumbnailInfo->GetContentId();
593 if (__pIconListViewCache != null)
595 IEnumerator* pEnum = __pIconListViewCache->GetEnumeratorN();
596 Bitmap* pBitmap = null;
597 while (pEnum->MoveNext() == E_SUCCESS)
599 ThumbnailInfo* pTempThumbnailInfo = static_cast<ThumbnailInfo*>(pEnum->GetCurrent());
601 if (contentId == pTempThumbnailInfo->GetContentId())
603 AppLogDebug("[CHASEFIRE] PM receive (%ls)", pThumbnailInfo->GetFilePath().GetPointer());
604 pBitmap = pThumbnailInfo->GetBitmapN();
605 pTempThumbnailInfo->SetBitmap(*pBitmap);
608 pTempThumbnailInfo->SetContentType(pThumbnailInfo->GetContentType());
609 pTempThumbnailInfo->SetDuration(pThumbnailInfo->GetDuration());
610 delete pThumbnailInfo;
616 if (isMatch == false)
618 if (SIZE_ICON_LIST_CACHE <= __pIconListViewCache->GetCount())
620 __pIconListViewCache->RemoveAt(0, true);
622 AppLogDebug("[CHASEFIRE] (all:%d) Add Thumbail(%ls)",__pIconListViewCache->GetCount(),
623 pThumbnailInfo->GetFilePath().GetPointer());
624 __pIconListViewCache->Add(pThumbnailInfo);
629 int loopCount = __pContentInfoList->GetCount();
630 for (int i = 0; i < loopCount; ++i)
632 if (contentId == (static_cast<ContentInfo*>(__pContentInfoList->GetAt(i)))->GetContentId())
639 IAlbumEventListener* pInterface = null;
640 IEnumerator* pEventEnum = __pPresentationModelListener->GetEnumeratorN();
641 while (pEventEnum->MoveNext() == E_SUCCESS)
643 pInterface = static_cast<IAlbumEventListener*>(pEventEnum->GetCurrent());
644 pInterface->OnThumbnailDecoded(index);
648 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
652 FileListPresentationModel::OnContentCreated(Tizen::Content::ContentId contentId, Tizen::Content::ContentType contentType, result r)
654 AppLogDebug("ENTER");
655 IFormContentUpdateEventListener* pInterface = null;
656 if (__pContentEventListener == null)
661 IEnumerator* pEventEnum = __pContentEventListener->GetEnumeratorN();
662 while (pEventEnum->MoveNext() == E_SUCCESS)
664 pInterface = static_cast<IFormContentUpdateEventListener*>(pEventEnum->GetCurrent());
665 pInterface->OnContentUpdated();
672 FileListPresentationModel::OnContentUpdated(Tizen::Content::ContentId contentId, Tizen::Content::ContentType contentType, result r)
674 AppLogDebug("ENTER");
675 IFormContentUpdateEventListener* pInterface = null;
676 if (__pContentEventListener == null)
681 IEnumerator* pEventEnum = __pContentEventListener->GetEnumeratorN();
682 while (pEventEnum->MoveNext() == E_SUCCESS)
684 pInterface = static_cast<IFormContentUpdateEventListener*>(pEventEnum->GetCurrent());
685 pInterface->OnContentUpdated();
692 FileListPresentationModel::OnContentDeleted(Tizen::Content::ContentId contentId, Tizen::Content::ContentType contentType, result r)
694 AppLogDebug("ENTER");
695 IFormContentUpdateEventListener* pInterface = null;
696 if (__pContentEventListener == null)
701 IEnumerator* pEventEnum = __pContentEventListener->GetEnumeratorN();
702 while (pEventEnum->MoveNext() == E_SUCCESS)
704 pInterface = static_cast<IFormContentUpdateEventListener*>(pEventEnum->GetCurrent());
705 pInterface->OnContentUpdated();
712 FileListPresentationModel::AddPresentationModelListener(const IAlbumEventListener* listener)
714 AppLogDebug("ENTER");
715 __pPresentationModelListener->Add((Object*)listener);
716 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
720 FileListPresentationModel::RemovePresentationModelListener(const IAlbumEventListener& listener)
722 AppLogDebug("ENTER");
723 __pPresentationModelListener->Remove(listener);
724 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
728 FileListPresentationModel::AddContentEventListener(const IFormContentUpdateEventListener* listener)
730 AppLogDebug("ENTER");
731 if (__pContentEventListener != null)
733 __pContentEventListener->RemoveAll();
734 __pContentEventListener->Add((Object*)listener);
735 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
740 FileListPresentationModel::RemoveContentEventListener(const IFormContentUpdateEventListener* listener)
742 AppLogDebug("ENTER");
743 __pContentEventListener->Remove(*listener);
744 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
748 FileListPresentationModel::GetThumbnailInfoFromInternalBufferN(const ContentId& contentId) const
750 AppLogDebug("ENTER");
751 ThumbnailInfo* pThumbnailInfo = null;
752 ThumbnailInfo* pTempThumbnailInfo = null;
753 if (__pIconListViewCache != null)
755 int loopCount = __pIconListViewCache->GetCount();
756 for (int i = 0 ; i < loopCount; ++i)
758 pTempThumbnailInfo = static_cast<ThumbnailInfo*>(__pIconListViewCache->GetAt(i));
759 if (contentId == pTempThumbnailInfo->GetContentId())
762 pThumbnailInfo = new (std::nothrow) ThumbnailInfo();
763 Bitmap* pBitmap = pTempThumbnailInfo->GetBitmapN();
764 pThumbnailInfo->Construct(pTempThumbnailInfo->GetContentId(),
765 pTempThumbnailInfo->GetFilePath(), *pBitmap,
766 pTempThumbnailInfo->GetContentType(), pTempThumbnailInfo->GetDuration());
772 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
774 return pThumbnailInfo;
778 FileListPresentationModel::DeleteContentFileList(const IList& contentIndexList)
780 AppLogDebug("ENTER");
781 if (&contentIndexList == null || contentIndexList.GetCount() <= 0)
783 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
788 IList * pContentIdList = new (std::nothrow) ArrayList(SingleObjectDeleter);
789 int loopCount = contentIndexList.GetCount();
790 for (int i = 0; i < loopCount; ++i)
792 const Integer* pIndex = static_cast<const Integer*>(contentIndexList.GetAt(i));
794 if ((pIndex != null) && (pIndex->ToInt())>=0 && __pContentInfoList->GetCount() > pIndex->ToInt())
796 pContentIdList->Add(new (std::nothrow) ContentId((static_cast<ContentInfo*>
797 (__pContentInfoList->GetAt(pIndex->ToInt())))->GetContentId()));
801 loopCount = pContentIdList->GetCount();
802 for (int i = 0; i < loopCount; ++i)
804 ContentId* pContentId = static_cast<ContentId*>(pContentIdList->GetAt(i));
805 if (pContentId != null)
807 DeleteContentFile(*pContentId);
810 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
816 FileListPresentationModel::GetCollisionIndexListN(const IList& contentIndexList, const String& destDirectory)
818 AppLogDebug("ENTER");
819 if (&contentIndexList == null || contentIndexList.GetCount() <= 0 || &destDirectory == null
820 || destDirectory.IsEmpty() == true)
822 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
827 if (File::IsFileExist(destDirectory) == false)
829 AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult()));
834 IList * pCollisionInfoList = new (std::nothrow) ArrayList(SingleObjectDeleter);
835 ContentInfo* pContentInfo = null;
836 int loopCount = contentIndexList.GetCount();
837 for (int i = 0; i < loopCount; ++i)
839 const Integer* pIndex = static_cast<const Integer*>(contentIndexList.GetAt(i));
841 if ((pIndex != null) && (pIndex->ToInt()) >= 0 && __pContentInfoList->GetCount() > pIndex->ToInt())
843 pContentInfo = const_cast<ContentInfo*>(static_cast<const ContentInfo*>(__pContentInfoList->GetAt(pIndex->ToInt())));
844 String filePath = pContentInfo->GetContentPath();
845 String fileName = GetFileNameFromFullPath(filePath, true);
848 if (destDirectory.EndsWith(DIRECTORY_SEPARATOR) == true)
850 destPath.Append(destDirectory);
851 destPath.Append(fileName);
855 destPath.Append(destDirectory);
856 destPath.Append(DIRECTORY_SEPARATOR);
857 destPath.Append(fileName);
860 if (File::IsFileExist(destPath) == true)
862 pCollisionInfoList->Add(*(new (std::nothrow) String(pIndex->ToString() + MULTI_ITEM_SEPARATOR + fileName)));
866 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
868 return pCollisionInfoList;
872 FileListPresentationModel::MoveToContentFileList(const IList& contentIndexList, const String& destDirectory)
874 AppLogDebug("ENTER");
875 result r = E_SUCCESS;
876 if (&contentIndexList == null || contentIndexList.GetCount() <= 0 || &destDirectory == null || destDirectory.IsEmpty() == true)
878 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
883 if (File::IsFileExist(destDirectory) == false)
885 Directory::Create(destDirectory, true);
888 delete __pContentIdList;
889 __pContentIdList = new (std::nothrow) ArrayList(SingleObjectDeleter);
890 int loopCount = contentIndexList.GetCount();
891 for (int i = 0; i < loopCount; ++i)
893 const Integer* pIndex = static_cast<const Integer*>(contentIndexList.GetAt(i));
895 if ((pIndex != null) && (pIndex->ToInt())>=0 && __pContentInfoList->GetCount() > pIndex->ToInt())
897 __pContentIdList->Add(new (std::nothrow) ContentId((static_cast<ContentInfo*>(__pContentInfoList->GetAt(pIndex->ToInt())))->GetContentId()));
902 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
908 FileListPresentationModel::DeleteContentFile(const ContentId& contentId)
910 AppLogDebug("ENTER");
911 if (&contentId == null)
913 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
917 result r = __pContentManager->DeleteContent(contentId);
919 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
925 FileListPresentationModel::MoveToContentFile(const ContentId& contentId, const String& destDirectory)
927 AppLogDebug("ENTER");
928 if (contentId.ToString().IsEmpty() == true || destDirectory.IsEmpty() == true)
930 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
933 result r = E_SUCCESS;
934 ContentInfo* pContentInfo = __pContentManager->GetContentInfoN(contentId);
935 if (pContentInfo == null)
937 AppLogDebug("Santhosh %s", destDirectory.GetPointer());
938 AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult()));
942 String filePath = pContentInfo->GetContentPath();
943 if (filePath.GetLength() < 4)
945 AppLogDebug("EXIT 3(%s)", GetErrorMessage(GetLastResult()));
950 if (destDirectory.EndsWith(DIRECTORY_SEPARATOR) == true)
952 destPath.Append(destDirectory);
953 destPath.Append(GetFileNameFromFullPath(filePath, true));
957 destPath.Append(destDirectory);
958 destPath.Append(DIRECTORY_SEPARATOR);
959 destPath.Append(GetFileNameFromFullPath(filePath, true));
962 if (destPath.CompareTo(filePath) == 0)
964 AppLogDebug("EXIT 4(%s)", GetErrorMessage(GetLastResult()));
968 if (File::IsFileExist(destPath) == true)
970 File::Remove(destPath);
973 if (pContentInfo->GetContentType() == CONTENT_TYPE_IMAGE)
975 r = File::Copy(filePath, destPath, false);
980 ImageContentInfo contentInfo;
981 r = contentInfo.Construct(&destPath);
984 __pContentManager->CreateContent(contentInfo);
986 TryCatch(!IsFailed(r),,"CreateContent::the value is %s",GetErrorMessage(r));
987 r = __pContentManager->DeleteContent(contentId);
988 TryCatch(!IsFailed(r),,"DeleteContent::the value is %s",GetErrorMessage(r));
993 else if (pContentInfo->GetContentType() == CONTENT_TYPE_VIDEO)
995 r = File::Copy(filePath, destPath, false);
998 VideoContentInfo contentInfo;
999 r = contentInfo.Construct(&destPath);
1001 __pContentManager->CreateContent(contentInfo);
1002 r = GetLastResult();
1003 TryCatch(!IsFailed(r),,"CreateContent::the value is %s",GetErrorMessage(r));
1004 r = __pContentManager->DeleteContent(contentId);
1005 TryCatch(!IsFailed(r),,"DeleteContent::the value is %s",GetErrorMessage(r));
1010 delete pContentInfo;
1012 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1018 FileListPresentationModel::StartAppControl(const String& providerId, const String& operationId,
1019 const String* pUriData, const Tizen::Base::String* pMimeType, const HashMap* pDataList,
1020 IAppControlResponseListener* pListener)
1022 AppLogDebug("ENTER");
1023 AppControl* pAc = AppManager::FindAppControlN(providerId, operationId);
1026 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
1029 result r = pAc->Start(pUriData, pMimeType, pDataList, pListener);
1033 GalleryApp* pGalleryApp = static_cast<GalleryApp*>(GalleryApp::GetInstance());
1034 pGalleryApp->SetFrameEnabled(false);
1039 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1045 FileListPresentationModel::SetCurrentAlbumInfo(const String& albumName, const IList& directoryList)
1047 AppLogDebug("ENTER");
1049 if (&directoryList != null)
1051 if (__pDirectoryList != null && __pDirectoryList->GetCount() > 0)
1053 bool isMatched = false;
1054 int outterLoopCount = __pDirectoryList->GetCount();
1055 int innerLoopCount = 0;
1056 for (int i = 0; i < outterLoopCount ; ++i)
1059 innerLoopCount = directoryList.GetCount();
1060 for (int j = 0; j < innerLoopCount; ++j)
1062 if (static_cast<String*>(__pDirectoryList->GetAt(i))->CompareTo(
1063 *(const_cast<String*>(static_cast<const String*>(directoryList.GetAt(j))))) == 0)
1071 outterLoopCount = directoryList.GetCount();
1072 for (int i = 0; i < outterLoopCount; ++i)
1075 innerLoopCount = __pDirectoryList->GetCount();
1076 for (int j = 0; j < innerLoopCount; ++j)
1078 if (const_cast<String*>(static_cast<const String*>(directoryList.GetAt(i)))->CompareTo(
1079 *(static_cast<String*>(__pDirectoryList->GetAt(j)))) == 0)
1089 __albumName = albumName;
1091 if (__pDirectoryList != null)
1093 delete __pDirectoryList;
1095 __pDirectoryList = new (std::nothrow) ArrayList(SingleObjectDeleter);
1097 int loopCount = directoryList.GetCount();
1098 for (int i = 0; i < loopCount; ++i)
1100 __pDirectoryList->Add(new (std::nothrow) String(*(const_cast<String*>
1101 (static_cast<const String*>(directoryList.GetAt(i))))));
1104 if (__pContentInfoList != null)
1106 delete __pContentInfoList;
1107 __pContentInfoList = null;
1110 if (GetAppControlMode() == APP_CONTROL_MODE_PICK)
1112 AppControlMediaType appControlMediaType = GetAppControlMediaType();
1113 if (appControlMediaType == APPCONTROL_MEDIA_TYPE_IMAGE)
1115 __albumContentType = CONTENT_TYPE_IMAGE;
1117 else if (appControlMediaType == APPCONTROL_MEDIA_TYPE_VIDEO)
1119 __albumContentType = CONTENT_TYPE_VIDEO;
1122 __pContentInfoList = GetContentInfoListInDirectoryListN(*__pDirectoryList, __albumContentType);
1123 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1129 FileListPresentationModel::RefreshCurrentAlbumContentInfoList(ContentType contentType)
1131 AppLogDebug("ENTER");
1132 result r = RefreshContentInfoList(contentType);
1133 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1139 FileListPresentationModel::RefreshContentInfoList(ContentType contentType)
1141 AppLogDebug("ENTER");
1142 if ((contentType != CONTENT_TYPE_ALL) && (contentType != CONTENT_TYPE_IMAGE) && (contentType != CONTENT_TYPE_VIDEO))
1144 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
1149 if ((__pDirectoryList == null) || (__pDirectoryList->GetCount() <= 0))
1151 AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult()));
1156 __albumContentType = contentType;
1158 if (__pContentInfoList != null)
1160 delete __pContentInfoList;
1161 __pContentInfoList = null;
1163 __pContentInfoList = GetContentInfoListInDirectoryListN(*__pDirectoryList, __albumContentType);
1164 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1170 FileListPresentationModel::GetCurrentAlbumName(void)
1172 AppLogDebug("ENTER");
1173 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1179 FileListPresentationModel::SetCurrentAlbumName(String& albumName)
1181 AppLogDebug("ENTER");
1182 if (&albumName == null)
1184 __albumName = EMPTY_SPACE;
1188 __albumName = albumName;
1190 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1194 FileListPresentationModel::GetCurrentAlbumContentType(void)
1196 AppLogDebug("ENTER");
1197 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1199 return __albumContentType;
1203 FileListPresentationModel::SetCurrentAlbumContentType(ContentType contentType)
1205 AppLogDebug("ENTER");
1206 __albumContentType = contentType;
1207 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1211 FileListPresentationModel::GetAlbumDirectoryListN(void)
1213 AppLogDebug("ENTER");
1214 IList* pAlbumDirectoryList = new (std::nothrow) ArrayList(SingleObjectDeleter);
1215 if (__pDirectoryList == null)
1217 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
1219 return pAlbumDirectoryList;
1222 String* pDirectory = null;
1223 int loopCount = __pDirectoryList->GetCount();
1224 for (int i = 0; i < loopCount; ++i)
1226 pDirectory = static_cast<String*>(__pDirectoryList->GetAt(i));
1227 pAlbumDirectoryList->Add(new (std::nothrow) String(*pDirectory));
1229 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1231 return pAlbumDirectoryList;
1235 FileListPresentationModel::GetAlbumContentInfoList(void)
1237 AppLogDebug("ENTER");
1238 IList* pContentList = new (std::nothrow) ArrayList(SingleObjectDeleter);
1239 if (__pContentInfoList == null)
1241 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
1243 return pContentList;
1246 ContentInfo* pContentInfo = null;
1247 int loopCount = __pContentInfoList->GetCount();
1248 for (int i = 0; i < loopCount; ++i)
1250 pContentInfo = static_cast<ContentInfo*>(__pContentInfoList->GetAt(i));
1251 pContentList->Add(pContentInfo);
1253 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1255 return pContentList;
1259 FileListPresentationModel::GetContentInfo(int index)
1261 AppLogDebug("ENTER");
1262 if (__pContentInfoList == null || __pContentInfoList->GetCount() == 0)
1264 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
1269 if (index < 0 || index >= __pContentInfoList->GetCount())
1271 AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult()));
1275 ContentInfo* pContentInfo = static_cast<ContentInfo*>(__pContentInfoList->GetAt(index));
1276 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1278 return pContentInfo;
1282 IList* FileListPresentationModel::GetContentIdListN(const IList& contentInfoList)
1284 IList* pContentIdList = new (std::nothrow) ArrayList(SingleObjectDeleter);
1285 int loopCount = contentInfoList.GetCount();
1286 for (int i = 0; i < loopCount; ++i)
1288 const Integer* pIndex = static_cast<const Integer*>(contentInfoList.GetAt(i));
1290 if ((pIndex != null) && (pIndex->ToInt())>=0 && __pContentInfoList->GetCount() > pIndex->ToInt())
1292 pContentIdList->Add(new (std::nothrow) ContentId((static_cast<ContentInfo*>(__pContentInfoList->GetAt(pIndex->ToInt())))->GetContentId()));
1296 return pContentIdList;
1300 FileListPresentationModel::GetCurrentAlbumContentInfoCount(void)
1302 AppLogDebug("ENTER");
1303 if (__pContentInfoList == null)
1305 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
1309 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1311 return __pContentInfoList->GetCount();
1315 FileListPresentationModel::GetContentInfoIndex(int index)
1317 AppLogDebug("ENTER");
1318 if (__pContentInfoList == null || __pContentInfoList->GetCount() == 0)
1320 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
1325 if (index < 0 || index >= __pContentInfoList->GetCount())
1327 AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult()));
1331 ContentInfo* pContentInfo = static_cast<ContentInfo*>(__pContentInfoList->GetAt(index));
1332 ContentId contentId = pContentInfo->GetContentId();
1333 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1339 FileListPresentationModel::GetContentFilePath(int index)
1341 AppLogDebug("ENTER index(%d)", index);
1342 if (__pContentInfoList == null || __pContentInfoList->GetCount() == 0)
1344 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
1349 if (index < 0 || index >= __pContentInfoList->GetCount())
1351 AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult()));
1356 ContentInfo* pContentInfo = static_cast<ContentInfo*>(__pContentInfoList->GetAt(index));
1357 String contentPath = pContentInfo->GetContentPath();
1358 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1364 FileListPresentationModel::CoverVideoOverlayedImageOnThumbnailN(Bitmap& thumbnail,
1365 const ThumbnailInfo& thumbmailInfo)
1367 AppLogDebug("ENTER");
1368 Bitmap* overlayedImage = null;
1370 if (&thumbmailInfo != null)
1372 long duration = thumbmailInfo.GetDuration();
1375 if (&thumbnail != null)
1377 BufferInfo bufferInfo;
1378 thumbnail.Lock(bufferInfo, INFINITE);
1380 mainCanvas.Construct(bufferInfo);
1384 Rectangle mainRect(0, 0, W_DEFAULT_THUMBNAIL, H_DEFAULT_THUMBNAIL);
1385 mainCanvas.Construct(mainRect);
1386 mainCanvas.FillRectangle(Color::GetColor(COLOR_ID_BLACK), mainRect);
1389 Rectangle playRect(GAP_W_PLAY_FG, GAP_H_PLAY_FG, W_PLAY_FG, H_PLAY_FG);
1390 Bitmap* playBitmap = ResourceManager::GetBitmapN(IDB_VIDEOTHUMBNAIL_PLAY);
1391 if (playBitmap != null)
1393 mainCanvas.DrawBitmap(playRect, *playBitmap);
1398 Rectangle durSize(0, 0, W_DURATION, H_DURATION);
1399 Rectangle durRect(0, GAP_H_DURATION, W_DURATION, H_DURATION);
1400 Color durColor(COLOR_DURATION_BG);
1401 durColor.SetAlpha(ALPHA_DURATION);
1402 durCanvas.Construct(durSize);
1403 durCanvas.FillRectangle(durColor, durSize);
1405 durFont.Construct(FONT_STYLE_PLAIN, FONT_SIZE_DURATION);
1406 durCanvas.SetFont(durFont);
1407 durCanvas.DrawText(Point(W_DURATION_TEXT, H_DURATION_TEXT), CommonUtil::DurationToTimeString(duration), COLOR_TEXT_OUTLINE);
1409 durBitmap.Construct(durCanvas,durCanvas.GetBounds());
1410 mainCanvas.DrawBitmap(durRect,durBitmap);
1412 overlayedImage = new (std::nothrow) Bitmap();
1413 overlayedImage->Construct(mainCanvas,mainCanvas.GetBounds());
1415 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1417 return overlayedImage;
1421 FileListPresentationModel::GetShadedBackgroundBitmapN(Bitmap& bgBitmap,
1422 const Bitmap& orgBitmap,
1423 const Rectangle& orgBitmapPosition)
1425 AppLogDebug("ENTER");
1426 if (&orgBitmap == null || &orgBitmap == null)
1428 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
1433 BufferInfo bufferInfo;
1434 bgBitmap.Lock(bufferInfo, INFINITE);
1437 mainCanvas.Construct(bufferInfo);
1439 mainCanvas.DrawBitmap(orgBitmapPosition, orgBitmap);
1441 Bitmap* pMainImage = new (std::nothrow) Bitmap();
1442 pMainImage->Construct(mainCanvas,mainCanvas.GetBounds());
1443 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1449 FileListPresentationModel::GetContentInfoListInDirectoryListN(const IList& contentDirectoryList,
1450 ContentType contentType)const
1452 AppLogDebug("ENTER");
1453 IList* pContentList = new (std::nothrow) ArrayList(SingleObjectDeleter);
1455 if ((&contentDirectoryList == null) || (contentDirectoryList.GetCount() == 0)
1456 || ((contentType != CONTENT_TYPE_IMAGE) && (contentType != CONTENT_TYPE_VIDEO) && (contentType != CONTENT_TYPE_ALL)))
1458 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
1459 return pContentList;
1462 ContentDirectory contentDirectory;
1463 IListT<ContentType>* pContentTypeList = new (std::nothrow) ArrayListT<ContentType>();
1464 if (contentType == CONTENT_TYPE_IMAGE || contentType == CONTENT_TYPE_ALL)
1466 pContentTypeList->Add(CONTENT_TYPE_IMAGE);
1468 if (contentType == CONTENT_TYPE_VIDEO || contentType == CONTENT_TYPE_ALL)
1470 pContentTypeList->Add(CONTENT_TYPE_VIDEO);
1472 result r = contentDirectory.Construct(*pContentTypeList);
1473 delete pContentTypeList;
1477 int pageNo = SIZE_PAGE_NO;
1478 int countPerPage = SIZE_CONUNT_PER_PAGE;
1479 String* pContentDirectory = null;
1481 int loopCount = contentDirectoryList.GetCount();
1482 for (int i = 0; i < loopCount; ++i)
1484 IList* pIList = null;
1485 pContentDirectory = const_cast<String*>(static_cast<const String*>(contentDirectoryList.GetAt(i)));
1486 if (pContentDirectory != null)
1488 pIList = contentDirectory.GetContentDirectoryItemListN(*pContentDirectory, pageNo, countPerPage,
1489 CONTENT_INFO_ORDER, SORT_ORDER_NONE);
1493 pContentList->AddItems(*pIList);
1502 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1504 return pContentList;
1508 FileListPresentationModel::ConvertToAlbumName(const String& targetPath)const
1510 AppLogDebug("ENTER");
1512 if (&targetPath == null || targetPath.GetLength() == 0)
1517 if (targetPath == RESERVED_CAMERA_PATH || targetPath == RESERVED_CAMERA_PATH_EXT)
1519 albumName = ResourceManager::GetString(L"IDS_MEDIABR_BODY_CAMERA_ROLL_ABB");
1521 else if (targetPath == RESERVED_DOWNLOAD_PATH)
1523 albumName = ResourceManager::GetString(L"IDS_COM_BODY_DOWNLOADS");
1527 String directoryName = GetDirecotyNameFromFullPath(targetPath);
1528 albumName = directoryName;
1535 FileListPresentationModel::GetAppControlMode(void) const
1537 AppLogDebug("Enter");
1538 AppLogDebug("Exit");
1540 return __appControlMode;
1544 FileListPresentationModel::GetAppControlMediaType(void) const
1546 AppLogDebug("Enter");
1547 AppLogDebug("Exit");
1549 return __appControlMediaType;
1552 AppControlSelectionMode
1553 FileListPresentationModel::GetAppControlSelectionMode(void) const
1555 AppLogDebug("Enter");
1556 AppLogDebug("Exit");
1558 return __appControlSelectionMode;