#include <FSystem.h>
#include "GlCommonUtil.h"
#include "GlFileListPresentationModel.h"
+#include "GlContentUpdateEventListener.h"
#include "GlGalleryApp.h"
#include "GlThumbnailEvent.h"
#include "GlThumbnailEventArg.h"
static const int SIZE_ICON_LIST_CACHE = 50;
static const int W_DURATION_TEXT = 44;
static const int H_DURATION_TEXT = 4;
-static const int W_DURATION = 158;
-static const int H_DURATION = 38;
-static const int W_DEFAULT_THUMBNAIL = 158;
-static const int H_DEFAULT_THUMBNAIL = 158;
-static const int W_WIDE_THUMBNAIL = 172;
-static const int H_WIDE_THUMBNAIL = 128;
+static const int W_DURATION = 171;
+static const int H_DURATION = 32;
+static const int W_DEFAULT_THUMBNAIL = 171;
+static const int H_DEFAULT_THUMBNAIL = 127;
+static const int W_WIDE_THUMBNAIL = 171;
+static const int H_WIDE_THUMBNAIL = 127;
static const int W_PLAY_FG = 64;
static const int H_PLAY_FG = 64;
-static const int GAP_W_PLAY_FG = 47;
-static const int GAP_H_PLAY_FG = 27;
-static const int GAP_H_DURATION = 27+64+28;
+static const int GAP_W_PLAY_FG = (W_DEFAULT_THUMBNAIL -W_PLAY_FG)/2 ;
+static const int GAP_H_PLAY_FG = (H_DEFAULT_THUMBNAIL - H_PLAY_FG)/2;
+static const int GAP_H_DURATION = H_DEFAULT_THUMBNAIL - H_DURATION;
static const int ALPHA_DURATION = 70;
-static const int FONT_SIZE_DURATION = 28;
-static const Dimension DIMENSION_REAL_ICON (162,164);
-static const Rectangle RECTANGLE_THUMBNAIL_OFFSET_POSION (1, 1, 156, 158);
-static const Rectangle RECTANGLE_VIDEO_THUMBNAIL_OFFSET_POSION (1, 1, 168, 124);
+static const int FONT_SIZE_DURATION = 24;
+static const Dimension DIMENSION_REAL_ICON (171,127);
+static const Rectangle RECTANGLE_THUMBNAIL_OFFSET_POSION (1, 1, 171, 127);
+static const Rectangle RECTANGLE_VIDEO_THUMBNAIL_OFFSET_POSION (1, 1, 171, 127);
static const Color COLOR_DURATION_BG (Color::GetColor(COLOR_ID_BLACK));
static const Color COLOR_TEXT_OUTLINE (Color::GetColor(COLOR_ID_WHITE));
ThumbnailProvider* FileListPresentationModel::__pThumbnailProvider = null;
ThumbnailEvent* FileListPresentationModel::__pThumbnailEvent = null;
ArrayList* FileListPresentationModel::__pPresentationModelListener = null;
+ArrayList* FileListPresentationModel::__pContentEventListener = null;
ArrayList* FileListPresentationModel::__pIconListViewCache = null;
IList* FileListPresentationModel::__pDirectoryList = null;
IList* FileListPresentationModel::__pContentInfoList = null;
FileListPresentationModel::FileListPresentationModel(void)
- :__albumContentType(CONTENT_TYPE_ALL)
- ,__appControlMode(APP_CONTROL_MODE_MAIN)
- ,__appControlMediaType(APPCONTROL_MEDIA_TYPE_UNKNOWN)
- ,__appControlSelectionMode(APPCONTROL_SELECTION_MODE_UNKNOWN)
+ : __albumContentType(CONTENT_TYPE_ALL)
+ , __appControlMode(APP_CONTROL_MODE_MAIN)
+ , __appControlMediaType(APPCONTROL_MEDIA_TYPE_IMAGE)
+ , __appControlSelectionMode(APPCONTROL_SELECTION_MODE_SINGLE)
{
AppLogDebug("ENTER");
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
__pThumbnailEvent = new (std::nothrow) ThumbnailEvent();
__pThumbnailEvent->AddListener(*pThumbnailEventListener, true);
+ ContentUpdateEventListener::GetInstance();
+ __pContentManager = new (std::nothrow) ContentManager();
+ __pContentManager->Construct();
+
if (__pIconListViewCache != null)
{
delete __pIconListViewCache;
__pPresentationModelListener = new (std::nothrow) ArrayList();
__pPresentationModelListener->Construct();
+ __pContentEventListener = new (std::nothrow) ArrayList();
+ __pContentEventListener->Construct();
+
__pThumbnailProvider = ThumbnailProvider::GetInstance();
GalleryApp* pApp = static_cast<GalleryApp*>(GalleryApp::GetInstance());
if (pArguments != null)
{
const String* selectionMode = static_cast<const String*>(pArguments->GetValue(String(APPCONTROL_KEY_SELECTION_MODE)));
- const String* mediaType = static_cast<const String*>(pArguments->GetValue(String(APPCONTROL_KEY_MEDIA_TYPE)));
- if (mediaType != null && mediaType->CompareTo(APPCONTROL_DATA_VIDEO) == 0)
+ if (pApp->GetMimeType().StartsWith(APPCONTROL_DATA_VIDEO, 0) == 0)
{
__appControlMediaType = APPCONTROL_MEDIA_TYPE_VIDEO;
}
- else
- {
- __appControlMediaType = APPCONTROL_MEDIA_TYPE_IMAGE;
- }
if (selectionMode != null && selectionMode->CompareTo(APPCONTROL_DATA_MULTIPLE) == 0)
{
__appControlSelectionMode = APPCONTROL_SELECTION_MODE_MULTIPLE;
}
- else
- {
- __appControlSelectionMode = APPCONTROL_SELECTION_MODE_SINGLE;
- }
}
}
else if (operationId.CompareTo(APPCONTROL_OPERATION_ID_CONFIGURE) == 0)
{
__appControlMode = APP_CONTROL_MODE_SETTING;
}
+
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
return E_SUCCESS;
__pPresentationModelListener = null;
}
+ if (__pContentEventListener != null)
+ {
+ delete __pContentEventListener;
+ __pContentEventListener = null;
+ }
+
delete __pPresentationModelInstance;
__pPresentationModelInstance = null;
if (pContentTypeList != null)
{
delete pContentTypeList;
- pContentTypeList = null;
}
TryReturn(r == E_SUCCESS, false, "[%s] Unable to construct ContentDirectory", GetErrorMessage(r));
int pageNo = SIZE_PAGE_NO;
int countPerPage = SIZE_CONUNT_PER_PAGE;
- IList* pContentList = contentDirectory.GetContentDirectoryItemListN(directoryPath, pageNo, countPerPage, CONTENT_INFO_ORDER, SORT_ORDER_ASCENDING);
+ IList* pContentList = contentDirectory.GetContentDirectoryItemListN(directoryPath, pageNo, countPerPage,
+ CONTENT_INFO_ORDER, SORT_ORDER_ASCENDING);
if (pContentList == null || pContentList->GetCount() <= 0)
{
if (pContentList != null)
{
delete pContentList;
- pContentList = null;
}
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
{
pDstBitmap = CoverVideoOverlayedImageOnThumbnailN(*pOrgBitmap, *pThumbnailInfo);
delete pOrgBitmap;
- pOrgBitmap = null;
}
}
else
Bitmap* pThumbnailBgBitmap = ResourceManager::GetBitmapN(IDB_VIDEOTHUMBNAIL_BG);
Rectangle thumbnailRect(RECTANGLE_THUMBNAIL_OFFSET_POSION);
pDstBitmap->Scale(Dimension(RECTANGLE_THUMBNAIL_OFFSET_POSION.width - RECTANGLE_THUMBNAIL_OFFSET_POSION.x
- , RECTANGLE_THUMBNAIL_OFFSET_POSION.height - RECTANGLE_THUMBNAIL_OFFSET_POSION.y));
+ , RECTANGLE_THUMBNAIL_OFFSET_POSION.height - RECTANGLE_THUMBNAIL_OFFSET_POSION.y));
if (pThumbnailBgBitmap != null)
{
pThumbnailBgBitmap->Scale(DIMENSION_REAL_ICON);
pThumbnail = GetShadedBackgroundBitmapN(*pThumbnailBgBitmap, *pDstBitmap, thumbnailRect);
delete pThumbnailBgBitmap;
- pThumbnailBgBitmap = null;
delete pDstBitmap;
- pDstBitmap = null;
}
else
{
if (pThumbnailInfo != null)
{
delete pThumbnailInfo;
- pThumbnailInfo = null;
}
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
Bitmap* pThumbnailBgBitmap = ResourceManager::GetBitmapN(IDB_VIDEOTHUMBNAIL_BG);
Rectangle thumbnailRect(RECTANGLE_VIDEO_THUMBNAIL_OFFSET_POSION);
pOrgBitmap->Scale(Dimension(RECTANGLE_VIDEO_THUMBNAIL_OFFSET_POSION.width - RECTANGLE_VIDEO_THUMBNAIL_OFFSET_POSION.x
- , RECTANGLE_VIDEO_THUMBNAIL_OFFSET_POSION.height - RECTANGLE_VIDEO_THUMBNAIL_OFFSET_POSION.y));
+ , RECTANGLE_VIDEO_THUMBNAIL_OFFSET_POSION.height - RECTANGLE_VIDEO_THUMBNAIL_OFFSET_POSION.y));
if (pThumbnailBgBitmap != null)
{
pThumbnailBgBitmap->Scale(Dimension(W_WIDE_THUMBNAIL, H_WIDE_THUMBNAIL));
pThumbnail = GetShadedBackgroundBitmapN(*pThumbnailBgBitmap, *pOrgBitmap, thumbnailRect);
delete pThumbnailBgBitmap;
- pThumbnailBgBitmap = null;
}
delete pOrgBitmap;
- pOrgBitmap = null;
}
else
{
if (pThumbnailInfo != null)
{
delete pThumbnailInfo;
- pThumbnailInfo = null;
}
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
return;
}
- __pThumbnailProvider->RequestThumbnail(pContentInfo->GetContentId(), __pThumbnailEvent);
+ __pThumbnailProvider->RequestThumbnail(pContentInfo->GetContentId(), __pThumbnailEvent);
AppLogDebug("EXIT");
}
FileListPresentationModel::CancelThumbnailRequest(const int index)
{
AppLogDebug("ENTER : index(%d)", index);
- ContentInfo* pContentInfo = null;
+ /*ContentInfo* pContentInfo = null;
if (__pContentInfoList != null && index < __pContentInfoList->GetCount())
{
AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
return;
}
- __pThumbnailProvider->CancelThumbnailRequest(pContentInfo->GetContentId(), __pThumbnailEvent);
- }
+ __pThumbnailProvider->CancelThumbnailRequest(pContentInfo->GetContentId(), __pThumbnailEvent);
+ }*/
AppLogDebug("EXIT");
}
if (__pThumbnailProvider != null)
{
- __pThumbnailProvider->ClearThumbnailRequests(appTerminating);
+ __pThumbnailProvider->ClearThumbnailRequests(appTerminating);
}
AppLogDebug("EXIT");
pTempThumbnailInfo->SetContentType(pThumbnailInfo->GetContentType());
pTempThumbnailInfo->SetDuration(pThumbnailInfo->GetDuration());
delete pThumbnailInfo;
- pThumbnailInfo = null;
isMatch = true;
break;
}
{
__pIconListViewCache->RemoveAt(0, true);
}
- AppLogDebug("[CHASEFIRE] (all:%d) Add Thumbail(%ls)",__pIconListViewCache->GetCount(), pThumbnailInfo->GetFilePath().GetPointer());
+ AppLogDebug("[CHASEFIRE] (all:%d) Add Thumbail(%ls)",__pIconListViewCache->GetCount(),
+ pThumbnailInfo->GetFilePath().GetPointer());
__pIconListViewCache->Add(pThumbnailInfo);
}
}
pInterface->OnThumbnailDecoded(index);
}
delete pEventEnum;
- pEventEnum = null;
}
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
void
+FileListPresentationModel::OnContentCreated(Tizen::Content::ContentId contentId, Tizen::Content::ContentType contentType, result r)
+{
+ AppLogDebug("ENTER");
+ IFormContentUpdateEventListener* pInterface = null;
+ if (__pContentEventListener == null)
+ {
+ AppLogDebug("EXIT");
+ return;
+ }
+ IEnumerator* pEventEnum = __pContentEventListener->GetEnumeratorN();
+ while (pEventEnum->MoveNext() == E_SUCCESS)
+ {
+ pInterface = static_cast<IFormContentUpdateEventListener*>(pEventEnum->GetCurrent());
+ pInterface->OnContentUpdated();
+ }
+ delete pEventEnum;
+ AppLogDebug("EXIT");
+}
+
+void
+FileListPresentationModel::OnContentUpdated(Tizen::Content::ContentId contentId, Tizen::Content::ContentType contentType, result r)
+{
+ AppLogDebug("ENTER");
+ IFormContentUpdateEventListener* pInterface = null;
+ if (__pContentEventListener == null)
+ {
+ AppLogDebug("EXIT");
+ return;
+ }
+ IEnumerator* pEventEnum = __pContentEventListener->GetEnumeratorN();
+ while (pEventEnum->MoveNext() == E_SUCCESS)
+ {
+ pInterface = static_cast<IFormContentUpdateEventListener*>(pEventEnum->GetCurrent());
+ pInterface->OnContentUpdated();
+ }
+ delete pEventEnum;
+ AppLogDebug("EXIT");
+}
+
+void
+FileListPresentationModel::OnContentDeleted(Tizen::Content::ContentId contentId, Tizen::Content::ContentType contentType, result r)
+{
+ AppLogDebug("ENTER");
+ IFormContentUpdateEventListener* pInterface = null;
+ if (__pContentEventListener == null)
+ {
+ AppLogDebug("EXIT");
+ return;
+ }
+ IEnumerator* pEventEnum = __pContentEventListener->GetEnumeratorN();
+ while (pEventEnum->MoveNext() == E_SUCCESS)
+ {
+ pInterface = static_cast<IFormContentUpdateEventListener*>(pEventEnum->GetCurrent());
+ pInterface->OnContentUpdated();
+ }
+ delete pEventEnum;
+ AppLogDebug("EXIT");
+}
+
+void
FileListPresentationModel::AddPresentationModelListener(const IAlbumEventListener* listener)
{
AppLogDebug("ENTER");
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
+void
+FileListPresentationModel::AddContentEventListener(const IFormContentUpdateEventListener* listener)
+{
+ AppLogDebug("ENTER");
+ if (__pContentEventListener != null)
+ {
+ __pContentEventListener->RemoveAll();
+ __pContentEventListener->Add((Object*)listener);
+ AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+ }
+}
+
+void
+FileListPresentationModel::RemoveContentEventListener(const IFormContentUpdateEventListener* listener)
+{
+ AppLogDebug("ENTER");
+ __pContentEventListener->Remove(*listener);
+ AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+}
+
ThumbnailInfo*
FileListPresentationModel::GetThumbnailInfoFromInternalBufferN(const ContentId& contentId) const
{
if ((pIndex != null) && (pIndex->ToInt())>=0 && __pContentInfoList->GetCount() > pIndex->ToInt())
{
- pContentIdList->Add(new (std::nothrow) ContentId((static_cast<ContentInfo*>(__pContentInfoList->GetAt(pIndex->ToInt())))->GetContentId()));
+ pContentIdList->Add(new (std::nothrow) ContentId((static_cast<ContentInfo*>
+ (__pContentInfoList->GetAt(pIndex->ToInt())))->GetContentId()));
}
}
FileListPresentationModel::GetCollisionIndexListN(const IList& contentIndexList, const String& destDirectory)
{
AppLogDebug("ENTER");
- if (&contentIndexList == null || contentIndexList.GetCount() <= 0 || &destDirectory == null || destDirectory.IsEmpty() == true)
+ if (&contentIndexList == null || contentIndexList.GetCount() <= 0 || &destDirectory == null
+ || destDirectory.IsEmpty() == true)
{
AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
Directory::Create(destDirectory, true);
}
- IList * pContentIdList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ delete __pContentIdList;
+ __pContentIdList = new (std::nothrow) ArrayList(SingleObjectDeleter);
int loopCount = contentIndexList.GetCount();
for (int i = 0; i < loopCount; ++i)
{
if ((pIndex != null) && (pIndex->ToInt())>=0 && __pContentInfoList->GetCount() > pIndex->ToInt())
{
- pContentIdList->Add(new (std::nothrow) ContentId((static_cast<ContentInfo*>(__pContentInfoList->GetAt(pIndex->ToInt())))->GetContentId()));
+ __pContentIdList->Add(new (std::nothrow) ContentId((static_cast<ContentInfo*>(__pContentInfoList->GetAt(pIndex->ToInt())))->GetContentId()));
}
}
- loopCount = pContentIdList->GetCount();
- for (int i = 0; i < loopCount; ++i)
- {
- ContentId* pContentId = static_cast<ContentId*>(pContentIdList->GetAt(i));
- if (pContentId != null)
- {
- MoveToContentFile(*pContentId, destDirectory);
- }
- }
+
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
return E_SUCCESS;
return E_SUCCESS;
}
- ContentManager contentManager;
- result r = contentManager.Construct();
- if (r == E_SUCCESS)
- {
- r = contentManager.DeleteContent(contentId);
- }
+ result r = __pContentManager->DeleteContent(contentId);
+
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
return r;
AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
return E_FAILURE;
}
-
- ContentManager contentManager;
- result r = contentManager.Construct();
- if (r == E_SUCCESS)
+ result r = E_SUCCESS;
+ ContentInfo* pContentInfo = __pContentManager->GetContentInfoN(contentId);
+ if (pContentInfo == null)
{
- ContentInfo* pContentInfo = contentManager.GetContentInfoN(contentId);
- if (pContentInfo == null)
- {
- AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult()));
- return E_FAILURE;
- }
-
- String filePath = pContentInfo->GetContentPath();
- if (filePath.GetLength() < 4)
- {
- AppLogDebug("EXIT 3(%s)", GetErrorMessage(GetLastResult()));
-
- return E_SUCCESS;
- }
-
- String destPath;
- if (destDirectory.EndsWith(DIRECTORY_SEPARATOR) == true)
- {
- destPath.Append(destDirectory);
- destPath.Append(GetFileNameFromFullPath(filePath, true));
- }
- else
- {
- destPath.Append(destDirectory);
- destPath.Append(DIRECTORY_SEPARATOR);
- destPath.Append(GetFileNameFromFullPath(filePath, true));
- }
+ AppLogDebug("Santhosh %s", destDirectory.GetPointer());
+ AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult()));
+ return E_FAILURE;
+ }
- if (destPath.CompareTo(filePath) == 0)
- {
- AppLogDebug("EXIT 4(%s)", GetErrorMessage(GetLastResult()));
+ String filePath = pContentInfo->GetContentPath();
+ if (filePath.GetLength() < 4)
+ {
+ AppLogDebug("EXIT 3(%s)", GetErrorMessage(GetLastResult()));
+ return E_SUCCESS;
+ }
- return E_SUCCESS;
- }
+ String destPath;
+ if (destDirectory.EndsWith(DIRECTORY_SEPARATOR) == true)
+ {
+ destPath.Append(destDirectory);
+ destPath.Append(GetFileNameFromFullPath(filePath, true));
+ }
+ else
+ {
+ destPath.Append(destDirectory);
+ destPath.Append(DIRECTORY_SEPARATOR);
+ destPath.Append(GetFileNameFromFullPath(filePath, true));
+ }
- if (File::IsFileExist(destPath) == true)
- {
- File::Remove(destPath);
- }
+ if (destPath.CompareTo(filePath) == 0)
+ {
+ AppLogDebug("EXIT 4(%s)", GetErrorMessage(GetLastResult()));
+ return E_SUCCESS;
+ }
- result r = E_SUCCESS;
+ if (File::IsFileExist(destPath) == true)
+ {
+ File::Remove(destPath);
+ }
- if (pContentInfo->GetContentType() == CONTENT_TYPE_IMAGE)
+ if (pContentInfo->GetContentType() == CONTENT_TYPE_IMAGE)
+ {
+ r = File::Copy(filePath, destPath, false);
+ if (r == E_SUCCESS)
{
-
- r = File::Copy(filePath, destPath, false);
if (r == E_SUCCESS)
{
- ContentManager cntManager;
- result rt = cntManager.Construct();
- if (rt == E_SUCCESS)
+ ImageContentInfo contentInfo;
+ r = contentInfo.Construct(&destPath);
+ if (r == E_SUCCESS)
{
- ImageContentInfo contentInfo;
- rt = contentInfo.Construct(&destPath);
- if (rt == E_SUCCESS)
- {
- cntManager.CreateContent(contentInfo);
- cntManager.DeleteContent(contentId);
- }
+ __pContentManager->CreateContent(contentInfo);
+ r = GetLastResult();
+ TryCatch(!IsFailed(r),,"CreateContent::the value is %s",GetErrorMessage(r));
+ r = __pContentManager->DeleteContent(contentId);
+ TryCatch(!IsFailed(r),,"DeleteContent::the value is %s",GetErrorMessage(r));
}
}
}
- else if (pContentInfo->GetContentType() == CONTENT_TYPE_VIDEO)
+ }
+ else if (pContentInfo->GetContentType() == CONTENT_TYPE_VIDEO)
+ {
+ r = File::Copy(filePath, destPath, false);
+ if (r == E_SUCCESS)
{
- r = File::Copy(filePath, destPath, false);
-
- if (r == E_SUCCESS)
+ VideoContentInfo contentInfo;
+ r = contentInfo.Construct(&destPath);
{
- ContentManager cntManager;
- result rt = cntManager.Construct();
- if (rt == E_SUCCESS)
- {
- VideoContentInfo contentInfo;
- rt = contentInfo.Construct(&destPath);
- {
- cntManager.CreateContent(contentInfo);
- cntManager.DeleteContent(contentId);
- }
- }
+ __pContentManager->CreateContent(contentInfo);
+ r = GetLastResult();
+ TryCatch(!IsFailed(r),,"CreateContent::the value is %s",GetErrorMessage(r));
+ r = __pContentManager->DeleteContent(contentId);
+ TryCatch(!IsFailed(r),,"DeleteContent::the value is %s",GetErrorMessage(r));
}
}
- delete pContentInfo;
- pContentInfo = null;
}
+ CATCH:
+ delete pContentInfo;
+
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
return r;
}
result
-FileListPresentationModel::StartAppControl( const String& providerId, const String& operationId,
- const IMap* pDataList, IAppControlResponseListener* pListener)
+FileListPresentationModel::StartAppControl(const String& providerId, const String& operationId,
+ const String* pUriData, const Tizen::Base::String* pMimeType, const HashMap* pDataList,
+ IAppControlResponseListener* pListener)
{
AppLogDebug("ENTER");
- AppLogDebug("FindAppControlN(%ls, %ls)", providerId.GetPointer(), operationId.GetPointer());
- if (pDataList != null)
- {
- IList* pKeyList = pDataList->GetKeysN();
- if (pKeyList != null)
- {
- int keyCount = pKeyList->GetCount();
- for (int i = 0 ; i < keyCount ; ++i)
- {
- String* pKey = const_cast<String*>(static_cast<const String*>(pKeyList->GetAt(i)));
- String* pValue = const_cast<String*>(static_cast<const String*>(pDataList->GetValue(*pKey)));
-
- AppLogDebug("(%ls:%ls)", pKey == null ? L"(null)" : pKey->GetPointer(), pValue == null ? L"(null)" : pValue->GetPointer());
- }
- }
- }
AppControl* pAc = AppManager::FindAppControlN(providerId, operationId);
if (pAc == null)
{
AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
-
return E_FAILURE;
}
- result r = pAc->Start(null, null, pDataList, pListener);
+ result r = pAc->Start(pUriData, pMimeType, pDataList, pListener);
if (r == E_SUCCESS)
{
int loopCount = directoryList.GetCount();
for (int i = 0; i < loopCount; ++i)
{
- __pDirectoryList->Add(new (std::nothrow) String(*(const_cast<String*>(static_cast<const String*>(directoryList.GetAt(i))))));
+ __pDirectoryList->Add(new (std::nothrow) String(*(const_cast<String*>
+ (static_cast<const String*>(directoryList.GetAt(i))))));
}
if (__pContentInfoList != null)
if (__pContentInfoList != null)
{
delete __pContentInfoList;
+ __pContentInfoList = null;
}
__pContentInfoList = GetContentInfoListInDirectoryListN(*__pDirectoryList, __albumContentType);
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
return pContentInfo;
}
+
+IList* FileListPresentationModel::GetContentIdListN(const IList& contentInfoList)
+{
+ IList* pContentIdList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ int loopCount = contentInfoList.GetCount();
+ for (int i = 0; i < loopCount; ++i)
+ {
+ const Integer* pIndex = static_cast<const Integer*>(contentInfoList.GetAt(i));
+
+ if ((pIndex != null) && (pIndex->ToInt())>=0 && __pContentInfoList->GetCount() > pIndex->ToInt())
+ {
+ pContentIdList->Add(new (std::nothrow) ContentId((static_cast<ContentInfo*>(__pContentInfoList->GetAt(pIndex->ToInt())))->GetContentId()));
+ }
+ }
+
+ return pContentIdList;
+}
+
int
FileListPresentationModel::GetCurrentAlbumContentInfoCount(void)
{
Bitmap*
FileListPresentationModel::CoverVideoOverlayedImageOnThumbnailN(Bitmap& thumbnail,
- const ThumbnailInfo& thumbmailInfo)
+ const ThumbnailInfo& thumbmailInfo)
{
AppLogDebug("ENTER");
Bitmap* overlayedImage = null;
{
mainCanvas.DrawBitmap(playRect, *playBitmap);
delete playBitmap;
- playBitmap = null;
}
Canvas durCanvas;
Bitmap*
FileListPresentationModel::GetShadedBackgroundBitmapN(Bitmap& bgBitmap,
- const Bitmap& orgBitmap,
- const Rectangle& orgBitmapPosition)
+ const Bitmap& orgBitmap,
+ const Rectangle& orgBitmapPosition)
{
AppLogDebug("ENTER");
if (&orgBitmap == null || &orgBitmap == null)
IList*
FileListPresentationModel::GetContentInfoListInDirectoryListN(const IList& contentDirectoryList,
- ContentType contentType)const
+ ContentType contentType)const
{
AppLogDebug("ENTER");
IList* pContentList = new (std::nothrow) ArrayList(SingleObjectDeleter);