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";
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_
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");
pAlbumCount->Invalidate(true);
AppLogDebug("EXIT");
-}
\ No newline at end of file
+}
}
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");
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);
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;
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);
AppLogDebug("ENTER");
Header* pHeader = GetHeader();
CommonUtil::SetTabHeaderStyle(*pHeader);
+ pHeader->SetTabEditModeEnabled(false);
pHeader->AddActionEventListener(*this);
AddOrientationEventListener(*this);
AppLogDebug("EXIT");
pContentPanel->OnOrientationPanelChanged(orientationStatus);
}
AppLogDebug("EXIT");
-}
\ No newline at end of file
+}
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);
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");
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;
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");
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";
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
{
if (__pDataList == null)
{
- AppLogDebug("1");
__pDataList = new (std::nothrow) ArrayList();
__pDataList->Construct();
}
else
{
- AppLogDebug("2");
__pDataList->RemoveAll(true);
}
__pDataList->Add(pContentPathArrayList);
__pDataList->Add(*(new Integer(0)));
}
-
+*/
AppLogDebug("EXIT");
}
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");
__pThumbnail = null;
pThumbnailLabel->Invalidate(true);
AppLogDebug("EXIT");
-}
\ No newline at end of file
+}
}
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;
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();
}
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");
AppLogDebug("ENTER");
if (pIList != null)
{
- String combineText;
+ /* String combineText;
String path;
int loopCount = pIList->GetCount();
}
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");