extern const wchar_t* APPCONTROL_KEY_SOCIAL_RESULT_TYPE;
extern const wchar_t* APPCONTROL_KEY_MESSAGE_TYPE;
extern const wchar_t* APPCONTROL_KEY_SOCIAL_ITEM_ID;
+extern const wchar_t* APPCONTROL_KEY_IMAGE_CROP_MODE;
extern const wchar_t* APPCONTROL_URI_MMS_TO;
extern const wchar_t* APPCONTROL_URI_MAIL_TO;
extern const wchar_t* APPCONTROL_DATA_URI_FILE;
extern const wchar_t* APPCONTROL_DATA_PERSON;
extern const wchar_t* APPCONTROL_DATA_MMS;
+extern const wchar_t* APPCONTROL_DATA_AUTO;
+extern const wchar_t* APPCONTROL_DATA_FIT_TO_SCREEN;
extern const wchar_t* SETTING_VALUE_HOME_SCREEN_WALLPAPER;
extern const wchar_t* SETTING_VALUE_LOCK_SCREEN_WALLPAPER;
extern const wchar_t* DIRECTORY_SEPARATOR;
extern const wchar_t* FILE_EXT_SEPARATOR;
extern const wchar_t* APPCONTROL_PATH_SEPARATOR;
+extern const wchar_t* FILE_NAME_SEPARATOR;
extern const wchar_t* IDB_IMAGE_VIEWERFORM_BUTTON_PLAY;
extern const wchar_t* IDB_IMAGE_VIEWERFORM_BUTTON_DETAILS;
#include <FSystem.h>
#include <FSocial.h>
#include "IvImageCropForm.h"
+#include "IvImageViewerApp.h"
#include "IvImageViewerPresentationModel.h"
#include "IvResourceManager.h"
#include "IvTypes.h"
static const int CROP_BOX_LINE_WIDTH = 5;
ImageCropForm::ImageCropForm(void)
- : __imageHeight(0)
+ : __cropMode(APPCONTROL_DATA_AUTO)
+ , __imageHeight(0)
, __imageWidth(0)
, __isOrientationChanged(false)
, __pCanvas(null)
result
ImageCropForm::OnInitializing(void)
{
- result r = E_SUCCESS;
-
AppResource* pAppResource = null;
Bitmap* pSaveButtonBitmap = null;
Bitmap* pCancelButtonBitmap = null;
AddOrientationEventListener(*this);
__pPresentationModel->AddFileUpdateListener(this);
- return r;
+ return E_SUCCESS;
}
void
AppLogDebug("ENTER pArgs(%x)", pArgs);
if (pArgs != null)
{
- IEnumerator* pEnum = pArgs->GetEnumeratorN();
- if (pEnum->MoveNext() != E_SUCCESS)
- {
- delete pEnum;
- delete pArgs;
- AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
+ __sourceFilePath = *(static_cast<String*>(pArgs->GetAt(0)));
+ __cropMode = *(static_cast<String*>(pArgs->GetAt(1)));
+ }
+ else
+ {
+ __sourceFilePath = __pPresentationModel->GetFilePathAt(0);
- return;
- }
- __sourceFilePath = *(static_cast<String*>(pEnum->GetCurrent()));
- if (__sourceFilePath.IsEmpty() == false)
+ ImageViewerApp* pImageViewerApp = static_cast<ImageViewerApp*>(ImageViewerApp::GetInstance());
+ const IMap* pIMap = pImageViewerApp->GetAppControlArguments();
+
+ if (pIMap != null)
{
- result r = __imageBuffer.Construct(__sourceFilePath.GetPointer());
- if (r == E_SUCCESS)
+ const String* pCropMode = static_cast<const String*>(pIMap->GetValue(String(APPCONTROL_KEY_IMAGE_CROP_MODE)));
+
+ if (pCropMode != null)
{
- __imageWidth = __imageBuffer.GetWidth();
- __imageHeight = __imageBuffer.GetHeight();
- __pCurrentBitmap = __imageBuffer.GetBitmapN(BITMAP_PIXEL_FORMAT_RGB565, BUFFER_SCALING_AUTO);
+ __cropMode = *pCropMode;
}
- Image img;
- __imageFormat = img.GetImageFormat(__sourceFilePath);
}
- if (pEnum->MoveNext() != E_SUCCESS)
+ }
+
+ if (__sourceFilePath.IsEmpty() == false)
+ {
+ result r = __imageBuffer.Construct(__sourceFilePath.GetPointer());
+ if (r == E_SUCCESS)
{
- delete pEnum;
- delete pArgs;
- AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult()));
+ __imageWidth = __imageBuffer.GetWidth();
+ __imageHeight = __imageBuffer.GetHeight();
+ __pCurrentBitmap = __imageBuffer.GetBitmapN(BITMAP_PIXEL_FORMAT_RGB565, BUFFER_SCALING_AUTO);
+ }
+ Image img;
+ __imageFormat = img.GetImageFormat(__sourceFilePath);
+ }
- return;
+ if (__cropMode == APPCONTROL_DATA_AUTO)
+ {
+ SetValue();
+ return;
+ }
+ else if (__cropMode == APPCONTROL_DATA_FIT_TO_SCREEN)
+ {
+ Integer *pStatus = static_cast<Integer*>(pArgs->GetAt(2));
+ if (pStatus != null)
+ {
+ __statusValue = pStatus->ToInt();
}
- __cropMode = *(static_cast<String*>(pEnum->GetCurrent()));
- if (__cropMode.IsEmpty() == false)
+ if (__statusValue == SET_AT_TYPE_CALLER_IMAGE)
{
- __cropMode.ToLowerCase();
- if (__cropMode == "auto")
- {
- delete pEnum;
- delete pArgs;
- SetValue();
- return;
- }
- else if (__cropMode == "fit-to-screen")
+ LongLong* pContentId = static_cast<LongLong*>(pArgs->GetAt(3));
+ if (pContentId != null)
{
- if (pEnum->MoveNext() != E_SUCCESS)
- {
- delete pEnum;
- delete pArgs;
- AppLogDebug("EXIT 3(%s)", GetErrorMessage(GetLastResult()));
-
- return;
- }
- Integer *pStatus = static_cast<Integer*>(pEnum->GetCurrent());
- if (pStatus != null)
- {
- __statusValue = pStatus->ToInt();
- }
- if (__statusValue == SET_AT_TYPE_CALLER_IMAGE)
- {
- if (pEnum->MoveNext() != E_SUCCESS)
- {
- delete pEnum;
- delete pArgs;
- AppLogDebug("EXIT 4(%s)", GetErrorMessage(GetLastResult()));
-
- return;
- }
-
- LongLong* pContentId = static_cast<LongLong*>(pEnum->GetCurrent());
- if (pContentId != null)
- {
- __contentId = pContentId->ToLongLong();
- }
- }
-
- delete pEnum;
- delete pArgs;
- SetValue();
+ __contentId = pContentId->ToLongLong();
}
}
+ SetValue();
}
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
r = __pCanvas->DrawBitmap(Rectangle(__cropBox.x + __cropBox.width - (CROP_RECTANGLE_HEIGHT / 2), (__cropBox.y + __cropBox.height - (CROP_RECTANGLE_HEIGHT / 2)), CROP_RECTANGLE_HEIGHT, CROP_RECTANGLE_HEIGHT), *__pRectangleBitmap); // Bottom Right Rectangle
r = __pCanvas->DrawBitmap(Rectangle(__cropBox.x - (CROP_RECTANGLE_HEIGHT / 2), (__cropBox.y + __cropBox.height - (CROP_RECTANGLE_HEIGHT / 2)), CROP_RECTANGLE_HEIGHT, CROP_RECTANGLE_HEIGHT), *__pRectangleBitmap); // Bottom Left Rectangle
}
- AppLogDebug("EXIT");
+ AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
return r;
}
break;
case IDA_BUTTON_SAVE:
{
- if (__cropMode == "auto")
+ if (__cropMode == APPCONTROL_DATA_AUTO)
{
ImageBuffer* pCropBuffer = null;
int count = 1;
int index = 0;
String destFilePath;
- String stringToInsert = L"_";
- String delimiter = L".";
if (__sourceFilePath.IsEmpty() == false)
{
__sourceFilePath.Reverse();
- __sourceFilePath.IndexOf(delimiter, 0, index);
+ __sourceFilePath.IndexOf(FILE_EXT_SEPARATOR, 0, index);
__sourceFilePath.Reverse();
- __sourceFilePath.Insert(stringToInsert, __sourceFilePath.GetLength() - index - 1);
+ __sourceFilePath.Insert(FILE_NAME_SEPARATOR, __sourceFilePath.GetLength() - index - 1);
destFilePath.Append(__sourceFilePath);
destFilePath.Insert(count, destFilePath.GetLength() - index - 1);
while (File::IsFileExist(destFilePath) == true)
pList->Add(new (std::nothrow) String(destFilePath));
pSceneManager->GoBackward(BackwardSceneTransition(), pList);
}
- else if(__cropMode == "fit-to-screen")
+ else if(__cropMode == APPCONTROL_DATA_FIT_TO_SCREEN)
{
ImageBuffer* pCropBuffer = null;
result r = E_SUCCESS;
(__cropBox.width * __imageWidth) / __imageBox.width, (__cropBox.height * __imageHeight) / __imageBox.height);
if (__statusValue == SET_AT_TYPE_HOME_SCREEN_WALLPAPER)
{
- String destPath = App::GetInstance()->GetAppRootPath() + TEMP_FILE_PATH_HOME_SCREEN_WALLPAPER;
+ String destPath = App::GetInstance()->GetAppDataPath() + TEMP_FILE_PATH_HOME_SCREEN_WALLPAPER;
r = pCropBuffer->EncodeToFile(destPath, __imageFormat, true, 100);
if (r == E_SUCCESS)
{
r = SettingInfo::SetValue(SETTING_VALUE_HOME_SCREEN_WALLPAPER, destPath);
}
- else if (r == E_OVERFLOW)
- {
- MessageBox messageBox;
- messageBox.Construct(L"", L"File size is too big", MSGBOX_STYLE_NONE, 3000);
- int modalResult = 0;
- messageBox.ShowAndWait(modalResult);
- }
}
else if (__statusValue == SET_AT_TYPE_LOCK_SCREEN_WALLPAPER)
{
- String destPath = App::GetInstance()->GetAppRootPath() + TEMP_FILE_PATH_LOCK_SCREEN_WALLPAPER;
+ String destPath = App::GetInstance()->GetAppDataPath() + TEMP_FILE_PATH_LOCK_SCREEN_WALLPAPER;
r = pCropBuffer->EncodeToFile(destPath, __imageFormat, true, 100);
if (r == E_SUCCESS)
{
r = SettingInfo::SetValue(SETTING_VALUE_LOCK_SCREEN_WALLPAPER, destPath);
}
- else if (r == E_OVERFLOW)
- {
- MessageBox messageBox;
- messageBox.Construct(L"", L"File size is too big", MSGBOX_STYLE_NONE, 3000);
- int modalResult = 0;
- messageBox.ShowAndWait(modalResult);
- }
}
else if (__statusValue == SET_AT_TYPE_HOME_AND_LOCK_SCREEN_WALLPAPER)
{
- String destPath = App::GetInstance()->GetAppRootPath() + TEMP_FILE_PATH_LOCK_SCREEN_WALLPAPER;
- String destPathHome = App::GetInstance()->GetAppRootPath() + TEMP_FILE_PATH_HOME_SCREEN_WALLPAPER;
+ String destPath = App::GetInstance()->GetAppDataPath() + TEMP_FILE_PATH_LOCK_SCREEN_WALLPAPER;
+ String destPathHome = App::GetInstance()->GetAppDataPath() + TEMP_FILE_PATH_HOME_SCREEN_WALLPAPER;
r = pCropBuffer->EncodeToFile(destPath, __imageFormat, true, 100);
r = pCropBuffer->EncodeToFile(destPathHome, __imageFormat, true, 100);
if (r == E_SUCCESS)
int count = 1;
int index = 0;
String destFilePath;
- String stringToInsert = L"_";
- String delimiter = L".";
+
if (__sourceFilePath.IsEmpty() == false)
{
__sourceFilePath.Reverse();
- __sourceFilePath.IndexOf(delimiter, 0, index);
+ __sourceFilePath.IndexOf(FILE_EXT_SEPARATOR, 0, index);
__sourceFilePath.Reverse();
- __sourceFilePath.Insert(stringToInsert, __sourceFilePath.GetLength() - index - 1);
+ __sourceFilePath.Insert(FILE_NAME_SEPARATOR, __sourceFilePath.GetLength() - index - 1);
destFilePath.Append(__sourceFilePath);
destFilePath.Insert(count, destFilePath.GetLength() - index - 1);
while (File::IsFileExist(destFilePath) == true)
ArrayList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter);
pList->Add(new (std::nothrow) String(destFilePath));
pSceneManager->GoBackward(BackwardSceneTransition(), pList);
- AppLog("Exit");
+ AppLogDebug("EXIT(%s)1", GetErrorMessage(GetLastResult()));
return;
}
delete pCropBuffer;
}
break;
}
- AppLog("Exit");
+ AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
void
__isOrientationChanged = true;
SetValue();
__pCanvas->Clear();
- AppLogDebug("EXIT");
+ AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
void
AppLogDebug("ENTER");
__touchStart = currentPosition;
CheckCurrentPosition(currentPosition);
- AppLogDebug("EXIT");
+ AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
void
AppLogDebug("ENTER");
int deltaX = currentPosition.x - __touchStart.x;
int deltaY = currentPosition.y - __touchStart.y;
- if (__cropMode.Equals("auto", false))
+ if (__cropMode.Equals(APPCONTROL_DATA_AUTO, false))
{
switch(__pointLocation)
{
break;
}
}
- else if (__cropMode != "auto")
+ else if (__cropMode != APPCONTROL_DATA_AUTO)
{
if (__pointLocation == INSIDE_LEFT_RECTANGLE || __pointLocation == INSIDE_BOTTOM_LEFT_RECTANGLE
|| __pointLocation == INSIDE_TOP_LEFT_RECTANGLE)
}
RequestRedraw(false);
__touchStart = currentPosition;
- AppLogDebug("EXIT");
+ AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
void
{
AppLogDebug("ENTER");
__pointLocation = OUTSIDE_CROPBOX;
- AppLogDebug("EXIT");
+ AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
void
{
__pointLocation = OUTSIDE_CROPBOX;
}
- AppLogDebug("EXIT");
+ AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
return;
}
void
ImageInfo::Construct(const String& pFilePath, Bitmap* pBitmap)
{
- AppLogDebug("Enter");
+ AppLogDebug("ENTER");
__pFilePath = pFilePath;
__pBitmap = pBitmap;
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
String
ImageInfo::GetFilePath(void) const
{
- AppLogDebug("Enter");
+ AppLogDebug("ENTER");
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
return __pFilePath;
}
void
ImageInfo::SetFilePath(const String& filePath)
{
- AppLogDebug("Enter");
+ AppLogDebug("ENTER");
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
__pFilePath = filePath;
}
Bitmap*
ImageInfo::GetBitmapN(void) const
{
- AppLogDebug("Enter");
+ AppLogDebug("ENTER");
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
return CommonUtil::CloneBitmapN(*__pBitmap);
}
void
ImageInfo::SetBitmap(Tizen::Graphics::Bitmap* pBitmap)
{
- AppLogDebug("Enter pBitmap(%x)", pBitmap);
+ AppLogDebug("ENTER pBitmap(%x)", pBitmap);
if (__pBitmap != null)
{
delete __pBitmap;
void
ImageInfo::ClearBitmap(void)
{
- AppLogDebug("Enter");
+ AppLogDebug("ENTER");
delete __pBitmap;
__pBitmap = null;
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
{
String fileName = File::GetFileName(filePath);
String fileExtension = File::GetFileExtension(filePath);
- String tempFileName = __nameEditFieldText + L"." + fileExtension;
+ String tempFileName = __nameEditFieldText + FILE_EXT_SEPARATOR + fileExtension;
filePath.Replace(fileName, tempFileName);
if (File::IsFileExist(filePath) == true)
return;
}
- AppLogDebug("ENTER2");
+
const String* pType = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_TYPE)));
const ArrayList* pList = static_cast<const ArrayList*>(pExtraData->GetValue(String(APPCONTROL_KEY_PATH)));
const String* pIndex = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_INDEX)));
- AppLogDebug("ENTER3");
+
if (pType != null)
{
- AppLogDebug("ENTER4");
pArguments->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE), new (std::nothrow) String(*pType));
}
if (pList != null)
{
- AppLog("Check pointer(%x) pExtraData(%x)", pList, pExtraData);
- AppLogDebug("ENTER5");
ArrayList* pArrayList = new (std::nothrow) ArrayList();
pArrayList->Construct();
const String* temp;
- AppLogDebug("ENTER6");
int loopCount = pList->GetCount();
- AppLogDebug("ENTER7 loopCount(%d)", loopCount);
+
for (int i = 0; i < loopCount; ++i)
{
temp = static_cast<const String*>(pList->GetAt(i));
- AppLogDebug("ENTER8 temp(%ls)", temp->GetPointer());
pArrayList->Add(new (std::nothrow) String(*temp));
}
pArguments->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), pArrayList);
messageBox.ShowAndWait(modalResult);
return;
}
- String cropMode = L"auto";
+
ArrayList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter);
pList->Add(new (std::nothrow) String(filePath));
- pList->Add(new (std::nothrow) String(cropMode));
+ pList->Add(new (std::nothrow) String(APPCONTROL_DATA_AUTO));
pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_CROP), pList);
}
break;
case ACTION_ID_CONTEXTMENU_HOME:
{
String filePath = __pPresentationModel->GetFilePathAt(__pGallery->GetCurrentItemIndex());
- String cropMode = "fit-to-screen";
+ String cropMode = APPCONTROL_DATA_FIT_TO_SCREEN;
ArrayList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter);
pList->Add(new (std::nothrow) String(filePath));
pList->Add(new (std::nothrow) String(cropMode));
case ACTION_ID_CONTEXTMENU_LOCK:
{
String filePath = __pPresentationModel->GetFilePathAt(__pGallery->GetCurrentItemIndex());
- String cropMode = "fit-to-screen";
+ String cropMode = APPCONTROL_DATA_FIT_TO_SCREEN;
ArrayList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter);
pList->Add(new (std::nothrow) String(filePath));
pList->Add(new (std::nothrow) String(cropMode));
case ACTION_ID_CONTEXTMENU_HOME_AND_LOCK:
{
String filePath = __pPresentationModel->GetFilePathAt(__pGallery->GetCurrentItemIndex());
- String cropMode = "fit-to-screen";
+ String cropMode = APPCONTROL_DATA_FIT_TO_SCREEN;
ArrayList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter);
pList->Add(new (std::nothrow) String(filePath));
pList->Add(new (std::nothrow) String(cropMode));
{
LongLong::Parse(*pContactId, lresult);
String filePath = __pPresentationModel->GetFilePathAt(__pGallery->GetCurrentItemIndex());
- String cropMode = "fit-to-screen";
+ String cropMode = APPCONTROL_DATA_FIT_TO_SCREEN;
ArrayList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter);
pList->Add(new (std::nothrow) String(filePath));
pList->Add(new (std::nothrow) String(cropMode));
void
ImageViewerForm::CreateShuffledList(int count)
{
- AppLogDebug("ImageViewerForm::CreateShuffledList ENTER");
+ AppLogDebug("ENTER");
if(__pShuffledList == null)
{
__pShuffledList = new (std::nothrow) int[count];
- for(int i = 0; i < count; i++)
+ for(int i = 0; i < count; ++i)
{
__pShuffledList[i] = i;
}
}
- for(int i = count - 1; i > 1; i--)
+ for(int i = count - 1; i > 1; --i)
{
int randomNum = Math::Rand() % (i+1);
int t = __pShuffledList[randomNum];
__pShuffledList[randomNum] = __pShuffledList[i];
__pShuffledList[i] = t;
}
-
- for(int i = 0; i < count; i++)
- {
- AppLogDebug("ShuffeldList i = %d & Val = %d", i, __pShuffledList[i]);
- }
-
- AppLogDebug("ImageViewerForm::CreateShuffledList EXIT");
+ AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
void
result transferResult, const String& errorCode, const String& errorMessage)
{
AppLogDebug("ENTER");
- AppLogTag("IV", "ImageViewerForm::OnContentDownloadCompleted");
- AppLogTag("IV", "DownloadCompleted Error [%s]", GetErrorMessage(transferResult));
- AppLogTag("IV", "errorCode [%ls] errorMessage [%ls]", errorCode.GetPointer(), errorMessage.GetPointer());
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
__pPopUp->SetShowState(false);
}
- if (index == 0) // start slide show
+ if (index == 0)
{
int repeatValue = 0;
int interval = 0 ;
__pSettingPresentationModel->GetValue(SECTION_NAME_IMAGE_VIEWER,
ENTRY_NAME_IMAGE_VIEWER_SLIDESHOW_INTERVAL, interval);
- interval = interval * 1000;
- AppLogDebug("The slide interval is %d", interval);
- __pGallery->SetSlideShowViewDuration(interval);
-
-
+ interval = interval * 1000;
+ __pGallery->SetSlideShowViewDuration(interval);
__pGallery->UpdateGallery();
if (__detail == false)
}
}
}
- else if (index == 1) // launch settings
+ else if (index == 1)
{
__pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_GALLERY,
APPCONTROL_OPERATION_ID_CONFIGURE, null, null, null, this);
const ArrayList* pList = static_cast<const ArrayList*>(pArguments->GetValue(String(APPCONTROL_KEY_PATH)));
const String* pIndex = static_cast<const String*>(pArguments->GetValue(String(APPCONTROL_KEY_INDEX)));
- AppLog("pType %x pList %x pIndex %x", pType, pList, pIndex);
-
if (pIndex != null)
{
Integer::Parse(*pIndex, __startIndex);
{
pImageInfo = new (std::nothrow) ImageInfo();
tempPath = *(const_cast<String*>(static_cast<const String*>(pList->GetAt(i))));
- AppLog("(%d) tempPath(%ls)", i, tempPath.GetPointer());
-
pImageInfo->Construct(tempPath, null);
__pImageCaches->Add(pImageInfo);
tempPath.Clear();
}
}
}
- AppLogDebug("Exit");
+ AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
void
ImageViewerPresentationModel::LoadSettingValue()
{
+ AppLogDebug("ENTER");
int returnValue = 0;
__pSettingPresentationModel->GetValue(SECTION_NAME_IMAGE_VIEWER,
default:
break;
}
+ AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
-int ImageViewerPresentationModel::GetImageCacheIndex(const String& afilePath)
+int
+ImageViewerPresentationModel::GetImageCacheIndex(const String& afilePath)
{
+ AppLogDebug("ENTER");
int loopCount = __pImageCaches->GetCount();
String filePath;
ImageInfo* pImageInfo;
if (afilePath == filePath)
{
AppLogDebug(" returning the index %d", i);
+ AppLogDebug("EXIT(%s)1", GetErrorMessage(GetLastResult()));
return i;
}
}
+ AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
return -1;
}
-void ImageViewerPresentationModel::OnContentFileCreated(Tizen::Content::ContentId contentId, Tizen::Content::ContentType contentType, result r)
+void
+ImageViewerPresentationModel::OnContentFileCreated(Tizen::Content::ContentId contentId, Tizen::Content::ContentType contentType, result r)
{
- AppLogDebug(" Enter");
- AppLogDebug(" Exit");
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
-void ImageViewerPresentationModel::OnContentFileUpdated(Tizen::Content::ContentId contentId, Tizen::Content::ContentType contentType, result r)
+
+void
+ImageViewerPresentationModel::OnContentFileUpdated(Tizen::Content::ContentId contentId, Tizen::Content::ContentType contentType, result r)
{
- AppLogDebug(" Enter");
- AppLogDebug(" Exit");
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
-void ImageViewerPresentationModel::OnContentFileDeleted(Tizen::Content::ContentId contentId, Tizen::Content::ContentType contentType, result r)
+
+void
+ImageViewerPresentationModel::OnContentFileDeleted(Tizen::Content::ContentId contentId, Tizen::Content::ContentType contentType, result r)
{
- AppLogDebug("Enter");
+ AppLogDebug("ENTER");
__contentId = contentId;
__ivTriggeredDeleteEvent = true;
- AppLogDebug("Exit");
+ AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
-void ImageViewerPresentationModel::OnContentDirectoryScanCompleted(const Tizen::Base::String& filePath, result r)
+
+void
+ImageViewerPresentationModel::OnContentDirectoryScanCompleted(const Tizen::Base::String& filePath, result r)
{
- AppLogDebug(" Enter");
+ AppLogDebug("ENTER");
AppLogDebug(" directory path is %ls", filePath.GetPointer());
if ( !__ivTriggeredEvent && __ivTriggeredDeleteEvent)
{
__ivTriggeredEvent = false;
}
__ivTriggeredDeleteEvent = false;
- AppLogDebug("Exit");
+ AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
-
const wchar_t* APPCONTROL_KEY_SOCIAL_RESULT_TYPE = L"http://tizen.org/appcontrol/data/social/result_type";
const wchar_t* APPCONTROL_KEY_MESSAGE_TYPE = L"http://tizen.org/appcontrol/data/message/type";
const wchar_t* APPCONTROL_KEY_SOCIAL_ITEM_ID = L"http://tizen.org/appcontrol/data/social/item_id";
+const wchar_t* APPCONTROL_KEY_IMAGE_CROP_MODE = L"http://tizen.org/appcontrol/data/image/crop_mode";
const wchar_t* APPCONTROL_URI_MMS_TO = L"mmsto";
const wchar_t* APPCONTROL_URI_MAIL_TO = L"mailto";
const wchar_t* APPCONTROL_DATA_URI_FILE = L"file://";
const wchar_t* APPCONTROL_DATA_PERSON = L"person";
const wchar_t* APPCONTROL_DATA_MMS = L"mms";
+const wchar_t* APPCONTROL_DATA_AUTO = L"auto";
+const wchar_t* APPCONTROL_DATA_FIT_TO_SCREEN = L"fit_to_screen";
const wchar_t* SETTING_VALUE_HOME_SCREEN_WALLPAPER = L"http://tizen.org/setting/screen.wallpaper";
const wchar_t* SETTING_VALUE_LOCK_SCREEN_WALLPAPER = L"http://tizen.org/setting/screen.wallpaper.lock";
const wchar_t* FOLDER_PATH_DOWNLOADS = L"Downloads/";
-const wchar_t* TEMP_FILE_PATH_HOME_SCREEN_WALLPAPER = L"shared/data/home.jpg";
-const wchar_t* TEMP_FILE_PATH_LOCK_SCREEN_WALLPAPER = L"shared/data/lock.jpg";
+const wchar_t* TEMP_FILE_PATH_HOME_SCREEN_WALLPAPER = L"home.jpg";
+const wchar_t* TEMP_FILE_PATH_LOCK_SCREEN_WALLPAPER = L"lock.jpg";
const wchar_t* TEMP_FILE_PATH_WEB_FILE = L"data/test_out.jpg";
const wchar_t* WEB_URL_HTTP = L"http://";
const wchar_t* DIRECTORY_SEPARATOR = L"/";
const wchar_t* FILE_EXT_SEPARATOR = L".";
const wchar_t* APPCONTROL_PATH_SEPARATOR = L";";
+const wchar_t* FILE_NAME_SEPARATOR = L"_";
const wchar_t* IDB_IMAGE_VIEWERFORM_BUTTON_PLAY = L"T0_1_btn_play.png";
const wchar_t* IDB_IMAGE_VIEWERFORM_BUTTON_DETAILS = L"T01_1_controlbar_icon_detail.png";