X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2FCallBaseForm.cpp;h=8122a0353f51e1551ab9a0d15facf9ffbaeeb903;hb=309ccc13eb3fd773e597473136e3f15aa792de7e;hp=0f1ab33ddf49111da737276d69e0df362b56bf80;hpb=0fc070c3be46085c5d15c0b9b10a2f9e6b100ab7;p=apps%2Fosp%2FCall.git diff --git a/src/CallBaseForm.cpp b/src/CallBaseForm.cpp index 0f1ab33..8122a03 100644 --- a/src/CallBaseForm.cpp +++ b/src/CallBaseForm.cpp @@ -19,6 +19,7 @@ * @brief Base class for all Call forms */ #include "CallActiveCallForm.h" +#include "CallIncomingCallForm.h" #include "CallBaseForm.h" #include "CallInfo.h" #include "CallPresentationModel.h" @@ -65,6 +66,29 @@ BaseForm::OnActionPerformed(const Control& source, int actionId) void BaseForm::HandleCallConnected(IListT& pCallList) { + if(__pCallPresentor->IsIncomingorDialingCallPresent() == true) + { + //This scenario will come, if 1 call is disconnected from conf. call having 2 participants. + //In this case, if there is any dialing call exists, then ignore. + //Else, if there is any incoming call exists, then update call option popup. + switch (__formType) + { + case FORMTYPE_INCOMINGCALL: + { + IncomingCallForm* pIncomingCallForm = dynamic_cast(this); + if (pIncomingCallForm != null) + { + pIncomingCallForm->CallDisconnected(); + } + } + break; + + default: + break; + } + return; + } + SceneManager* pSceneManager = SceneManager::GetInstance(); switch (__formType) @@ -160,12 +184,35 @@ BaseForm::HandleCallConnected(IListT& pCallList) } void -BaseForm::HandleCallDisconnected(bool isLastCall, IListT& pCallList) +BaseForm::HandleCallDisconnected(bool isLastCall, IListT& pCurrentActiveCallList) { + if(__pCallPresentor->IsIncomingorDialingCallPresent() == true) + { + //This scenario will come, if this disconnected call is neither incoming nor dialing call. + //In this case, if there is any dialing call exists, then ignore. + //Else, if there is any incoming call exists, then update call option popup. + switch (__formType) + { + case FORMTYPE_INCOMINGCALL: + { + IncomingCallForm* pIncomingCallForm = dynamic_cast(this); + if (pIncomingCallForm != null) + { + pIncomingCallForm->CallDisconnected(); + } + } + break; + + default: + break; + } + return; + } + SceneManager* pSceneManager = SceneManager::GetInstance(); CallApp* pPhoneApp = static_cast(UiApp::GetInstance()); - int callCount = pCallList.GetCount(); + int callCount = pCurrentActiveCallList.GetCount(); if (callCount > 0) { //Ownership - To be deleted in 'OnSceneActivatedN' of next form @@ -175,7 +222,7 @@ BaseForm::HandleCallDisconnected(bool isLastCall, IListT& pCallList { //fetch call info and add to list AppCallInfo callInfo; - result r = pCallList.GetAt(index, callInfo); + result r = pCurrentActiveCallList.GetAt(index, callInfo); if (r == E_SUCCESS) { //copy call information to new instance @@ -188,7 +235,7 @@ BaseForm::HandleCallDisconnected(bool isLastCall, IListT& pCallList { //fetch call info and add to list AppCallInfo callInfo; - result r = pCallList.GetAt(0, callInfo); + result r = pCurrentActiveCallList.GetAt(0, callInfo); if (r == E_SUCCESS) { //copy call information to new instance @@ -211,7 +258,7 @@ BaseForm::HandleCallDisconnected(bool isLastCall, IListT& pCallList } else { - if (pCallList.GetCount() == 1) + if (pCurrentActiveCallList.GetCount() == 1) { if (callInfo.IsConferenceCall() == true) { @@ -291,6 +338,29 @@ BaseForm::HandleCallSwapOccured(IListT& pCallList) void BaseForm::HandleConferenceChange(void) { + if(__pCallPresentor->IsIncomingorDialingCallPresent() == true) + { + //This scenario will come, if 1 call is disconnected from conf. call having more than 2 participants. + //In this case, if there is any dialing call exists, then ignore. + //Else, if there is any incoming call exists, then update call option popup. + switch (__formType) + { + case FORMTYPE_INCOMINGCALL: + { + IncomingCallForm* pIncomingCallForm = dynamic_cast(this); + if (pIncomingCallForm != null) + { + pIncomingCallForm->CallDisconnected(); + } + } + break; + + default: + break; + } + return; + } + switch (__formType) { case FORMTYPE_CONFCALLLIST: