Fixed Send Message Default Handler routines according to Dejana's request.
Removed some unnecessary funtions.
--- a/telephonyserver/etelmultimode/DTsy/mmtsy.h Thu Oct 07 19:32:01 2010 +0300
+++ b/telephonyserver/etelmultimode/DTsy/mmtsy.h Fri Oct 15 11:27:58 2010 +0300
@@ -1042,8 +1042,7 @@
TInt ReceiveMessageCancel(const TTsyReqHandle aTsyReqHandle);
TInt SendMessage(const TTsyReqHandle aTsyReqHandle, TDesC8* aMsgData, TDesC8* aMsgAttributes);
TInt SendMessageDefaultHandler(const TTsyReqHandle aTsyReqHandle, TDesC8* aMsgData, TDesC8* aMsgAttributes);
- TInt SendMessageCancel(const TTsyReqHandle aTsyReqHandle);
- TInt SendMessageCancelDefaultHandler(const TTsyReqHandle aTsyReqHandle);
+ TInt SendMessageCancel(const TTsyReqHandle aTsyReqHandle);
TInt SendMessageNoFdnCheck(const TTsyReqHandle aTsyReqHandle, TDesC8* aMsgData, TDesC8* aMsgAttributes);
TInt SendMessageNoFdnCheckCancel(const TTsyReqHandle aTsyReqHandle);
TInt SendRelease(const TTsyReqHandle aTsyReqHandle, TDes8* aReturnResult);
--- a/telephonyserver/etelmultimode/DTsy/mmtsymessaging.cpp Thu Oct 07 19:32:01 2010 +0300
+++ b/telephonyserver/etelmultimode/DTsy/mmtsymessaging.cpp Fri Oct 15 11:27:58 2010 +0300
@@ -1712,8 +1712,7 @@
{
case EMobileUssdMessagingReceiveMessage:
return ReceiveMessageCancel(aTsyReqHandle);
- case EMobileUssdMessagingSendMessageDefaultHandler:
- return SendMessageCancelDefaultHandler(aTsyReqHandle);
+ case EMobileUssdMessagingSendMessageDefaultHandler:
case EMobileUssdMessagingSendMessage:
return SendMessageCancel(aTsyReqHandle);
case EMobileUssdMessagingSendMessageNoFdnCheck:
@@ -1806,13 +1805,7 @@
ReqCompleted(aTsyReqHandle,KErrCancel);
return KErrNone;
}
-TInt CUssdMessagingDMmTsy::SendMessageCancelDefaultHandler(const TTsyReqHandle aTsyReqHandle)
- {
- LOGTEXT(_L8("CUssdMessagingDMmTsy::SendMessageCancelDefaultHandler called"));
- iPhone->RemoveDelayedReq(aTsyReqHandle);
- ReqCompleted(aTsyReqHandle,KErrCancel);
- return KErrNone;
- }
+
TInt CUssdMessagingDMmTsy::SendMessageNoFdnCheck(const TTsyReqHandle aTsyReqHandle, TDesC8* aMsgData, TDesC8* aMsgAttributes)
/**
* This method sends an outgoing SMS to the network. The number used for sending the SMS
--- a/telephonyserver/etelmultimode/group/BLD.INF Thu Oct 07 19:32:01 2010 +0300
+++ b/telephonyserver/etelmultimode/group/BLD.INF Fri Oct 15 11:27:58 2010 +0300
@@ -50,7 +50,3 @@
../DTsy/Dmmtsy.mmp support
../TETEL/te_EtelMM/TE_EtelMM.mmp manual
-// include console USSD test client
-#include "../commontsy/group/bld.inf"
-#include "../mockltsy/group/bld.inf"
-#include "../consoleussdtestclient/group/bld.inf"
--- a/telephonyserverplugins/common_tsy/commontsy/inc/mmsms/cmmussdtsy.h Thu Oct 07 19:32:01 2010 +0300
+++ b/telephonyserverplugins/common_tsy/commontsy/inc/mmsms/cmmussdtsy.h Fri Oct 15 11:27:58 2010 +0300
@@ -172,15 +172,7 @@
* @param aError Completes send message request
*/
virtual void CompleteSendMessage( TInt aError );
-
- /**
- * Complete SendMessage to Default Handler
- *
- *
- * @param aError Completes send message request
- */
- virtual void CompleteSendMessageDefaultHandler( TInt aError );
-
+
/**
* Complete SendMessageNoFdnCheck
*
@@ -330,15 +322,6 @@
* @return KErrNone
*/
TInt SendMessageCancel( const TTsyReqHandle aTsyReqHandle );
-
- /**
- * Cancels an outstanding SendMessage request
- *
- *
- * @param aTsyReqHandle Request handle
- * @return KErrNone
- */
- TInt SendMessageCancelDefaultHandler( const TTsyReqHandle aTsyReqHandle );
/**
* Cancels an outstanding SendMessageNoFdnCheck request
--- a/telephonyserverplugins/common_tsy/commontsy/src/mmsms/cmmussdtsy.cpp Thu Oct 07 19:32:01 2010 +0300
+++ b/telephonyserverplugins/common_tsy/commontsy/src/mmsms/cmmussdtsy.cpp Fri Oct 15 11:27:58 2010 +0300
@@ -59,8 +59,7 @@
ResetVariables();
// Initialize boolean flag
- iUssdNoFdnCheckFlag = EUssdNoFdnCheckUnknown;
- iSendToDefaultHandler = EFalse;
+ iUssdNoFdnCheckFlag = EUssdNoFdnCheckUnknown;
}
CMmUssdTsy* CMmUssdTsy::NewL(
@@ -259,14 +258,11 @@
ReceiveMessageCancel( aTsyReqHandle );
ret = KErrNone;
break;
+ case EMobileUssdMessagingSendMessageDefaultHandler:
case EMobileUssdMessagingSendMessage:
SendMessageCancel( aTsyReqHandle );
ret = KErrNone;
- break;
- case EMobileUssdMessagingSendMessageDefaultHandler:
- SendMessageCancelDefaultHandler( aTsyReqHandle );
- ret = KErrNone;
- break;
+ break;
case EMobileUssdMessagingSendMessageNoFdnCheck:
SendMessageNoFdnCheckCancel( aTsyReqHandle );
ret = KErrNone;
@@ -670,14 +666,14 @@
// Set timer for the request
SetTypeOfResponse( EMultimodeUssdSendMessage,
aTsyReqHandle );
- }
+ }
if ( (iUssdNoFdnCheckFlag == EUssdNoFdnCheckNotUsed) &&
(EFalse != iSendToDefaultHandler)) //send to default hadnler
{
// Set timer for the request
SetTypeOfResponse( EMultimodeUssdSendMessageDefaultHandler,
aTsyReqHandle );
- }
+ }
#else
// Check if NoFdnCheck is used or not
if ( iUssdNoFdnCheckFlag == EUssdNoFdnCheckUsed )
@@ -709,7 +705,15 @@
const TTsyReqHandle aTsyReqHandle )
{
// reset the req handle
- iTsyReqHandleStore->ResetTsyReqHandle( EMultimodeUssdSendMessage );
+ if(EFalse == iSendToDefaultHandler)
+ {
+ iTsyReqHandleStore->ResetTsyReqHandle( EMultimodeUssdSendMessage );
+ }
+ else // default handler
+ {
+ iTsyReqHandleStore->ResetTsyReqHandle( EMultimodeUssdSendMessageDefaultHandler );
+ }
+
CancelReserveSession();
@@ -722,67 +726,8 @@
return KErrNone;
}
-// ---------------------------------------------------------------------------
-// CmmUssdTsy::SendMessageCancelDefaultHandler
-// Cancels cancelling of USSD session.
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-TInt CMmUssdTsy::SendMessageCancelDefaultHandler(
- const TTsyReqHandle aTsyReqHandle )
- {
- // reset the req handle
- iTsyReqHandleStore->ResetTsyReqHandle( EMultimodeUssdSendMessageDefaultHandler );
-
- CancelReserveSession();
-
- // complete with cancel
- ReqCompleted( aTsyReqHandle, KErrCancel );
- iSsTransactionOngoing = EFalse;
-
- iUssdNoFdnCheckFlag = EUssdNoFdnCheckUnknown;
-
- return KErrNone;
- }
-// ---------------------------------------------------------------------------
-// CMmUssdTsy::CompleteSendMessageDefaultHandler
-// Complete SendMessage
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-void CMmUssdTsy::CompleteSendMessageDefaultHandler(
- TInt aError )
- {
-TFLOGSTRING("TSY: CMmUssdTsy::CompleteSendMessage.\n" );
- TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
- /*EMultimodeUssdSendMessage*/EMultimodeUssdSendMessageDefaultHandler );
-
- if ( EMultimodeUssdReqHandleUnknown != reqHandle )
- {
- // reset req handle. Returns the deleted req handle
- reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
- /*EMultimodeUssdSendMessage*/EMultimodeUssdSendMessageDefaultHandler );
- // If the session is already in progress then no session management
- // action is required. Otherwise we either promote the reserved
- // session to an open session or cancel the reservation.
- if ( !IsSessionInProgress() && IsSessionReserved() )
- {
- if ( KErrNone == aError )
- {
- SetSessionOwnerByTsyHandle( reqHandle );
- }
- else
- {
- CancelReserveSession();
- }
- }
-
- ReqCompleted( reqHandle, aError );
- iSsTransactionOngoing = EFalse;
- iUssdNoFdnCheckFlag = EUssdNoFdnCheckUnknown;
- }
- }
+
// ---------------------------------------------------------------------------
// CMmUssdTsy::CompleteSendMessage
// Complete SendMessage
@@ -793,14 +738,32 @@
TInt aError )
{
TFLOGSTRING("TSY: CMmUssdTsy::CompleteSendMessage.\n" );
- TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
- EMultimodeUssdSendMessage );
+ TTsyReqHandle reqHandle;
+
+ if(EFalse == iSendToDefaultHandler)
+ {
+ reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
+ EMultimodeUssdSendMessage );
+ }
+ else //default hanlder
+ {
+ reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
+ EMultimodeUssdSendMessageDefaultHandler );
+ }
if ( EMultimodeUssdReqHandleUnknown != reqHandle )
{
// reset req handle. Returns the deleted req handle
- reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
- EMultimodeUssdSendMessage );
+ if(EFalse == iSendToDefaultHandler)
+ {
+ reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
+ EMultimodeUssdSendMessage );
+ }
+ else// default handler
+ {
+ reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
+ EMultimodeUssdSendMessageDefaultHandler );
+ }
// If the session is already in progress then no session management
// action is required. Otherwise we either promote the reserved
// session to an open session or cancel the reservation.
@@ -957,14 +920,15 @@
TDes8* aMsgAttributes) // aMsgAttributes may be NULL
{
TFLOGSTRING("TSY: CMmUssdTsy::NotifyNetworkRelease" );
-/*
+
+//TODO if we do not remove the following if block emulator would not start in GUI mode
//Check if there is a session in progress
if ( !IsSessionInProgress() )
{
// You can't release a dialogue that isn't in progress.
return KErrDisconnected;
}
-*/
+
if (aMsgData->MaxLength() < sizeof(RMobilePhone::TMobilePhoneSendSSRequestV3Pckg))
{
@@ -1187,12 +1151,10 @@
switch( aReqHandleType )
{
// Cases handled with automatic completion
- case EMultimodeUssdSendMessage:
+ case EMultimodeUssdSendMessageDefaultHandler:
+ case EMultimodeUssdSendMessage:
CompleteSendMessage( aError );
break;
- case EMultimodeUssdSendMessageDefaultHandler:
- CompleteSendMessageDefaultHandler( aError );
- break;
case EMultimodeUssdSendMessageNoFdnCheck:
CompleteSendMessageNoFdnCheck( aError );
break;
--- a/telephonyserverplugins/common_tsy/commontsy/src/mmtsy/CMmMessageRouterProxy.cpp Thu Oct 07 19:32:01 2010 +0300
+++ b/telephonyserverplugins/common_tsy/commontsy/src/mmtsy/CMmMessageRouterProxy.cpp Fri Oct 15 11:27:58 2010 +0300
@@ -1513,14 +1513,11 @@
#endif // SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
//USSD
- case EMobileUssdMessagingSendMessage:
+ case EMobileUssdMessagingSendMessageDefaultHandler:
+ case EMobileUssdMessagingSendMessage:
static_cast<CMmUssdTsy*>( mmObject )->
CompleteSendMessage( aResult );
- break;
- case EMobileUssdMessagingSendMessageDefaultHandler:
- static_cast<CMmUssdTsy*>( mmObject )->
- CompleteSendMessageDefaultHandler( aResult );
- break;
+ break;
case EMobileUssdMessagingSendMessageNoFdnCheck:
static_cast<CMmUssdTsy*>( mmObject )->
CompleteSendMessageNoFdnCheck( aResult );