From 3b10335639e1b6ce6db24abfc3830bb03c43da25 Mon Sep 17 00:00:00 2001 From: HyukSoon Choi Date: Wed, 3 Apr 2013 16:00:16 +0900 Subject: [PATCH] Send mime to Camera Change-Id: I023737d78fc02bacd23af96abca1a0520745957e Signed-off-by: HyukSoon Choi --- inc/GlAlbumListPresentationModel.h | 3 ++- inc/GlFileListPresentationModel.h | 3 ++- inc/GlTypes.h | 2 ++ src/GlAlbumListEditorForm.cpp | 4 ++-- src/GlAlbumListForm.cpp | 3 ++- src/GlAlbumListPresentationModel.cpp | 5 ++--- src/GlAllListEditorPanel.cpp | 6 +++--- src/GlAllListPanel.cpp | 4 ++-- src/GlAllListSelectionPanel.cpp | 8 +++++--- src/GlFileListForm.cpp | 6 ++++-- src/GlFileListPresentationModel.cpp | 4 ++-- src/GlImageListEditorPanel.cpp | 5 +++-- src/GlImageListPanel.cpp | 3 ++- src/GlTypes.cpp | 2 ++ src/GlVideoListEditorPanel.cpp | 4 ++-- src/GlVideoListPanel.cpp | 3 ++- 16 files changed, 39 insertions(+), 26 deletions(-) diff --git a/inc/GlAlbumListPresentationModel.h b/inc/GlAlbumListPresentationModel.h index e5299a2..c4c28d1 100644 --- a/inc/GlAlbumListPresentationModel.h +++ b/inc/GlAlbumListPresentationModel.h @@ -60,7 +60,8 @@ public: void CancelThumbnailRequest(const int folderIndex); void ClearThumbnailRequests(bool appTerminating = false); result StartAppControl(const Tizen::Base::String& providerId, const Tizen::Base::String& operationId, - const Tizen::Base::Collection::IMap* pDataList, Tizen::App::IAppControlResponseListener* pListener); + const Tizen::Base::String* pMimeType, const Tizen::Base::Collection::IMap* pDataList, + Tizen::App::IAppControlResponseListener* pListener); void InitializeAlbumInfoList(const Tizen::Content::ContentType& contentType); result DeleteContentInfoInDirectory(int index, Tizen::Content::ContentType contentType); diff --git a/inc/GlFileListPresentationModel.h b/inc/GlFileListPresentationModel.h index 9be34e5..03fa8ba 100644 --- a/inc/GlFileListPresentationModel.h +++ b/inc/GlFileListPresentationModel.h @@ -67,7 +67,8 @@ public: result MoveToContentFileList(const Tizen::Base::Collection::IList& contentIndexList, const Tizen::Base::String& destDirectory); result StartAppControl(const Tizen::Base::String& providerId, const Tizen::Base::String& operationId, - const Tizen::Base::Collection::IMap* pDataList, Tizen::App::IAppControlResponseListener* pListener); + const Tizen::Base::String* pMimeType, const Tizen::Base::Collection::IMap* pDataList, + Tizen::App::IAppControlResponseListener* pListener); result SetCurrentAlbumInfo(const Tizen::Base::String& albumName, const Tizen::Base::Collection::IList& directoryList); result RefreshCurrentAlbumContentInfoList(Tizen::Content::ContentType contentType); diff --git a/inc/GlTypes.h b/inc/GlTypes.h index b1d5d58..c0cd70d 100644 --- a/inc/GlTypes.h +++ b/inc/GlTypes.h @@ -193,6 +193,8 @@ 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_MIME_IMAGE_JPG; + extern const wchar_t* APPCONTROL_DATA_IMAGE; extern const wchar_t* APPCONTROL_DATA_VIDEO; extern const wchar_t* APPCONTROL_DATA_SINGLE; diff --git a/src/GlAlbumListEditorForm.cpp b/src/GlAlbumListEditorForm.cpp index 78802e9..d89b288 100644 --- a/src/GlAlbumListEditorForm.cpp +++ b/src/GlAlbumListEditorForm.cpp @@ -690,7 +690,7 @@ AlbumListEditorForm::OnRequestMessage(void) pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pArrayList); __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_MESSAGE, APPCONTROL_OPERATION_ID_COMPOSE, - pDataList, null); + null, pDataList, null); } AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); } @@ -755,7 +755,7 @@ AlbumListEditorForm::OnRequestEmail(void) pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pArrayList); __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_EMAIL, - APPCONTROL_OPERATION_ID_COMPOSE, pDataList, null); + APPCONTROL_OPERATION_ID_COMPOSE, null, pDataList, null); } AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); } diff --git a/src/GlAlbumListForm.cpp b/src/GlAlbumListForm.cpp index d04df93..7ed2122 100644 --- a/src/GlAlbumListForm.cpp +++ b/src/GlAlbumListForm.cpp @@ -359,7 +359,8 @@ AlbumListForm::OnActionPerformed(const Control& source, int actionId) new (std::nothrow) String(APPCONTROL_DATA_TRUE)); __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_CAMERA, - APPCONTROL_OPERATION_ID_CREATE_CONTENT, pDataList, null); + APPCONTROL_OPERATION_ID_CREATE_CONTENT, new (std::nothrow) String(APPCONTROL_MIME_IMAGE_JPG), + pDataList, null); } break; case ACTION_ID_FOOTER_EDIT: diff --git a/src/GlAlbumListPresentationModel.cpp b/src/GlAlbumListPresentationModel.cpp index 7f4a719..6043788 100644 --- a/src/GlAlbumListPresentationModel.cpp +++ b/src/GlAlbumListPresentationModel.cpp @@ -499,10 +499,9 @@ AlbumListPresentationModel::CreateMergeBitmapN(int index) result AlbumListPresentationModel::StartAppControl(const String& providerId, const String& operationId, - const IMap* pDataList, IAppControlResponseListener* pListener) + const String* pMimeType, const IMap* pDataList, IAppControlResponseListener* pListener) { AppLogDebug("ENTER"); - AppLogDebug("FindAppControlN(%ls, %ls)", providerId.GetPointer(), operationId.GetPointer()); AppControl* pAc = AppManager::FindAppControlN(providerId, operationId); if (pAc == null) { @@ -510,7 +509,7 @@ AlbumListPresentationModel::StartAppControl(const String& providerId, const Str return E_FAILURE; } - result r = pAc->Start(null, null, pDataList, pListener); + result r = pAc->Start(null, pMimeType, pDataList, pListener); if (r == E_SUCCESS) { diff --git a/src/GlAllListEditorPanel.cpp b/src/GlAllListEditorPanel.cpp index f0af790..dfed3fe 100644 --- a/src/GlAllListEditorPanel.cpp +++ b/src/GlAllListEditorPanel.cpp @@ -635,7 +635,7 @@ AllListEditorPanel::OnRequestMessage(void) 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, + __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_MESSAGE, APPCONTROL_OPERATION_ID_COMPOSE, null, pDataList, null); AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); @@ -674,7 +674,7 @@ AllListEditorPanel::OnRequestEmail(void) pDataList->Construct(); pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pArrayList); - __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_EMAIL, APPCONTROL_OPERATION_ID_COMPOSE, + __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_EMAIL, APPCONTROL_OPERATION_ID_COMPOSE, null, pDataList, null); AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); @@ -713,7 +713,7 @@ AllListEditorPanel::OnRequestSlideShow(void) 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, + __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_IMAGE, APPCONTROL_OPERATION_ID_VIEW, null, pDataList, null); delete pIndexList; diff --git a/src/GlAllListPanel.cpp b/src/GlAllListPanel.cpp index 3e20db4..f04733d 100644 --- a/src/GlAllListPanel.cpp +++ b/src/GlAllListPanel.cpp @@ -250,8 +250,8 @@ AllListPanel::OnIconListViewItemStateChanged(IconListView& view, int index, Icon pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), pArrayList); pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_INDEX), new (std::nothrow) String(listIndex)); - AppLog("Check pointer(%x) pDataList(%x)", pArrayList, pDataList); - __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_IMAGE, APPCONTROL_OPERATION_ID_VIEW, pDataList, null); + __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_IMAGE, APPCONTROL_OPERATION_ID_VIEW, null, + pDataList, null); String* temp; loopCount = pArrayList->GetCount(); diff --git a/src/GlAllListSelectionPanel.cpp b/src/GlAllListSelectionPanel.cpp index 5e31859..76b82ec 100644 --- a/src/GlAllListSelectionPanel.cpp +++ b/src/GlAllListSelectionPanel.cpp @@ -547,7 +547,7 @@ AllListSelectionPanel::OnRequestMessage(void) 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, + __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_MESSAGE, APPCONTROL_OPERATION_ID_COMPOSE, null, pDataList, null); AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); @@ -586,7 +586,8 @@ AllListSelectionPanel::OnRequestEmail(void) pDataList->Construct(); 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, null, + pDataList, null); AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); return E_SUCCESS; @@ -624,7 +625,8 @@ AllListSelectionPanel::OnRequestSlideShow(void) 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, null, + pDataList, null); AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); return E_SUCCESS; diff --git a/src/GlFileListForm.cpp b/src/GlFileListForm.cpp index 32a4548..327e6db 100644 --- a/src/GlFileListForm.cpp +++ b/src/GlFileListForm.cpp @@ -166,7 +166,8 @@ FileListForm::OnActionPerformed(const Control& source, int actionId) 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, null, + pDataList, null); break; } case ACTION_ID_FOOTER_CAMERA: @@ -174,7 +175,8 @@ FileListForm::OnActionPerformed(const Control& source, int actionId) HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter); pDataList->Construct(); 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); + __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_CAMERA, APPCONTROL_OPERATION_ID_CREATE_CONTENT, + new (std::nothrow) String(APPCONTROL_MIME_IMAGE_JPG), pDataList, null); break; } default: diff --git a/src/GlFileListPresentationModel.cpp b/src/GlFileListPresentationModel.cpp index fe70e68..8aeca8f 100644 --- a/src/GlFileListPresentationModel.cpp +++ b/src/GlFileListPresentationModel.cpp @@ -1016,7 +1016,7 @@ FileListPresentationModel::MoveToContentFile(const ContentId& contentId, const S result FileListPresentationModel::StartAppControl(const String& providerId, const String& operationId, - const IMap* pDataList, IAppControlResponseListener* pListener) + const Tizen::Base::String* pMimeType, const IMap* pDataList, IAppControlResponseListener* pListener) { AppLogDebug("ENTER"); AppControl* pAc = AppManager::FindAppControlN(providerId, operationId); @@ -1025,7 +1025,7 @@ FileListPresentationModel::StartAppControl(const String& providerId, const Strin AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); return E_FAILURE; } - result r = pAc->Start(null, null, pDataList, pListener); + result r = pAc->Start(null, pMimeType, pDataList, pListener); if (r == E_SUCCESS) { diff --git a/src/GlImageListEditorPanel.cpp b/src/GlImageListEditorPanel.cpp index 395fe7c..a648823 100644 --- a/src/GlImageListEditorPanel.cpp +++ b/src/GlImageListEditorPanel.cpp @@ -669,7 +669,7 @@ ImageListEditorPanel::OnRequestMessage(void) 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, + __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_MESSAGE, APPCONTROL_OPERATION_ID_COMPOSE, null, pDataList, null); AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); } @@ -699,7 +699,8 @@ ImageListEditorPanel::OnRequestEmail(void) pDataList->Construct(); 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, null, + pDataList, null); AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); } diff --git a/src/GlImageListPanel.cpp b/src/GlImageListPanel.cpp index fd52a1a..54dbc89 100644 --- a/src/GlImageListPanel.cpp +++ b/src/GlImageListPanel.cpp @@ -231,7 +231,8 @@ ImageListPanel::OnIconListViewItemStateChanged(IconListView& view, int index, Ic 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); + __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_IMAGE, APPCONTROL_OPERATION_ID_VIEW, null, + pDataList, null); } AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); } diff --git a/src/GlTypes.cpp b/src/GlTypes.cpp index a1a8f96..2849135 100644 --- a/src/GlTypes.cpp +++ b/src/GlTypes.cpp @@ -85,6 +85,8 @@ const wchar_t* APPCONTROL_KEY_DATA_SELECTED = L"http://tizen.org/appcontrol/data 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_MIME_IMAGE_JPG = L"image/jpg"; + const wchar_t* APPCONTROL_DATA_IMAGE = L"image"; const wchar_t* APPCONTROL_DATA_VIDEO = L"video"; const wchar_t* APPCONTROL_DATA_SINGLE = L"single"; diff --git a/src/GlVideoListEditorPanel.cpp b/src/GlVideoListEditorPanel.cpp index 6b6399b..f3fd6da 100644 --- a/src/GlVideoListEditorPanel.cpp +++ b/src/GlVideoListEditorPanel.cpp @@ -810,7 +810,7 @@ VideoListEditorPanel::OnRequestMessage(void) 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, + __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_MESSAGE, APPCONTROL_OPERATION_ID_COMPOSE, null, pDataList, null); AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); } @@ -839,7 +839,7 @@ VideoListEditorPanel::OnRequestEmail(void) pDataList->Construct(); pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pArrayList); - __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_EMAIL, APPCONTROL_OPERATION_ID_COMPOSE, + __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_EMAIL, APPCONTROL_OPERATION_ID_COMPOSE, null, pDataList, null); AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); } diff --git a/src/GlVideoListPanel.cpp b/src/GlVideoListPanel.cpp index 53a7a73..e0c9942 100644 --- a/src/GlVideoListPanel.cpp +++ b/src/GlVideoListPanel.cpp @@ -242,7 +242,8 @@ VideoListPanel::OnListViewItemStateChanged(ListView& listView, int index, int el 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, null, + pDataList, null); } AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); } -- 2.7.4