From eeacc7a0e5eeae85c7cf3bcff4c2de08ba42dcda Mon Sep 17 00:00:00 2001 From: HyukSoon Choi Date: Fri, 29 Mar 2013 10:01:51 +0900 Subject: [PATCH] New AppControl Spec Change-Id: I03815e47a64b71505cd21b2c25e296acdf49520f Signed-off-by: HyukSoon Choi --- inc/IvImageNameEditorForm.h | 21 ++++---- inc/IvImageSetterForm.h | 3 +- inc/IvImageViewerForm.h | 1 - inc/IvImageViewerPresentationModel.h | 5 +- inc/IvTypes.h | 22 ++++++--- manifest.xml | 3 ++ src/IvImageEventArg.cpp | 1 - src/IvImageInfo.cpp | 1 - src/IvImageNameEditorForm.cpp | 3 -- src/IvImageViewerApp.cpp | 53 ++++++++++---------- src/IvImageViewerForm.cpp | 90 ++++++++++++++++------------------ src/IvImageViewerPresentationModel.cpp | 55 +++++---------------- src/IvTypes.cpp | 25 +++++----- 13 files changed, 127 insertions(+), 156 deletions(-) diff --git a/inc/IvImageNameEditorForm.h b/inc/IvImageNameEditorForm.h index b9f4d13..353c752 100644 --- a/inc/IvImageNameEditorForm.h +++ b/inc/IvImageNameEditorForm.h @@ -29,14 +29,14 @@ #include "IvImageViewerPresentationModel.h" class ImageNameEditorForm -: public Tizen::Ui::Controls::Form - , public Tizen::Ui::Controls::IFormBackEventListener - , public Tizen::Ui::IActionEventListener - , public Tizen::Ui::IOrientationEventListener - , public Tizen::Ui::ITextEventListener - , public Tizen::Ui::Scenes::ISceneEventListener - { - public: + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::Controls::IFormBackEventListener + , public Tizen::Ui::IActionEventListener + , public Tizen::Ui::IOrientationEventListener + , public Tizen::Ui::ITextEventListener + , public Tizen::Ui::Scenes::ISceneEventListener +{ +public: ImageNameEditorForm(void); virtual ~ImageNameEditorForm(void); @@ -45,7 +45,6 @@ class ImageNameEditorForm virtual result OnInitializing(void); virtual result OnTerminating(void); - void CreateMessage(Tizen::Base::String& str); virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source); @@ -63,7 +62,7 @@ class ImageNameEditorForm virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId); - private: +private: int __currentIndex; int __modalMsgBoxResult; Tizen::Ui::Controls::EditField* __pNameEditField; @@ -72,6 +71,6 @@ class ImageNameEditorForm Tizen::Base::String __nameEditFieldTempText; Tizen::Ui::Controls::MessageBox* __pMessageBox; ImageViewerPresentationModel* __pPresentationModel; - }; +}; #endif /* _IV_IMAGE_NAME_EDITOR_FORM_H_ */ diff --git a/inc/IvImageSetterForm.h b/inc/IvImageSetterForm.h index 54c9f79..fc75b2d 100644 --- a/inc/IvImageSetterForm.h +++ b/inc/IvImageSetterForm.h @@ -73,8 +73,7 @@ public: virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId); - //From IFileUpdateEventListener - void OnFormFileEventOccuered(const int index, const unsigned long eventId); + virtual void OnFormFileEventOccuered(const int index, const unsigned long eventId); private: result InitializeButton(void); diff --git a/inc/IvImageViewerForm.h b/inc/IvImageViewerForm.h index d42dc5c..239beb1 100644 --- a/inc/IvImageViewerForm.h +++ b/inc/IvImageViewerForm.h @@ -115,7 +115,6 @@ public: virtual void OnImageDecodedN(const int index); - //From IFileUpdateEventListener virtual void OnFormFileEventOccuered(const int index, const unsigned long eventId); private: diff --git a/inc/IvImageViewerPresentationModel.h b/inc/IvImageViewerPresentationModel.h index ed0e54e..1c23c82 100644 --- a/inc/IvImageViewerPresentationModel.h +++ b/inc/IvImageViewerPresentationModel.h @@ -42,7 +42,7 @@ class IFileUpdateEventListener; class ImageViewerPresentationModel : public IImageProviderEventListener - , public Tizen::Io::IFileEventListener + , public Tizen::Io::IFileEventListener { public: static ImageViewerPresentationModel* GetInstance(); @@ -76,12 +76,11 @@ public: SlideShowTransitionEffect GetTransitionEffectOfSlideShow(void) const; result StartAppControl(const Tizen::Base::String& providerId, const Tizen::Base::String& operationId, - const Tizen::Base::Collection::HashMap* pDataList, + const Tizen::Base::String* uriData, const Tizen::Base::Collection::HashMap* pDataList, Tizen::App::IAppControlResponseListener* pListener); virtual void OnImageReceivedN(Tizen::Base::Runtime::IEventArg& eventArg); - //From IFileEventListener virtual void OnFileEventOccured (const unsigned long events, const Tizen::Base::String &path, const unsigned int eventId); private: diff --git a/inc/IvTypes.h b/inc/IvTypes.h index a40e602..fa8a967 100644 --- a/inc/IvTypes.h +++ b/inc/IvTypes.h @@ -92,19 +92,29 @@ extern const wchar_t* APPCONTROL_PROVIDER_ID_VIDEO_PLAYER; extern const wchar_t* APPCONTROL_OPERATION_ID_PICK; extern const wchar_t* APPCONTROL_OPERATION_ID_VIEW; -extern const wchar_t* APPCONTROL_OPERATION_ID_PLAY; 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_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_VALUE; -extern const wchar_t* APPCONTROL_KEY_RETURN_TYPE; -extern const wchar_t* APPCONTROL_KEY_LEGACY_RESULT; +extern const wchar_t* APPCONTROL_KEY_SOCIAL_ITEM_TYPE; +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_DATA_IMAGE; +extern const wchar_t* APPCONTROL_DATA_VIDEO; +extern const wchar_t* APPCONTROL_DATA_SLIDE_SHOW; +extern const wchar_t* APPCONTROL_DATA_MESSAGE; +extern const wchar_t* APPCONTROL_DATA_EMAIL; +extern const wchar_t* APPCONTROL_DATA_SINGLE; +extern const wchar_t* APPCONTROL_DATA_ITEM_ID; +extern const wchar_t* APPCONTROL_DATA_URI_FILE; +extern const wchar_t* APPCONTROL_DATA_MMS; +extern const wchar_t* APPCONTROL_DATA_PERSON; extern const wchar_t* APPCONTROL_DATA_IMAGE; extern const wchar_t* APPCONTROL_DATA_VIDEO; diff --git a/manifest.xml b/manifest.xml index c4b7453..262a69c 100644 --- a/manifest.xml +++ b/manifest.xml @@ -32,6 +32,9 @@ + + + diff --git a/src/IvImageEventArg.cpp b/src/IvImageEventArg.cpp index 46ddc71..87f43d2 100644 --- a/src/IvImageEventArg.cpp +++ b/src/IvImageEventArg.cpp @@ -37,7 +37,6 @@ ImageEventArg::~ImageEventArg(void) if (__pBitmap != null) { delete __pBitmap; - __pBitmap = null; } } diff --git a/src/IvImageInfo.cpp b/src/IvImageInfo.cpp index 7e2e69b..cadc1a2 100644 --- a/src/IvImageInfo.cpp +++ b/src/IvImageInfo.cpp @@ -35,7 +35,6 @@ ImageInfo::~ImageInfo(void) if (__pBitmap != null) { delete __pBitmap; - __pBitmap = null; } } diff --git a/src/IvImageNameEditorForm.cpp b/src/IvImageNameEditorForm.cpp index 5ac0b8d..89d8005 100644 --- a/src/IvImageNameEditorForm.cpp +++ b/src/IvImageNameEditorForm.cpp @@ -234,7 +234,6 @@ ImageNameEditorForm::OnTextValueChanged (const Control &source) if (inputString.Contains(DIRECTORY_SEPARATOR) == true) { - String msg = ResourceManager::GetString(L"IDS_COM_POP_INVALID_CHARACTERS"); CreateMessage(msg); @@ -385,5 +384,3 @@ ImageNameEditorForm::CreateMessage(String& str) return; } - - diff --git a/src/IvImageViewerApp.cpp b/src/IvImageViewerApp.cpp index 496273e..a9c1788 100644 --- a/src/IvImageViewerApp.cpp +++ b/src/IvImageViewerApp.cpp @@ -120,8 +120,6 @@ ImageViewerApp::OnAppTerminating(AppRegistry& appRegistry, bool forcedTerminatio pPresentationModel->ClearImageRequests(true); } - Thread::Sleep(1000); - delete __pArguments; __pArguments = null; @@ -171,7 +169,7 @@ ImageViewerApp::OnAppControlRequestReceived(RequestId reqId, const String& opera { __uriData = *pUriData; } - if (pExtraData != null) + else if (pExtraData != null) { HashMap* pArguments = new (std::nothrow) HashMap(SingleObjectDeleter); result r = pArguments->Construct(); @@ -182,35 +180,40 @@ ImageViewerApp::OnAppControlRequestReceived(RequestId reqId, const String& opera return; } - - const String* pKey = null; - const String* pValue = null; - IList* pKeyList = pExtraData->GetKeysN(); - - if (pKeyList != null) + AppLogDebug("ENTER2"); + const String* pType = static_cast(pExtraData->GetValue(String(APPCONTROL_KEY_TYPE))); + const ArrayList* pList = static_cast(pExtraData->GetValue(String(APPCONTROL_KEY_PATH))); + const String* pIndex = static_cast(pExtraData->GetValue(String(APPCONTROL_KEY_INDEX))); + AppLogDebug("ENTER3"); + if (pType != null) { - int loopCount = pKeyList->GetCount(); + 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) { - pKey = static_cast(pKeyList->GetAt(i)); - if (pKey != null) - { - pValue = static_cast(pExtraData->GetValue(*pKey)); - AppLogDebug("(%ls:%ls)", pKey == null ? L"(null)" : pKey->GetPointer(), pValue == null ? L"(null)" : pValue->GetPointer()); - if (pValue != null && pKey->CompareTo(APPCONTROL_KEY_LEGACY_RESULT) != 0) - { - pArguments->Add(new (std::nothrow) String(*pKey), new (std::nothrow) String(*pValue)); - } - } + temp = static_cast(pList->GetAt(i)); + AppLogDebug("ENTER8 temp(%ls)", temp->GetPointer()); + pArrayList->Add(new (std::nothrow) String(*temp)); } - __pArguments = pArguments; - delete pKeyList; + pArguments->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), pArrayList); } - else + if (pIndex != null) { - delete pArguments; - pArguments = null; + pArguments->Add(new (std::nothrow) String(APPCONTROL_KEY_INDEX), new (std::nothrow) String(*pIndex)); } + + __pArguments = pArguments; } AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); } diff --git a/src/IvImageViewerForm.cpp b/src/IvImageViewerForm.cpp index a7688b1..83fc9fe 100644 --- a/src/IvImageViewerForm.cpp +++ b/src/IvImageViewerForm.cpp @@ -194,8 +194,8 @@ ImageViewerForm::OnInitializing(void) InitializePopup(); if (__initializeDisplayModeCurrent == APPCONTROL_MODE_NORMAL - || __initializeDisplayModeCurrent == APPCONTROL_MODE_MESSAGE - || __initializeDisplayModeCurrent == APPCONTROL_MODE_EMAIL) + || __initializeDisplayModeCurrent == APPCONTROL_MODE_MESSAGE + || __initializeDisplayModeCurrent == APPCONTROL_MODE_EMAIL) { int index = __pPresentationModel->GetStartIndex(); __pGallery->UpdateGallery(); @@ -514,15 +514,12 @@ ImageViewerForm::CallVideoPlayer(void) AppLogDebug("ENTER"); int index = __pGallery->GetCurrentItemIndex(); String filePath = __pPresentationModel->GetFilePathAt(index); + filePath.Insert(APPCONTROL_DATA_URI_FILE, 0); - HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter); - pDataList->Construct(); - pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE), - new (std::nothrow) String(APPCONTROL_DATA_VIDEO)); - pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), new (std::nothrow) String(filePath)); + AppLogDebug("ENTER(%ls)", filePath.GetPointer()); - __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_VIDEO_PLAYER, - APPCONTROL_OPERATION_ID_PLAY, pDataList, this); + __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_VIDEO_PLAYER, APPCONTROL_OPERATION_ID_VIEW, + &filePath, null, this); AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); } @@ -1399,11 +1396,13 @@ ImageViewerForm::OnActionPerformed(const Control& source, int actionId) pDataList->Construct(); pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_SELECTION_MODE), new (std::nothrow) String(APPCONTROL_DATA_SINGLE)); - pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_RETURN_TYPE), - new (std::nothrow) String(APPCONTROL_DATA_CONTACT_ID)); + pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_SOCIAL_ITEM_TYPE), + new (std::nothrow) String(APPCONTROL_DATA_PERSON)); + pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_SOCIAL_RESULT_TYPE), + new (std::nothrow) String(APPCONTROL_DATA_ITEM_ID)); __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_CONTACTS, - APPCONTROL_OPERATION_ID_PICK, pDataList, this); + APPCONTROL_OPERATION_ID_PICK, null, pDataList, this); break; } case ACTION_ID_CONTEXTMENU_EMAIL: @@ -1534,25 +1533,20 @@ ImageViewerForm::OnAppControlCompleteResponseReceived(const AppId& appId, && operationId == APPCONTROL_OPERATION_ID_PICK && appControlResult == APP_CTRL_RESULT_SUCCEEDED) { - const String* pReturnType = - static_cast(pExtraData->GetValue(String(APPCONTROL_KEY_RETURN_TYPE))); - if (pReturnType != null && pReturnType->CompareTo(APPCONTROL_DATA_CONTACT_ID) == 0) + const String* pContactId = + static_cast(pExtraData->GetValue(String(APPCONTROL_KEY_SOCIAL_ITEM_ID))); + SceneManager* pSceneManager = SceneManager::GetInstance(); + long long lresult = 0; + if (pContactId != null && pContactId->GetLength() > 0) { - const String* pContactId = - static_cast(pExtraData->GetValue(String(APPCONTROL_KEY_VALUE))); - SceneManager* pSceneManager = SceneManager::GetInstance(); - long long lresult = 0; - if (pContactId != null && pContactId->GetLength() > 0) - { - LongLong::Parse(*pContactId, lresult); - } - ArrayList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter); - pList->Add(new (std::nothrow) Integer(__pGallery->GetCurrentItemIndex())); - pList->Add(new (std::nothrow) Integer(SET_AT_TYPE_CALLER_IMAGE)); - pList->Add(new (std::nothrow) LongLong(lresult)); - __pPresentationModel->SetSetterIndex(__pGallery->GetCurrentItemIndex()); - pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_SETTER), pList); + LongLong::Parse(*pContactId, lresult); } + ArrayList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter); + pList->Add(new (std::nothrow) Integer(__pGallery->GetCurrentItemIndex())); + pList->Add(new (std::nothrow) Integer(SET_AT_TYPE_CALLER_IMAGE)); + pList->Add(new (std::nothrow) LongLong(lresult)); + __pPresentationModel->SetSetterIndex(__pGallery->GetCurrentItemIndex()); + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_SETTER), pList); } ImageViewerApp* pImageViewerApp = static_cast(ImageViewerApp::GetInstance()); @@ -1744,18 +1738,16 @@ ImageViewerForm::OnRequestEmailAction(void) String filePath = __pPresentationModel->GetFilePathAt(currentIndex); - ImageViewerMediaType mediaType = CommonUtil::GetMediaType(filePath); + HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter); + pDataList->Construct(); - if (mediaType == IMAGE_VIEWER_MEDIA_TYPE_IMAGE || mediaType == IMAGE_VIEWER_MEDIA_TYPE_VIDEO) - { - HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter); - pDataList->Construct(); - pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_ATTACHMENTS), - new (std::nothrow) String(filePath)); + IList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter); + pList->Add(new (std::nothrow) String(filePath)); - __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_EMAIL, - APPCONTROL_OPERATION_ID_COMPOSE, pDataList, this); - } + pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pList); + + __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_EMAIL, APPCONTROL_OPERATION_ID_COMPOSE, + null, pDataList, this); AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); } @@ -1773,18 +1765,18 @@ ImageViewerForm::OnRequestMessagesAction(void) String filePath = __pPresentationModel->GetFilePathAt(currentIndex); - ImageViewerMediaType mediaType = CommonUtil::GetMediaType(filePath); + HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter); + pDataList->Construct(); + pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_MESSAGE_TYPE), + new (std::nothrow) String(APPCONTROL_DATA_MMS)); - if (mediaType == IMAGE_VIEWER_MEDIA_TYPE_IMAGE || mediaType == IMAGE_VIEWER_MEDIA_TYPE_VIDEO) - { - 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(filePath)); + IList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter); + pList->Add(new (std::nothrow) String(filePath)); - __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_MESSAGES, - APPCONTROL_OPERATION_ID_COMPOSE, pDataList, this); - } + pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pList); + + __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_MESSAGES, + APPCONTROL_OPERATION_ID_COMPOSE, null, pDataList, this); AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); } diff --git a/src/IvImageViewerPresentationModel.cpp b/src/IvImageViewerPresentationModel.cpp index e5501f7..f9a7ac3 100644 --- a/src/IvImageViewerPresentationModel.cpp +++ b/src/IvImageViewerPresentationModel.cpp @@ -116,9 +116,11 @@ ImageViewerPresentationModel::Construct(void) if (pArguments != null) { const String* pType = static_cast(pArguments->GetValue(String(APPCONTROL_KEY_TYPE))); - const String* pPath = static_cast(pArguments->GetValue(String(APPCONTROL_KEY_PATH))); + const ArrayList* pList = static_cast(pArguments->GetValue(String(APPCONTROL_KEY_PATH))); const String* pIndex = static_cast(pArguments->GetValue(String(APPCONTROL_KEY_INDEX))); + AppLog("pType %x pList %x pIndex %x", pType, pList, pIndex); + if (pIndex != null) { Integer::Parse(*pIndex, __startIndex); @@ -131,57 +133,26 @@ ImageViewerPresentationModel::Construct(void) { __type = *pType; } - if (pPath != null) + if (pList != null) { - String delim(APPCONTROL_PATH_SEPARATOR); - String currentPath = *pPath; - ImageInfo* pImageInfo = null; String tempPath; - - wchar_t tempChar[2] = L""; - - result r = E_SUCCESS; - FileAttributes attr; - - int loopCount = currentPath.GetLength(); + ImageInfo* pImageInfo = null; + int loopCount = pList->GetCount(); for (int i = 0; i < loopCount; ++i) { - currentPath.GetCharAt(i, *tempChar); - if (delim != tempChar) - { - tempPath += tempChar; - } - else - { - r = File::GetAttributes(tempPath, attr); - if (r == E_SUCCESS && attr.IsDirectory() != true) - { - pImageInfo = new (std::nothrow) ImageInfo(); - pImageInfo->Construct(tempPath, null); - __pImageCaches->Add(pImageInfo); - __pFileEventManager->AddPath(tempPath, FILE_EVENTS); - tempPath.Clear(); - continue; - } - tempPath += L";"; - } - } - - r = File::GetAttributes(tempPath, attr); - if (r == E_SUCCESS && attr.IsDirectory() != true) - { pImageInfo = new (std::nothrow) ImageInfo(); + tempPath = *(const_cast(static_cast(pList->GetAt(i)))); + AppLog("(%d) tempPath(%ls)", i, tempPath.GetPointer()); + pImageInfo->Construct(tempPath, null); __pImageCaches->Add(pImageInfo); - __pFileEventManager->AddPath(tempPath, FILE_EVENTS); - + tempPath.Clear(); } } } } else { - __startIndex = 0; uriData.Replace(APPCONTROL_DATA_URI_FILE, L""); ImageInfo* pImageInfo = new (std::nothrow) ImageInfo(); pImageInfo->Construct(uriData, null); @@ -377,8 +348,8 @@ ImageViewerPresentationModel::GetFileName(const String& filePath, bool checkExe) } result -ImageViewerPresentationModel::StartAppControl(const String& providerId, const String & operationId, - const HashMap* pDataList, IAppControlResponseListener* pListener) +ImageViewerPresentationModel::StartAppControl(const String& providerId, const String& operationId, + const String* uriData, const HashMap* pDataList, IAppControlResponseListener* pListener) { AppLogDebug("ENTER"); result r = E_FAILURE; @@ -407,7 +378,7 @@ ImageViewerPresentationModel::StartAppControl(const String& providerId, const S return E_FAILURE; } - r = pAc->Start(null, null, pDataList, pListener); + r = pAc->Start(uriData, null, pDataList, pListener); if (r == E_SUCCESS) { diff --git a/src/IvTypes.cpp b/src/IvTypes.cpp index 32e56c2..b35b86c 100644 --- a/src/IvTypes.cpp +++ b/src/IvTypes.cpp @@ -45,19 +45,18 @@ const wchar_t* APPCONTROL_PROVIDER_ID_VIDEO_PLAYER = L"tizen.videoplayer"; 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_PLAY = L"http://tizen.org/appcontrol/operation/play"; 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_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_VALUE = L"value"; -const wchar_t* APPCONTROL_KEY_RETURN_TYPE = L"returnType"; -const wchar_t* APPCONTROL_KEY_LEGACY_RESULT = L"http://tizen.org/appcontrol/data/legacyresult"; +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_SOCIAL_ITEM_TYPE = L"http://tizen.org/appcontrol/data/social/item_type"; +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_DATA_IMAGE = L"image"; const wchar_t* APPCONTROL_DATA_VIDEO = L"video"; @@ -65,9 +64,10 @@ const wchar_t* APPCONTROL_DATA_SLIDE_SHOW = L"slideshow"; const wchar_t* APPCONTROL_DATA_MESSAGE = L"message"; const wchar_t* APPCONTROL_DATA_EMAIL = L"email"; const wchar_t* APPCONTROL_DATA_SINGLE = L"single"; -const wchar_t* APPCONTROL_DATA_CONTACT_ID = L"contactId"; +const wchar_t* APPCONTROL_DATA_ITEM_ID = L"item_id"; const wchar_t* APPCONTROL_DATA_URI_FILE = L"file://"; -const wchar_t* APPCONTROL_DATA_MMS = L"MMS"; +const wchar_t* APPCONTROL_DATA_MMS = L"mms"; +const wchar_t* APPCONTROL_DATA_PERSON = L"person"; 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"; @@ -99,6 +99,7 @@ const wchar_t* CONTENT_EXT_FLV = L".flv"; const wchar_t* CONTENT_QUERY_PREFIX_FILENAME = L"ContentFileName ="; const wchar_t* EMPTY_SPACE = L""; +const wchar_t* APPCONTROL_SEPARATOR = L"/"; const wchar_t* DIRECTORY_SEPARATOR = L"/"; const wchar_t* FILE_EXT_SEPARATOR = L"."; const wchar_t* APPCONTROL_PATH_SEPARATOR = L";"; -- 2.7.4