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_UNKNOWN)
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 IMap* pDataList, IAppControlResponseListener* pListener)
1021 AppLogDebug("ENTER");
1022 AppControl* pAc = AppManager::FindAppControlN(providerId, operationId);
1025 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
1028 result r = pAc->Start(null, null, pDataList, pListener);
1032 GalleryApp* pGalleryApp = static_cast<GalleryApp*>(GalleryApp::GetInstance());
1033 pGalleryApp->SetFrameEnabled(false);
1038 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1044 FileListPresentationModel::SetCurrentAlbumInfo(const String& albumName, const IList& directoryList)
1046 AppLogDebug("ENTER");
1048 if (&directoryList != null)
1050 if (__pDirectoryList != null && __pDirectoryList->GetCount() > 0)
1052 bool isMatched = false;
1053 int outterLoopCount = __pDirectoryList->GetCount();
1054 int innerLoopCount = 0;
1055 for (int i = 0; i < outterLoopCount ; ++i)
1058 innerLoopCount = directoryList.GetCount();
1059 for (int j = 0; j < innerLoopCount; ++j)
1061 if (static_cast<String*>(__pDirectoryList->GetAt(i))->CompareTo(
1062 *(const_cast<String*>(static_cast<const String*>(directoryList.GetAt(j))))) == 0)
1070 outterLoopCount = directoryList.GetCount();
1071 for (int i = 0; i < outterLoopCount; ++i)
1074 innerLoopCount = __pDirectoryList->GetCount();
1075 for (int j = 0; j < innerLoopCount; ++j)
1077 if (const_cast<String*>(static_cast<const String*>(directoryList.GetAt(i)))->CompareTo(
1078 *(static_cast<String*>(__pDirectoryList->GetAt(j)))) == 0)
1088 __albumName = albumName;
1090 if (__pDirectoryList != null)
1092 delete __pDirectoryList;
1094 __pDirectoryList = new (std::nothrow) ArrayList(SingleObjectDeleter);
1096 int loopCount = directoryList.GetCount();
1097 for (int i = 0; i < loopCount; ++i)
1099 __pDirectoryList->Add(new (std::nothrow) String(*(const_cast<String*>
1100 (static_cast<const String*>(directoryList.GetAt(i))))));
1103 if (__pContentInfoList != null)
1105 delete __pContentInfoList;
1106 __pContentInfoList = null;
1109 if (GetAppControlMode() == APP_CONTROL_MODE_PICK)
1111 AppControlMediaType appControlMediaType = GetAppControlMediaType();
1112 if (appControlMediaType == APPCONTROL_MEDIA_TYPE_IMAGE)
1114 __albumContentType = CONTENT_TYPE_IMAGE;
1116 else if (appControlMediaType == APPCONTROL_MEDIA_TYPE_VIDEO)
1118 __albumContentType = CONTENT_TYPE_VIDEO;
1121 __pContentInfoList = GetContentInfoListInDirectoryListN(*__pDirectoryList, __albumContentType);
1122 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1128 FileListPresentationModel::RefreshCurrentAlbumContentInfoList(ContentType contentType)
1130 AppLogDebug("ENTER");
1131 result r = RefreshContentInfoList(contentType);
1132 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1138 FileListPresentationModel::RefreshContentInfoList(ContentType contentType)
1140 AppLogDebug("ENTER");
1141 if ((contentType != CONTENT_TYPE_ALL) && (contentType != CONTENT_TYPE_IMAGE) && (contentType != CONTENT_TYPE_VIDEO))
1143 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
1148 if ((__pDirectoryList == null) || (__pDirectoryList->GetCount() <= 0))
1150 AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult()));
1155 __albumContentType = contentType;
1157 if (__pContentInfoList != null)
1159 delete __pContentInfoList;
1160 __pContentInfoList = null;
1162 __pContentInfoList = GetContentInfoListInDirectoryListN(*__pDirectoryList, __albumContentType);
1163 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1169 FileListPresentationModel::GetCurrentAlbumName(void)
1171 AppLogDebug("ENTER");
1172 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1178 FileListPresentationModel::SetCurrentAlbumName(String& albumName)
1180 AppLogDebug("ENTER");
1181 if (&albumName == null)
1183 __albumName = EMPTY_SPACE;
1187 __albumName = albumName;
1189 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1193 FileListPresentationModel::GetCurrentAlbumContentType(void)
1195 AppLogDebug("ENTER");
1196 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1198 return __albumContentType;
1202 FileListPresentationModel::SetCurrentAlbumContentType(ContentType contentType)
1204 AppLogDebug("ENTER");
1205 __albumContentType = contentType;
1206 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1210 FileListPresentationModel::GetAlbumDirectoryListN(void)
1212 AppLogDebug("ENTER");
1213 IList* pAlbumDirectoryList = new (std::nothrow) ArrayList(SingleObjectDeleter);
1214 if (__pDirectoryList == null)
1216 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
1218 return pAlbumDirectoryList;
1221 String* pDirectory = null;
1222 int loopCount = __pDirectoryList->GetCount();
1223 for (int i = 0; i < loopCount; ++i)
1225 pDirectory = static_cast<String*>(__pDirectoryList->GetAt(i));
1226 pAlbumDirectoryList->Add(new (std::nothrow) String(*pDirectory));
1228 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1230 return pAlbumDirectoryList;
1234 FileListPresentationModel::GetAlbumContentInfoList(void)
1236 AppLogDebug("ENTER");
1237 IList* pContentList = new (std::nothrow) ArrayList(SingleObjectDeleter);
1238 if (__pContentInfoList == null)
1240 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
1242 return pContentList;
1245 ContentInfo* pContentInfo = null;
1246 int loopCount = __pContentInfoList->GetCount();
1247 for (int i = 0; i < loopCount; ++i)
1249 pContentInfo = static_cast<ContentInfo*>(__pContentInfoList->GetAt(i));
1250 pContentList->Add(pContentInfo);
1252 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1254 return pContentList;
1258 FileListPresentationModel::GetContentInfo(int index)
1260 AppLogDebug("ENTER");
1261 if (__pContentInfoList == null || __pContentInfoList->GetCount() == 0)
1263 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
1268 if (index < 0 || index >= __pContentInfoList->GetCount())
1270 AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult()));
1274 ContentInfo* pContentInfo = static_cast<ContentInfo*>(__pContentInfoList->GetAt(index));
1275 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1277 return pContentInfo;
1281 IList* FileListPresentationModel::GetContentIdListN(const IList& contentInfoList)
1283 IList* pContentIdList = new (std::nothrow) ArrayList(SingleObjectDeleter);
1284 int loopCount = contentInfoList.GetCount();
1285 for (int i = 0; i < loopCount; ++i)
1287 const Integer* pIndex = static_cast<const Integer*>(contentInfoList.GetAt(i));
1289 if ((pIndex != null) && (pIndex->ToInt())>=0 && __pContentInfoList->GetCount() > pIndex->ToInt())
1291 pContentIdList->Add(new (std::nothrow) ContentId((static_cast<ContentInfo*>(__pContentInfoList->GetAt(pIndex->ToInt())))->GetContentId()));
1295 return pContentIdList;
1299 FileListPresentationModel::GetCurrentAlbumContentInfoCount(void)
1301 AppLogDebug("ENTER");
1302 if (__pContentInfoList == null)
1304 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
1308 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1310 return __pContentInfoList->GetCount();
1314 FileListPresentationModel::GetContentInfoIndex(int index)
1316 AppLogDebug("ENTER");
1317 if (__pContentInfoList == null || __pContentInfoList->GetCount() == 0)
1319 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
1324 if (index < 0 || index >= __pContentInfoList->GetCount())
1326 AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult()));
1330 ContentInfo* pContentInfo = static_cast<ContentInfo*>(__pContentInfoList->GetAt(index));
1331 ContentId contentId = pContentInfo->GetContentId();
1332 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1338 FileListPresentationModel::GetContentFilePath(int index)
1340 AppLogDebug("ENTER index(%d)", index);
1341 if (__pContentInfoList == null || __pContentInfoList->GetCount() == 0)
1343 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
1348 if (index < 0 || index >= __pContentInfoList->GetCount())
1350 AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult()));
1355 ContentInfo* pContentInfo = static_cast<ContentInfo*>(__pContentInfoList->GetAt(index));
1356 String contentPath = pContentInfo->GetContentPath();
1357 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1363 FileListPresentationModel::CoverVideoOverlayedImageOnThumbnailN(Bitmap& thumbnail,
1364 const ThumbnailInfo& thumbmailInfo)
1366 AppLogDebug("ENTER");
1367 Bitmap* overlayedImage = null;
1369 if (&thumbmailInfo != null)
1371 long duration = thumbmailInfo.GetDuration();
1374 if (&thumbnail != null)
1376 BufferInfo bufferInfo;
1377 thumbnail.Lock(bufferInfo, INFINITE);
1379 mainCanvas.Construct(bufferInfo);
1383 Rectangle mainRect(0, 0, W_DEFAULT_THUMBNAIL, H_DEFAULT_THUMBNAIL);
1384 mainCanvas.Construct(mainRect);
1385 mainCanvas.FillRectangle(Color::GetColor(COLOR_ID_BLACK), mainRect);
1388 Rectangle playRect(GAP_W_PLAY_FG, GAP_H_PLAY_FG, W_PLAY_FG, H_PLAY_FG);
1389 Bitmap* playBitmap = ResourceManager::GetBitmapN(IDB_VIDEOTHUMBNAIL_PLAY);
1390 if (playBitmap != null)
1392 mainCanvas.DrawBitmap(playRect, *playBitmap);
1397 Rectangle durSize(0, 0, W_DURATION, H_DURATION);
1398 Rectangle durRect(0, GAP_H_DURATION, W_DURATION, H_DURATION);
1399 Color durColor(COLOR_DURATION_BG);
1400 durColor.SetAlpha(ALPHA_DURATION);
1401 durCanvas.Construct(durSize);
1402 durCanvas.FillRectangle(durColor, durSize);
1404 durFont.Construct(FONT_STYLE_PLAIN, FONT_SIZE_DURATION);
1405 durCanvas.SetFont(durFont);
1406 durCanvas.DrawText(Point(W_DURATION_TEXT, H_DURATION_TEXT), CommonUtil::DurationToTimeString(duration), COLOR_TEXT_OUTLINE);
1408 durBitmap.Construct(durCanvas,durCanvas.GetBounds());
1409 mainCanvas.DrawBitmap(durRect,durBitmap);
1411 overlayedImage = new (std::nothrow) Bitmap();
1412 overlayedImage->Construct(mainCanvas,mainCanvas.GetBounds());
1414 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1416 return overlayedImage;
1420 FileListPresentationModel::GetShadedBackgroundBitmapN(Bitmap& bgBitmap,
1421 const Bitmap& orgBitmap,
1422 const Rectangle& orgBitmapPosition)
1424 AppLogDebug("ENTER");
1425 if (&orgBitmap == null || &orgBitmap == null)
1427 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
1432 BufferInfo bufferInfo;
1433 bgBitmap.Lock(bufferInfo, INFINITE);
1436 mainCanvas.Construct(bufferInfo);
1438 mainCanvas.DrawBitmap(orgBitmapPosition, orgBitmap);
1440 Bitmap* pMainImage = new (std::nothrow) Bitmap();
1441 pMainImage->Construct(mainCanvas,mainCanvas.GetBounds());
1442 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1448 FileListPresentationModel::GetContentInfoListInDirectoryListN(const IList& contentDirectoryList,
1449 ContentType contentType)const
1451 AppLogDebug("ENTER");
1452 IList* pContentList = new (std::nothrow) ArrayList(SingleObjectDeleter);
1454 if ((&contentDirectoryList == null) || (contentDirectoryList.GetCount() == 0)
1455 || ((contentType != CONTENT_TYPE_IMAGE) && (contentType != CONTENT_TYPE_VIDEO) && (contentType != CONTENT_TYPE_ALL)))
1457 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
1458 return pContentList;
1461 ContentDirectory contentDirectory;
1462 IListT<ContentType>* pContentTypeList = new (std::nothrow) ArrayListT<ContentType>();
1463 if (contentType == CONTENT_TYPE_IMAGE || contentType == CONTENT_TYPE_ALL)
1465 pContentTypeList->Add(CONTENT_TYPE_IMAGE);
1467 if (contentType == CONTENT_TYPE_VIDEO || contentType == CONTENT_TYPE_ALL)
1469 pContentTypeList->Add(CONTENT_TYPE_VIDEO);
1471 result r = contentDirectory.Construct(*pContentTypeList);
1472 delete pContentTypeList;
1476 int pageNo = SIZE_PAGE_NO;
1477 int countPerPage = SIZE_CONUNT_PER_PAGE;
1478 String* pContentDirectory = null;
1480 int loopCount = contentDirectoryList.GetCount();
1481 for (int i = 0; i < loopCount; ++i)
1483 IList* pIList = null;
1484 pContentDirectory = const_cast<String*>(static_cast<const String*>(contentDirectoryList.GetAt(i)));
1485 if (pContentDirectory != null)
1487 pIList = contentDirectory.GetContentDirectoryItemListN(*pContentDirectory, pageNo, countPerPage,
1488 CONTENT_INFO_ORDER, SORT_ORDER_NONE);
1492 pContentList->AddItems(*pIList);
1501 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1503 return pContentList;
1507 FileListPresentationModel::ConvertToAlbumName(const String& targetPath)const
1509 AppLogDebug("ENTER");
1511 if (&targetPath == null || targetPath.GetLength() == 0)
1516 if (targetPath == RESERVED_CAMERA_PATH || targetPath == RESERVED_CAMERA_PATH_EXT)
1518 albumName = ResourceManager::GetString(L"IDS_MEDIABR_BODY_CAMERA_ROLL_ABB");
1520 else if (targetPath == RESERVED_DOWNLOAD_PATH)
1522 albumName = ResourceManager::GetString(L"IDS_COM_BODY_DOWNLOADS");
1526 String directoryName = GetDirecotyNameFromFullPath(targetPath);
1527 albumName = directoryName;
1534 FileListPresentationModel::GetAppControlMode(void) const
1536 AppLogDebug("Enter");
1537 AppLogDebug("Exit");
1539 return __appControlMode;
1543 FileListPresentationModel::GetAppControlMediaType(void) const
1545 AppLogDebug("Enter");
1546 AppLogDebug("Exit");
1548 return __appControlMediaType;
1551 AppControlSelectionMode
1552 FileListPresentationModel::GetAppControlSelectionMode(void) const
1554 AppLogDebug("Enter");
1555 AppLogDebug("Exit");
1557 return __appControlSelectionMode;