Implemented the spec of Appcontrol for Tizen2.1
authorJongTaeOh <jongtae.oh@samsung.com>
Tue, 26 Mar 2013 06:33:52 +0000 (15:33 +0900)
committerJongTaeOh <jongtae.oh@samsung.com>
Tue, 26 Mar 2013 06:33:52 +0000 (15:33 +0900)
Change-Id: I492b90e80a0d9dfbc9e8b9c49dbb7e7348005a75

inc/MpTypes.h
src/MpAlbumContentListForm.cpp
src/MpAllListPanel.cpp
src/MpContentForm.cpp
src/MpFolderContentListForm.cpp
src/MpMusicPlayerApp.cpp
src/MpPlaylistContentListForm.cpp
src/MpSetAsPopup.cpp
src/MpSharePopup.cpp

index 925d466..1688bea 100644 (file)
@@ -321,13 +321,12 @@ static const Tizen::Base::String RENAME_EDIT_AREA = L"RenameEditArea";
 static const Tizen::Base::String RENAME_CALCEL_BUTTON = L"RenameCancelButton";
 static const Tizen::Base::String RENAME_BG_LABEL = L"RenameBgLabel";
 
-static const Tizen::Base::String APPCONTROL_KEY_ATTACHMENTS = L"attachments";
-static const Tizen::Base::String APPCONTROL_KEY_RETURNTYPE = L"returnType";
-static const Tizen::Base::String APPCONTROL_VALUE_CONTACTID = L"contactId";
-static const Tizen::Base::String APPCONTROL_KEY_VALUE = L"value";
-
-static const Tizen::Base::String APPCONTROL_KEY_SINGLE_MODE = L"selectionMode";
-static const Tizen::Base::String APPCONTROL_VALUE_SINGLE = L"single";
+static const Tizen::Base::String APPCONTROL_KEY_PATH = L"http://tizen.org/appcontrol/data/path";
+static const Tizen::Base::String APPCONTROL_KEY_SOCIAL_ITEM_ID = L"http://tizen.org/appcontrol/data/social/item_id";
+static const Tizen::Base::String APPCONTROL_KEY_SELECTION_MODE = L"http://tizen.org/appcontrol/data/selection_mode";
+static const Tizen::Base::String APPCONTROL_KEY_SOCIAL_RESULT_TYPE = L"http://tizen.org/appcontrol/data/social/result_type";
+static const Tizen::Base::String APPCONTROL_OPTION_SINGLE = L"single";
+static const Tizen::Base::String APPCONTROL_OPTION_ITEM_ID = L"item_id";
 
 static const Tizen::Base::String SHARE_BUTTON_NAME = L"ShareButton";
 static const Tizen::Base::String SET_BUTTON_NAME = L"SetButton";
@@ -529,17 +528,19 @@ static const Tizen::Base::String TabNameId[HEAD_ITEM_COUNT] =
 static const int TIMER_INTERVAL = 100;
 static const int MIN_REWIND_POSITION = 2;
 
-static const Tizen::Base::String OPERATION_ID_COMPOSE = L"http://tizen.org/appcontrol/operation/compose";
 static const Tizen::Base::String PROVIDER_ID_MESSAGE = L"tizen.message";
 static const Tizen::Base::String PROVIDER_ID_EMAIL = L"tizen.email";
+static const Tizen::Base::String PROVIDER_ID_CONTACT = L"tizen.contacts";
+static const Tizen::Base::String OPERATION_ID_COMPOSE = L"http://tizen.org/appcontrol/operation/compose";
+static const Tizen::Base::String OPERATION_ID_SOCIAL_PICK = L"http://tizen.org/appcontrol/operation/social/pick";
+
 static const Tizen::Base::String CALL_RINGTONE_KEY = L"http://tizen.org/setting/sound.ringtone";
 static const Tizen::Base::String MEDIA_VOLUME = L"http://tizen.org/setting/sound.media.volume";
-static const Tizen::Base::String TIZEN_APPCONTROL_OPERATION_PICK = L"http://tizen.org/appcontrol/operation/pick";
+
 static const Tizen::Base::String DATABASE_PATH = L"data/PlaylistDb";
-static const Tizen::Base::String TIZEN_APPCONTROL_PROVIDER_CONTACT = L"tizen.contacts";
 static const Tizen::Base::String SELECTION_MODE = L"selectionMode:single";
 static const Tizen::Base::String RETURN_TYPE = L"returnType:contactId";
 
 static const Tizen::Base::String CONTENT_FORM_REQUSEST_ID = L"ContentFormRequestId";
 
-#endif // _MP_TYPES_H_
\ No newline at end of file
+#endif // _MP_TYPES_H_
index b5fc8b2..1e691e0 100644 (file)
@@ -356,53 +356,49 @@ AlbumContentListForm::OnAppControlCompleteResponseReceived(const AppId& appId,
                return;
        }
        AppLogDebug("%ls, %ls", appId.GetPointer(), operationId.GetPointer());
-       if (appId.Equals(String(TIZEN_APPCONTROL_PROVIDER_CONTACT)))
+       if (appId.Equals(String(PROVIDER_ID_CONTACT)))
        {
                if (appControlResult == APP_CTRL_RESULT_SUCCEEDED)
                {
-                       const String* pContactId = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_RETURNTYPE)));
-                       if (pContactId->Equals(APPCONTROL_VALUE_CONTACTID, true))
-                       {
-                               const String* pResultString = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_VALUE)));
-
-                               AppLogDebug("%ls", pResultString->GetPointer());
-                               int contactId;
-                               Integer::Parse(*pResultString, contactId);
-
-                               AddressbookManager* pAddressbookManager = AddressbookManager::GetInstance();
-                               Addressbook* pAddressbook = pAddressbookManager->GetAddressbookN(DEFAULT_ADDRESSBOOK_ID);
-
-                               ContentInformation* pCcontentInfo = __pPresentationModel->GetContentInfoN(GetActivatedContextItem());
-                               if (pCcontentInfo == null)
-                               {
-                                       delete pAddressbook;
-                                       pAddressbook = null;
-                                       return;
-                               }
-
-                               Contact* pContact = pAddressbook->GetContactN(contactId);
-                               pContact->SetValue(CONTACT_PROPERTY_ID_RINGTONE, pCcontentInfo->ContentFilePath);
-                               result r = pAddressbook->UpdateContact(*pContact);
-
-                               if (r == E_SUCCESS)
-                               {
-                                       MessageBox messageBox;
-                                       messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_POP_SUCCESS"),
-                                                       MSGBOX_STYLE_OK,
-                                                       COUNT_MESSAGE_BOX_TIMEOUT);
-                                       int modalResult = 0;
-                                       messageBox.ShowAndWait(modalResult);
-                               }
-
-                               delete pCcontentInfo;
-                               pCcontentInfo = null;
-
-                               delete pContact;
-                               pContact = null;
+                       const String* pResultString = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_SOCIAL_ITEM_ID)));
+
+                       AppLogDebug("%ls", pResultString->GetPointer());
+                       int contactId;
+                       Integer::Parse(*pResultString, contactId);
+
+                       AddressbookManager* pAddressbookManager = AddressbookManager::GetInstance();
+                       Addressbook* pAddressbook = pAddressbookManager->GetAddressbookN(DEFAULT_ADDRESSBOOK_ID);
 
+                       ContentInformation* pCcontentInfo = __pPresentationModel->GetContentInfoN(GetActivatedContextItem());
+                       if (pCcontentInfo == null)
+                       {
                                delete pAddressbook;
                                pAddressbook = null;
+                               return;
+                       }
+
+                       Contact* pContact = pAddressbook->GetContactN(contactId);
+                       pContact->SetValue(CONTACT_PROPERTY_ID_RINGTONE, pCcontentInfo->ContentFilePath);
+                       result r = pAddressbook->UpdateContact(*pContact);
+
+                       if (r == E_SUCCESS)
+                       {
+                               MessageBox messageBox;
+                               messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_POP_SUCCESS"),
+                                               MSGBOX_STYLE_OK,
+                                               COUNT_MESSAGE_BOX_TIMEOUT);
+                               int modalResult = 0;
+                               messageBox.ShowAndWait(modalResult);
                        }
+
+                       delete pCcontentInfo;
+                       pCcontentInfo = null;
+
+                       delete pContact;
+                       pContact = null;
+
+                       delete pAddressbook;
+                       pAddressbook = null;
                }
        }
        AppLogDebug("EXIT");
@@ -473,4 +469,4 @@ AlbumContentListForm::RefreshAdditionalInformationRegisterBar(void)
 
        pAlbumCount->Invalidate(true);
        AppLogDebug("EXIT");
-}
\ No newline at end of file
+}
index 74b9144..dda5151 100644 (file)
@@ -119,52 +119,48 @@ AllListPanel::OnAppControlCompleteResponseReceived(const AppId& appId,
        }
 
        AppLogDebug("%ls, %ls", appId.GetPointer(), operationId.GetPointer());
-       if (appId.Equals(String(TIZEN_APPCONTROL_PROVIDER_CONTACT))/* && operationId.Equals(String(OPERATION_ID_PICK))*/)
+       if (appId.Equals(String(PROVIDER_ID_CONTACT))/* && operationId.Equals(String(OPERATION_ID_PICK))*/)
        {
                if (appControlResult == APP_CTRL_RESULT_SUCCEEDED)
                {
-                       const String* pContactId = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_RETURNTYPE)));
-                       if (pContactId->Equals(APPCONTROL_VALUE_CONTACTID, true))
-                       {
-                               const String* pResultString = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_VALUE)));
+                       const String* pResultString = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_SOCIAL_ITEM_ID)));
 
-                               AppLogDebug("%ls", pResultString->GetPointer());
+                       AppLogDebug("%ls", pResultString->GetPointer());
 
-                               ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(__itemIndex);
-                               if (pContentInfoStruct == null)
-                               {
-                                       return;
-                               }
+                       ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(__itemIndex);
+                       if (pContentInfoStruct == null)
+                       {
+                               return;
+                       }
 
-                               int contactId;
-                               Integer::Parse(*pResultString, contactId);
+                       int contactId;
+                       Integer::Parse(*pResultString, contactId);
 
-                               AddressbookManager* pAddressbookManager = AddressbookManager::GetInstance();
-                               Addressbook* pAddressbook = pAddressbookManager->GetAddressbookN(DEFAULT_ADDRESSBOOK_ID);
+                       AddressbookManager* pAddressbookManager = AddressbookManager::GetInstance();
+                       Addressbook* pAddressbook = pAddressbookManager->GetAddressbookN(DEFAULT_ADDRESSBOOK_ID);
 
-                               Contact* pContact = pAddressbook->GetContactN(contactId);
-                               pContact->Tizen::Social::Contact::SetValue(CONTACT_PROPERTY_ID_RINGTONE, pContentInfoStruct->ContentFilePath);
-                               result r = pAddressbook->UpdateContact(*pContact);
+                       Contact* pContact = pAddressbook->GetContactN(contactId);
+                       pContact->Tizen::Social::Contact::SetValue(CONTACT_PROPERTY_ID_RINGTONE, pContentInfoStruct->ContentFilePath);
+                       result r = pAddressbook->UpdateContact(*pContact);
 
-                               if (r == E_SUCCESS)
-                               {
-                                       MessageBox messageBox;
-                                       messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_POP_SUCCESS"),
-                                                       MSGBOX_STYLE_OK,
-                                                       3000);
-                                       int modalResult = 0;
-                                       messageBox.ShowAndWait(modalResult);
-                               }
+                       if (r == E_SUCCESS)
+                       {
+                               MessageBox messageBox;
+                               messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_POP_SUCCESS"),
+                                               MSGBOX_STYLE_OK,
+                                               3000);
+                               int modalResult = 0;
+                               messageBox.ShowAndWait(modalResult);
+                       }
 
-                               delete pContentInfoStruct;
-                               pContentInfoStruct = null;
+                       delete pContentInfoStruct;
+                       pContentInfoStruct = null;
 
-                               delete pContact;
-                               pContact = null;
+                       delete pContact;
+                       pContact = null;
 
-                               delete pAddressbook;
-                               pAddressbook = null;
-                       }
+                       delete pAddressbook;
+                       pAddressbook = null;
                }
        }
        AppLogDebug("EXIT");
@@ -269,7 +265,7 @@ AllListPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 
                        HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
                        pDataList->Construct();
-                       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_ATTACHMENTS), new (std::nothrow) String(pContentInfoStruct->ContentFilePath));
+                       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), new (std::nothrow) String(pContentInfoStruct->ContentFilePath));
 
                        pAppControl->Start(null, null, pDataList, this);
 
@@ -302,7 +298,7 @@ AllListPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 
        case IDA_SET_CONTEXT_MENU_CALLER:
                {
-                       AppControl* pAppControl = AppManager::FindAppControlN(TIZEN_APPCONTROL_PROVIDER_CONTACT, TIZEN_APPCONTROL_OPERATION_PICK);
+                       AppControl* pAppControl = AppManager::FindAppControlN(PROVIDER_ID_CONTACT, OPERATION_ID_SOCIAL_PICK);
                        if (pAppControl == null)
                        {
                                return;
@@ -310,8 +306,8 @@ AllListPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 
                        HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
                        pDataList->Construct();
-                       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_SINGLE_MODE), new (std::nothrow) String(APPCONTROL_VALUE_SINGLE));
-                       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_RETURNTYPE), new (std::nothrow) String(APPCONTROL_VALUE_CONTACTID));
+                       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_SELECTION_MODE), new (std::nothrow) String(APPCONTROL_OPTION_SINGLE));
+                       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_SOCIAL_RESULT_TYPE), new (std::nothrow) String(APPCONTROL_OPTION_ITEM_ID));
 
                        pAppControl->Start(null, null, pDataList, this);
 
index f3779c4..f56f12e 100644 (file)
@@ -62,6 +62,7 @@ ContentForm::OnInitializing(void)
        AppLogDebug("ENTER");
        Header* pHeader = GetHeader();
        CommonUtil::SetTabHeaderStyle(*pHeader);
+       pHeader->SetTabEditModeEnabled(false);
        pHeader->AddActionEventListener(*this);
        AddOrientationEventListener(*this);
        AppLogDebug("EXIT");
@@ -173,4 +174,4 @@ ContentForm::OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::O
                pContentPanel->OnOrientationPanelChanged(orientationStatus);
        }
        AppLogDebug("EXIT");
-}
\ No newline at end of file
+}
index 39d429c..562202e 100644 (file)
@@ -235,7 +235,7 @@ FolderContentListForm::OnActionPerformed(const Tizen::Ui::Control& source, int a
 
                        HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
                        pDataList->Construct();
-                       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_ATTACHMENTS), new (std::nothrow) String(pContentInfo->ContentFilePath));
+                       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), new (std::nothrow) String(pContentInfo->ContentFilePath));
                        delete pContentInfo;
 
                        pAppControl->Start(null, null, pDataList, this);
@@ -272,7 +272,7 @@ FolderContentListForm::OnActionPerformed(const Tizen::Ui::Control& source, int a
 
        case IDA_CONTEXT_MENU_ITEM_CALLER:
                {
-                       AppControl* pAppControl = AppManager::FindAppControlN(TIZEN_APPCONTROL_PROVIDER_CONTACT, TIZEN_APPCONTROL_OPERATION_PICK);
+                       AppControl* pAppControl = AppManager::FindAppControlN(PROVIDER_ID_CONTACT, OPERATION_ID_SOCIAL_PICK);
                        if (pAppControl == null)
                        {
                                AppLogDebug("AppManager::FindAppControlN is null");
@@ -281,8 +281,8 @@ FolderContentListForm::OnActionPerformed(const Tizen::Ui::Control& source, int a
 
                        HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
                        pDataList->Construct();
-                       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_SINGLE_MODE), new (std::nothrow) String(APPCONTROL_VALUE_SINGLE));
-                       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_RETURNTYPE), new (std::nothrow) String(APPCONTROL_VALUE_CONTACTID));
+                       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_SELECTION_MODE), new (std::nothrow) String(APPCONTROL_OPTION_SINGLE));
+                       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_SOCIAL_RESULT_TYPE), new (std::nothrow) String(APPCONTROL_OPTION_ITEM_ID));
 
                        pAppControl->Start(null, null, pDataList, this);
                        delete pAppControl;
@@ -502,53 +502,49 @@ FolderContentListForm::OnAppControlCompleteResponseReceived(const AppId& appId,
                return;
        }
        AppLogDebug("%ls, %ls", appId.GetPointer(), operationId.GetPointer());
-       if (appId.Equals(String(TIZEN_APPCONTROL_PROVIDER_CONTACT)))
+       if (appId.Equals(String(PROVIDER_ID_CONTACT)))
        {
                if (appControlResult == APP_CTRL_RESULT_SUCCEEDED)
                {
-                       const String* pContactId = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_RETURNTYPE)));
-                       if (pContactId->Equals(APPCONTROL_VALUE_CONTACTID, true))
-                       {
-                               const String* pResultString = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_VALUE)));
-
-                               AppLogDebug("%ls", pResultString->GetPointer());
-                               int contactId;
-                               Integer::Parse(*pResultString, contactId);
-
-                               AddressbookManager* pAddressbookManager = AddressbookManager::GetInstance();
-                               Addressbook* pAddressbook = pAddressbookManager->GetAddressbookN(DEFAULT_ADDRESSBOOK_ID);
-
-                               ContentInformation* pCcontentInfo = __pPresentationModel->GetContentInfoN(GetActivatedContextItem());
-                               if (pCcontentInfo == null)
-                               {
-                                       delete pAddressbook;
-                                       pAddressbook = null;
-                                       return;
-                               }
-
-                               Contact* pContact = pAddressbook->GetContactN(contactId);
-                               pContact->SetValue(CONTACT_PROPERTY_ID_RINGTONE, pCcontentInfo->ContentFilePath);
-                               result r = pAddressbook->UpdateContact(*pContact);
-
-                               if (r == E_SUCCESS)
-                               {
-                                       MessageBox messageBox;
-                                       messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_POP_SUCCESS"),
-                                                       MSGBOX_STYLE_OK,
-                                                       COUNT_MESSAGE_BOX_TIMEOUT);
-                                       int modalResult = 0;
-                                       messageBox.ShowAndWait(modalResult);
-                               }
-
-                               delete pCcontentInfo;
-                               pCcontentInfo = null;
-
-                               delete pContact;
-                               pContact = null;
+                       const String* pResultString = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_SOCIAL_ITEM_ID)));
+
+                       AppLogDebug("%ls", pResultString->GetPointer());
+                       int contactId;
+                       Integer::Parse(*pResultString, contactId);
 
+                       AddressbookManager* pAddressbookManager = AddressbookManager::GetInstance();
+                       Addressbook* pAddressbook = pAddressbookManager->GetAddressbookN(DEFAULT_ADDRESSBOOK_ID);
+
+                       ContentInformation* pCcontentInfo = __pPresentationModel->GetContentInfoN(GetActivatedContextItem());
+                       if (pCcontentInfo == null)
+                       {
                                delete pAddressbook;
                                pAddressbook = null;
+                               return;
+                       }
+
+                       Contact* pContact = pAddressbook->GetContactN(contactId);
+                       pContact->SetValue(CONTACT_PROPERTY_ID_RINGTONE, pCcontentInfo->ContentFilePath);
+                       result r = pAddressbook->UpdateContact(*pContact);
+
+                       if (r == E_SUCCESS)
+                       {
+                               MessageBox messageBox;
+                               messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_POP_SUCCESS"),
+                                               MSGBOX_STYLE_OK,
+                                               COUNT_MESSAGE_BOX_TIMEOUT);
+                               int modalResult = 0;
+                               messageBox.ShowAndWait(modalResult);
                        }
+
+                       delete pCcontentInfo;
+                       pCcontentInfo = null;
+
+                       delete pContact;
+                       pContact = null;
+
+                       delete pAddressbook;
+                       pAddressbook = null;
                }
        }
        AppLogDebug("EXIT");
index 6974e97..53613ad 100644 (file)
@@ -41,7 +41,7 @@ const wchar_t* TIZEN_APPCONTORL_PROVIDER_AUDIO = L"http://tizen.org/appcontrol/p
 const wchar_t* TIZEN_APPCONTROL_OPERATION_PLAY = L"http://tizen.org/appcontrol/operation/play";
 const wchar_t* TIZEN_APPCONTROL_OPERATION_VIEW = L"http://tizen.org/appcontrol/operation/view";
 const wchar_t* TIZEN_APPCONTROL_OPERATION_CONFIGURE = L"http://tizen.org/appcontrol/operation/configure";
-const static Tizen::Base::String APPCONTROL_KEYFIELD_PATH = L"path";
+//const static Tizen::Base::String APPCONTROL_KEYFIELD_PATH = L"path";
 static const wchar_t* PARAM_LANGUAGE = L"http://tizen.org/setting/locale.language";
 static const wchar_t* PARAM_COUNTRY = L"http://tizen.org/setting/locale.country";
 
@@ -305,14 +305,22 @@ MusicPlayerApp::ParsingArgument(const Tizen::Base::String* pUriData, const Tizen
 
                sourceStr.Append(*pUriData);
                sourceStr.Replace(original, replace);
-               pContentPath = &sourceStr;
+       //      pContentPath = &sourceStr;
 
-//             AppLogDebug("%ls", pContentPath->GetPointer());
+               ArrayList* pContentPathArrayList = new (std::nothrow) ArrayList();
+               pContentPathArrayList->Construct();
+
+               AppLogDebug("sourceStr : %ls", sourceStr.GetPointer());
+               pContentPathArrayList->Add((new (std::nothrow) String(sourceStr)));
+               __pDataList->Add(pContentPathArrayList);
+               __pDataList->Add(*(new Integer(0)));
        }
-       else if (pArgs != null && pArgs->GetCount() > 0)
+
+/*For multiple file path*/
+
+/*     else if (pArgs != null && pArgs->GetCount() > 0)
        {
                pContentPath = static_cast<const String*>(pArgs->GetValue(APPCONTROL_KEYFIELD_PATH));
-//             AppLogDebug("%ls", pContentPath->GetPointer());
        }
        else
        {
@@ -331,13 +339,11 @@ MusicPlayerApp::ParsingArgument(const Tizen::Base::String* pUriData, const Tizen
 
                if (__pDataList == null)
                {
-                       AppLogDebug("1");
                        __pDataList = new (std::nothrow) ArrayList();
                        __pDataList->Construct();
                }
                else
                {
-                       AppLogDebug("2");
                        __pDataList->RemoveAll(true);
                }
 
@@ -355,7 +361,7 @@ MusicPlayerApp::ParsingArgument(const Tizen::Base::String* pUriData, const Tizen
                __pDataList->Add(pContentPathArrayList);
                __pDataList->Add(*(new Integer(0)));
        }
-
+*/
        AppLogDebug("EXIT");
 }
 
index 89986d2..2fdde03 100644 (file)
@@ -380,53 +380,49 @@ PlaylistContentListForm::OnAppControlCompleteResponseReceived(const AppId& appId
                return;
        }
        AppLogDebug("%ls, %ls", appId.GetPointer(), operationId.GetPointer());
-       if (appId.Equals(String(TIZEN_APPCONTROL_PROVIDER_CONTACT)))
+       if (appId.Equals(String(PROVIDER_ID_CONTACT)))
        {
                if (appControlResult == APP_CTRL_RESULT_SUCCEEDED)
                {
-                       const String* pContactId = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_RETURNTYPE)));
-                       if (pContactId->Equals(APPCONTROL_VALUE_CONTACTID, true))
-                       {
-                               const String* pResultString = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_VALUE)));
+                       const String* pResultString = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_SOCIAL_ITEM_ID)));
 
-                               AppLogDebug("%ls", pResultString->GetPointer());
-                               int contactId;
-                               Integer::Parse(*pResultString, contactId);
+                       AppLogDebug("%ls", pResultString->GetPointer());
+                       int contactId;
+                       Integer::Parse(*pResultString, contactId);
 
-                               AddressbookManager* pAddressbookManager = AddressbookManager::GetInstance();
-                               Addressbook* pAddressbook = pAddressbookManager->GetAddressbookN(DEFAULT_ADDRESSBOOK_ID);
+                       AddressbookManager* pAddressbookManager = AddressbookManager::GetInstance();
+                       Addressbook* pAddressbook = pAddressbookManager->GetAddressbookN(DEFAULT_ADDRESSBOOK_ID);
 
-                               ContentInformation* pCcontentInfo = __pPresentationModel->GetContentInfoN(GetActivatedContextItem());
-                               if (pCcontentInfo == null)
-                               {
-                                       delete pAddressbook;
-                                       pAddressbook = null;
-                                       return;
-                               }
+                       ContentInformation* pCcontentInfo = __pPresentationModel->GetContentInfoN(GetActivatedContextItem());
+                       if (pCcontentInfo == null)
+                       {
+                               delete pAddressbook;
+                               pAddressbook = null;
+                               return;
+                       }
 
-                               Contact* pContact = pAddressbook->GetContactN(contactId);
-                               pContact->SetValue(CONTACT_PROPERTY_ID_RINGTONE, pCcontentInfo->ContentFilePath);
-                               result r = pAddressbook->UpdateContact(*pContact);
+                       Contact* pContact = pAddressbook->GetContactN(contactId);
+                       pContact->SetValue(CONTACT_PROPERTY_ID_RINGTONE, pCcontentInfo->ContentFilePath);
+                       result r = pAddressbook->UpdateContact(*pContact);
 
-                               if (r == E_SUCCESS)
-                               {
-                                       MessageBox messageBox;
-                                       messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_POP_SUCCESS"),
-                                                       MSGBOX_STYLE_OK,
-                                                       COUNT_MESSAGE_BOX_TIMEOUT);
-                                       int modalResult = 0;
-                                       messageBox.ShowAndWait(modalResult);
-                               }
+                       if (r == E_SUCCESS)
+                       {
+                               MessageBox messageBox;
+                               messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_POP_SUCCESS"),
+                                               MSGBOX_STYLE_OK,
+                                               COUNT_MESSAGE_BOX_TIMEOUT);
+                               int modalResult = 0;
+                               messageBox.ShowAndWait(modalResult);
+                       }
 
-                               delete pCcontentInfo;
-                               pCcontentInfo = null;
+                       delete pCcontentInfo;
+                       pCcontentInfo = null;
 
-                               delete pContact;
-                               pContact = null;
+                       delete pContact;
+                       pContact = null;
 
-                               delete pAddressbook;
-                               pAddressbook = null;
-                       }
+                       delete pAddressbook;
+                       pAddressbook = null;
                }
        }
        AppLogDebug("EXIT");
@@ -486,4 +482,4 @@ PlaylistContentListForm::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableVie
        __pThumbnail = null;
        pThumbnailLabel->Invalidate(true);
        AppLogDebug("EXIT");
-}
\ No newline at end of file
+}
index e731d8e..f0c714b 100644 (file)
@@ -320,7 +320,7 @@ SetAsPopup::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableVie
        }
        else
        {
-               AppControl* pAppControl = AppManager::FindAppControlN(TIZEN_APPCONTROL_PROVIDER_CONTACT, TIZEN_APPCONTROL_OPERATION_PICK);
+               AppControl* pAppControl = AppManager::FindAppControlN(PROVIDER_ID_CONTACT, OPERATION_ID_SOCIAL_PICK);
                if (pAppControl == null)
                {
                        return;
@@ -328,8 +328,8 @@ SetAsPopup::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableVie
 
                HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
                pDataList->Construct();
-               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_SINGLE_MODE), new (std::nothrow) String(APPCONTROL_VALUE_SINGLE));
-               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_RETURNTYPE), new (std::nothrow) String(APPCONTROL_VALUE_CONTACTID));
+               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_SELECTION_MODE), new (std::nothrow) String(APPCONTROL_OPTION_SINGLE));
+               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_SOCIAL_RESULT_TYPE), new (std::nothrow) String(APPCONTROL_OPTION_ITEM_ID));
 
 //             Tizen::Base::Collection::ArrayList* pData = new (std::nothrow) Tizen::Base::Collection::ArrayList();
 //             pData->Construct();
@@ -410,45 +410,38 @@ SetAsPopup::OnAppControlCompleteResponseReceived(const AppId& appId,
        }
 
        AppLogDebug("%ls, %ls", appId.GetPointer(), operationId.GetPointer());
-       if (appId.Equals(String(TIZEN_APPCONTROL_PROVIDER_CONTACT))/* && operationId.Equals(String(OPERATION_ID_PICK))*/)
+       if (appId.Equals(String(PROVIDER_ID_CONTACT))/* && operationId.Equals(String(OPERATION_ID_PICK))*/)
        {
                if (appControlResult == APP_CTRL_RESULT_SUCCEEDED)
                {
-//                     pReturnValue->Add(new (std::nothrow) String(RETURN_KEY_TYPE), new (std::nothrow) String(RETURN_TYPE_CONTACT_ID));
-//                     pReturnValue->Add(new (std::nothrow) String(RETURN_KEY_VALUE), new (std::nothrow) String(pContactId));
+                       const String* pResultString = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_SOCIAL_ITEM_ID)));
 
-                       const String* pContactId = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_RETURNTYPE)));
-                       if (pContactId->Equals(APPCONTROL_VALUE_CONTACTID, true))
+                       AppLogDebug("%ls", pResultString->GetPointer());
+                       int contactId;
+                       Integer::Parse(*pResultString, contactId);
+
+                       AddressbookManager* pAddressbookManager = AddressbookManager::GetInstance();
+                       Addressbook* pAddressbook = pAddressbookManager->GetAddressbookN(DEFAULT_ADDRESSBOOK_ID);
+
+                       Contact* pContact = pAddressbook->GetContactN(contactId);
+                       pContact->SetValue(CONTACT_PROPERTY_ID_RINGTONE, *__pCurrentContentPath);
+                       result r = pAddressbook->UpdateContact(*pContact);
+
+                       if (r == E_SUCCESS)
                        {
-                               const String* pResultString = static_cast<const String*>(pExtraData->GetValue(String(APPCONTROL_KEY_VALUE)));
-
-                               AppLogDebug("%ls", pResultString->GetPointer());
-                               int contactId;
-                               Integer::Parse(*pResultString, contactId);
-
-                               AddressbookManager* pAddressbookManager = AddressbookManager::GetInstance();
-                               Addressbook* pAddressbook = pAddressbookManager->GetAddressbookN(DEFAULT_ADDRESSBOOK_ID);
-
-                               Contact* pContact = pAddressbook->GetContactN(contactId);
-                               pContact->SetValue(CONTACT_PROPERTY_ID_RINGTONE, *__pCurrentContentPath);
-                               result r = pAddressbook->UpdateContact(*pContact);
-
-                               if (r == E_SUCCESS)
-                               {
-                                       MessageBox messageBox;
-                                       messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_POP_SUCCESS"),
-                                                       MSGBOX_STYLE_OK,
-                                                       3000);
-                                       int modalResult = 0;
-                                       messageBox.ShowAndWait(modalResult);
-                               }
-
-                               delete pContact;
-                               pContact = null;
-
-                               delete pAddressbook;
-                               pAddressbook = null;
+                               MessageBox messageBox;
+                               messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_POP_SUCCESS"),
+                                               MSGBOX_STYLE_OK,
+                                               3000);
+                               int modalResult = 0;
+                               messageBox.ShowAndWait(modalResult);
                        }
+
+                       delete pContact;
+                       pContact = null;
+
+                       delete pAddressbook;
+                       pAddressbook = null;
                }
        }
        AppLogDebug("EXIT");
index f2f593d..9f47465 100644 (file)
@@ -326,7 +326,7 @@ SharePopup::SetArguments(Tizen::Base::Collection::IList* pIList)
        AppLogDebug("ENTER");
        if (pIList != null)
        {
-               String combineText;
+       /*      String combineText;
                String path;
 
                int loopCount = pIList->GetCount();
@@ -340,11 +340,11 @@ SharePopup::SetArguments(Tizen::Base::Collection::IList* pIList)
                        }
                        combineText.Append(path);
                }
+               AppLogDebug("%ls", combineText.GetPointer());   */
 
-               AppLogDebug("%ls", combineText.GetPointer());
                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), static_cast<ArrayList*>(pIList));
 
                __pDataList = pDataList;
                AppLogDebug("EXIT");