private:
Tizen::App::IAppControlResponseListener* __pAppControlEventListener;
- Tizen::Base::Collection::HashMap* __dataList;
static CustomAppControl* __pInstance;
static Tizen::App::AppControl* __pAppControlInUse;
};
CustomAppControl::~CustomAppControl(void)
{
- if (__dataList != null)
- {
- __dataList->RemoveAll();
- delete __dataList;
- }
+//empty implementation
}
CustomAppControl*
result
CustomAppControl::Construct(void)
{
- result r = E_FAILURE;
-
- __dataList = new (std::nothrow) HashMap();
- if (__dataList != null)
- r = __dataList->Construct();
-
+ result r = E_SUCCESS;
return r;
}
void
Frame* pCurrentFrame = null;
String mediaType;
-
- String* pTypeKey = new (std::nothrow)String (L"type");
- String* pTypeVal = new (std::nothrow)String(L"");
- String* pPathKey = new (std::nothrow)String(L"path");
- String* pPathVal = new (std::nothrow)String(L"");
+ String mimeType;
+ const String* uriType = new (std::nothrow) const String(mediaFullPath);
+ const String *pMimeInfo = null;
mediaType = FindMediaType(mediaFullPath);
{
AppLogDebug("Image App Control");
((MyFilesApp*) Application::GetInstance())->SetImageAppControlLanched(true);
-
pAc = AppManager::FindAppControlN(L"tizen.imageviewer", L"http://tizen.org/appcontrol/operation/view");
- pTypeVal->Append(L"image");
- pPathVal->Append(mediaFullPath);
+ mimeType.Append(L"image/*");
}
else if (mediaType == "audio")
{
pAc = AppManager::FindAppControlN(L"tizen.musicplayer", L"http://tizen.org/appcontrol/operation/view");
- pTypeVal->Append(L"audio");
- pPathVal->Append(mediaFullPath);
+ mimeType.Append(L"audio/*");
}
else if (mediaType == "video")
{
-
pAc = AppManager::FindAppControlN(L"tizen.videoplayer", L"http://tizen.org/appcontrol/operation/view");
- pTypeVal->Append(L"video");
- pPathVal->Append(mediaFullPath);
-
- AppLogDebug("Video File found :%S", pPathVal->GetPointer());
+ mimeType.Append(L"video/*");
}
else if (mediaType == "web")
{
pAc = AppManager::FindAppControlN(L"tizen.internet", L"http://tizen.org/appcontrol/operation/view");
- pTypeKey->Clear();
- pTypeKey->Append(L"url");
- pTypeVal->Append(mediaFullPath);
}
else if (mediaType == "contact")
{
pAc = AppManager::FindAppControlN(L"tizen.contacts", L"http://tizen.org/appcontrol/operation/view");
- pTypeKey->Clear();
- pTypeKey->Append(L"viewType");
- pTypeVal->Clear();
- pTypeVal->Append(L"vcf");
- pPathVal->Append(mediaFullPath);
+ mimeType.Append(L"text/x-vcard");
}
else if (mediaType == "calendar")
{
pAc = AppManager::FindAppControlN(L"tizen.calendar", L"http://tizen.org/appcontrol/operation/view");
- pTypeKey->Clear();
- pTypeKey->Append(L"viewType");
- pTypeVal->Clear();
- pTypeVal->Append(L"vcs");
- pPathVal->Append(mediaFullPath);
+ mimeType.Append(L"text/x-vcalendar");
}
else if (mediaType == "email")
{
pAc->GetAppId() != videoPlayerAppId )
{
AppLogDebug("Returning");
- delete pTypeKey;
- delete pTypeVal;
- delete pPathKey;
- delete pPathVal;
+
+ if (uriType != null)
+ {
+ delete uriType;
+ }
if (pAc != null)
{
return null;
}
- if (pTypeVal->CompareTo("") != 0)
- {
- __dataList->Add(pTypeKey, pTypeVal);
- }
- else
- {
- delete pTypeVal;
- }
-
- if (pPathVal->CompareTo("") != 0)
+ pMimeInfo = new (std::nothrow) const String(mimeType);
+ if(pAc->GetAppId() == musicPlayerAppId || pAc->GetAppId() == browserAppId || pAc->GetAppId() == phoneAppId || pAc->GetAppId() == videoPlayerAppId )
{
- AppLogDebug("CustomAppControl::LaunchAppControl:%S", pPathVal->GetPointer());
-
- r = __dataList->Add(pPathKey, pPathVal);
- AppLogDebug("CustomAppControl::LaunchAppControl:%s", GetErrorMessage(r));
+ //In case of Music Player, Browser, Phone appcontrols , No need to register Listener
+ r = pAc->Start(uriType,pMimeInfo,null,null);
+ AppLogDebug("start result is %s",GetErrorMessage(r));
}
else
{
- delete pPathVal;
+ AppLogDebug("pac not null");
+ AppLogDebug("uri is %S",uriType->GetPointer());
+ AppLogDebug("mimeType is %S",mimeType.GetPointer());
+ r = pAc->Start(uriType,pMimeInfo,null,__pAppControlEventListener);
+ AppLogDebug("start result is %s",GetErrorMessage(r));
}
-
- if(pAc->GetAppId() == musicPlayerAppId || pAc->GetAppId() == browserAppId || pAc->GetAppId() == phoneAppId || pAc->GetAppId() == videoPlayerAppId )
- //In case of Music Player, Browser, Phone appcontrols , No need to register Listener
- r = pAc->Start(null, null, __dataList, null);
- else
- r = pAc->Start(null, null, __dataList,__pAppControlEventListener);
-
AppLogDebug("EXIT::CustomAppControl::LaunchAppControl::%s", GetErrorMessage(r));
- __dataList->Remove(*pTypeKey);
- __dataList->Remove(*pPathKey);
-
pCurrentFrame = Application::GetInstance()->GetAppFrame()->GetFrame();
- if (pCurrentFrame != null)
+ if (pCurrentFrame != null && r==E_SUCCESS)
{
pCurrentFrame->SetEnabled(false);
}
AppLogDebug("EXIT:: CustomAppControl::LaunchAppControl::%s", GetErrorMessage(GetLastResult()));
+ if (pMimeInfo != null)
+ {
+ delete pMimeInfo;
+ }
+
+ if (uriType != null)
+ {
+ delete uriType;
+ }
return pAc;
CATCH:
-
- delete pTypeKey;
- delete pTypeVal;
- delete pPathKey;
- delete pPathVal;
+delete pMimeInfo;
+delete uriType;
return null;
}
DirectoryEntry* ptempDirEntry = null;
IMapEnumerator* pMapEnum = null;
AppControl* pAc = null;
- String* pTypeKey = null;
- String* pTypeValue = null;
- String* pAttachKey = null;
- String attachValue;
+ const String* pAttachKey = null;
+ const String* pUriType = null;
const HashMap* pResultHash = null;
+ result r = E_SUCCESS;
HashMap dataList;
+ ArrayList* filePathList = null;
MessageBox messageBox;
int modalResult = 0;
- int selectedFileCount = 0;
dataList.Construct();
- pAttachKey = new (std::nothrow) String(L"attachments");
+ pAttachKey = new (std::nothrow) const String(L"http://tizen.org/appcontrol/data/path");
switch (shareType)
{
case SHARE_VIA_MESSAGE:
{
+ pUriType = new (std::nothrow) const String(L"mmsto");
pAc = AppManager::FindAppControlN(L"tizen.messages", "http://tizen.org/appcontrol/operation/compose");
- pTypeKey = new (std::nothrow) String(L"type");
- pTypeValue = new (std::nothrow) String(L"MMS");
- dataList.Add(pTypeKey, pTypeValue);
}
break;
pMapEnum = _pFileManager->GetCheckedList()->GetMapEnumeratorN();
if (pMapEnum != null)
{
+ if (filePathList == null)
+ {
+ filePathList = new (std::nothrow) ArrayList();
+ }
while (pMapEnum->MoveNext() == E_SUCCESS)
{
ptempDirEntry = static_cast< DirectoryEntry* >(pMapEnum->GetValue());
if (ptempDirEntry != null)
{
- attachValue.Append(ptempDirEntry->GetFullFilePath());
- selectedFileCount++;
- if (pResultHash != null)
- {
- if (selectedFileCount < pResultHash->GetCount())
- {
- attachValue.Append(";");
- }
- }
+ filePathList->Add(new (std::nothrow) String (ptempDirEntry->GetFullFilePath()));
}
}
}
}
- dataList.Add(pAttachKey, new (std::nothrow) String(attachValue));
- AppLogDebug(" AttachValue is %S",attachValue.GetPointer());
+ dataList.Add(*pAttachKey,*filePathList);
+ if (shareType == SHARE_VIA_MESSAGE)
+ {
+ dataList.Add(new (std::nothrow) String (L"http://tizen.org/appcontrol/data/message/type"),new (std::nothrow) String (L"mms"));
+ }
if (pAc != null)
{
- if (pAc->Start(null, null, &dataList, null) == E_MAX_EXCEEDED)
+ AppLogDebug("filePathList count is %d",filePathList->GetCount());
+
+ if (shareType == SHARE_VIA_EMAIL)
+ {
+ r = pAc->Start(null, null, &dataList, null);
+ }
+ else if (shareType == SHARE_VIA_MESSAGE)
+ {
+ r = pAc->Start(pUriType, null, &dataList, null);
+ }
+
+ if (r == E_MAX_EXCEEDED)
{
messageBox.Construct(L"", L"Email Size Exceeded", MSGBOX_STYLE_OK);
messageBox.ShowAndWait(modalResult);
if (dataList.GetCount() > 0)
{
+ if (filePathList != null)
+ {
+ filePathList->RemoveAll(true);
+ }
dataList.RemoveAll(true);
}
+ if (pUriType != null)
+ {
+ delete pUriType;
+ }
}
void
if (_pFileProgressingPopup != null)
{
- _pFileProgressingPopup->RemoveAllControls();
+ //_pFileProgressingPopup->RemoveAllControls();
delete _pFileProgressingPopup;
_pFileProgressingPopup = null;
}
SceneManager* pSceneManager = null;\r
pSceneManager = SceneManager::GetInstance();\r
currentPath = FolderNavigationPresentationModel::GetCurrentPath();\r
+\r
+ if (_currentViewStyle != APPCONTROL_VIEW_EXPORT)\r
+ {\r
+ ResetFooter();\r
+ }\r
+\r
if (currentPath == BasePresentationModel::GetMediaPath() || currentPath == BasePresentationModel::GetSdCardPath())\r
{\r
FolderNavigationPresentationModel::SetCurrentFilePath(currentPath);\r
\r
SceneManager::GetInstance()->AddSceneManagerEventListener(*this);\r
\r
+ _itemSelectedCount.Clear();\r
+\r
+ if (_pFileManager != null)\r
+ {\r
+ if (!_pFileManager->IsCheckedListNull())\r
+ {\r
+ _pFileManager->ClearCheckedList();\r
+ }\r
+ }\r
if (_selectionMode == SELECTION_MODE_SINGE) // start of MULTIPLE_MODE_SELECTION if\r
{\r
pLayout = dynamic_cast <RelativeLayout*> (Form::GetLayoutN());\r
if (pAppResource != null)\r
{\r
pAppResource->GetString(L"IDS_MF_TAB_MEMORY_CARD", memoryCard);\r
+#if 0\r
pAppResource->GetString(L"IDS_MF_TAB_EXTERNAL_STORAGE", externalStorage);\r
+#endif\r
}\r
\r
ListAnnexStyle style = LIST_ANNEX_STYLE_NORMAL;\r
titleText.Clear();\r
titleText.Append(*tempStr);\r
\r
- pItem->AddElement(Rectangle(116, 34, 604, 44), IDA_FORMAT_STRING, titleText, true);\r
+ pItem->AddElement(Rectangle(W_LISTVIEW_ITEM_BITMAP + 2 * X_LISTVIEW, (H_ITEM_LISTVIEW - H_LISTVIEW_ITEM_TITLE) /2, itemWidth - (W_LISTVIEW_ITEM_BITMAP + 3 * X_LISTVIEW), H_LISTVIEW_ITEM_TITLE),\r
+ IDA_FORMAT_STRING,\r
+ titleText,\r
+ true);\r
\r
return pItem;\r
}\r
if (pAppResource != null)\r
{\r
pAppResource->GetString(L"IDS_MF_TAB_MEMORY_CARD", sdCardStorage);\r
+#if 0\r
pAppResource->GetString(L"IDS_MF_TAB_EXTERNAL_STORAGE", externalStorage);\r
+#endif\r
\r
}\r
\r
__pFolderList->RemoveAt(__listItemCount - 1, true);\r
}\r
\r
+#if 0\r
if (deviceSateUSBStorage == inserted)\r
{\r
pExternalStorage = new (std::nothrow) String(externalStorage);\r
{\r
__pFolderList->RemoveAt(__listItemCount - 1);\r
}\r
+#endif\r
+\r
__listItemCount = __pFolderList->GetCount();\r
\r
//__pListView->UpdateList();\r
if (pAppResource != null)\r
{\r
pAppResource->GetString(L"IDS_MF_TAB_MEMORY_CARD", sdCardStorage);\r
+#if 0\r
pAppResource->GetString(L"IDS_MF_TAB_EXTERNAL_STORAGE", externalStorage);\r
+#endif\r
\r
}\r
\r