New AppControl Spec
authorHyukSoon Choi <hs619.choi@samsung.com>
Fri, 29 Mar 2013 01:01:31 +0000 (10:01 +0900)
committerHyukSoon Choi <hs619.choi@samsung.com>
Fri, 29 Mar 2013 01:01:31 +0000 (10:01 +0900)
Change-Id: Idce30dcc00a56c4b5f653f8137ef5b87dde5585b
Signed-off-by: HyukSoon Choi <hs619.choi@samsung.com>
16 files changed:
inc/GlTypes.h
manifest.xml
src/GlAlbumListEditorForm.cpp
src/GlAlbumListForm.cpp
src/GlAlbumListPresentationModel.cpp
src/GlAllListEditorPanel.cpp
src/GlAllListPanel.cpp
src/GlAllListSelectionPanel.cpp
src/GlFileListForm.cpp
src/GlFileListPresentationModel.cpp
src/GlGalleryApp.cpp
src/GlImageListEditorPanel.cpp
src/GlImageListPanel.cpp
src/GlTypes.cpp
src/GlVideoListEditorPanel.cpp
src/GlVideoListPanel.cpp

index 1886438..ae841cc 100644 (file)
@@ -180,20 +180,19 @@ extern const wchar_t* APPCONTROL_PROVIDER_ID_IMAGE;
 extern const wchar_t* APPCONTROL_OPERATION_ID_PICK;
 extern const wchar_t* APPCONTROL_OPERATION_ID_VIEW;
 extern const wchar_t* APPCONTROL_OPERATION_ID_CAPTURE;
-extern const wchar_t* APPCONTROL_OPERATION_ID_CREATECONTENT;
+extern const wchar_t* APPCONTROL_OPERATION_ID_CREATE_CONTENT;
 extern const wchar_t* APPCONTROL_OPERATION_ID_COMPOSE;
 extern const wchar_t* APPCONTROL_OPERATION_ID_CONFIGURE;
 extern const wchar_t* APPCONTROL_OPERATION_ID_MAIN;
 
 extern const wchar_t* APPCONTROL_KEY_TYPE;
-extern const wchar_t* APPCONTROL_KEY_MEDIA_TYPE;
 extern const wchar_t* APPCONTROL_KEY_PATH;
 extern const wchar_t* APPCONTROL_KEY_INDEX;
-extern const wchar_t* APPCONTROL_KEY_ATTACHMENTS;
 extern const wchar_t* APPCONTROL_KEY_SELECTION_MODE;
 extern const wchar_t* APPCONTROL_KEY_DATA_SELECTED;
+extern const wchar_t* APPCONTROL_KEY_MESSAGE_TYPE;
+extern const wchar_t* APPCONTROL_KEY_CAMERA_ALLOW_SWITCH;
 
-extern const wchar_t* APPCONTROL_DATA_CAMERA;
 extern const wchar_t* APPCONTROL_DATA_IMAGE;
 extern const wchar_t* APPCONTROL_DATA_VIDEO;
 extern const wchar_t* APPCONTROL_DATA_SINGLE;
@@ -201,6 +200,7 @@ extern const wchar_t* APPCONTROL_DATA_MULTIPLE;
 extern const wchar_t* APPCONTROL_DATA_SLIDE_SHOW;
 extern const wchar_t* APPCONTROL_DATA_MMS;
 extern const wchar_t* APPCONTROL_DATA_SELECTION_MODE;
+extern const wchar_t* APPCONTROL_DATA_TRUE;
 
 extern const wchar_t* APPCONTROL_RESULT_KEY_LEGACY_RESULT;
 
index b130478..cf104e9 100644 (file)
@@ -8,7 +8,7 @@
         <Feature Name="tizen.screen.coordinatesystem.logical">Normal</Feature>
     </Requirements>
     <Apps>
-        <ApiVersion>2.0</ApiVersion>
+        <ApiVersion>2.1</ApiVersion>
         <Privileges>
             <Privilege>http://tizen.org/privilege/content.read</Privilege>
             <Privilege>http://tizen.org/privilege/content.write</Privilege>
index 4f1f62d..81683eb 100644 (file)
@@ -633,8 +633,6 @@ AlbumListEditorForm::OnRequestMessage(void)
                return;
        }
 
-       String combineText;
-
        IList* pAlbumInfoList = __pPresentationModel->GetAlbumInfoList();
 
        int maxCount = __pPresentationModel->GetFolderCount();
@@ -645,9 +643,11 @@ AlbumListEditorForm::OnRequestMessage(void)
                if (maxCount <= 0)
                {
                        AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult()));
-
                        return;
                }
+
+               ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+               pArrayList->Construct();
                for (int i = 0 ; i < maxCount; ++i)
                {
                        if (__pEditorFolderIconList->IsItemChecked (i))
@@ -664,12 +664,7 @@ AlbumListEditorForm::OnRequestMessage(void)
                                        {
                                                break;
                                        }
-                                       String path = pContentInfo->GetContentPath();
-                                       if (combineText.CompareTo(EMPTY_SPACE) != 0)
-                                       {
-                                               combineText.Append(L";");
-                                       }
-                                       combineText.Append(path);
+                                       pArrayList->Add(new (std::nothrow) String(pContentInfo->GetContentPath()));
                                }
 
                                if (i == 0)
@@ -681,10 +676,8 @@ AlbumListEditorForm::OnRequestMessage(void)
 
                HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
                pDataList->Construct();
-               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE),
-                               new (std::nothrow) String(APPCONTROL_DATA_MMS));
-               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_ATTACHMENTS),
-                               new (std::nothrow) String(combineText));
+               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_MESSAGE_TYPE), new (std::nothrow) String(APPCONTROL_DATA_MMS));
+               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pArrayList);
 
                __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_MESSAGE, APPCONTROL_OPERATION_ID_COMPOSE,
                                pDataList, null);
@@ -706,8 +699,6 @@ AlbumListEditorForm::OnRequestEmail(void)
                return;
        }
 
-       String combineText;
-
        IList* pAlbumInfoList = __pPresentationModel->GetAlbumInfoList();
 
        int maxCount = __pPresentationModel->GetFolderCount();
@@ -718,9 +709,11 @@ AlbumListEditorForm::OnRequestEmail(void)
                if (maxCount <= 0)
                {
                        AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult()));
-
                        return;
                }
+
+               ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+               pArrayList->Construct();
                for (int i = 0 ; i < maxCount; ++i)
                {
                        if (__pEditorFolderIconList->IsItemChecked (i))
@@ -737,12 +730,7 @@ AlbumListEditorForm::OnRequestEmail(void)
                                        {
                                                break;
                                        }
-                                       String path = pContentInfo->GetContentPath();
-                                       if (combineText.CompareTo(EMPTY_SPACE) != 0)
-                                       {
-                                               combineText.Append(L";");
-                                       }
-                                       combineText.Append(path);
+                                       pArrayList->Add(new (std::nothrow) String(pContentInfo->GetContentPath()));
                                }
 
                                if (i == 0)
@@ -754,8 +742,7 @@ AlbumListEditorForm::OnRequestEmail(void)
 
                HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
                pDataList->Construct();
-               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_ATTACHMENTS),
-                               new (std::nothrow) String(combineText));
+               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pArrayList);
 
                __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_EMAIL,
                                APPCONTROL_OPERATION_ID_COMPOSE, pDataList, null);
index 47c18b0..d04df93 100644 (file)
@@ -289,28 +289,28 @@ AlbumListForm::OnIconListViewItemStateChanged(IconListView& view, int index, Ico
                AlbumInfo* pSendAlbumInfo = new (std::nothrow) AlbumInfo();
                pSendAlbumInfo->Construct(*pAlbumInfo);
 
-               ArrayList* aList = new (std::nothrow) ArrayList(SingleObjectDeleter);
-               aList->Construct();
-               aList->Add(pSendAlbumInfo);
+               ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+               pArrayList->Construct();
+               pArrayList->Add(pSendAlbumInfo);
 
                if (__pPresentationModel->GetAppControlMode() == APP_CONTROL_MODE_PICK)
                {
                        if (__pPresentationModel->GetAppControlMediaType() == APPCONTROL_MEDIA_TYPE_IMAGE)
                        {
-                               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_LIST_EDITOR), aList);
+                               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_LIST_EDITOR), pArrayList);
                        }
                        else if  (__pPresentationModel->GetAppControlMediaType() == APPCONTROL_MEDIA_TYPE_VIDEO)
                        {
-                               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_VIDEO_LIST_EDITOR), aList);
+                               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_VIDEO_LIST_EDITOR), pArrayList);
                        }
                        else
                        {
-                               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_LIST_EDITOR), aList);
+                               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_LIST_EDITOR), pArrayList);
                        }
                }
                else
                {
-                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_LIST), aList);
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_LIST), pArrayList);
                }
        }
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
@@ -355,11 +355,11 @@ AlbumListForm::OnActionPerformed(const Control& source, int actionId)
                {
                        HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
                        pDataList->Construct();
-                       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE),
-                                       new (std::nothrow) String(APPCONTROL_DATA_CAMERA));
+                       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_CAMERA_ALLOW_SWITCH),
+                                       new (std::nothrow) String(APPCONTROL_DATA_TRUE));
 
                        __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_CAMERA,
-                                       APPCONTROL_OPERATION_ID_CAPTURE, pDataList, null);
+                                       APPCONTROL_OPERATION_ID_CREATE_CONTENT, pDataList, null);
                }
                break;
        case ACTION_ID_FOOTER_EDIT:
index 807bf90..7f4a719 100644 (file)
@@ -168,17 +168,14 @@ AlbumListPresentationModel::Construct(void)
                {
                        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 (selectionMode != null && selectionMode->CompareTo(APPCONTROL_DATA_MULTIPLE) == 0)
                        {
-                               __appControlMediaType = APPCONTROL_MEDIA_TYPE_VIDEO;
+                               __appControlSelectionMode = APPCONTROL_SELECTION_MODE_MULTIPLE;
                        }
 
-                       if (selectionMode != null && selectionMode->CompareTo(APPCONTROL_DATA_MULTIPLE) == 0)
+                       if (pApp->GetMimeType().StartsWith(APPCONTROL_DATA_VIDEO, 0) == true)
                        {
-                               __appControlSelectionMode = APPCONTROL_SELECTION_MODE_MULTIPLE;
+                               __appControlMediaType = APPCONTROL_MEDIA_TYPE_VIDEO;
                        }
                }
        }
index 7b860ac..f0af790 100644 (file)
@@ -613,33 +613,27 @@ AllListEditorPanel::OnRequestMessage(void)
                return E_FAILURE;
        }
 
-       String combineText;
-       String path;
        Integer* pIndex = null;
        int checkedIndex;
-
+       ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+       pArrayList->Construct();
        int loopCount = pIndexList->GetCount();
-       AppLogDebug("pIndexList->GetCount(%d)", loopCount);
+
        for (int i = 0; i < loopCount; ++i)
        {
                pIndex = static_cast<Integer*>(pIndexList->GetAt(i));
                if (pIndex != null)
                {
                        checkedIndex = pIndex->ToInt();
-                       path = __pPresentationModel->GetContentFilePath(checkedIndex);
-               }
-
-               if (combineText.CompareTo(EMPTY_SPACE) != 0)
-               {
-                       combineText.Append(L";");
+                       pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(checkedIndex)));
                }
-               combineText.Append(path);
        }
 
        HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
        pDataList->Construct();
-       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE), new (std::nothrow) String(APPCONTROL_DATA_MMS));
-       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_ATTACHMENTS), new (std::nothrow) String(combineText));
+       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_MESSAGE_TYPE),
+                       new (std::nothrow) String(APPCONTROL_DATA_MMS));
+       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pArrayList);
 
        __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_MESSAGE, APPCONTROL_OPERATION_ID_COMPOSE,
                        pDataList, null);
@@ -660,32 +654,25 @@ AllListEditorPanel::OnRequestEmail(void)
                return E_FAILURE;
        }
 
-       String combineText;
-       String path;
        Integer* pIndex = null;
        int checkedIndex;
-
+       ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+       pArrayList->Construct();
        int loopCount = pIndexList->GetCount();
-       AppLogDebug("pIndexList->GetCount(%d)", loopCount);
+
        for (int i = 0; i < loopCount; ++i)
        {
                pIndex = static_cast<Integer*>(pIndexList->GetAt(i));
                if (pIndex != null)
                {
                        checkedIndex = pIndex->ToInt();
-                       path = __pPresentationModel->GetContentFilePath(checkedIndex);
+                       pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(checkedIndex)));
                }
-
-               if (combineText.CompareTo(EMPTY_SPACE) != 0)
-               {
-                       combineText.Append(L";");
-               }
-               combineText.Append(path);
        }
 
        HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
        pDataList->Construct();
-       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_ATTACHMENTS), new (std::nothrow) String(combineText));
+       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pArrayList);
 
        __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_EMAIL, APPCONTROL_OPERATION_ID_COMPOSE,
                        pDataList, null);
@@ -702,54 +689,34 @@ AllListEditorPanel::OnRequestSlideShow(void)
        if (pIndexList == null)
        {
                AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
-
-               return E_FAILURE;
-       }
-
-       HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
-       result r = pDataList->Construct();
-       if (r != E_SUCCESS)
-       {
-               delete pDataList;
-               delete pIndexList;
-               AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult()));
-
                return E_FAILURE;
        }
 
-       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE),
-                       new (std::nothrow) String(APPCONTROL_DATA_SLIDE_SHOW));
-
        Integer* pRealIndex = null;
        int realIndex = -1;
-       String combineText;
-       String path;
-
+       ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+       pArrayList->Construct();
        int loopCount = pIndexList->GetCount();
-       if (loopCount > 0)
+
+       for (int i = 0; i < loopCount; ++i)
        {
-               for (int i = 0; i < loopCount; ++i)
+               pRealIndex = static_cast<Integer*>(pIndexList->GetAt(i));
+               if (pRealIndex != null)
                {
-                       pRealIndex = static_cast<Integer*>(pIndexList->GetAt(i));
-                       if (pRealIndex != null)
-                       {
-                               realIndex = pRealIndex->ToInt();
-                       }
-
-                       path = __pPresentationModel->GetContentFilePath(realIndex);
-                       if (combineText.CompareTo(EMPTY_SPACE) != 0)
-                       {
-                               combineText.Append(L";");
-                       }
-                       combineText.Append(path);
+                       realIndex = pRealIndex->ToInt();
+                       pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(realIndex)));
                }
-               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), new (std::nothrow) String(combineText));
        }
 
-       delete pIndexList;
+       HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
+       pDataList->Construct();
+       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE), new (std::nothrow) String(APPCONTROL_DATA_SLIDE_SHOW));
+       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pArrayList);
+
+       __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_IMAGE, APPCONTROL_OPERATION_ID_VIEW,
+                       pDataList, null);
 
-       __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_IMAGE,
-                       APPCONTROL_OPERATION_ID_VIEW, pDataList, null);
+       delete pIndexList;
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
        return E_SUCCESS;
index c6b0b47..3e20db4 100644 (file)
@@ -226,39 +226,40 @@ AllListPanel::OnIconListViewItemStateChanged(IconListView& view, int index, Icon
        AppLogDebug("ENTER");
        if (status == ICON_LIST_VIEW_ITEM_SELECTED)
        {
-               HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
-               pDataList->Construct();
-               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE),
-                               new (std::nothrow) String(APPCONTROL_DATA_IMAGE));
-
                if (__pPresentationModel->GetCurrentAlbumContentInfoCount() <= 0)
                {
                        AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
-
                        return;
                }
 
-               String combineText;
-               String path;
+               ArrayList* pArrayList = new (std::nothrow) ArrayList();
+               pArrayList->Construct();
                int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
+
                for (int i = 0 ; i < loopCount; ++i)
                {
-                       path = __pPresentationModel->GetContentFilePath(i);
-
-                       if (combineText.CompareTo(EMPTY_SPACE) != 0)
-                       {
-                               combineText.Append(L";");
-                       }
-                       combineText.Append(path);
+                       pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(i)));
                }
 
                String listIndex;
                listIndex.Format(10, L"%d", index);
-               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), new (std::nothrow) String(combineText));
+
+               HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
+               pDataList->Construct();
+               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE), new (std::nothrow) String(APPCONTROL_DATA_IMAGE));
+               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), pArrayList);
                pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_INDEX), new (std::nothrow) String(listIndex));
 
-               __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_IMAGE,
-                               APPCONTROL_OPERATION_ID_VIEW, pDataList, null);
+               AppLog("Check pointer(%x) pDataList(%x)", pArrayList, pDataList);
+               __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_IMAGE, APPCONTROL_OPERATION_ID_VIEW, pDataList, null);
+
+               String* temp;
+               loopCount = pArrayList->GetCount();
+               for (int i = 0; i < loopCount; ++i)
+               {
+                       temp = static_cast<String*>(pArrayList->GetAt(i));
+                       AppLog("print temp(%ls)", temp->GetPointer());
+               }
        }
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
index 8bfd9c1..8fc2e08 100644 (file)
@@ -525,32 +525,27 @@ AllListSelectionPanel::OnRequestMessage(void)
                return E_FAILURE;
        }
 
-       String combineText;
-       String path;
        Integer* pIndex = null;
        int checkedIndex;
-
+       ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+       pArrayList->Construct();
        int loopCount = pIndexList->GetCount();
-       AppLogDebug("pIndexList->GetCount(%d)", loopCount);
+
        for (int i = 0; i < loopCount; ++i)
        {
                pIndex = static_cast<Integer*>(pIndexList->GetAt(i));
                if (pIndex != null)
                {
                        checkedIndex = pIndex->ToInt();
-                       path = __pPresentationModel->GetContentFilePath(checkedIndex);
-               }
-
-               if (combineText.CompareTo(EMPTY_SPACE) != 0)
-               {
-                       combineText.Append(L";");
+                       pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(checkedIndex)));
                }
-               combineText.Append(path);
        }
+
        HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
        pDataList->Construct();
-       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE), new (std::nothrow) String(APPCONTROL_DATA_MMS));
-       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_ATTACHMENTS), new (std::nothrow) String(combineText));
+       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_MESSAGE_TYPE),
+                       new (std::nothrow) String(APPCONTROL_DATA_MMS));
+       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pArrayList);
 
        __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_MESSAGE, APPCONTROL_OPERATION_ID_COMPOSE,
                        pDataList, null);
@@ -571,34 +566,27 @@ AllListSelectionPanel::OnRequestEmail(void)
                return E_FAILURE;
        }
 
-       String combineText;
-       String path;
        Integer* pIndex = null;
        int checkedIndex;
-
+       ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+       pArrayList->Construct();
        int loopCount = pIndexList->GetCount();
-       AppLogDebug("pIndexList->GetCount(%d)", loopCount);
+
        for (int i = 0; i < loopCount; ++i)
        {
                pIndex = static_cast<Integer*>(pIndexList->GetAt(i));
                if (pIndex != null)
                {
                        checkedIndex = pIndex->ToInt();
-                       path = __pPresentationModel->GetContentFilePath(checkedIndex);
+                       pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(checkedIndex)));
                }
-
-               if (combineText.CompareTo(EMPTY_SPACE) != 0)
-               {
-                       combineText.Append(L";");
-               }
-               combineText.Append(path);
        }
+
        HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
        pDataList->Construct();
-       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_ATTACHMENTS), new (std::nothrow) String(combineText));
+       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pArrayList);
 
-       __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_EMAIL,
-                       APPCONTROL_OPERATION_ID_COMPOSE, pDataList, null);
+       __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_EMAIL, APPCONTROL_OPERATION_ID_COMPOSE, pDataList, null);
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
        return E_SUCCESS;
@@ -612,55 +600,31 @@ AllListSelectionPanel::OnRequestSlideShow(void)
        if (pIndexList == null)
        {
                AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
-
-               return E_FAILURE;
-       }
-
-       HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
-       result r = pDataList->Construct();
-       if (r != E_SUCCESS)
-       {
-               delete pDataList;
-               delete pIndexList;
-               AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult()));
-
                return E_FAILURE;
        }
 
-       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE),
-                       new (std::nothrow) String(APPCONTROL_DATA_SLIDE_SHOW));
-
        Integer* pRealIndex = null;
        int realIndex = -1;
-       String combineText;
-       String path;
-
+       ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+       pArrayList->Construct();
        int loopCount = pIndexList->GetCount();
-       if (loopCount > 0)
+
+       for (int i = 0; i < loopCount; ++i)
        {
-               for (int i = 0; i < loopCount; ++i)
+               pRealIndex = static_cast<Integer*>(pIndexList->GetAt(i));
+               if (pRealIndex != null)
                {
-                       pRealIndex = static_cast<Integer*>(pIndexList->GetAt(i));
-                       if (pRealIndex != null)
-                       {
-                               realIndex = pRealIndex->ToInt();
-                       }
-
-                       path = __pPresentationModel->GetContentFilePath(realIndex);
-                       if (combineText.CompareTo(EMPTY_SPACE) != 0)
-                       {
-                               combineText.Append(L";");
-                       }
-                       combineText.Append(path);
+                       realIndex = pRealIndex->ToInt();
+                       pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(realIndex)));
                }
-               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH),
-                               new (std::nothrow) String(combineText));
        }
 
-       delete pIndexList;
+       HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
+       pDataList->Construct();
+       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE), new (std::nothrow) String(APPCONTROL_DATA_SLIDE_SHOW));
+       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pArrayList);
 
-       __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_IMAGE,
-                       APPCONTROL_OPERATION_ID_VIEW, pDataList, null);
+       __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_IMAGE, APPCONTROL_OPERATION_ID_VIEW, pDataList, null);
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
        return E_SUCCESS;
index 181e3db..32a4548 100644 (file)
@@ -152,50 +152,34 @@ FileListForm::OnActionPerformed(const Control& source, int actionId)
        }
        case ACTION_ID_FOOTER_SLIDESHOW:
        {
-               HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
-               pDataList->Construct();
-               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE), new (std::nothrow) String(APPCONTROL_DATA_SLIDE_SHOW));
-
-               if (__pPresentationModel->GetCurrentAlbumContentInfoCount() <= 0)
-               {
-                       break;
-               }
-               String combineText;
-               String path;
-
+               ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+               pArrayList->Construct();
                int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
+
                for (int i = 0; i < loopCount; ++i)
                {
-                       path = __pPresentationModel->GetContentFilePath(i);
-                       if (combineText.CompareTo(EMPTY_SPACE) != 0)
-                       {
-                               combineText.Append(L";");
-                       }
-                       combineText.Append(path);
+                       pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(i)));
                }
-               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH),
-                               new (std::nothrow) String(combineText));
 
-               __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_IMAGE,
-                               APPCONTROL_OPERATION_ID_VIEW, pDataList, null);
+               HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
+               pDataList->Construct();
+               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE), new (std::nothrow) String(APPCONTROL_DATA_SLIDE_SHOW));
+               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pArrayList);
+
+               __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_IMAGE, APPCONTROL_OPERATION_ID_VIEW, pDataList, null);
                break;
        }
        case ACTION_ID_FOOTER_CAMERA:
        {
                HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
                pDataList->Construct();
-               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE),
-                               new (std::nothrow) String(APPCONTROL_DATA_CAMERA));
-
-               __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_CAMERA,
-                               APPCONTROL_OPERATION_ID_CAPTURE, pDataList, null);
+               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_CAMERA_ALLOW_SWITCH), new (std::nothrow) String(APPCONTROL_DATA_TRUE));
+               __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_CAMERA, APPCONTROL_OPERATION_ID_CREATE_CONTENT, pDataList, null);
                break;
        }
        default:
-       {
                break;
        }
-       }
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
 
index bb5ee2a..fe70e68 100644 (file)
@@ -165,16 +165,11 @@ FileListPresentationModel::Construct(void)
                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)
                        {
@@ -1028,7 +1023,6 @@ FileListPresentationModel::StartAppControl(const String& providerId, const Strin
        if (pAc == null)
        {
                AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
-
                return E_FAILURE;
        }
        result r = pAc->Start(null, null, pDataList, pListener);
index e1ff0ee..e6cb469 100644 (file)
@@ -76,14 +76,6 @@ GalleryApp::GetAppControlOperationId(void) const
 }
 
 String
-GalleryApp::GetUriData(void) const
-{
-       AppLogDebug("ENTER");
-       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-       return __uriData;
-}
-
-String
 GalleryApp::GetMimeType(void) const
 {
        AppLogDebug("ENTER");
@@ -148,8 +140,6 @@ GalleryApp::OnAppTerminating(AppRegistry& appRegistry, bool forcedTermination)
                pFileListPresentationModel->ClearThumbnailRequests(true);
        }
 
-       Thread::Sleep(1000);
-
        delete __pArguments;
        __pArguments = null;
 
@@ -184,10 +174,6 @@ GalleryApp::OnAppControlRequestReceived(RequestId reqId, const String& operation
        __requestId = reqId;
        __operationId = operationId;
 
-       if (pUriData != null)
-       {
-               __uriData = *pUriData;
-       }
        if (pMimeType != null)
        {
                __mimeType = *pMimeType;
@@ -207,10 +193,7 @@ GalleryApp::OnAppControlRequestReceived(RequestId reqId, const String& operation
                        pKey = static_cast<const String*>(pKeyList->GetAt(i));
                        pValue = static_cast<const String*>(pExtraData->GetValue(*pKey));
 
-                       if (pValue != null && pKey->CompareTo(APPCONTROL_RESULT_KEY_LEGACY_RESULT) != 0)
-                       {
-                               pArguments->Add(new (std::nothrow) String(*pKey), new (std::nothrow) String(*pValue));
-                       }
+                       pArguments->Add(new (std::nothrow) String(*pKey), new (std::nothrow) String(*pValue));
                }
                __pArguments = pArguments;
                delete pKeyList;
index c876572..395fe7c 100644 (file)
@@ -452,8 +452,6 @@ ImageListEditorPanel::OnIconListViewItemStateChanged(IconListView& view, int ind
                        result r = map->Construct();
                        if (r == E_SUCCESS)
                        {
-                               map->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH),
-                                               new (std::nothrow) String(__pPresentationModel->GetContentFilePath(index)));
                                map->Add(new (std::nothrow) String(APPCONTROL_KEY_DATA_SELECTED),
                                                new (std::nothrow) String(__pPresentationModel->GetContentFilePath(index)));
 
@@ -654,42 +652,22 @@ ImageListEditorPanel::OnRequestMessage(void)
        if (pIndexList->GetCount() <= 0)
        {
                AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
-
                return;
        }
 
-       String combineText;
-       String path;
+       ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+       pArrayList->Construct();
        int loopCount = pIndexList->GetCount();
+
        for (int i = 0; i < loopCount; ++i)
        {
-               path = __pPresentationModel->GetContentFilePath(i);
-
-               if (path.EndsWith(CONTENT_EXT_PNG)
-                               || path.EndsWith(CONTENT_EXT_BMP)
-                               || path.EndsWith(CONTENT_EXT_JPG)
-                               || path.EndsWith(CONTENT_EXT_GIF)
-                               || path.EndsWith(CONTENT_EXT_TIF)
-                               || path.EndsWith(CONTENT_EXT_MP4)
-                               || path.EndsWith(CONTENT_EXT_3GP)
-                               || path.EndsWith(CONTENT_EXT_AVI)
-                               || path.EndsWith(CONTENT_EXT_RM)
-                               || path.EndsWith(CONTENT_EXT_WMV)
-                               || path.EndsWith(CONTENT_EXT_ASF)
-                       )
-               {
-                       if (combineText.CompareTo(EMPTY_SPACE) != 0)
-                       {
-                               combineText.Append(L";");
-                       }
-                       combineText.Append(path);
-               }
+               pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(i)));
        }
 
        HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
        pDataList->Construct();
-       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE), new (std::nothrow) String(APPCONTROL_DATA_MMS));
-       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_ATTACHMENTS), new (std::nothrow) String(combineText));
+       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_MESSAGE_TYPE), new (std::nothrow) String(APPCONTROL_DATA_MMS));
+       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pArrayList);
 
        __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_MESSAGE, APPCONTROL_OPERATION_ID_COMPOSE,
                        pDataList, null);
@@ -708,41 +686,20 @@ ImageListEditorPanel::OnRequestEmail(void)
                return;
        }
 
-       String combineText;
-       String path;
+       ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+       pArrayList->Construct();
        int loopCount = pIndexList->GetCount();
+
        for (int i = 0; i < loopCount; ++i)
        {
-               path = __pPresentationModel->GetContentFilePath(i);
-
-               if (path.EndsWith(CONTENT_EXT_PNG)
-                               || path.EndsWith(CONTENT_EXT_BMP)
-                               || path.EndsWith(CONTENT_EXT_JPG)
-                               || path.EndsWith(CONTENT_EXT_GIF)
-                               || path.EndsWith(CONTENT_EXT_TIF)
-                               || path.EndsWith(CONTENT_EXT_MP4)
-                               || path.EndsWith(CONTENT_EXT_3GP)
-                               || path.EndsWith(CONTENT_EXT_AVI)
-                               || path.EndsWith(CONTENT_EXT_RM)
-                               || path.EndsWith(CONTENT_EXT_WMV)
-                               || path.EndsWith(CONTENT_EXT_ASF)
-                       )
-               {
-                       if (combineText.CompareTo(EMPTY_SPACE) != 0)
-                       {
-                               combineText.Append(L";");
-                       }
-                       combineText.Append(path);
-               }
+               pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(i)));
        }
 
        HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
        pDataList->Construct();
-       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_ATTACHMENTS),
-                       new (std::nothrow) String(combineText));
+       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pArrayList);
 
-       __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_EMAIL, APPCONTROL_OPERATION_ID_COMPOSE,
-                       pDataList, null);
+       __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_EMAIL, APPCONTROL_OPERATION_ID_COMPOSE, pDataList, null);
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
 
@@ -784,25 +741,21 @@ ImageListEditorPanel::OnRequestAppExitWithMultipleSelectionAppControlResult(void
        if (pIndexList->GetCount() <= 0)
        {
                AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
-
                return;
        }
 
-       String combineText;
-
+       ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+       pArrayList->Construct();
        int loopCount = pIndexList->GetCount();
+
        for (int i = 0; i < loopCount; ++i)
        {
-               combineText.Append(__pPresentationModel->GetContentFilePath(i));
-               combineText.Append(L";");
+               pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(i)));
        }
 
        HashMap* map = new (std::nothrow) HashMap(SingleObjectDeleter);
        map->Construct();
-       map->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH),
-                       new (std::nothrow) String(combineText));
-       map->Add(new (std::nothrow) String(APPCONTROL_KEY_DATA_SELECTED),
-                               new (std::nothrow) String(combineText));
+       map->Add(new (std::nothrow) String(APPCONTROL_KEY_DATA_SELECTED), (Object*)pArrayList);
 
        GalleryApp* pApp = dynamic_cast<GalleryApp*>(UiApp::GetInstance());
        if (pApp != null)
index 3318dd5..fd52a1a 100644 (file)
@@ -214,24 +214,24 @@ ImageListPanel::OnIconListViewItemStateChanged(IconListView& view, int index, Ic
        AppLogDebug("ENTER");
        if (status == ICON_LIST_VIEW_ITEM_SELECTED)
        {
-               HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
-               pDataList->Construct();
-               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE),
-                               new (std::nothrow) String(APPCONTROL_DATA_IMAGE));
-
+               ArrayList* pArrayList = new (std::nothrow) ArrayList();
+               pArrayList->Construct();
                int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
+
                for (int i = 0; i < loopCount; ++i)
                {
-                       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH),
-                                       new (std::nothrow) String(__pPresentationModel->GetContentFilePath(i)));
+                       pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(i)));
                }
                String listIndex;
                listIndex.Format(10, L"%d", index);
-               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_INDEX),
-                               new (std::nothrow) String(listIndex));
 
-               __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_IMAGE,
-                               APPCONTROL_OPERATION_ID_VIEW, pDataList, null);
+               HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
+               pDataList->Construct();
+               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE), new (std::nothrow) String(APPCONTROL_DATA_IMAGE));
+               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pArrayList);
+               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_INDEX), new (std::nothrow) String(listIndex));
+
+               __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_IMAGE, APPCONTROL_OPERATION_ID_VIEW, pDataList, null);
        }
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
index e910fc2..a1a8f96 100644 (file)
@@ -72,28 +72,27 @@ const wchar_t* APPCONTROL_PROVIDER_ID_IMAGE = L"tizen.imageviewer";
 
 const wchar_t* APPCONTROL_OPERATION_ID_PICK    = L"http://tizen.org/appcontrol/operation/pick";
 const wchar_t* APPCONTROL_OPERATION_ID_VIEW = L"http://tizen.org/appcontrol/operation/view";
-const wchar_t* APPCONTROL_OPERATION_ID_CAPTURE = L"http://tizen.org/appcontrol/operation/capture";
-const wchar_t* APPCONTROL_OPERATION_ID_CREATECONTENT = L"http://tizen.org/appcontrol/operation/createcontent";
+const wchar_t* APPCONTROL_OPERATION_ID_CREATE_CONTENT = L"http://tizen.org/appcontrol/operation/create_content";
 const wchar_t* APPCONTROL_OPERATION_ID_COMPOSE = L"http://tizen.org/appcontrol/operation/compose";
 const wchar_t* APPCONTROL_OPERATION_ID_CONFIGURE = L"http://tizen.org/appcontrol/operation/configure";
 const wchar_t* APPCONTROL_OPERATION_ID_MAIN = L"http://tizen.org/appcontrol/operation/main";
 
-const wchar_t* APPCONTROL_KEY_TYPE = L"type";
-const wchar_t* APPCONTROL_KEY_MEDIA_TYPE = L"mediaType";
-const wchar_t* APPCONTROL_KEY_PATH = L"path";
-const wchar_t* APPCONTROL_KEY_INDEX = L"index";
-const wchar_t* APPCONTROL_KEY_ATTACHMENTS = L"attachments";
-const wchar_t* APPCONTROL_KEY_SELECTION_MODE = L"selectionMode";
+const wchar_t* APPCONTROL_KEY_TYPE = L"http://tizen.org/appcontrol/data/type";
+const wchar_t* APPCONTROL_KEY_PATH = L"http://tizen.org/appcontrol/data/path";
+const wchar_t* APPCONTROL_KEY_INDEX = L"http://tizen.org/appcontrol/data/index";
+const wchar_t* APPCONTROL_KEY_SELECTION_MODE = L"http://tizen.org/appcontrol/data/selection_mode";
 const wchar_t* APPCONTROL_KEY_DATA_SELECTED = L"http://tizen.org/appcontrol/data/selected";
+const wchar_t* APPCONTROL_KEY_MESSAGE_TYPE = L"http://tizen.org/appcontrol/data/message/type";
+const wchar_t* APPCONTROL_KEY_CAMERA_ALLOW_SWITCH = L"http://tizen.org/appcontrol/data/camera/allow_switch";
 
-const wchar_t* APPCONTROL_DATA_CAMERA = L"camera";
 const wchar_t* APPCONTROL_DATA_IMAGE = L"image";
 const wchar_t* APPCONTROL_DATA_VIDEO = L"video";
 const wchar_t* APPCONTROL_DATA_SINGLE = L"single";
 const wchar_t* APPCONTROL_DATA_MULTIPLE = L"multiple";
 const wchar_t* APPCONTROL_DATA_SLIDE_SHOW = L"slideshow";
-const wchar_t* APPCONTROL_DATA_MMS = L"MMS";
+const wchar_t* APPCONTROL_DATA_MMS = L"mms";
 const wchar_t* APPCONTROL_DATA_SELECTION_MODE = L"http://tizen.org/appcontrol/data/selection/mode";
+const wchar_t* APPCONTROL_DATA_TRUE = L"true";
 
 const wchar_t* APPCONTROL_RESULT_KEY_LEGACY_RESULT = L"http://tizen.org/appcontrol/data/legacyresult";
 
index 0d635ba..6b6399b 100644 (file)
@@ -576,8 +576,10 @@ VideoListEditorPanel::OnListViewItemStateChanged(ListView& listView, int index,
                        {
                                map->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH),
                                                new (std::nothrow) String(__pPresentationModel->GetContentFilePath(index)));
-                               map->Add(new (std::nothrow) String(APPCONTROL_KEY_DATA_SELECTED),
-                                               new (std::nothrow) String(__pPresentationModel->GetContentFilePath(index)));
+                               ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+                               pArrayList->Construct();
+                               pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(index)));
+                               map->Add(new (std::nothrow) String(APPCONTROL_KEY_DATA_SELECTED), (Object*)pArrayList);
 
                                GalleryApp* pApp = dynamic_cast<GalleryApp*>(UiApp::GetInstance());
                                if (pApp != null)
@@ -794,39 +796,19 @@ VideoListEditorPanel::OnRequestMessage(void)
                return;
        }
 
-       String combineText;
-       String path;
-
+       ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+       pArrayList->Construct();
        int loopCount = pIndexList->GetCount();
+
        for (int i = 0; i < loopCount; ++i)
        {
-               path = __pPresentationModel->GetContentFilePath(i);
-
-               if (    path.EndsWith(CONTENT_EXT_PNG)
-                       || path.EndsWith(CONTENT_EXT_BMP)
-                       || path.EndsWith(CONTENT_EXT_JPG)
-                       || path.EndsWith(CONTENT_EXT_GIF)
-                       || path.EndsWith(CONTENT_EXT_TIF)
-                       || path.EndsWith(CONTENT_EXT_MP4)
-                       || path.EndsWith(CONTENT_EXT_3GP)
-                       || path.EndsWith(CONTENT_EXT_AVI)
-                       || path.EndsWith(CONTENT_EXT_RM)
-                       || path.EndsWith(CONTENT_EXT_WMV)
-                       || path.EndsWith(CONTENT_EXT_ASF)
-                       )
-               {
-                       if (combineText.CompareTo(EMPTY_SPACE) != 0)
-                       {
-                               combineText.Append(L";");
-                       }
-                       combineText.Append(path);
-               }
+               pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(i)));
        }
 
        HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
        pDataList->Construct();
-       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE), new (std::nothrow) String(APPCONTROL_DATA_MMS));
-       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_ATTACHMENTS), new (std::nothrow) String(combineText));
+       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_MESSAGE_TYPE), new (std::nothrow) String(APPCONTROL_DATA_MMS));
+       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pArrayList);
 
        __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_MESSAGE, APPCONTROL_OPERATION_ID_COMPOSE,
                        pDataList, null);
@@ -841,42 +823,21 @@ VideoListEditorPanel::OnRequestEmail(void)
        if (pIndexList->GetCount() <= 0)
        {
                AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
-
                return;
        }
 
-       String combineText;
-       String path;
-
+       ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+       pArrayList->Construct();
        int loopCount = pIndexList->GetCount();
+
        for (int i = 0; i < loopCount; ++i)
        {
-               path = __pPresentationModel->GetContentFilePath(i);
-
-               if (    path.EndsWith(CONTENT_EXT_PNG)
-                       || path.EndsWith(CONTENT_EXT_BMP)
-                       || path.EndsWith(CONTENT_EXT_JPG)
-                       || path.EndsWith(CONTENT_EXT_GIF)
-                       || path.EndsWith(CONTENT_EXT_TIF)
-                       || path.EndsWith(CONTENT_EXT_MP4)
-                       || path.EndsWith(CONTENT_EXT_3GP)
-                       || path.EndsWith(CONTENT_EXT_AVI)
-                       || path.EndsWith(CONTENT_EXT_RM)
-                       || path.EndsWith(CONTENT_EXT_WMV)
-                       || path.EndsWith(CONTENT_EXT_ASF)
-                       )
-               {
-                       if (combineText.CompareTo(EMPTY_SPACE) != 0)
-                       {
-                               combineText.Append(L";");
-                       }
-                       combineText.Append(path);
-               }
+               pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(i)));
        }
 
        HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
        pDataList->Construct();
-       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_ATTACHMENTS), new (std::nothrow) String(combineText));
+       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pArrayList);
 
        __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_EMAIL,     APPCONTROL_OPERATION_ID_COMPOSE,
                        pDataList, null);
@@ -925,19 +886,18 @@ VideoListEditorPanel::OnRequestAppExitWithMultipleSelectionAppControlResult(void
                return;
        }
 
-       String combineText;
-
+       ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+       pArrayList->Construct();
        int loopCount = pIndexList->GetCount();
+
        for (int i = 0; i < loopCount; ++i)
        {
-               combineText.Append(__pPresentationModel->GetContentFilePath(i));
-               combineText.Append(L";");
+               pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(i)));
        }
 
        HashMap* map = new (std::nothrow) HashMap(SingleObjectDeleter);
        map->Construct();
-       map->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), new (std::nothrow) String(combineText));
-       map->Add(new (std::nothrow) String(APPCONTROL_KEY_DATA_SELECTED), new (std::nothrow) String(combineText));
+       map->Add(new (std::nothrow) String(APPCONTROL_KEY_DATA_SELECTED), (Object*)pArrayList);
 
        GalleryApp* pApp = dynamic_cast<GalleryApp*>(UiApp::GetInstance());
        if (pApp != null)
@@ -945,6 +905,10 @@ VideoListEditorPanel::OnRequestAppExitWithMultipleSelectionAppControlResult(void
                pApp->SendAppControlResult(APP_CTRL_RESULT_SUCCEEDED, map);
                pApp->Terminate();
        }
+       else
+       {
+               delete map;
+       }
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
 
index c5f7f9d..53a7a73 100644 (file)
@@ -226,24 +226,23 @@ VideoListPanel::OnListViewItemStateChanged(ListView& listView, int index, int el
        AppLogDebug("ENTER");
        if (status == LIST_ITEM_STATUS_SELECTED)
        {
-               HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
-               pDataList->Construct();
-               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE),
-                               new (std::nothrow) String(APPCONTROL_DATA_IMAGE));
-
+               IList* pList = new (std::nothrow) ArrayList();
                int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
+
                for (int i = 0; i < loopCount; ++i)
                {
-                       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH),
-                               new (std::nothrow) String(__pPresentationModel->GetContentFilePath(i)));
+                       pList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(i)));
                }
                String listIndex;
-               listIndex.Format(10, L"d", index);
-               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_INDEX),
-                               new (std::nothrow) String(listIndex));
+               listIndex.Format(10, L"%d", index);
+
+               HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
+               pDataList->Construct();
+               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE), new (std::nothrow) String(APPCONTROL_DATA_IMAGE));
+               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pList);
+               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_INDEX), new (std::nothrow) String(listIndex));
 
-               __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_IMAGE,
-                               APPCONTROL_OPERATION_ID_VIEW, pDataList, null);
+               __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_IMAGE, APPCONTROL_OPERATION_ID_VIEW, pDataList, null);
        }
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }