//
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
-// Licensed under the Flora License, Version 1.0 (the License);
+// Licensed under the Flora License, Version 1.1 (the License);
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
using namespace Tizen::Ui::Scenes;
using namespace Tizen::Telephony;
using namespace Tizen::Base::Utility;
+using namespace Tizen::Messaging;
CallPresentationModel* CallPresentationModel::__pInstance = null;
__pNetworkManager = null;
__psimStateManager = null;
__psimInfo = null;
+ __pSmsManager = null;
+ __isMessageSendInProgress = false;
}
CallPresentationModel::~CallPresentationModel(void)
delete __psimInfo;
__psimInfo = null;
}
+ if(__pSmsManager != null)
+ {
+ delete __pSmsManager;
+ __pSmsManager = null;
+ }
}
void
numberEndsWithHash = IfNumberEndsWithHash(contactNumber);
if(numberEndsWithHash == true)
{
- __pTelEventListener->HandleTelephonyError(ERROR_GPRS_NUMBER);
+ __pTelEventListener->HandleTelephonyError(ERROR_USSD_NUMBER);
return ;
}
{
nextScene = IDSCN_SCENE_OUT_EMERGENCYCALL;
}
- pSceneManager->GoForward( ForwardSceneTransition( nextScene), pLaunchArgs);
+ pSceneManager->GoForward( ForwardSceneTransition( nextScene,
+ SCENE_TRANSITION_ANIMATION_TYPE_NONE, SCENE_HISTORY_OPTION_NO_HISTORY,SCENE_DESTROY_OPTION_KEEP), pLaunchArgs);
}
}
SetMuteStatus(false);
if(__pSettingsPresentor != null)
{
+ //Check if there is a incoming call or dialing call present before setting the status
+ if(IsIncomingorDialingCallPresent() == false)
+ {
__pSettingsPresentor->SetCallState(CALL_STATE_CALL_OFF);
+ }
}
}
else
}
+void
+CallPresentationModel::SendMessage(String& strMsg,String& recpientNum)
+{
+ AppLogDebug("Enter");
+ result r;
+ if(__pSmsManager == null)
+ {
+ __pSmsManager = new (std::nothrow) SmsManager();
+ result r = __pSmsManager->Construct(*this);
+ if (IsFailed(r) == true)
+ {
+ delete __pSmsManager;
+ __pSmsManager = null;
+ return;
+ }
+
+ }
+ RecipientList recipient;
+ recipient.Add(RECIPIENT_TYPE_TO,recpientNum);
+ SmsMessage smsMessage;
+ r = smsMessage.SetText(strMsg);
+ if (IsFailed(r) == false)
+ {
+ r = __pSmsManager->Send(smsMessage,recipient,true);
+ if (IsFailed(r) == false)
+ {
+ __isMessageSendInProgress = true;
+ }
+
+ }
+
+}
+
+bool
+CallPresentationModel::IsMessageSendingInProgress(void)
+{
+ AppLogDebug("Enter %d",__isMessageSendInProgress);
+ return __isMessageSendInProgress;
+}
+
+void
+CallPresentationModel::OnSmsMessageSent(result r)
+{
+ AppLogDebug("Enter");
+ __isMessageSendInProgress = false;
+
+}