# HG changeset patch # User ivan.fildichev@opencode.com # Date 1286469121 -10800 # Node ID 930a53cdc2d3e0040831d043446ab45cfd126552 # Parent 6fbc08ed9c424c9614ee984985668ecf950613d6 Intermidiate version diff -r 6fbc08ed9c42 -r 930a53cdc2d3 hwpluginsimulation/mocksy/inc/cmocksyengine.h --- a/hwpluginsimulation/mocksy/inc/cmocksyengine.h Fri Jun 04 13:03:15 2010 +0100 +++ b/hwpluginsimulation/mocksy/inc/cmocksyengine.h Thu Oct 07 19:32:01 2010 +0300 @@ -33,7 +33,7 @@ EHandlingTerminated, //< all messages are handled EFailure, //< receive message doesn't correspond to the expected one }; - + virtual void Notify(TNotificationType aNotification) =0; }; diff -r 6fbc08ed9c42 -r 930a53cdc2d3 package_definition.xml --- a/package_definition.xml Fri Jun 04 13:03:15 2010 +0100 +++ b/package_definition.xml Thu Oct 07 19:32:01 2010 +0300 @@ -1,139 +1,173 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 6fbc08ed9c42 -r 930a53cdc2d3 telephonyserver/etelmultimode/CETEL/mm_messaging.cpp --- a/telephonyserver/etelmultimode/CETEL/mm_messaging.cpp Fri Jun 04 13:03:15 2010 +0100 +++ b/telephonyserver/etelmultimode/CETEL/mm_messaging.cpp Thu Oct 07 19:32:01 2010 +0300 @@ -1182,6 +1182,36 @@ Set(EMobileUssdMessagingSendMessage, aReqStatus, aMsgData, aMsgAttributes); } +EXPORT_C void RMobileUssdMessaging::SendMessage(TRequestStatus& aReqStatus, const TDesC8& aMsgData, + const TDesC8& aMsgAttributes, TInt aCommand) const +/** + This member function sends a USSD message to the network. + + See 3GPP spec. 04.90 for more details on expected responses from + the network. + + Use RTelSubSessionBase::CancelAsyncRequest(EMobileUssdMessagingSendMessageDefaultHandler) + to cancel a previously placed asynchronous SendMessage() request. + + @param aReqStatus On return, KErrNone if successful. + @param aMsgData The message data. + @param aMsgAttributes The TMobileUssdAttributesV1Pckg with the message attributes. + + @see TMobileUssdAttributesV1 + +@capability NetworkServices +@capability WriteDeviceData +@capability NetworkControl +*/ + { + if(ETransferToDefaultHandler != aCommand) + { + aReqStatus = KErrArgument; + return; + } + Set(EMobileUssdMessagingSendMessageDefaultHandler, aReqStatus, aMsgData, aMsgAttributes); + } + EXPORT_C void RMobileUssdMessaging::SendMessageNoFdnCheck(TRequestStatus& aReqStatus, const TDesC8& aMsgData, const TDesC8& aMsgAttributes) const /** Sends an outgoing USSD to the network. diff -r 6fbc08ed9c42 -r 930a53cdc2d3 telephonyserver/etelmultimode/DTsy/mmtsy.h --- a/telephonyserver/etelmultimode/DTsy/mmtsy.h Fri Jun 04 13:03:15 2010 +0100 +++ b/telephonyserver/etelmultimode/DTsy/mmtsy.h Thu Oct 07 19:32:01 2010 +0300 @@ -1040,8 +1040,10 @@ TInt GetCaps(const TTsyReqHandle aTsyReqHandle, TDes8* aCaps); TInt ReceiveMessage(const TTsyReqHandle aTsyReqHandle, TDes8* aMsgData, TDes8* aMsgAttributes); TInt ReceiveMessageCancel(const TTsyReqHandle aTsyReqHandle); - TInt SendMessage(const TTsyReqHandle aTsyReqHandle, TDesC8* aMsgData, TDesC8* aMsgAttributes); + 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 SendMessageNoFdnCheck(const TTsyReqHandle aTsyReqHandle, TDesC8* aMsgData, TDesC8* aMsgAttributes); TInt SendMessageNoFdnCheckCancel(const TTsyReqHandle aTsyReqHandle); TInt SendRelease(const TTsyReqHandle aTsyReqHandle, TDes8* aReturnResult); diff -r 6fbc08ed9c42 -r 930a53cdc2d3 telephonyserver/etelmultimode/DTsy/mmtsymessaging.cpp --- a/telephonyserver/etelmultimode/DTsy/mmtsymessaging.cpp Fri Jun 04 13:03:15 2010 +0100 +++ b/telephonyserver/etelmultimode/DTsy/mmtsymessaging.cpp Thu Oct 07 19:32:01 2010 +0300 @@ -1571,6 +1571,7 @@ case EMobileUssdMessagingSendMessage: case EMobileUssdMessagingSendMessageNoFdnCheck: case EMobileUssdMessagingSendRelease: + case EMobileUssdMessagingSendMessageDefaultHandler: ret=KReqModeFlowControlObeyed; break; @@ -1589,6 +1590,7 @@ case EMobileUssdMessagingSendMessageNoFdnCheckCancel: case EMobileUssdMessagingSendReleaseCancel: case EMobileUssdMessagingNotifyNetworkReleaseCancel: + case EMobileUssdMessagingSendMessageDefaultHandlerCancel: default: User::Leave(KErrNotSupported); break; @@ -1662,7 +1664,8 @@ case EMobileUssdMessagingSendMessage: return SendMessage(aTsyReqHandle, aPackage.Des1n(), aPackage.Des2n()); - + case EMobileUssdMessagingSendMessageDefaultHandler: + return SendMessageDefaultHandler(aTsyReqHandle, aPackage.Des1n(), aPackage.Des2n()); case EMobileUssdMessagingSendMessageNoFdnCheck: return SendMessageNoFdnCheck(aTsyReqHandle, aPackage.Des1n(), aPackage.Des2n()); @@ -1688,6 +1691,7 @@ case EMobileUssdMessagingReceiveMessageCancel: return ReceiveMessageCancel(aTsyReqHandle); case EMobileUssdMessagingSendMessageCancel: + case EMobileUssdMessagingSendMessageDefaultHandlerCancel: return SendMessageCancel(aTsyReqHandle); case EMobileUssdMessagingSendMessageNoFdnCheckCancel: return SendMessageNoFdnCheckCancel(aTsyReqHandle); @@ -1708,7 +1712,9 @@ { case EMobileUssdMessagingReceiveMessage: return ReceiveMessageCancel(aTsyReqHandle); - case EMobileUssdMessagingSendMessage: + case EMobileUssdMessagingSendMessageDefaultHandler: + return SendMessageCancelDefaultHandler(aTsyReqHandle); + case EMobileUssdMessagingSendMessage: return SendMessageCancel(aTsyReqHandle); case EMobileUssdMessagingSendMessageNoFdnCheck: return SendMessageNoFdnCheckCancel(aTsyReqHandle); @@ -1766,8 +1772,24 @@ LOGTEXT(_L8("CUssdMessagingDMmTsy::SendMessage called")); RMobileUssdMessaging::TMobileUssdAttributesV1Pckg* attsPckg = REINTERPRET_CAST(RMobileUssdMessaging::TMobileUssdAttributesV1Pckg*,aMsgAttributes); RMobileUssdMessaging::TMobileUssdAttributesV1& atts = (*attsPckg)(); - if ((aMsgData->Compare(DMMTSY_USSD_MESSAGE_PDU) != 0) || - atts.iFlags != DMMTSY_USSD_ATTRIBUTE_FLAGS || + + if (atts.iFlags != DMMTSY_USSD_ATTRIBUTE_FLAGS || + atts.iFormat != DMMTSY_USSD_ATTRIBUTE_FORMAT || + atts.iType != DMMTSY_USSD_ATTRIBUTE_TYPE || + atts.iDcs != DMMTSY_USSD_ATTRIBUTE_DCS) + ReqCompleted(aTsyReqHandle,KErrCorrupt); + else + iPhone->AddDelayedReq(aTsyReqHandle,this); + return KErrNone; + } + +TInt CUssdMessagingDMmTsy::SendMessageDefaultHandler(const TTsyReqHandle aTsyReqHandle, TDesC8* aMsgData, TDesC8* aMsgAttributes) + { + LOGTEXT(_L8("CUssdMessagingDMmTsy::SendMessage called")); + RMobileUssdMessaging::TMobileUssdAttributesV1Pckg* attsPckg = REINTERPRET_CAST(RMobileUssdMessaging::TMobileUssdAttributesV1Pckg*,aMsgAttributes); + RMobileUssdMessaging::TMobileUssdAttributesV1& atts = (*attsPckg)(); + + if (atts.iFlags != DMMTSY_USSD_ATTRIBUTE_FLAGS || atts.iFormat != DMMTSY_USSD_ATTRIBUTE_FORMAT || atts.iType != DMMTSY_USSD_ATTRIBUTE_TYPE || atts.iDcs != DMMTSY_USSD_ATTRIBUTE_DCS) @@ -1784,7 +1806,13 @@ 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 diff -r 6fbc08ed9c42 -r 930a53cdc2d3 telephonyserver/etelmultimode/INC/ETELMM.H --- a/telephonyserver/etelmultimode/INC/ETELMM.H Fri Jun 04 13:03:15 2010 +0100 +++ b/telephonyserver/etelmultimode/INC/ETELMM.H Thu Oct 07 19:32:01 2010 +0300 @@ -10402,6 +10402,14 @@ KCapsMTUssd=0x00000002 }; +/** Defines transfer modes for USSD reply + +Modes: GSM/WCDMA */ + enum TMobileUssdTransferMode + { + /**Transfer the reply to the default client*/ + ETransferToDefaultHandler + }; class TMobileUssdCapsV1 : public RMobilePhone::TMultimodeType @@ -10554,6 +10562,7 @@ IMPORT_C void SendMessage(TRequestStatus& aReqStatus, const TDesC8& aMsgData, const TDesC8& aMsgAttributes) const; IMPORT_C void SendMessageNoFdnCheck(TRequestStatus& aReqStatus, const TDesC8& aMsgData, const TDesC8& aMsgAttributes) const; + IMPORT_C void SendMessage(TRequestStatus& aReqStatus, const TDesC8& aMsgData, const TDesC8& aMsgAttributes, TInt aCommand) const; IMPORT_C void SendRelease(TRequestStatus& aReqStatus, TDes8& aReturnResult) const; IMPORT_C void NotifyNetworkRelease(TRequestStatus& aReqStatus, TDes8& aReturnResult) const; diff -r 6fbc08ed9c42 -r 930a53cdc2d3 telephonyserver/etelmultimode/INC/secure/ETELMMCS.H --- a/telephonyserver/etelmultimode/INC/secure/ETELMMCS.H Fri Jun 04 13:03:15 2010 +0100 +++ b/telephonyserver/etelmultimode/INC/secure/ETELMMCS.H Thu Oct 07 19:32:01 2010 +0300 @@ -760,14 +760,16 @@ { EMobilePhoneSendNetworkServiceRequestNoFdnCheck = EEtelMMIpcOffset8, // 28000 EMobileUssdMessagingSendMessage, // 28001 - EMobileUssdMessagingSendMessageNoFdnCheck // 28002 + EMobileUssdMessagingSendMessageNoFdnCheck, // 28002 + EMobileUssdMessagingSendMessageDefaultHandler // 28003 }; enum { EMobilePhoneSendNetworkServiceRequestNoFdnCheckCancel = EMobilePhoneSendNetworkServiceRequestNoFdnCheck + EMobileCancelOffset, // 28500 EMobileUssdMessagingSendMessageCancel = EMobileUssdMessagingSendMessage + EMobileCancelOffset, // 28501 - EMobileUssdMessagingSendMessageNoFdnCheckCancel = EMobileUssdMessagingSendMessageNoFdnCheck + EMobileCancelOffset // 28502 + EMobileUssdMessagingSendMessageNoFdnCheckCancel = EMobileUssdMessagingSendMessageNoFdnCheck + EMobileCancelOffset, // 28502 + EMobileUssdMessagingSendMessageDefaultHandlerCancel = EMobileUssdMessagingSendMessageDefaultHandler + EMobileCancelOffset // 28503 }; // diff -r 6fbc08ed9c42 -r 930a53cdc2d3 telephonyserver/etelmultimode/TETEL/te_EtelMM/TE_mmussd.cpp --- a/telephonyserver/etelmultimode/TETEL/te_EtelMM/TE_mmussd.cpp Fri Jun 04 13:03:15 2010 +0100 +++ b/telephonyserver/etelmultimode/TETEL/te_EtelMM/TE_mmussd.cpp Thu Oct 07 19:32:01 2010 +0300 @@ -114,6 +114,27 @@ else INFO_PRINTF2(_L("Test %d - RMobileUssdMessaging::SendMessage (async & cancel (Request Not Cancelled)) passed"), iTestCount++); + sendMsg = DMMTSY_USSD_MESSAGE_PDU; + sendAtts.iFlags = DMMTSY_USSD_ATTRIBUTE_FLAGS; + sendAtts.iFormat = DMMTSY_USSD_ATTRIBUTE_FORMAT; + sendAtts.iType = DMMTSY_USSD_ATTRIBUTE_TYPE; + sendAtts.iDcs = DMMTSY_USSD_ATTRIBUTE_DCS; + + ussdMessaging.SendMessage(reqStatus, sendMsg, sendAttsPckg, RMobileUssdMessaging::ETransferToDefaultHandler); + User::WaitForRequest(reqStatus); + TEST(reqStatus.Int()==KErrNone); + INFO_PRINTF2(_L("Test %d - RMobileUssdMessaging::SendMessage /EMobileUssdMessagingSendMessageDefaultHandler/ passed"), iTestCount++); + + // asynchronous & cancel + ussdMessaging.SendMessage(reqStatus, sendMsg, sendAttsPckg, RMobileUssdMessaging::ETransferToDefaultHandler); + ussdMessaging.CancelAsyncRequest(EMobileUssdMessagingSendMessageDefaultHandler); + User::WaitForRequest(reqStatus); + TEST(reqStatus.Int()==KErrNone || reqStatus.Int()==KErrCancel); + if (reqStatus.Int()==KErrCancel) + INFO_PRINTF2(_L("Test %d - RMobileUssdMessaging::SendMessage /EMobileUssdMessagingSendMessageDefaultHandler/ (async & cancel (Cancelled Request)) passed"), iTestCount++); + else + INFO_PRINTF2(_L("Test %d - RMobileUssdMessaging::SendMessage /EMobileUssdMessagingSendMessageDefaultHandler/ (async & cancel (Request Not Cancelled)) passed"), iTestCount++); + // test.Next(_L("OK: RMobileUssdMessaging's Receive & Send Message")); // Send Message NoFdnCheck diff -r 6fbc08ed9c42 -r 930a53cdc2d3 telephonyserver/etelmultimode/bwins/ETELMMU.def --- a/telephonyserver/etelmultimode/bwins/ETELMMU.def Fri Jun 04 13:03:15 2010 +0100 +++ b/telephonyserver/etelmultimode/bwins/ETELMMU.def Thu Oct 07 19:32:01 2010 +0300 @@ -674,3 +674,5 @@ ?TerminateActiveCalls@RMobilePhone@@QBEXAAVTRequestStatus@@@Z @ 673 NONAME ; void RMobilePhone::TerminateActiveCalls(class TRequestStatus &) const ?AcceptIncomingDialogue@RMobileUssdMessaging@@QBEHXZ @ 674 NONAME ; int RMobileUssdMessaging::AcceptIncomingDialogue(void) const ?RejectIncomingDialogue@RMobileUssdMessaging@@QBEHXZ @ 675 NONAME ; int RMobileUssdMessaging::RejectIncomingDialogue(void) const + ?SendMessage@RMobileUssdMessaging@@QBEXAAVTRequestStatus@@ABVTDesC8@@1H@Z @ 676 NONAME ; void RMobileUssdMessaging::SendMessage(class TRequestStatus &, class TDesC8 const &, class TDesC8 const &, int) const + diff -r 6fbc08ed9c42 -r 930a53cdc2d3 telephonyserver/etelmultimode/group/BLD.INF --- a/telephonyserver/etelmultimode/group/BLD.INF Fri Jun 04 13:03:15 2010 +0100 +++ b/telephonyserver/etelmultimode/group/BLD.INF Thu Oct 07 19:32:01 2010 +0300 @@ -50,3 +50,7 @@ ../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" diff -r 6fbc08ed9c42 -r 930a53cdc2d3 telephonyserver/etelserverandcore/Documentation/platsec/API_Capability_Assignment.xls Binary file telephonyserver/etelserverandcore/Documentation/platsec/API_Capability_Assignment.xls has changed diff -r 6fbc08ed9c42 -r 930a53cdc2d3 telephonyserver/etelserverandcore/EtelRecorder/playback/inc/tipclookup.h --- a/telephonyserver/etelserverandcore/EtelRecorder/playback/inc/tipclookup.h Fri Jun 04 13:03:15 2010 +0100 +++ b/telephonyserver/etelserverandcore/EtelRecorder/playback/inc/tipclookup.h Thu Oct 07 19:32:01 2010 +0300 @@ -633,6 +633,7 @@ {28000, _L8("EMobilePhoneSendNetworkServiceRequestNoFdnCheck")}, {28001, _L8("EMobileUssdMessagingSendMessage")}, {28002, _L8("EMobileUssdMessagingSendMessageNoFdnCheck")}, + {28003, _L8("EMobileUssdMessagingSendMessageDefaultHandler")}, {28500, _L8("EMobilePhoneSendNetworkServiceRequestNoFdnCheckCancel")}, {28501, _L8("EMobileUssdMessagingSendMessageCancel")}, {28502, _L8("EMobileUssdMessagingSendMessageNoFdnCheckCancel")}, diff -r 6fbc08ed9c42 -r 930a53cdc2d3 telephonyserver/etelserverandcore/INC/ET_PHONE.H --- a/telephonyserver/etelserverandcore/INC/ET_PHONE.H Fri Jun 04 13:03:15 2010 +0100 +++ b/telephonyserver/etelserverandcore/INC/ET_PHONE.H Thu Oct 07 19:32:01 2010 +0300 @@ -282,6 +282,7 @@ TInt ClientsDecision( const RMessage2& aMessage, CTelSession* aSession, TBool aAccepted ); void DeletedReqEntry( CReqEntry* aReqEntry ); CReqEntry* NewUpdatedReqEntry(); + CTelObject::TReqMode GetReqMode()const; private: void ConstructL(); @@ -294,8 +295,7 @@ void Clear(); public: - // TODO temp for testing. Is delivery manager the correct place for these - // or should there be a separate data storage object? + TPhoneClientId iSessionOwner; TBool iSessionReserved; diff -r 6fbc08ed9c42 -r 930a53cdc2d3 telephonyserver/etelserverandcore/INC/ET_TSY.H --- a/telephonyserver/etelserverandcore/INC/ET_TSY.H Fri Jun 04 13:03:15 2010 +0100 +++ b/telephonyserver/etelserverandcore/INC/ET_TSY.H Thu Oct 07 19:32:01 2010 +0300 @@ -52,6 +52,7 @@ const TUint KReqModeRePostImmediately=0x00000004; const TUint KReqModeMultipleCompletionWithInterestLevel=0x00000008; const TUint KReqModeSessionBased=0x00000010; +const TUint KReqModeTransferToDefaultHandler=0x00000020; class CTelObject; diff -r 6fbc08ed9c42 -r 930a53cdc2d3 telephonyserver/etelserverandcore/SETEL/ET_CORE.CPP --- a/telephonyserver/etelserverandcore/SETEL/ET_CORE.CPP Fri Jun 04 13:03:15 2010 +0100 +++ b/telephonyserver/etelserverandcore/SETEL/ET_CORE.CPP Thu Oct 07 19:32:01 2010 +0300 @@ -929,7 +929,6 @@ return NULL; } -/* EXPORT_C TInt CPhoneBase::FindSessionByTsyHandle(const TTsyReqHandle aTsyReqHandle) { CReqEntry* reqEntry = FindByTsyHandle(aTsyReqHandle); @@ -952,7 +951,7 @@ } return reqEntry->iMessage.Int3(); } -*/ + void CPhoneBase::UpdateBuffer(CReqEntry* aUpdatedReqEntry,CReqEntry* aReqEntry) // // Is passed both the TSY-updated request entry (which may be multi-buffered or not) @@ -1357,7 +1356,7 @@ SetActive(); break; case EInterestCategoryDefault: - // wait on default client (no timeout) //TODO: What if the default client doesn't respond? (Neil) + // wait on default client (no timeout) break; default: // No more clients @@ -1461,11 +1460,13 @@ TBool CMmDeliveryObject::DeliveryInProgress() const { // In the case of delivery to the default client we won't be active when - // delivery is carried out as no timeout is used for the default client - - // TODO is it correct that the default client should have no timeout? + // delivery is carried out as no timeout is used for the default client return (IsActive() || iCurrentReq); } - +CTelObject::TReqMode CMmDeliveryObject::GetReqMode()const + { + return iReqMode; + } TInt CMmDeliveryObject::ClientsDecision( const RMessage2& aMessage, CTelSession* aSession, TBool aAccepted ) { if (!DeliveryInProgress()) diff -r 6fbc08ed9c42 -r 930a53cdc2d3 telephonyserver/etelserverandcore/SETEL/ET_PHONE.CPP --- a/telephonyserver/etelserverandcore/SETEL/ET_PHONE.CPP Fri Jun 04 13:03:15 2010 +0100 +++ b/telephonyserver/etelserverandcore/SETEL/ET_PHONE.CPP Thu Oct 07 19:32:01 2010 +0300 @@ -994,8 +994,8 @@ // If a call is session based then it can only be used // when the client is the session owner. - if (reqMode&KReqModeSessionBased && IsSessionInProgress() - /*&& aMessage.Int3() != iSessionOwner.iSubSessionId TODO*/) + if ( (reqMode&KReqModeSessionBased && IsSessionInProgress()) + && (aMessage.Int3() != iDeliveryObject->iSessionOwner.iSubSessionId) ) { // Each type of session only allowed to have one ongoing 'session/dialogue'. RECORD_COMPLETE_SUB(aMessage.Session(), this, aMessage.Int3(), aMessage.Function(), res); @@ -1354,7 +1354,7 @@ } } - CheckAndDestroyDummySubSession(); //TODO + CheckAndDestroyDummySubSession(); } void CTelObject::RepostRequest(CReqEntry* aUpdatedReqEntry, const TInt aError) @@ -1389,27 +1389,33 @@ void CTelObject::SetSessionOwner(TInt aSessionHandle, TInt aSubSessionHandle) { iDeliveryObject->iSessionOwner = TPhoneClientId(aSessionHandle, aSubSessionHandle); - // TODO notify TSY that the session owner has changed } -// TODO can be used by the TSY to set the session owner to the current request. +// Can be used by the TSY to set the session owner to the current request. // For each request the CTSY is given a TsyReqHandle so this is a sensible thing // for it to be dealing with. -// TODO note that once a session has an owner the reserved state is irrelevant. +// Note that once a session has an owner the reserved state is irrelevant. EXPORT_C void CTelObject::SetSessionOwnerByTsyHandle(const TTsyReqHandle aTsyReqHandle) { -// const TInt owningsession = PhoneOwner()->FindSessionByTsyHandle( aTsyReqHandle ); -// const TInt owningsubsession = PhoneOwner()->FindSubSessionByTsyHandle( aTsyReqHandle ); -// iSessionOwner = TPhoneClientId(owningsession, owningsubsession); - // TODO notify TSY that the session owner has changed + const TInt owningsession = PhoneOwner()->FindSessionByTsyHandle( aTsyReqHandle ); + const TInt owningsubsession = PhoneOwner()->FindSubSessionByTsyHandle( aTsyReqHandle ); + + + if(iDeliveryObject->GetReqMode() == (KReqModeSessionBased | KReqModeTransferToDefaultHandler)) // transfer to default handler + { + iDeliveryObject->iSessionOwner = TPhoneClientId(KUssdDefaultClientSid, owningsubsession); + } + else //not default handler + { + iDeliveryObject->iSessionOwner = TPhoneClientId(owningsession, owningsubsession); + } } TBool CTelObject::IsSessionOwner(CReqEntry* aReqEntry) const { - // TODO Neil's experimental update TPhoneClientId clientId(reinterpret_cast(aReqEntry->iSession),aReqEntry->iMessage.Int3()); return (clientId == iDeliveryObject->iSessionOwner); } @@ -1430,7 +1436,7 @@ EXPORT_C TBool CTelObject::IsSessionInProgress() const { - // TODO Neil's experimental update + //Indicates if there is an ongoing USSD dialogue. if (iDeliveryObject) { return iDeliveryObject->iSessionOwner != TPhoneClientId(); @@ -1440,8 +1446,12 @@ EXPORT_C TInt CTelObject::ReserveSession() { - // TODO Neil's experimental update - ASSERT(iDeliveryObject); + // There is no active session so we have to work out who to deliver it to. + if (NULL == iDeliveryObject) + { + iDeliveryObject = CMmDeliveryObject::NewL(*this); + } + //Reserve the session if it is not already reserved if (iDeliveryObject->iSessionReserved) { return KErrInUse; @@ -1452,21 +1462,32 @@ EXPORT_C TBool CTelObject::IsSessionReserved() const { - // TODO Neil's experimental update - return iDeliveryObject->iSessionReserved; + //Check if the USSD session has been reserved + if (NULL != iDeliveryObject) + { + return iDeliveryObject->iSessionReserved; + } + else + { + return EFalse; + } } EXPORT_C void CTelObject::CancelReserveSession() { - // TODO Neil's experimental update - iDeliveryObject->iSessionReserved = EFalse; + if (iDeliveryObject) + { + iDeliveryObject->iSessionReserved = EFalse; + } } EXPORT_C void CTelObject::EndSession() { - // TODO Neil's experimental update - iDeliveryObject->iSessionOwner = TPhoneClientId(); - iDeliveryObject->iSessionReserved = EFalse; + if (iDeliveryObject) + { + iDeliveryObject->iSessionOwner = TPhoneClientId(); + iDeliveryObject->iSessionReserved = EFalse; + } } TInt CTelObject::ResolveError(CTelSession* aSession, const TInt aError) const diff -r 6fbc08ed9c42 -r 930a53cdc2d3 telephonyserver/etelserverandcore/SETEL/ET_SVR.CPP --- a/telephonyserver/etelserverandcore/SETEL/ET_SVR.CPP Fri Jun 04 13:03:15 2010 +0100 +++ b/telephonyserver/etelserverandcore/SETEL/ET_SVR.CPP Thu Oct 07 19:32:01 2010 +0300 @@ -674,9 +674,9 @@ 27500, //range is 27500-27506 inclusive 27507, //range is 27507-27999 inclusive 28000, //range is 28000-28002 inclusive - 28003, //range is 28003-28499 inclusive + 28004, //range is 28004-28499 inclusive 28500, //range is 28500-28502 inclusive - 28503, //range is 28503-28999 inclusive + 28504, //range is 28504-28999 inclusive 29000, //range is 29000-29004 inclusive 29005, //range is 29005-29005 inclusive 29006, //range is 29006 diff -r 6fbc08ed9c42 -r 930a53cdc2d3 telephonyserverplugins/common_tsy/commontsy/inc/mmsms/cmmussdtsy.h --- a/telephonyserverplugins/common_tsy/commontsy/inc/mmsms/cmmussdtsy.h Fri Jun 04 13:03:15 2010 +0100 +++ b/telephonyserverplugins/common_tsy/commontsy/inc/mmsms/cmmussdtsy.h Thu Oct 07 19:32:01 2010 +0300 @@ -46,6 +46,7 @@ EMultimodeUssdSendRelease, EMultimodeUssdNotifyNetworkRelease, EMultimodeUssdSendMessageNoFdnCheck, + EMultimodeUssdSendMessageDefaultHandler, // ATTENTION: Declare constant for those requests that need // own request handle record in iTsyReqHandleStore above the // following! @@ -171,6 +172,14 @@ * @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 @@ -321,6 +330,15 @@ * @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 @@ -462,6 +480,10 @@ * Indicating if SendMessageNoFdnCheck request is ongoing */ TUssdNoFdnCheckStatus iUssdNoFdnCheckFlag; + /** + * Indicating if SendMessage should send request to DefaultHandler + */ + TBool iSendToDefaultHandler; }; #endif // CMMUSSDTSY_H diff -r 6fbc08ed9c42 -r 930a53cdc2d3 telephonyserverplugins/common_tsy/commontsy/src/mmsms/cmmussdtsy.cpp --- a/telephonyserverplugins/common_tsy/commontsy/src/mmsms/cmmussdtsy.cpp Fri Jun 04 13:03:15 2010 +0100 +++ b/telephonyserverplugins/common_tsy/commontsy/src/mmsms/cmmussdtsy.cpp Thu Oct 07 19:32:01 2010 +0300 @@ -60,6 +60,7 @@ // Initialize boolean flag iUssdNoFdnCheckFlag = EUssdNoFdnCheckUnknown; + iSendToDefaultHandler = EFalse; } CMmUssdTsy* CMmUssdTsy::NewL( @@ -189,13 +190,23 @@ case EMobileUssdMessagingSendMessage: { iUssdNoFdnCheckFlag = EUssdNoFdnCheckNotUsed; + iSendToDefaultHandler = EFalse; ret = SendMessageL( aTsyReqHandle, aPackage.Des1n(), aPackage.Des2n() ); } break; + case EMobileUssdMessagingSendMessageDefaultHandler: + { + iUssdNoFdnCheckFlag = EUssdNoFdnCheckNotUsed; + iSendToDefaultHandler = ETrue; + ret = SendMessageL( + aTsyReqHandle, aPackage.Des1n(), aPackage.Des2n() ); + } + break; case EMobileUssdMessagingSendMessageNoFdnCheck: { iUssdNoFdnCheckFlag = EUssdNoFdnCheckUsed; + iSendToDefaultHandler = EFalse; ret = SendMessageL( aTsyReqHandle, aPackage.Des1n(), aPackage.Des2n() ); } @@ -252,6 +263,10 @@ SendMessageCancel( aTsyReqHandle ); ret = KErrNone; break; + case EMobileUssdMessagingSendMessageDefaultHandler: + SendMessageCancelDefaultHandler( aTsyReqHandle ); + ret = KErrNone; + break; case EMobileUssdMessagingSendMessageNoFdnCheck: SendMessageNoFdnCheckCancel( aTsyReqHandle ); ret = KErrNone; @@ -298,17 +313,19 @@ KReqModeMultipleCompletionWithInterestLevel; break; // Services handled by TSY - case EMobileUssdMessagingSendMessage: + case EMobileUssdMessagingSendMessageDefaultHandler: + ret = KReqModeSessionBased | KReqModeTransferToDefaultHandler; + break; + case EMobileUssdMessagingSendMessage: case EMobileUssdMessagingSendMessageNoFdnCheck: case EMobileUssdMessagingSendRelease: - //ret = KReqModeSessionBased; - ret = 0; + ret = KReqModeSessionBased; break; case EMobileUssdMessagingNotifyNetworkRelease: // Multiple completion because the clients don't have to own the // session in order to be notified that the session has been // released. - ret = KReqModeMultipleCompletionEnabled; + ret = KReqModeRePostImmediately | KReqModeMultipleCompletionEnabled; break; default: User::Leave( KErrNotSupported ); @@ -471,7 +488,6 @@ } ReqCompleted( aTsyReqHandle, ret ); - return KErrNone; } @@ -536,13 +552,10 @@ TInt aError, CMmDataPackage* aDataPackage ) { - // TODO if a session is in progress and this is a notification then we need to send back - // a USSD busy code. - TFLOGSTRING("TSY: CMmUssdTsy::CompleteReceiveMessage.\n" ); TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle( EMultimodeUssdReceiveMessage ); - + if ( ( EMultimodeUssdReqHandleUnknown != reqHandle ) ) { // reset req handle. Returns the deleted req handle @@ -553,7 +566,7 @@ { TDes8* unpackedReceiveUssdMessagePtr = NULL; RMobileUssdMessaging::TMobileUssdAttributesV1* unpackedReceiveUssdMessageAttributesPtr = NULL; - aDataPackage->UnPackData (&unpackedReceiveUssdMessagePtr, &unpackedReceiveUssdMessageAttributesPtr); + aDataPackage->UnPackData (&unpackedReceiveUssdMessagePtr, &unpackedReceiveUssdMessageAttributesPtr); if(iReceiveUssdMessagePtr->MaxLength() >= unpackedReceiveUssdMessagePtr->Length()) { @@ -584,6 +597,7 @@ TFLOGSTRING2("TSY: CMmUssdTsy::SendMessageL: iUssdNoFdnCheckFlag: %d", iUssdNoFdnCheckFlag); TInt ret = KErrNone; + if ( iSsTransactionOngoing ) { ret = KErrServerBusy; @@ -603,14 +617,23 @@ ret = iMmPhone->MessageManager()->HandleRequestL( EMobileUssdMessagingSendMessageNoFdnCheck, &package ); } - if ( iUssdNoFdnCheckFlag == EUssdNoFdnCheckNotUsed ) + if ( iUssdNoFdnCheckFlag == EUssdNoFdnCheckNotUsed ) { // Send request to the Domestic OS layer. - ret = iMmPhone->MessageManager()->HandleRequestL( - EMobileUssdMessagingSendMessage, &package ); + if(EFalse == iSendToDefaultHandler) + { + ret = iMmPhone->MessageManager()->HandleRequestL( + EMobileUssdMessagingSendMessage, &package ); + } + else //default handler + { + ret = iMmPhone->MessageManager()->HandleRequestL( + EMobileUssdMessagingSendMessageDefaultHandler, &package ); + } } + - iSsTransactionOngoing = ETrue; + iSsTransactionOngoing = ETrue; } if ( KErrNone != ret ) @@ -621,7 +644,6 @@ } else { -/* TODO if (!IsSessionInProgress()) { // If a session isn't in progress then reserve the session to @@ -633,7 +655,7 @@ // affect the session or dialogue state. (void)ReserveSession(); } -*/ + #ifdef REQHANDLE_TIMER // Check if NoFdnCheck is used or not if ( iUssdNoFdnCheckFlag == EUssdNoFdnCheckUsed ) @@ -642,12 +664,20 @@ SetTypeOfResponse( EMultimodeUssdSendMessageNoFdnCheck, aTsyReqHandle ); } - if ( iUssdNoFdnCheckFlag == EUssdNoFdnCheckNotUsed ) + if ( (iUssdNoFdnCheckFlag == EUssdNoFdnCheckNotUsed) && + (EFalse == iSendToDefaultHandler)) { // 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 ) @@ -680,8 +710,31 @@ { // reset the req handle iTsyReqHandleStore->ResetTsyReqHandle( EMultimodeUssdSendMessage ); - -// CancelReserveSession(); TODO + + CancelReserveSession(); + + // complete with cancel + ReqCompleted( aTsyReqHandle, KErrCancel ); + iSsTransactionOngoing = EFalse; + + iUssdNoFdnCheckFlag = EUssdNoFdnCheckUnknown; + + 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 ); @@ -691,7 +744,45 @@ 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 @@ -709,8 +800,7 @@ { // reset req handle. Returns the deleted req handle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( - EMultimodeUssdSendMessage ); -/* TODO + EMultimodeUssdSendMessage ); // 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. @@ -725,7 +815,7 @@ CancelReserveSession(); } } -*/ + ReqCompleted( reqHandle, aError ); iSsTransactionOngoing = EFalse; iUssdNoFdnCheckFlag = EUssdNoFdnCheckUnknown; @@ -742,34 +832,34 @@ const TTsyReqHandle aTsyReqHandle, TDes8* aReturnResult ) { -/* TODO + + //Check if there is a session in progress if ( !IsSessionInProgress() ) { // You can't release a dialogue that isn't in progress. return KErrDisconnected; } -*/ + TTsyReqHandle sendReleaseHandle = iTsyReqHandleStore->GetTsyReqHandle( EMultimodeUssdSendRelease ); - + if ( 0 < sendReleaseHandle ) { // The request is already in processing because of previous request // Complete request with status value informing the client about // the situation. -TFLOGSTRING("LTSY: CMmUssdTsy::SendRelease - KErrServerBusy"); - ReqCompleted( aTsyReqHandle, KErrServerBusy ); +TFLOGSTRING("LTSY: CMmUssdTsy::SendRelease - KErrAccessDenied"); + ReqCompleted( aTsyReqHandle, KErrAccessDenied ); } else { TFLOGSTRING("TSY: CMmUssdTsy::SendRelease called"); - TInt ret = KErrGeneral; TPckg* ussdSendSSRequestPckg = reinterpret_cast< TPckg* > ( aReturnResult ); - + if ( sizeof(RMobilePhone::TMobilePhoneSendSSRequestV3) > ussdSendSSRequestPckg->MaxLength() ) { @@ -786,7 +876,7 @@ ret = iMmPhone->MessageManager()->HandleRequestL( EMobileUssdMessagingSendRelease ); } - + // If ret is not KErrNone if ( KErrNone != ret ) { @@ -796,6 +886,7 @@ { #ifdef REQHANDLE_TIMER // Set timer for the request + //If there is no session in progress this line lead to crash SetTypeOfResponse( EMultimodeUssdSendRelease, aTsyReqHandle ); #else // Save SendMessage request handle, set timer @@ -804,7 +895,6 @@ #endif // REQHANDLE_TIMER } } - return KErrNone; } @@ -829,7 +919,7 @@ { aDataPackage->UnPackData ( *iReturnResultPtr ); } -// EndSession(); TODO + EndSession(); ReqCompleted( reqHandle, aErrorCode ); } } @@ -867,6 +957,14 @@ TDes8* aMsgAttributes) // aMsgAttributes may be NULL { TFLOGSTRING("TSY: CMmUssdTsy::NotifyNetworkRelease" ); +/* + //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)) { @@ -874,6 +972,7 @@ // Complete the request with appropiate error return KErrArgument; } + if (aMsgAttributes && aMsgAttributes->MaxLength() < sizeof(RMobileUssdMessaging::TMobileUssdAttributesV1Pckg)) { @@ -881,7 +980,7 @@ // Complete the request with appropiate error return KErrArgument; } - + TPckg* ussdSendSSRequestPckg = reinterpret_cast< TPckg* > ( aMsgData ); @@ -890,7 +989,6 @@ ( *ussdSendSSRequestPckg )(); iReturnNotifyPtr = &msgData; - if (aMsgAttributes != NULL) { RMobileUssdMessaging::TMobileUssdAttributesV1Pckg* ussdAttributesPckg = @@ -903,7 +1001,7 @@ else { iReturnNotifyUssdMessageAttributesPtr = NULL; - } + } #ifdef REQHANDLE_TIMER // Set timer for the request SetTypeOfResponse( EMultimodeUssdNotifyNetworkRelease, aTsyReqHandle ); @@ -926,7 +1024,7 @@ TInt aErrorCode, CMmDataPackage* aDataPackage ) { -// EndSession(); TODO + EndSession(); TFLOGSTRING2("TSY: CMmUssdTsy::CompleteNotifyNetworkRelease. Error: %d", aErrorCode ); // reset req handle. Returns the deleted req handle @@ -1024,6 +1122,7 @@ iReturnResultPtr = NULL; iReturnNotifyPtr = NULL; iReturnNotifyUssdMessageAttributesPtr = NULL; + iSendToDefaultHandler = EFalse; } #ifdef REQHANDLE_TIMER @@ -1044,6 +1143,7 @@ switch ( aReqHandleType ) { case EMultimodeUssdSendMessage: + case EMultimodeUssdSendMessageDefaultHandler: timeOut = KMmUssdSendMessageTimeOut; break; case EMultimodeUssdSendMessageNoFdnCheck: @@ -1089,7 +1189,10 @@ // Cases handled with automatic completion case EMultimodeUssdSendMessage: CompleteSendMessage( aError ); - break; + break; + case EMultimodeUssdSendMessageDefaultHandler: + CompleteSendMessageDefaultHandler( aError ); + break; case EMultimodeUssdSendMessageNoFdnCheck: CompleteSendMessageNoFdnCheck( aError ); break; @@ -1151,7 +1254,8 @@ switch ( aIpc ) { - case EMobileUssdMessagingSendMessage: + case EMobileUssdMessagingSendMessage: + case EMobileUssdMessagingSendMessageDefaultHandler: case EMobileUssdMessagingSendMessageNoFdnCheck: case EMobileUssdMessagingSendRelease: isRequestPossible = EFalse; diff -r 6fbc08ed9c42 -r 930a53cdc2d3 telephonyserverplugins/common_tsy/commontsy/src/mmtsy/CMmMessageRouterProxy.cpp --- a/telephonyserverplugins/common_tsy/commontsy/src/mmtsy/CMmMessageRouterProxy.cpp Fri Jun 04 13:03:15 2010 +0100 +++ b/telephonyserverplugins/common_tsy/commontsy/src/mmtsy/CMmMessageRouterProxy.cpp Thu Oct 07 19:32:01 2010 +0300 @@ -352,6 +352,7 @@ // USSD functionality case EMobileUssdMessagingSendRelease: case EMobileUssdMessagingSendMessage: + case EMobileUssdMessagingSendMessageDefaultHandler: case EMobileUssdMessagingSendMessageNoFdnCheck: case EMobileUssdMessagingReceiveMessage: case EMobileUssdMessagingNotifyNetworkRelease: @@ -376,7 +377,7 @@ case EMmTsyActivateSmsRouting: case EMmTsyDeactivateSmsRouting: case EMobileSmsMessagingReceiveMessage: - case EMobileSmsMessagingSendMessage: + case EMobileSmsMessagingSendMessage: case EMobileSmsMessagingSendMessageNoFdnCheck: case EMmTsySmsSendSatMessage: case EMobileSmsMessagingResumeSmsReception: @@ -1515,7 +1516,11 @@ case EMobileUssdMessagingSendMessage: static_cast( mmObject )-> CompleteSendMessage( aResult ); - break; + break; + case EMobileUssdMessagingSendMessageDefaultHandler: + static_cast( mmObject )-> + CompleteSendMessageDefaultHandler( aResult ); + break; case EMobileUssdMessagingSendMessageNoFdnCheck: static_cast( mmObject )-> CompleteSendMessageNoFdnCheck( aResult ); diff -r 6fbc08ed9c42 -r 930a53cdc2d3 telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmphonetsy.cpp --- a/telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmphonetsy.cpp Fri Jun 04 13:03:15 2010 +0100 +++ b/telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmphonetsy.cpp Thu Oct 07 19:32:01 2010 +0300 @@ -190,7 +190,7 @@ //Create the SSM Plugin Handler on creation rather than on demand to avoid problems //with Emergency Calls in Out Of Memory situations. - iSystemStatePluginHandler = CCtsySystemStatePluginHandler::NewL(); + //iSystemStatePluginHandler = CCtsySystemStatePluginHandler::NewL(); //#ifdef __WINS__ SYMBIAN commented out // iMmPhoneExtInterface->NotifySimStatusReadyL(); diff -r 6fbc08ed9c42 -r 930a53cdc2d3 telephonyserverplugins/common_tsy/test/component/group/bld.inf --- a/telephonyserverplugins/common_tsy/test/component/group/bld.inf Fri Jun 04 13:03:15 2010 +0100 +++ b/telephonyserverplugins/common_tsy/test/component/group/bld.inf Thu Oct 07 19:32:01 2010 +0300 @@ -136,6 +136,7 @@ // include USSD test client #include "../ussdtestclient/group/bld.inf" +#include "../consoleussdtestclient/group/bld.inf" PRJ_TESTMMPFILES //build test components diff -r 6fbc08ed9c42 -r 930a53cdc2d3 telephonyserverplugins/common_tsy/test/component/group/te_ctsy_component.mmp --- a/telephonyserverplugins/common_tsy/test/component/group/te_ctsy_component.mmp Fri Jun 04 13:03:15 2010 +0100 +++ b/telephonyserverplugins/common_tsy/test/component/group/te_ctsy_component.mmp Thu Oct 07 19:32:01 2010 +0300 @@ -24,6 +24,8 @@ VENDORID 0x70000001 CAPABILITY CommDD PowerMgmt ReadDeviceData WriteDeviceData TrustedUI ProtServ NetworkControl NetworkServices LocalServices ReadUserData WriteUserData Location +EPOCHEAPSIZE 0x10000 0x400000 + SOURCEPATH ../src SOURCE cctsylbsfu.cpp SOURCE cctsysmsstorefu.cpp diff -r 6fbc08ed9c42 -r 930a53cdc2d3 telephonyserverplugins/common_tsy/test/component/inc/cctsyussdmessagingfu.h --- a/telephonyserverplugins/common_tsy/test/component/inc/cctsyussdmessagingfu.h Fri Jun 04 13:03:15 2010 +0100 +++ b/telephonyserverplugins/common_tsy/test/component/inc/cctsyussdmessagingfu.h Thu Oct 07 19:32:01 2010 +0300 @@ -69,13 +69,18 @@ void TestSendMessage0001L(); void TestSendMessage0002L(); void TestSendMessage0003L(); - void TestSendMessage0004L(); + void TestSendMessage0004L(); void TestSendMessage0005L(); + void TestSendMessage0006L(); void TestSendRelease0001L(); void TestSendRelease0001bL(); + void TestSendRelease0001cL(); + void TestSendRelease0001dL(); void TestSendRelease0002L(); + void TestSendRelease0002bL(); void TestSendRelease0003L(); void TestSendRelease0004L(); + void TestSendRelease0004bL(); void TestSendRelease0005L(); void TestReceiveMessage0001L(); void TestReceiveMessage0002L(); @@ -85,7 +90,8 @@ void TestReceiveMessage0002eL(); void TestReceiveMessage0002fL(); void TestReceiveMessage0002gL(); - void TestReceiveMessage0002hL(); + void TestReceiveMessage0002hL(); + void TestReceiveMessage0002iL(); void TestReceiveMessage0003L(); void TestReceiveMessage0004L(); void TestReceiveMessage0004bL(); @@ -94,9 +100,14 @@ void TestReceiveMessage0004eL(); void TestReceiveMessage0004fL(); void TestNotifyNetworkRelease0001L(); + void TestNotifyNetworkRelease0001bL(); + void TestNotifyNetworkRelease0001cL(); + void TestNotifyNetworkRelease0001dL(); + void TestNotifyNetworkRelease0001eL(); void TestNotifyNetworkRelease0002L(); void TestNotifyNetworkRelease0003L(); void TestNotifyNetworkRelease0004L(); + void TestNotifyNetworkRelease0004bL(); void TestSendMessageNoFdnCheck0001L(); void TestSendMessageNoFdnCheck0002L(); void TestSendMessageNoFdnCheck0002bL(); diff -r 6fbc08ed9c42 -r 930a53cdc2d3 telephonyserverplugins/common_tsy/test/component/mockltsy/mockltsy/src/cmmmessagerouter.cpp --- a/telephonyserverplugins/common_tsy/test/component/mockltsy/mockltsy/src/cmmmessagerouter.cpp Fri Jun 04 13:03:15 2010 +0100 +++ b/telephonyserverplugins/common_tsy/test/component/mockltsy/mockltsy/src/cmmmessagerouter.cpp Thu Oct 07 19:32:01 2010 +0300 @@ -358,7 +358,8 @@ case EMobilePhoneStoreReadAllPhase1: case EMobilePhoneStoreWrite: case EMmTsySmsSendSatMessage: - case EMobileUssdMessagingSendMessage: + case EMobileUssdMessagingSendMessageDefaultHandler: + case EMobileUssdMessagingSendMessage: case EMobileBroadcastMessagingReceiveMessage: case EMobileBroadcastMessagingReceiveMessageCancel: case EMobileBroadcastMessagingSetFilterSetting: diff -r 6fbc08ed9c42 -r 930a53cdc2d3 telephonyserverplugins/common_tsy/test/component/mockltsy/mockltsy/src/cmocksmsmesshandler.cpp --- a/telephonyserverplugins/common_tsy/test/component/mockltsy/mockltsy/src/cmocksmsmesshandler.cpp Fri Jun 04 13:03:15 2010 +0100 +++ b/telephonyserverplugins/common_tsy/test/component/mockltsy/mockltsy/src/cmocksmsmesshandler.cpp Thu Oct 07 19:32:01 2010 +0300 @@ -115,8 +115,9 @@ TMockLtsyData1 data(smsData); return iMessageRouter->MockLtsyEngine()->ExecuteCommandL(aIpc, data); } + case EMobileUssdMessagingSendMessageDefaultHandler: case EMobileUssdMessagingSendMessageNoFdnCheck: - case EMobileUssdMessagingSendMessage: + case EMobileUssdMessagingSendMessage: { TDes8* ptr1 = NULL; TDes8** ptr2 = NULL; diff -r 6fbc08ed9c42 -r 930a53cdc2d3 telephonyserverplugins/common_tsy/test/component/mockltsy/mockltsy/src/ipcnames.cpp --- a/telephonyserverplugins/common_tsy/test/component/mockltsy/mockltsy/src/ipcnames.cpp Fri Jun 04 13:03:15 2010 +0100 +++ b/telephonyserverplugins/common_tsy/test/component/mockltsy/mockltsy/src/ipcnames.cpp Thu Oct 07 19:32:01 2010 +0300 @@ -595,6 +595,8 @@ _LIT(KEMobileUssdMessagingSendReleaseCancel, "EMobileUssdMessagingSendReleaseCancel"); _LIT(KEMobilePhoneSendNetworkServiceRequestNoFdnCheck, "EMobilePhoneSendNetworkServiceRequestNoFdnCheck"); _LIT(KEMobileUssdMessagingSendMessage, "EMobileUssdMessagingSendMessage"); +_LIT(KEMobileUssdMessagingSendMessageDefaultHandler, "EMobileUssdMessagingSendMessageDefaultHandler"); +_LIT(KEMobileUssdMessagingSendMessageDefaultHandlerCancel, "EMobileUssdMessagingSendMessageDefaultHandlerCancel"); _LIT(KEMobileUssdMessagingSendMessageNoFdnCheck, "EMobileUssdMessagingSendMessageNoFdnCheck"); _LIT(KEMobilePhoneSendNetworkServiceRequestNoFdnCheckCancel, "EMobilePhoneSendNetworkServiceRequestNoFdnCheckCancel"); _LIT(KEMobileUssdMessagingSendMessageCancel, "EMobileUssdMessagingSendMessageCancel"); @@ -1367,6 +1369,8 @@ case EMobileUssdMessagingSendReleaseCancel : return KEMobileUssdMessagingSendReleaseCancel; case EMobilePhoneSendNetworkServiceRequestNoFdnCheck : return KEMobilePhoneSendNetworkServiceRequestNoFdnCheck; case EMobileUssdMessagingSendMessage : return KEMobileUssdMessagingSendMessage; + case EMobileUssdMessagingSendMessageDefaultHandler : return KEMobileUssdMessagingSendMessageDefaultHandler; + case EMobileUssdMessagingSendMessageDefaultHandlerCancel : return KEMobileUssdMessagingSendMessageDefaultHandlerCancel; case EMobileUssdMessagingSendMessageNoFdnCheck : return KEMobileUssdMessagingSendMessageNoFdnCheck; case EMobilePhoneSendNetworkServiceRequestNoFdnCheckCancel : return KEMobilePhoneSendNetworkServiceRequestNoFdnCheckCancel; case EMobileUssdMessagingSendMessageCancel : return KEMobileUssdMessagingSendMessageCancel; diff -r 6fbc08ed9c42 -r 930a53cdc2d3 telephonyserverplugins/common_tsy/test/component/scripts/te_ctsycomponent_ussdmessaging_individual.script --- a/telephonyserverplugins/common_tsy/test/component/scripts/te_ctsycomponent_ussdmessaging_individual.script Fri Jun 04 13:03:15 2010 +0100 +++ b/telephonyserverplugins/common_tsy/test/component/scripts/te_ctsycomponent_ussdmessaging_individual.script Thu Oct 07 19:32:01 2010 +0300 @@ -16,280 +16,13 @@ LOAD_SUITE te_ctsy_component -START_TESTCASE BA-CTSY-USSDM-USM-0001 -//!@SYMTestCaseID BA-CTSY-USSDM-USM-0001 -//!@SYMComponent telephony_ctsy -//!@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::SendMessage -//!@SYMTestPriority High -//!@SYMTestActions Invokes RMobileUssdMessaging::SendMessage -//!@SYMTestExpectedResults Pass -//!@SYMTestType CT -RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestSendMessage0001L -END_TESTCASE BA-CTSY-USSDM-USM-0001 - -START_TESTCASE BA-CTSY-USSDM-USM-0002 -//!@SYMTestCaseID BA-CTSY-USSDM-USM-0002 -//!@SYMComponent telephony_ctsy -//!@SYMTestCaseDesc Test support in CTSY for cancelling of RMobileUssdMessaging::SendMessage -//!@SYMTestPriority High -//!@SYMTestActions Invokes cancelling of RMobileUssdMessaging::SendMessage -//!@SYMTestExpectedResults Pass -//!@SYMTestType CT -RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestSendMessage0002L -END_TESTCASE BA-CTSY-USSDM-USM-0002 - -START_TESTCASE BA-CTSY-USSDM-USM-0003 -//!@SYMTestCaseID BA-CTSY-USSDM-USM-0003 -//!@SYMComponent telephony_ctsy -//!@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::SendMessage with bad parameter data -//!@SYMTestPriority High -//!@SYMTestActions Invokes RMobileUssdMessaging::SendMessage with bad parameter data -//!@SYMTestExpectedResults Pass -//!@SYMTestType CT -RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestSendMessage0003L -END_TESTCASE BA-CTSY-USSDM-USM-0003 - -START_TESTCASE BA-CTSY-USSDM-USM-0004 -//!@SYMTestCaseID BA-CTSY-USSDM-USM-0004 -//!@SYMComponent telephony_ctsy -//!@SYMTestCaseDesc Test support in CTSY for multiple client requests to RMobileUssdMessaging::SendMessage -//!@SYMTestPriority High -//!@SYMTestActions Invokes multiple client requests to RMobileUssdMessaging::SendMessage -//!@SYMTestExpectedResults Pass -//!@SYMTestType CT -RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestSendMessage0004L -END_TESTCASE BA-CTSY-USSDM-USM-0004 - -START_TESTCASE BA-CTSY-USSDM-USR-0001 -//!@SYMTestCaseID BA-CTSY-USSDM-USR-0001 -//!@SYMComponent telephony_ctsy -//!@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::SendRelease -//!@SYMTestPriority High -//!@SYMTestActions Invokes RMobileUssdMessaging::SendRelease -//!@SYMTestExpectedResults Pass -//!@SYMTestType CT -RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestSendRelease0001L -END_TESTCASE BA-CTSY-USSDM-USR-0001 - -START_TESTCASE BA-CTSY-USSDM-USR-0001b -//!@SYMTestCaseID BA-CTSY-USSDM-USR-0001b -//!@SYMComponent telephony_ctsy -//!@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::SendRelease -//!@SYMTestPriority High -//!@SYMTestActions Invokes RMobileUssdMessaging::SendRelease -//!@SYMTestExpectedResults Pass -//!@SYMTestType CT -RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestSendRelease0001bL -END_TESTCASE BA-CTSY-USSDM-USR-0001b - -START_TESTCASE BA-CTSY-USSDM-USR-0002 -//!@SYMTestCaseID BA-CTSY-USSDM-USR-0002 -//!@SYMComponent telephony_ctsy -//!@SYMTestCaseDesc Test support in CTSY for cancelling of RMobileUssdMessaging::SendRelease -//!@SYMTestPriority High -//!@SYMTestActions Invokes cancelling of RMobileUssdMessaging::SendRelease -//!@SYMTestExpectedResults Pass -//!@SYMTestType CT -RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestSendRelease0002L -END_TESTCASE BA-CTSY-USSDM-USR-0002 - -START_TESTCASE BA-CTSY-USSDM-USR-0003 -//!@SYMTestCaseID BA-CTSY-USSDM-USR-0003 -//!@SYMComponent telephony_ctsy -//!@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::SendRelease with bad parameter data -//!@SYMTestPriority High -//!@SYMTestActions Invokes RMobileUssdMessaging::SendRelease with bad parameter data -//!@SYMTestExpectedResults Pass -//!@SYMTestType CT -RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestSendRelease0003L -END_TESTCASE BA-CTSY-USSDM-USR-0003 - -START_TESTCASE BA-CTSY-USSDM-USR-0004 -//!@SYMTestCaseID BA-CTSY-USSDM-USR-0004 -//!@SYMComponent telephony_ctsy -//!@SYMTestCaseDesc Test support in CTSY for multiple client requests to RMobileUssdMessaging::SendRelease -//!@SYMTestPriority High -//!@SYMTestActions Invokes multiple client requests to RMobileUssdMessaging::SendRelease -//!@SYMTestExpectedResults Pass -//!@SYMTestType CT -RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestSendRelease0004L -END_TESTCASE BA-CTSY-USSDM-USR-0004 - -START_TESTCASE BA-CTSY-USSDM-URM-0001 -//!@SYMTestCaseID BA-CTSY-USSDM-URM-0001 -//!@SYMComponent telephony_ctsy -//!@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::ReceiveMessage -//!@SYMTestPriority High -//!@SYMTestActions Invokes RMobileUssdMessaging::ReceiveMessage -//!@SYMTestExpectedResults Pass -//!@SYMTestType CT -RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessage0001L -END_TESTCASE BA-CTSY-USSDM-URM-0001 - -START_TESTCASE BA-CTSY-USSDM-URM-0002 -//!@SYMTestCaseID BA-CTSY-USSDM-URM-0002 -//!@SYMComponent telephony_ctsy -//!@SYMTestCaseDesc Test support in CTSY for cancelling of RMobileUssdMessaging::ReceiveMessage -//!@SYMTestPriority High -//!@SYMTestActions Invokes cancelling of RMobileUssdMessaging::ReceiveMessage (including via calling Close). -//!@SYMTestExpectedResults Pass -//!@SYMTestType CT -RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessage0002L -END_TESTCASE BA-CTSY-USSDM-URM-0002 - -START_TESTCASE BA-CTSY-USSDM-URM-0002b -//!@SYMTestCaseID BA-CTSY-USSDM-URM-0002b -//!@SYMComponent telephony_ctsy -//!@SYMTestCaseDesc Test cancelling of ReceiveMessage with multiple interested clients. -//!@SYMTestPriority High -//!@SYMTestActions Two clients present, first client calls Cancel before message received. -//!@SYMTestExpectedResults Pass -//!@SYMTestType CT -RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessage0002bL -END_TESTCASE BA-CTSY-USSDM-URM-0002b +// The USSD test client is copied into new executables with differing SIDs to differentiate +// between a priority/default/normal clients. +// +RUN_PROGRAM -1 setcap ussdtestclient.exe FFFFFFFE -SID 11111111 ussdtestclient_priority.exe +RUN_PROGRAM -1 setcap ussdtestclient.exe FFFFFFFE -SID 55555555 ussdtestclient_normal.exe +RUN_PROGRAM -1 setcap ussdtestclient.exe FFFFFFFE -SID 22222222 ussdtestclient_default.exe -START_TESTCASE BA-CTSY-USSDM-URM-0002c -//!@SYMTestCaseID BA-CTSY-USSDM-URM-0002c -//!@SYMComponent telephony_ctsy -//!@SYMTestCaseDesc Test cancelling of ReceiveMessage with multiple interested clients. -//!@SYMTestPriority High -//!@SYMTestActions Two clients present, first client calls Cancel AFTER accepting dialogue. -//!@SYMTestExpectedResults Pass -//!@SYMTestType CT -RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessage0002cL -END_TESTCASE BA-CTSY-USSDM-URM-0002c - -START_TESTCASE BA-CTSY-USSDM-URM-0002d -//!@SYMTestCaseID BA-CTSY-USSDM-URM-0002d -//!@SYMComponent telephony_ctsy -//!@SYMTestCaseDesc Test cancelling of ReceiveMessage with multiple interested clients. -//!@SYMTestPriority High -//!@SYMTestActions Two clients present, second client calls Cancel. -//!@SYMTestExpectedResults Pass -//!@SYMTestType CT -RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessage0002dL -END_TESTCASE BA-CTSY-USSDM-URM-0002d - -START_TESTCASE BA-CTSY-USSDM-URM-0002e -//!@SYMTestCaseID BA-CTSY-USSDM-URM-0002e -//!@SYMComponent telephony_ctsy -//!@SYMTestCaseDesc Test cancelling of ReceiveMessage with multiple interested clients. -//!@SYMTestPriority High -//!@SYMTestActions Two clients present, second client calls Close(). -//!@SYMTestExpectedResults Pass -//!@SYMTestType CT -RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessage0002eL -END_TESTCASE BA-CTSY-USSDM-URM-0002e - -START_TESTCASE BA-CTSY-USSDM-URM-0002f -//!@SYMTestCaseID BA-CTSY-USSDM-URM-0002f -//!@SYMComponent telephony_ctsy -//!@SYMTestCaseDesc Test cancelling of ReceiveMessage with multiple interested clients. -//!@SYMTestPriority High -//!@SYMTestActions Cancel one of the clients in the middle of a delivery. -//!@SYMTestExpectedResults Pass -//!@SYMTestType CT -RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessage0002fL -END_TESTCASE BA-CTSY-USSDM-URM-0002f - -START_TESTCASE BA-CTSY-USSDM-URM-0002g -//!@SYMTestCaseID BA-CTSY-USSDM-URM-0002g -//!@SYMComponent telephony_ctsy -//!@SYMTestCaseDesc Test cancelling of ReceiveMessage with multiple interested clients. -//!@SYMTestPriority High -//!@SYMTestActions Have two clients. Request offered to 1st. 1st client cancels. 2nd client should now be offered request. -//!@SYMTestExpectedResults Pass -//!@SYMTestType CT -RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessage0002gL -END_TESTCASE BA-CTSY-USSDM-URM-0002g - -START_TESTCASE BA-CTSY-USSDM-URM-0002h -//!@SYMTestCaseID BA-CTSY-USSDM-URM-0002h -//!@SYMComponent telephony_ctsy -//!@SYMTestCaseDesc Test cancelling of ReceiveMessage with multiple interested clients. -//!@SYMTestPriority High -//!@SYMTestActions Have two clients. Request offered to 1st. 1st client cancels. 2nd client should now be offered request. -//!@SYMTestExpectedResults Pass -//!@SYMTestType CT -RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessage0002hL -END_TESTCASE BA-CTSY-USSDM-URM-0002h - -START_TESTCASE BA-CTSY-USSDM-URM-0003 -//!@SYMTestCaseID BA-CTSY-USSDM-URM-0003 -//!@SYMComponent telephony_ctsy -//!@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::ReceiveMessage with bad parameter data -//!@SYMTestPriority High -//!@SYMTestActions Invokes RMobileUssdMessaging::ReceiveMessage with bad parameter data -//!@SYMTestExpectedResults Pass -//!@SYMTestType CT -RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessage0003L -END_TESTCASE BA-CTSY-USSDM-URM-0003 - -START_TESTCASE BA-CTSY-USSDM-URM-0004 -//!@SYMTestCaseID BA-CTSY-USSDM-URM-0004 -//!@SYMComponent telephony_ctsy -//!@SYMTestCaseDesc Test support in CTSY for multiple client requests to RMobileUssdMessaging::ReceiveMessage -//!@SYMTestPriority High -//!@SYMTestActions Invokes multiple client requests to RMobileUssdMessaging::ReceiveMessage -//!@SYMTestExpectedResults Pass -//!@SYMTestType CT -RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessage0004L -END_TESTCASE BA-CTSY-USSDM-URM-0004 - -START_TESTCASE BA-CTSY-USSDM-URM-0004b -//!@SYMTestCaseID BA-CTSY-USSDM-URM-0004b -//!@SYMComponent telephony_ctsy -//!@SYMTestCaseDesc Test support in CTSY for multiple client requests to RMobileUssdMessaging::ReceiveMessage -//!@SYMTestPriority High -//!@SYMTestActions Invokes multiple client requests to RMobileUssdMessaging::ReceiveMessage -//!@SYMTestExpectedResults Pass -//!@SYMTestType CT -RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessage0004bL -END_TESTCASE BA-CTSY-USSDM-URM-0004b - -START_TESTCASE BA-CTSY-USSDM-URM-0004c -//!@SYMTestCaseID BA-CTSY-USSDM-URM-0004c -//!@SYMComponent telephony_ctsy -//!@SYMTestCaseDesc Test support in CTSY for multiple client requests to RMobileUssdMessaging::ReceiveMessage -//!@SYMTestPriority High -//!@SYMTestActions Invokes multiple client requests to RMobileUssdMessaging::ReceiveMessage -//!@SYMTestExpectedResults Pass -//!@SYMTestType CT -RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessage0004cL -END_TESTCASE BA-CTSY-USSDM-URM-0004c - -START_TESTCASE BA-CTSY-USSDM-URM-0004d -//!@SYMTestCaseID BA-CTSY-USSDM-URM-0004d -//!@SYMComponent telephony_ctsy -//!@SYMTestCaseDesc Test support in CTSY for multiple client requests to RMobileUssdMessaging::ReceiveMessage -//!@SYMTestPriority High -//!@SYMTestActions Invokes multiple client requests to RMobileUssdMessaging::ReceiveMessage -//!@SYMTestExpectedResults Pass -//!@SYMTestType CT -RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessage0004dL -END_TESTCASE BA-CTSY-USSDM-URM-0004d - -START_TESTCASE BA-CTSY-USSDM-URM-0004e -//!@SYMTestCaseID BA-CTSY-USSDM-URM-0004e -//!@SYMComponent telephony_ctsy -//!@SYMTestCaseDesc Test support in CTSY for multiple client requests to RMobileUssdMessaging::ReceiveMessage -//!@SYMTestPriority High -//!@SYMTestActions Invokes multiple client requests to RMobileUssdMessaging::ReceiveMessage -//!@SYMTestExpectedResults Pass -//!@SYMTestType CT -RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessage0004eL -END_TESTCASE BA-CTSY-USSDM-URM-0004e - -START_TESTCASE BA-CTSY-USSDM-URM-0004f -//!@SYMTestCaseID BA-CTSY-USSDM-URM-0004f -//!@SYMComponent telephony_ctsy -//!@SYMTestCaseDesc Test support in CTSY for multiple client requests to RMobileUssdMessaging::ReceiveMessage -//!@SYMTestPriority High -//!@SYMTestActions Invokes multiple client requests to RMobileUssdMessaging::ReceiveMessage -//!@SYMTestExpectedResults Pass -//!@SYMTestType CT -RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessage0004fL -END_TESTCASE BA-CTSY-USSDM-URM-0004f START_TESTCASE BA-CTSY-USSDM-UNNR-0001 //!@SYMTestCaseID BA-CTSY-USSDM-UNNR-0001 //!@SYMComponent telephony_ctsy @@ -301,27 +34,38 @@ RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestNotifyNetworkRelease0001L END_TESTCASE BA-CTSY-USSDM-UNNR-0001 -START_TESTCASE BA-CTSY-USSDM-UNNR-0002 -//!@SYMTestCaseID BA-CTSY-USSDM-UNNR-0002 +START_TESTCASE BA-CTSY-USSDM-UNNR-0001e +//!@SYMTestCaseID BA-CTSY-USSDM-UNNR-0001e //!@SYMComponent telephony_ctsy -//!@SYMTestCaseDesc Test support in CTSY for cancelling of RMobileUssdMessaging::NotifyNetworkRelease +//!@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::NotifyNetworkRelease //!@SYMTestPriority High -//!@SYMTestActions Invokes cancelling of RMobileUssdMessaging::NotifyNetworkRelease +//!@SYMTestActions Invokes RMobileUssdMessaging::NotifyNetworkRelease //!@SYMTestExpectedResults Pass //!@SYMTestType CT -RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestNotifyNetworkRelease0002L -END_TESTCASE BA-CTSY-USSDM-UNNR-0002 +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestNotifyNetworkRelease0001eL +END_TESTCASE BA-CTSY-USSDM-UNNR-0001e -START_TESTCASE BA-CTSY-USSDM-UNNR-0003 -//!@SYMTestCaseID BA-CTSY-USSDM-UNNR-0003 +START_TESTCASE BA-CTSY-USSDM-UNNR-0001c +//!@SYMTestCaseID BA-CTSY-USSDM-UNNR-0001c //!@SYMComponent telephony_ctsy -//!@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::NotifyNetworkRelease with bad parameter data +//!@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::NotifyNetworkRelease //!@SYMTestPriority High -//!@SYMTestActions Invokes RMobileUssdMessaging::NotifyNetworkRelease with bad parameter data +//!@SYMTestActions Invokes RMobileUssdMessaging::NotifyNetworkRelease //!@SYMTestExpectedResults Pass //!@SYMTestType CT -RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestNotifyNetworkRelease0003L -END_TESTCASE BA-CTSY-USSDM-UNNR-0003 +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestNotifyNetworkRelease0001cL +END_TESTCASE BA-CTSY-USSDM-UNNR-0001c + +START_TESTCASE BA-CTSY-USSDM-UNNR-0001d +//!@SYMTestCaseID BA-CTSY-USSDM-UNNR-0001d +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::NotifyNetworkRelease before accepting a dialogue +//!@SYMTestPriority High +//!@SYMTestActions Invokes RMobileUssdMessaging::NotifyNetworkRelease +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestNotifyNetworkRelease0001dL +END_TESTCASE BA-CTSY-USSDM-UNNR-0001d START_TESTCASE BA-CTSY-USSDM-UNNR-0004 //!@SYMTestCaseID BA-CTSY-USSDM-UNNR-0004 @@ -334,78 +78,16 @@ RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestNotifyNetworkRelease0004L END_TESTCASE BA-CTSY-USSDM-UNNR-0004 -START_TESTCASE BA-CTSY-USSDM-USMNFC-0001 -//!@SYMTestCaseID BA-CTSY-USSDM-USMNFC-0001 -//!@SYMComponent telephony_ctsy -//!@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::SendMessageNoFdnCheck -//!@SYMTestPriority High -//!@SYMTestActions Invokes RMobileUssdMessaging::SendMessageNoFdnCheck -//!@SYMTestExpectedResults Pass -//!@SYMTestType CT -RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestSendMessageNoFdnCheck0001L -END_TESTCASE BA-CTSY-USSDM-USMNFC-0001 - -START_TESTCASE BA-CTSY-USSDM-USMNFC-0002 -//!@SYMTestCaseID BA-CTSY-USSDM-USMNFC-0002 +START_TESTCASE BA-CTSY-USSDM-UNNR-0004b +//!@SYMTestCaseID BA-CTSY-USSDM-UNNR-0004b //!@SYMComponent telephony_ctsy -//!@SYMTestCaseDesc Test support in CTSY for cancelling of RMobileUssdMessaging::SendMessageNoFdnCheck +//!@SYMTestCaseDesc Test support in CTSY for multiple client requests to RMobileUssdMessaging::NotifyNetworkRelease //!@SYMTestPriority High -//!@SYMTestActions Invokes cancelling of RMobileUssdMessaging::SendMessageNoFdnCheck -//!@SYMTestExpectedResults Pass -//!@SYMTestType CT -RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestSendMessageNoFdnCheck0002L -END_TESTCASE BA-CTSY-USSDM-USMNFC-0002 - -START_TESTCASE BA-CTSY-USSDM-USMNFC-0003 -//!@SYMTestCaseID BA-CTSY-USSDM-USMNFC-0003 -//!@SYMComponent telephony_ctsy -//!@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::SendMessageNoFdnCheck with bad parameter data -//!@SYMTestPriority High -//!@SYMTestActions Invokes RMobileUssdMessaging::SendMessageNoFdnCheck with bad parameter data +//!@SYMTestActions Invokes multiple client requests to RMobileUssdMessaging::NotifyNetworkRelease //!@SYMTestExpectedResults Pass //!@SYMTestType CT -RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestSendMessageNoFdnCheck0003L -END_TESTCASE BA-CTSY-USSDM-USMNFC-0003 - -START_TESTCASE BA-CTSY-USSDM-USMNFC-0004 -//!@SYMTestCaseID BA-CTSY-USSDM-USMNFC-0004 -//!@SYMComponent telephony_ctsy -//!@SYMTestCaseDesc Test support in CTSY for multiple client requests to RMobileUssdMessaging::SendMessageNoFdnCheck -//!@SYMTestPriority High -//!@SYMTestActions Invokes multiple client requests to RMobileUssdMessaging::SendMessageNoFdnCheck -//!@SYMTestExpectedResults Pass -//!@SYMTestType CT -RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestSendMessageNoFdnCheck0004L -END_TESTCASE BA-CTSY-USSDM-USMNFC-0004 - -START_TESTCASE BA-CTSY-USSDM-UGC-0001 -//!@SYMTestCaseID BA-CTSY-USSDM-UGC-0001 -//!@SYMComponent telephony_ctsy -//!@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::GetCaps -//!@SYMTestPriority High -//!@SYMTestActions Invokes RMobileUssdMessaging::GetCaps -//!@SYMTestExpectedResults Pass -//!@SYMTestType CT -RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestGetCaps0001L -END_TESTCASE BA-CTSY-USSDM-UGC-0001 - -START_TESTCASE BA-CTSY-USSDM-UGC-0003 -//!@SYMTestCaseID BA-CTSY-USSDM-UGC-0003 -//!@SYMComponent telephony_ctsy -//!@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::GetCaps with bad parameter data -//!@SYMTestPriority High -//!@SYMTestActions Invokes RMobileUssdMessaging::GetCaps with bad parameter data -//!@SYMTestExpectedResults Pass -//!@SYMTestType CT -RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestGetCaps0003L -END_TESTCASE BA-CTSY-USSDM-UGC-0003 - -// The USSD test client is copied into new executables with differing SIDs to differentiate -// between a priority/default/normal clients. -// -RUN_PROGRAM -1 setcap ussdtestclient.exe FFFFFFFE -SID 11111111 ussdtestclient_priority.exe -RUN_PROGRAM -1 setcap ussdtestclient.exe FFFFFFFE -SID 55555555 ussdtestclient_normal.exe -RUN_PROGRAM -1 setcap ussdtestclient.exe FFFFFFFE -SID 22222222 ussdtestclient_default.exe +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestNotifyNetworkRelease0004bL +END_TESTCASE BA-CTSY-USSDM-UNNR-0004b START_TESTCASE BA-CTSY-USSDM-URM-0005 //!@SYMTestCaseID BA-CTSY-USSDM-URM-0005 @@ -568,6 +250,41 @@ RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessageWithTestClient0016L END_TESTCASE BA-CTSY-USSDM-URM-0020 +START_TESTCASE BA-CTSY-USSDM-URM-0021 +//!@SYMTestCaseID BA-CTSY-USSDM-URM-0021 +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test ReceiveMessage with multiple clients. +//!@SYMTestPriority High +//!@SYMTestActions Two clients, both call ReceiveMessage. +// A message is received. First client offered message. Both clients call Close. +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessageWithTestClient0017L +END_TESTCASE BA-CTSY-USSDM-URM-0021 + +START_TESTCASE BA-CTSY-USSDM-UGC-0001 +//!@SYMTestCaseID BA-CTSY-USSDM-UGC-0001 +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::GetCaps +//!@SYMTestPriority High +//!@SYMTestActions Invokes RMobileUssdMessaging::GetCaps +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestGetCaps0001L +END_TESTCASE BA-CTSY-USSDM-UGC-0001 + +START_TESTCASE BA-CTSY-USSDM-UGC-0003 +//!@SYMTestCaseID BA-CTSY-USSDM-UGC-0003 +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::GetCaps with bad parameter data +//!@SYMTestPriority High +//!@SYMTestActions Invokes RMobileUssdMessaging::GetCaps with bad parameter data +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestGetCaps0003L +END_TESTCASE BA-CTSY-USSDM-UGC-0003 + +START_TESTCASE BA-CTSY-USSDM-UARM-0001 //!@SYMComponent telephony_ctsy //!@SYMTestCaseDesc Test calling accept and reject before a session has been created //!@SYMTestPriority High @@ -598,3 +315,457 @@ //!@SYMTestType CT RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestMultipleIncomingUssdMessages0001L END_TESTCASE BA-CTSY-USSDM-MIUM-0001 + +START_TESTCASE BA-CTSY-USSDM-USMNFC-0001 +//!@SYMTestCaseID BA-CTSY-USSDM-USMNFC-0001 +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::SendMessageNoFdnCheck +//!@SYMTestPriority High +//!@SYMTestActions Invokes RMobileUssdMessaging::SendMessageNoFdnCheck +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestSendMessageNoFdnCheck0001L +END_TESTCASE BA-CTSY-USSDM-USMNFC-0001 + +START_TESTCASE BA-CTSY-USSDM-USMNFC-0002 +//!@SYMTestCaseID BA-CTSY-USSDM-USMNFC-0002 +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for cancelling of RMobileUssdMessaging::SendMessageNoFdnCheck +//!@SYMTestPriority High +//!@SYMTestActions Invokes cancelling of RMobileUssdMessaging::SendMessageNoFdnCheck +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestSendMessageNoFdnCheck0002L +END_TESTCASE BA-CTSY-USSDM-USMNFC-0002 + +START_TESTCASE BA-CTSY-USSDM-USMNFC-0003 +//!@SYMTestCaseID BA-CTSY-USSDM-USMNFC-0003 +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::SendMessageNoFdnCheck with bad parameter data +//!@SYMTestPriority High +//!@SYMTestActions Invokes RMobileUssdMessaging::SendMessageNoFdnCheck with bad parameter data +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestSendMessageNoFdnCheck0003L +END_TESTCASE BA-CTSY-USSDM-USMNFC-0003 + +START_TESTCASE BA-CTSY-USSDM-USMNFC-0004 +//!@SYMTestCaseID BA-CTSY-USSDM-USMNFC-0004 +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for multiple client requests to RMobileUssdMessaging::SendMessageNoFdnCheck +//!@SYMTestPriority High +//!@SYMTestActions Invokes multiple client requests to RMobileUssdMessaging::SendMessageNoFdnCheck +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestSendMessageNoFdnCheck0004L +END_TESTCASE BA-CTSY-USSDM-USMNFC-0004 + +START_TESTCASE BA-CTSY-USSDM-USM-0001 +//!@SYMTestCaseID BA-CTSY-USSDM-USM-0001 +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::SendMessage +//!@SYMTestPriority High +//!@SYMTestActions Invokes RMobileUssdMessaging::SendMessage +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestSendMessage0001L +END_TESTCASE BA-CTSY-USSDM-USM-0001 + +START_TESTCASE BA-CTSY-USSDM-USM-0002 +//!@SYMTestCaseID BA-CTSY-USSDM-USM-0002 +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for cancelling of RMobileUssdMessaging::SendMessage +//!@SYMTestPriority High +//!@SYMTestActions Invokes cancelling of RMobileUssdMessaging::SendMessage +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestSendMessage0002L +END_TESTCASE BA-CTSY-USSDM-USM-0002 + +START_TESTCASE BA-CTSY-USSDM-USM-0003 +//!@SYMTestCaseID BA-CTSY-USSDM-USM-0003 +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::SendMessage with bad parameter data +//!@SYMTestPriority High +//!@SYMTestActions Invokes RMobileUssdMessaging::SendMessage with bad parameter data +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestSendMessage0003L +END_TESTCASE BA-CTSY-USSDM-USM-0003 + +START_TESTCASE BA-CTSY-USSDM-USM-0004 +//!@SYMTestCaseID BA-CTSY-USSDM-USM-0004 +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for multiple client requests to RMobileUssdMessaging::SendMessage +//!@SYMTestPriority High +//!@SYMTestActions Invokes multiple client requests to RMobileUssdMessaging::SendMessage +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestSendMessage0004L +END_TESTCASE BA-CTSY-USSDM-USM-0004 + +START_TESTCASE BA-CTSY-USSDM-USM-0005 +//!@SYMTestCaseID BA-CTSY-USSDM-USM-0005 +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::SendMessage +//!@SYMTestPriority High +//!@SYMTestActions Invokes RMobileUssdMessaging::SendMessage +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestSendMessage0005L +END_TESTCASE BA-CTSY-USSDM-USM-0005 + +START_TESTCASE BA-CTSY-USSDM-USM-0006 +//!@SYMTestCaseID BA-CTSY-USSDM-USM-0006 +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::SendMessage DefaultHandler +//!@SYMTestPriority High +//!@SYMTestActions Invokes RMobileUssdMessaging::SendMessage DefaultHandler +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestSendMessage0006L +END_TESTCASE BA-CTSY-USSDM-USM-0006 + +START_TESTCASE BA-CTSY-USSDM-USR-0001 +//!@SYMTestCaseID BA-CTSY-USSDM-USR-0001 +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::SendRelease +//!@SYMTestPriority High +//!@SYMTestActions Invokes RMobileUssdMessaging::SendRelease +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestSendRelease0001L +END_TESTCASE BA-CTSY-USSDM-USR-0001 + +START_TESTCASE BA-CTSY-USSDM-USR-0001b +//!@SYMTestCaseID BA-CTSY-USSDM-USR-0001b +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::SendRelease +//!@SYMTestPriority High +//!@SYMTestActions Invokes RMobileUssdMessaging::SendRelease +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestSendRelease0001bL +END_TESTCASE BA-CTSY-USSDM-USR-0001b + +START_TESTCASE BA-CTSY-USSDM-USR-0001c +//!@SYMTestCaseID BA-CTSY-USSDM-USR-0001c +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::SendRelease without USSD session in progress +//!@SYMTestPriority High +//!@SYMTestActions Invokes RMobileUssdMessaging::SendRelease +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestSendRelease0001cL +END_TESTCASE BA-CTSY-USSDM-USR-0001c + +START_TESTCASE BA-CTSY-USSDM-USR-0001d +//!@SYMTestCaseID BA-CTSY-USSDM-USR-0001d +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for failure on completion of pending comRMobileUssdMessaging::SendRelease request from LTSY->CTSY +//!@SYMTestPriority High +//!@SYMTestActions Invokes RMobileUssdMessaging::SendRelease +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestSendRelease0001dL +END_TESTCASE BA-CTSY-USSDM-USR-0001d + +START_TESTCASE BA-CTSY-USSDM-USR-0002 +//!@SYMTestCaseID BA-CTSY-USSDM-USR-0002 +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for cancelling of RMobileUssdMessaging::SendRelease +//!@SYMTestPriority High +//!@SYMTestActions Invokes cancelling of RMobileUssdMessaging::SendRelease +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestSendRelease0002L +END_TESTCASE BA-CTSY-USSDM-USR-0002 + +START_TESTCASE BA-CTSY-USSDM-USR-0002b +//!@SYMTestCaseID BA-CTSY-USSDM-USR-0002b +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for cancelling of RMobileUssdMessaging::SendRelease +//!@SYMTestPriority High +//!@SYMTestActions Invokes cancelling of RMobileUssdMessaging::SendRelease +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestSendRelease0002bL +END_TESTCASE BA-CTSY-USSDM-USR-0002b + +START_TESTCASE BA-CTSY-USSDM-USR-0003 +//!@SYMTestCaseID BA-CTSY-USSDM-USR-0003 +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::SendRelease with bad parameter data +//!@SYMTestPriority High +//!@SYMTestActions Invokes RMobileUssdMessaging::SendRelease with bad parameter data +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestSendRelease0003L +END_TESTCASE BA-CTSY-USSDM-USR-0003 + +START_TESTCASE BA-CTSY-USSDM-USR-0004 +//!@SYMTestCaseID BA-CTSY-USSDM-USR-0004 +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for multiple client requests to RMobileUssdMessaging::SendRelease +//!@SYMTestPriority High +//!@SYMTestActions Invokes multiple client requests to RMobileUssdMessaging::SendRelease +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestSendRelease0004L +END_TESTCASE BA-CTSY-USSDM-USR-0004 + +START_TESTCASE BA-CTSY-USSDM-USR-0004b +//!@SYMTestCaseID BA-CTSY-USSDM-USR-0004b +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for multiple client requests to RMobileUssdMessaging::SendRelease +//!@SYMTestPriority High +//!@SYMTestActions Invokes multiple client requests to RMobileUssdMessaging::SendRelease +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestSendRelease0004bL +END_TESTCASE BA-CTSY-USSDM-USR-0004b + +START_TESTCASE BA-CTSY-USSDM-USR-0005 +//!@SYMTestCaseID BA-CTSY-USSDM-USR-0005 +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc est support in CTSY for RMobileUssdMessaging::SendRelease with timeout +//!@SYMTestPriority High +//!@SYMTestActions Invokes RMobileUssdMessaging::SendRelease and tests for timeout +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestSendRelease0005L +END_TESTCASE BA-CTSY-USSDM-USR-0005 + +START_TESTCASE BA-CTSY-USSDM-UNNR-0001 +//!@SYMTestCaseID BA-CTSY-USSDM-UNNR-0001 +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::NotifyNetworkRelease +//!@SYMTestPriority High +//!@SYMTestActions Invokes RMobileUssdMessaging::NotifyNetworkRelease +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestNotifyNetworkRelease0001L +END_TESTCASE BA-CTSY-USSDM-UNNR-0001 + +START_TESTCASE BA-CTSY-USSDM-UNNR-0001b +//!@SYMTestCaseID BA-CTSY-USSDM-UNNR-0001b +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::NotifyNetworkRelease with optional paramter +//!@SYMTestPriority High +//!@SYMTestActions Invokes RMobileUssdMessaging::NotifyNetworkRelease +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestNotifyNetworkRelease0001bL +END_TESTCASE BA-CTSY-USSDM-UNNR-0001b + +START_TESTCASE BA-CTSY-USSDM-UNNR-0002 +//!@SYMTestCaseID BA-CTSY-USSDM-UNNR-0002 +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for cancelling of RMobileUssdMessaging::NotifyNetworkRelease +//!@SYMTestPriority High +//!@SYMTestActions Invokes cancelling of RMobileUssdMessaging::NotifyNetworkRelease +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestNotifyNetworkRelease0002L +END_TESTCASE BA-CTSY-USSDM-UNNR-0002 + +START_TESTCASE BA-CTSY-USSDM-UNNR-0003 +//!@SYMTestCaseID BA-CTSY-USSDM-UNNR-0003 +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::NotifyNetworkRelease with bad parameter data +//!@SYMTestPriority High +//!@SYMTestActions Invokes RMobileUssdMessaging::NotifyNetworkRelease with bad parameter data +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestNotifyNetworkRelease0003L +END_TESTCASE BA-CTSY-USSDM-UNNR-0003 + +START_TESTCASE BA-CTSY-USSDM-URM-0001 +//!@SYMTestCaseID BA-CTSY-USSDM-URM-0001 +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::ReceiveMessage +//!@SYMTestPriority High +//!@SYMTestActions Invokes RMobileUssdMessaging::ReceiveMessage +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessage0001L +END_TESTCASE BA-CTSY-USSDM-URM-0001 + +START_TESTCASE BA-CTSY-USSDM-URM-0002 +//!@SYMTestCaseID BA-CTSY-USSDM-URM-0002 +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for cancelling of RMobileUssdMessaging::ReceiveMessage +//!@SYMTestPriority High +//!@SYMTestActions Invokes cancelling of RMobileUssdMessaging::ReceiveMessage (including via calling Close). +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessage0002L +END_TESTCASE BA-CTSY-USSDM-URM-0002 + +START_TESTCASE BA-CTSY-USSDM-URM-0002b +//!@SYMTestCaseID BA-CTSY-USSDM-URM-0002b +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test cancelling of ReceiveMessage with multiple interested clients. +//!@SYMTestPriority High +//!@SYMTestActions Two clients present, first client calls Cancel before message received. +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessage0002bL +END_TESTCASE BA-CTSY-USSDM-URM-0002b + +START_TESTCASE BA-CTSY-USSDM-URM-0002c +//!@SYMTestCaseID BA-CTSY-USSDM-URM-0002c +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test cancelling of ReceiveMessage with multiple interested clients. +//!@SYMTestPriority High +//!@SYMTestActions Two clients present, first client calls Cancel AFTER accepting dialogue. +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessage0002cL +END_TESTCASE BA-CTSY-USSDM-URM-0002c + +START_TESTCASE BA-CTSY-USSDM-URM-0002d +//!@SYMTestCaseID BA-CTSY-USSDM-URM-0002d +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test cancelling of ReceiveMessage with multiple interested clients. +//!@SYMTestPriority High +//!@SYMTestActions Two clients present, second client calls Cancel. +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessage0002dL +END_TESTCASE BA-CTSY-USSDM-URM-0002d + +START_TESTCASE BA-CTSY-USSDM-URM-0002e +//!@SYMTestCaseID BA-CTSY-USSDM-URM-0002e +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test cancelling of ReceiveMessage with multiple interested clients. +//!@SYMTestPriority High +//!@SYMTestActions Two clients present, second client calls Close(). +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessage0002eL +END_TESTCASE BA-CTSY-USSDM-URM-0002e + +START_TESTCASE BA-CTSY-USSDM-URM-0002f +//!@SYMTestCaseID BA-CTSY-USSDM-URM-0002f +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test cancelling of ReceiveMessage with multiple interested clients. +//!@SYMTestPriority High +//!@SYMTestActions Cancel one of the clients in the middle of a delivery. +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessage0002fL +END_TESTCASE BA-CTSY-USSDM-URM-0002f + +START_TESTCASE BA-CTSY-USSDM-URM-0002g +//!@SYMTestCaseID BA-CTSY-USSDM-URM-0002g +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test cancelling of ReceiveMessage with multiple interested clients. +//!@SYMTestPriority High +//!@SYMTestActions Have two clients. Request offered to 1st. 1st client cancels. 2nd client should now be offered request. +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessage0002gL +END_TESTCASE BA-CTSY-USSDM-URM-0002g + +START_TESTCASE BA-CTSY-USSDM-URM-0002h +//!@SYMTestCaseID BA-CTSY-USSDM-URM-0002h +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test cancelling of ReceiveMessage with multiple interested clients. +//!@SYMTestPriority High +//!@SYMTestActions Have two clients. Request offered to 1st. 1st client cancels. 2nd client should now be offered request. +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessage0002hL +END_TESTCASE BA-CTSY-USSDM-URM-0002h + +START_TESTCASE BA-CTSY-USSDM-URM-0002i +//!@SYMTestCaseID BA-CTSY-USSDM-URM-0002i +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support of RMobileUssdMessaging::ReceiveMessage for consecutive reception of two USSD dialogues/messages by two different clients. +//!@SYMTestPriority High +//!@SYMTestActions Two clients present, first client calls Cancel before message received. +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessage0002iL +END_TESTCASE BA-CTSY-USSDM-URM-0002i + +START_TESTCASE BA-CTSY-USSDM-URM-0003 +//!@SYMTestCaseID BA-CTSY-USSDM-URM-0003 +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::ReceiveMessage with bad parameter data +//!@SYMTestPriority High +//!@SYMTestActions Invokes RMobileUssdMessaging::ReceiveMessage with bad parameter data +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessage0003L +END_TESTCASE BA-CTSY-USSDM-URM-0003 + +START_TESTCASE BA-CTSY-USSDM-URM-0004 +//!@SYMTestCaseID BA-CTSY-USSDM-URM-0004 +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for multiple client requests to RMobileUssdMessaging::ReceiveMessage +//!@SYMTestPriority High +//!@SYMTestActions Invokes multiple client requests to RMobileUssdMessaging::ReceiveMessage +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessage0004L +END_TESTCASE BA-CTSY-USSDM-URM-0004 + +START_TESTCASE BA-CTSY-USSDM-URM-0004b +//!@SYMTestCaseID BA-CTSY-USSDM-URM-0004b +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for multiple client requests to RMobileUssdMessaging::ReceiveMessage +//!@SYMTestPriority High +//!@SYMTestActions Invokes multiple client requests to RMobileUssdMessaging::ReceiveMessage +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessage0004bL +END_TESTCASE BA-CTSY-USSDM-URM-0004b + +START_TESTCASE BA-CTSY-USSDM-URM-0004c +//!@SYMTestCaseID BA-CTSY-USSDM-URM-0004c +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for multiple client requests to RMobileUssdMessaging::ReceiveMessage +//!@SYMTestPriority High +//!@SYMTestActions Invokes multiple client requests to RMobileUssdMessaging::ReceiveMessage +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessage0004cL +END_TESTCASE BA-CTSY-USSDM-URM-0004c + +START_TESTCASE BA-CTSY-USSDM-URM-0004d +//!@SYMTestCaseID BA-CTSY-USSDM-URM-0004d +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for multiple client requests to RMobileUssdMessaging::ReceiveMessage +//!@SYMTestPriority High +//!@SYMTestActions Invokes multiple client requests to RMobileUssdMessaging::ReceiveMessage +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessage0004dL +END_TESTCASE BA-CTSY-USSDM-URM-0004d + +START_TESTCASE BA-CTSY-USSDM-URM-0004e +//!@SYMTestCaseID BA-CTSY-USSDM-URM-0004e +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for multiple client requests to RMobileUssdMessaging::ReceiveMessage +//!@SYMTestPriority High +//!@SYMTestActions Invokes multiple client requests to RMobileUssdMessaging::ReceiveMessage +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessage0004eL +END_TESTCASE BA-CTSY-USSDM-URM-0004e + +START_TESTCASE BA-CTSY-USSDM-URM-0004f +//!@SYMTestCaseID BA-CTSY-USSDM-URM-0004f +//!@SYMComponent telephony_ctsy +//!@SYMTestCaseDesc Test support in CTSY for multiple client requests to RMobileUssdMessaging::ReceiveMessage +//!@SYMTestPriority High +//!@SYMTestActions Invokes multiple client requests to RMobileUssdMessaging::ReceiveMessage +//!@SYMTestExpectedResults Pass +//!@SYMTestType CT +RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyUssdMessagingFU.TestReceiveMessage0004fL +END_TESTCASE BA-CTSY-USSDM-URM-0004f + + + diff -r 6fbc08ed9c42 -r 930a53cdc2d3 telephonyserverplugins/common_tsy/test/component/src/cctsyussdmessagingfu.cpp --- a/telephonyserverplugins/common_tsy/test/component/src/cctsyussdmessagingfu.cpp Fri Jun 04 13:03:15 2010 +0100 +++ b/telephonyserverplugins/common_tsy/test/component/src/cctsyussdmessagingfu.cpp Thu Oct 07 19:32:01 2010 +0300 @@ -32,17 +32,21 @@ CTestSuite* CCTsyUssdMessagingFU::CreateSuiteL(const TDesC& aName) { SUB_SUITE; - ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestSendMessage0001L); ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestSendMessage0002L); ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestSendMessage0003L); ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestSendMessage0004L); ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestSendMessage0005L); + ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestSendMessage0006L); ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestSendRelease0001L); ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestSendRelease0001bL); + ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestSendRelease0001cL); + ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestSendRelease0001dL); ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestSendRelease0002L); + ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestSendRelease0002bL); ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestSendRelease0003L); ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestSendRelease0004L); + ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestSendRelease0004bL); ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestSendRelease0005L); ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestReceiveMessage0001L); ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestReceiveMessage0002L); @@ -53,17 +57,23 @@ ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestReceiveMessage0002fL); ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestReceiveMessage0002gL); ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestReceiveMessage0002hL); + ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestReceiveMessage0002iL); ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestReceiveMessage0003L); ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestReceiveMessage0004L); - ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestReceiveMessage0004bL); + ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestReceiveMessage0004bL); ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestReceiveMessage0004cL); ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestReceiveMessage0004dL); ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestReceiveMessage0004eL); ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestReceiveMessage0004fL); ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestNotifyNetworkRelease0001L); + ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestNotifyNetworkRelease0001eL); + ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestNotifyNetworkRelease0001bL); + ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestNotifyNetworkRelease0001cL); + ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestNotifyNetworkRelease0001dL); ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestNotifyNetworkRelease0002L); ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestNotifyNetworkRelease0003L); ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestNotifyNetworkRelease0004L); + ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestNotifyNetworkRelease0004bL); ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestSendMessageNoFdnCheck0001L); ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestSendMessageNoFdnCheck0002L); ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestSendMessageNoFdnCheck0003L); @@ -89,8 +99,8 @@ ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestAcceptRejectMisuse0001L); ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestAcceptRejectMisuse0002L); ADD_TEST_STEP_ISO_CPP(CCTsyUssdMessagingFU, TestMultipleIncomingUssdMessages0001L); - END_SUITE; + } @@ -230,7 +240,6 @@ } - /** @SYMTestCaseID BA-CTSY-USSDM-USM-0002 @SYMComponent telephony_ctsy @@ -443,12 +452,42 @@ TMockLtsyData2 mockData2(name1, attributes1); + mockData2.SerialiseL(data); + + RBuf8 data3; + CleanupClosePushL(data3); + + RMobileUssdMessaging::TMobileUssdAttributesV1 attributes; + TPckg msgAttributes(attributes); + + RMobileUssdMessaging::TGsmUssdMessageData name; + + //------------------------------------------------------------------------- + + RMobileUssdMessaging::TMobileUssdAttributesV1 completeAttributes; + + completeAttributes.iFlags = flags; + completeAttributes.iFormat = format; + completeAttributes.iType = type; + completeAttributes.iDcs = dcs; + + TBuf8 completeName = _L8("Name1"); + + TMockLtsyData2, RMobileUssdMessaging::TMobileUssdAttributesV1> + mockData3(completeName, completeAttributes); + mockData3.SerialiseL(data3); //------------------------------------------------------------------------- // Test A: Test multiple clients requesting RMobileUssdMessaging::SendMessage //------------------------------------------------------------------------- - - mockData2.SerialiseL(data); + iMockLTSY.CompleteL(EMobileUssdMessagingReceiveMessage, KErrNone, data3); + + ussdMessaging1.ReceiveMessage(requestStatus1, name, msgAttributes); + User::WaitForRequest(requestStatus1); + ret = requestStatus1.Int(); + ASSERT_EQUALS(KErrNone, ret); + ussdMessaging1.AcceptIncomingDialogue(); + iMockLTSY.ExpectL(EMobileUssdMessagingSendMessage, data); iMockLTSY.CompleteL(EMobileUssdMessagingSendMessage, KErrNone, 10); ussdMessaging1.SendMessage(requestStatus1, msgData1, msgAttributes1); @@ -462,8 +501,8 @@ AssertMockLtsyStatusL(); ASSERT_EQUALS(KErrServerBusy, requestStatus2.Int()); - CleanupStack::PopAndDestroy(6, this); // phone2, telServer2, data, this, - // ussdMessaging1, ussdMessaging2 + CleanupStack::PopAndDestroy(7, this); // phone2, telServer2, data, this, + // ussdMessaging1, ussdMessaging2, data3 } @@ -536,17 +575,16 @@ } - /** -@SYMTestCaseID BA-CTSY-USSDM-USR-0001 +@SYMTestCaseID BA-CTSY-USSDM-USM-0006 @SYMComponent telephony_ctsy -@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::SendRelease +@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::SendMessage DefaultHandler @SYMTestPriority High -@SYMTestActions Invokes RMobileUssdMessaging::SendRelease +@SYMTestActions Invokes RMobileUssdMessaging::SendMessage DefaultHandler @SYMTestExpectedResults Pass @SYMTestType CT */ -void CCTsyUssdMessagingFU::TestSendRelease0001L() +void CCTsyUssdMessagingFU::TestSendMessage0006L() { OpenEtelServerL(EUseExtendedError); @@ -561,46 +599,214 @@ ASSERT_EQUALS(KErrNone, ret); CleanupClosePushL(ussdMessaging); + TRequestStatus requestStatus; + + TUint32 flags = 100; + RMobileUssdMessaging::TMobileUssdDataFormat format = RMobileUssdMessaging::EFormatUnspecified; + RMobileUssdMessaging::TMobileUssdMessageType type = RMobileUssdMessaging::EUssdMORequest; + TUint8 dcs = 200; + + //------------------------------------------------------------------------- + // function parameters + + RMobileUssdMessaging::TMobileUssdAttributesV1 attributes; + TPckg msgAttributes(attributes); + + attributes.iFlags = flags; + attributes.iFormat = format; + attributes.iType = type; + attributes.iDcs = dcs; + + TName name = _L("Name1"); + TPckg msgData(name); + + //------------------------------------------------------------------------- + + TMockLtsyData2 + mockData2(name, attributes); + mockData2.SerialiseL(data); + + //------------------------------------------------------------------------- + // TEST A: failure to dispatch request to LTSY + //------------------------------------------------------------------------- + + + iMockLTSY.ExpectL(EMobileUssdMessagingSendMessageDefaultHandler, data, KErrNotSupported); + + ussdMessaging.SendMessage(requestStatus, msgData, msgAttributes, RMobileUssdMessaging::ETransferToDefaultHandler); + + User::WaitForRequest(requestStatus); + AssertMockLtsyStatusL(); + ASSERT_EQUALS(KErrNotSupported, requestStatus.Int()); + + //------------------------------------------------------------------------- + // TEST B: failure on completion of pending request from LTSY->CTSY + //------------------------------------------------------------------------- + + iMockLTSY.ExpectL(EMobileUssdMessagingSendMessageDefaultHandler, data); + iMockLTSY.CompleteL(EMobileUssdMessagingSendMessageDefaultHandler, KErrGeneral); + + ussdMessaging.SendMessage(requestStatus, msgData, msgAttributes, RMobileUssdMessaging::ETransferToDefaultHandler); + + User::WaitForRequest(requestStatus); + AssertMockLtsyStatusL(); + ASSERT_EQUALS(KErrGeneral, requestStatus.Int()); + + //------------------------------------------------------------------------- + // TEST C: Successful completion request of + // RMobileUssdMessaging::SendMessage when result is not cached. + //------------------------------------------------------------------------- + + iMockLTSY.ExpectL(EMobileUssdMessagingSendMessageDefaultHandler, data); + iMockLTSY.CompleteL(EMobileUssdMessagingSendMessageDefaultHandler, KErrNone); + + ussdMessaging.SendMessage(requestStatus, msgData, msgAttributes, RMobileUssdMessaging::ETransferToDefaultHandler); + + User::WaitForRequest(requestStatus); + AssertMockLtsyStatusL(); + ASSERT_EQUALS(KErrNone, requestStatus.Int()); + + //------------------------------------------------------------------------- + // TEST E: Unsolicited completion of RMobileUssdMessaging::SendMessage + // from LTSY. + //------------------------------------------------------------------------- + TRequestStatus mockLtsyStatus; - TRequestStatus requestStatus; - + + iMockLTSY.NotifyTerminated(mockLtsyStatus); + iMockLTSY.CompleteL(EMobileUssdMessagingSendMessageDefaultHandler, KErrNone); + User::WaitForRequest(mockLtsyStatus); + AssertMockLtsyStatusL(); + ASSERT_EQUALS(KErrNone, mockLtsyStatus.Int()); + + //------------------------------------------------------------------------- + // TEST : to increase CMmUssdTsy::ExtFunc coverage + // covers "if ( ERfsStateInfoInactive == iMmPhone->GetRfStateInfo() && + // ( !IsRequestPossibleInOffline( aIpc ) ) )" condition + //------------------------------------------------------------------------- + + iMockLTSY.NotifyTerminated(mockLtsyStatus); + TRfStateInfo rfInfo = ERfsStateInfoInactive; + TMockLtsyData1 mockData1(rfInfo); + + data.Close(); + mockData1.SerialiseL(data); + + iMockLTSY.CompleteL(EMmTsyBootGetRFStatusIPC, KErrNone, data); + User::WaitForRequest(mockLtsyStatus); + AssertMockLtsyStatusL(); + ASSERT_EQUALS(KErrNone, mockLtsyStatus.Int()); + + ussdMessaging.SendMessage(requestStatus, msgData, msgAttributes); + + User::WaitForRequest(requestStatus); + AssertMockLtsyStatusL(); + ASSERT_EQUALS(KErrGsmOfflineOpNotAllowed, requestStatus.Int()); + + CleanupStack::PopAndDestroy(3, this); // data, this, ussdMessaging + + } + +/** +@SYMTestCaseID BA-CTSY-USSDM-USR-0001 +@SYMComponent telephony_ctsy +@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::SendRelease +@SYMTestPriority High +@SYMTestActions Invokes RMobileUssdMessaging::SendRelease +@SYMTestExpectedResults Pass +@SYMTestType CT +*/ +void CCTsyUssdMessagingFU::TestSendRelease0001L() + { + OpenEtelServerL(EUseExtendedError); + CleanupStack::PushL(TCleanupItem(Cleanup,this)); + OpenPhoneL(); + + RBuf8 data; + CleanupClosePushL(data); + + RMobileUssdMessaging ussdMessaging; + TInt ret = ussdMessaging.Open(iPhone); + ASSERT_EQUALS(KErrNone, ret); + CleanupClosePushL(ussdMessaging); + + //------------------------------------------------------------------------- + // Setup: This block is taken from TestReceiveMessage0001L. All we want to + // do is to initiate a dialogue and then end it. Once the dialogue has ended + // then we can call Accept and Reject. + //------------------------------------------------------------------------- + + TRequestStatus requestStatus; + + TRequestStatus mockLtsyStatus; + + TUint32 flags = 100; + RMobileUssdMessaging::TMobileUssdDataFormat format = RMobileUssdMessaging::EFormatUnspecified; + RMobileUssdMessaging::TMobileUssdMessageType type = RMobileUssdMessaging::EUssdMORequest; + TUint8 dcs = 200; + + //------------------------------------------------------------------------- + // function parameters + + RMobileUssdMessaging::TMobileUssdAttributesV1 attributes; + TPckg msgAttributes(attributes); + + RMobileUssdMessaging::TGsmUssdMessageData name; + + //------------------------------------------------------------------------- + + RMobileUssdMessaging::TMobileUssdAttributesV1 completeAttributes; + + completeAttributes.iFlags = flags; + completeAttributes.iFormat = format; + completeAttributes.iType = type; + completeAttributes.iDcs = dcs; + + TBuf8 completeName = _L8("Name1"); + + TMockLtsyData2, RMobileUssdMessaging::TMobileUssdAttributesV1> + mockData2(completeName, completeAttributes); + mockData2.SerialiseL(data); + + iMockLTSY.CompleteL(EMobileUssdMessagingReceiveMessage, KErrNone, data); + + ussdMessaging.ReceiveMessage(requestStatus, name, msgAttributes); + User::WaitForRequest(requestStatus); + ret = requestStatus.Int(); + ASSERT_EQUALS(KErrNone, ret); + ussdMessaging.AcceptIncomingDialogue(); + + AssertMockLtsyStatusL(); + ASSERT_EQUALS(KErrNone, requestStatus.Int()); + + //------------------------------------------------------------------------- + // Release the dialogue + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- // function parameters RMobilePhone::TMobilePhoneSendSSRequestV3 sendV3; TPckg pckgSendV3(sendV3); - + //------------------------------------------------------------------------- RMobilePhone::TMobilePhoneSendSSRequestV3 completeSendV3; - + TUint8 opCode = 100; _LIT(KAdditionalInfo1, "additionalInfo1"); - + completeSendV3.iOpCode = opCode; completeSendV3.iAdditionalInfo = KAdditionalInfo1; - - TMockLtsyData1< RMobilePhone::TMobilePhoneSendSSRequestV3 > mockData1(completeSendV3); - + + TMockLtsyData1< RMobilePhone::TMobilePhoneSendSSRequestV3 > mockData1(completeSendV3); mockData1.SerialiseL(data); - - //------------------------------------------------------------------------- - // TEST B: failure on completion of pending request from LTSY->CTSY - //------------------------------------------------------------------------- - - iMockLTSY.ExpectL(EMobileUssdMessagingSendRelease); - iMockLTSY.CompleteL(EMobileUssdMessagingSendRelease, KErrGeneral, data); - ussdMessaging.SendRelease(requestStatus, pckgSendV3); - - User::WaitForRequest(requestStatus); - AssertMockLtsyStatusL(); - ASSERT_EQUALS(KErrGeneral, requestStatus.Int()); - + //------------------------------------------------------------------------- // TEST C: Successful completion request of // RMobileUssdMessaging::SendRelease when result is not cached. //------------------------------------------------------------------------- - + iMockLTSY.ExpectL(EMobileUssdMessagingSendRelease); iMockLTSY.CompleteL(EMobileUssdMessagingSendRelease, KErrNone, data); ussdMessaging.SendRelease(requestStatus, pckgSendV3); @@ -608,9 +814,10 @@ User::WaitForRequest(requestStatus); AssertMockLtsyStatusL(); ASSERT_EQUALS(KErrNone, requestStatus.Int()); + ASSERT_EQUALS(opCode, sendV3.iOpCode); - ASSERT_EQUALS(0, completeSendV3.iAdditionalInfo.Compare(sendV3.iAdditionalInfo)); - + ASSERT_EQUALS(0, completeSendV3.iAdditionalInfo.Compare(sendV3.iAdditionalInfo)); + //------------------------------------------------------------------------- // TEST E: Unsolicited completion of RMobileUssdMessaging::SendRelease // from LTSY. @@ -621,9 +828,8 @@ User::WaitForRequest(mockLtsyStatus); AssertMockLtsyStatusL(); ASSERT_EQUALS(KErrNone, mockLtsyStatus.Int()); - - CleanupStack::PopAndDestroy(3, this); // data, this, ussdMessaging - + + CleanupStack::PopAndDestroy(3, this); // data, this, ussdMessaging, dataTest } /** @@ -637,21 +843,70 @@ */ void CCTsyUssdMessagingFU::TestSendRelease0001bL() { - OpenEtelServerL(EUseExtendedError); - CleanupStack::PushL(TCleanupItem(Cleanup,this)); - OpenPhoneL(); - - RBuf8 data; - CleanupClosePushL(data); - - TRequestStatus mockLtsyStatus; - TRequestStatus requestStatus; - - RMobileUssdMessaging ussdMessaging; - TInt ret = ussdMessaging.Open(iPhone); - ASSERT_EQUALS(KErrNone, ret); - CleanupClosePushL(ussdMessaging); - + OpenEtelServerL(EUseExtendedError); + CleanupStack::PushL(TCleanupItem(Cleanup,this)); + OpenPhoneL(); + + RBuf8 data; + CleanupClosePushL(data); + + RMobileUssdMessaging ussdMessaging; + TInt ret = ussdMessaging.Open(iPhone); + ASSERT_EQUALS(KErrNone, ret); + CleanupClosePushL(ussdMessaging); + + //------------------------------------------------------------------------- + // Setup: This block is taken from TestReceiveMessage0001L. All we want to + // do is to initiate a dialogue and then end it. Once the dialogue has ended + // then we can call Accept and Reject. + //------------------------------------------------------------------------- + + TRequestStatus requestStatus; + TRequestStatus mockLtsyStatus; + + TUint32 flags = 100; + RMobileUssdMessaging::TMobileUssdDataFormat format = RMobileUssdMessaging::EFormatUnspecified; + RMobileUssdMessaging::TMobileUssdMessageType type = RMobileUssdMessaging::EUssdMORequest; + TUint8 dcs = 200; + + //------------------------------------------------------------------------- + // function parameters + + RMobileUssdMessaging::TMobileUssdAttributesV1 attributes; + TPckg msgAttributes(attributes); + + RMobileUssdMessaging::TGsmUssdMessageData name; + + //------------------------------------------------------------------------- + + RMobileUssdMessaging::TMobileUssdAttributesV1 completeAttributes; + + completeAttributes.iFlags = flags; + completeAttributes.iFormat = format; + completeAttributes.iType = type; + completeAttributes.iDcs = dcs; + + TBuf8 completeName = _L8("Name1"); + + TMockLtsyData2, RMobileUssdMessaging::TMobileUssdAttributesV1> + mockData2(completeName, completeAttributes); + mockData2.SerialiseL(data); + + iMockLTSY.CompleteL(EMobileUssdMessagingReceiveMessage, KErrNone, data); + + ussdMessaging.ReceiveMessage(requestStatus, name, msgAttributes); + User::WaitForRequest(requestStatus); + ret = requestStatus.Int(); + ASSERT_EQUALS(KErrNone, ret); + ussdMessaging.AcceptIncomingDialogue(); + + AssertMockLtsyStatusL(); + ASSERT_EQUALS(KErrNone, requestStatus.Int()); + + //------------------------------------------------------------------------- + // Release the dialogue + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- // function parameters @@ -679,7 +934,7 @@ iMockLTSY.ExpectL(EMobileUssdMessagingSendRelease, KErrNotSupported); ussdMessaging.SendRelease(requestStatus, pckgSendV3); - User::WaitForRequest(requestStatus); + User::WaitForRequest(requestStatus); AssertMockLtsyStatusL(); ASSERT_EQUALS(KErrNotSupported, requestStatus.Int()); @@ -696,7 +951,176 @@ AssertMockLtsyStatusL(); CleanupStack::PopAndDestroy(3); // data, this, ussdMessaging - + } + +/** +@SYMTestCaseID BA-CTSY-USSDM-USR-0006 +@SYMComponent telephony_ctsy +@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::SendRelease without USSD session in progress +@SYMTestPriority High +@SYMTestActions Invokes RMobileUssdMessaging::SendRelease +@SYMTestExpectedResults Pass +@SYMTestType CT +*/ +void CCTsyUssdMessagingFU::TestSendRelease0001cL() + { + + OpenEtelServerL(EUseExtendedError); + CleanupStack::PushL(TCleanupItem(Cleanup,this)); + OpenPhoneL(); + + RBuf8 data; + CleanupClosePushL(data); + + RMobileUssdMessaging ussdMessaging; + TInt ret = ussdMessaging.Open(iPhone); + ASSERT_EQUALS(KErrNone, ret); + CleanupClosePushL(ussdMessaging); + + TRequestStatus mockLtsyStatus; + TRequestStatus requestStatus; + + //------------------------------------------------------------------------- + // function parameters + + RMobilePhone::TMobilePhoneSendSSRequestV3 sendV3; + TPckg pckgSendV3(sendV3); + + //------------------------------------------------------------------------- + + RMobilePhone::TMobilePhoneSendSSRequestV3 completeSendV3; + + TUint8 opCode = 100; + _LIT(KAdditionalInfo1, "additionalInfo1"); + + completeSendV3.iOpCode = opCode; + completeSendV3.iAdditionalInfo = KAdditionalInfo1; + + TMockLtsyData1< RMobilePhone::TMobilePhoneSendSSRequestV3 > mockData1(completeSendV3); + mockData1.SerialiseL(data); + + //------------------------------------------------------------------------- + // TEST A: failure because there is no USSD session in progress + //------------------------------------------------------------------------- + + ussdMessaging.SendRelease(requestStatus, pckgSendV3); + + User::WaitForRequest(requestStatus); + AssertMockLtsyStatusL(); + ASSERT_EQUALS(KErrDisconnected, requestStatus.Int()); + + CleanupStack::PopAndDestroy(3, this); // data, this, ussdMessaging + + } + +/** +@SYMTestCaseID BA-CTSY-USSDM-USR-0001d +@SYMComponent telephony_ctsy +@SYMTestCaseDesc Test support in CTSY for failure on completion of pending comRMobileUssdMessaging::SendRelease request from LTSY->CTSY +@SYMTestPriority High +@SYMTestActions Invokes RMobileUssdMessaging::SendRelease +@SYMTestExpectedResults Pass +@SYMTestType CT +*/ +void CCTsyUssdMessagingFU::TestSendRelease0001dL() + { + OpenEtelServerL(EUseExtendedError); + CleanupStack::PushL(TCleanupItem(Cleanup,this)); + OpenPhoneL(); + + RBuf8 data; + CleanupClosePushL(data); + + RMobileUssdMessaging ussdMessaging; + TInt ret = ussdMessaging.Open(iPhone); + ASSERT_EQUALS(KErrNone, ret); + CleanupClosePushL(ussdMessaging); + + //------------------------------------------------------------------------- + // Setup: This block is taken from TestReceiveMessage0001L. All we want to + // do is to initiate a dialogue and then end it. Once the dialogue has ended + // then we can call Accept and Reject. + //------------------------------------------------------------------------- + + TRequestStatus requestStatus; + + TRequestStatus mockLtsyStatus; + + TUint32 flags = 100; + RMobileUssdMessaging::TMobileUssdDataFormat format = RMobileUssdMessaging::EFormatUnspecified; + RMobileUssdMessaging::TMobileUssdMessageType type = RMobileUssdMessaging::EUssdMORequest; + TUint8 dcs = 200; + + //------------------------------------------------------------------------- + // function parameters + + RMobileUssdMessaging::TMobileUssdAttributesV1 attributes; + TPckg msgAttributes(attributes); + + RMobileUssdMessaging::TGsmUssdMessageData name; + + //------------------------------------------------------------------------- + + RMobileUssdMessaging::TMobileUssdAttributesV1 completeAttributes; + + completeAttributes.iFlags = flags; + completeAttributes.iFormat = format; + completeAttributes.iType = type; + completeAttributes.iDcs = dcs; + + TBuf8 completeName = _L8("Name1"); + + TMockLtsyData2, RMobileUssdMessaging::TMobileUssdAttributesV1> + mockData2(completeName, completeAttributes); + mockData2.SerialiseL(data); + + iMockLTSY.CompleteL(EMobileUssdMessagingReceiveMessage, KErrNone, data); + + ussdMessaging.ReceiveMessage(requestStatus, name, msgAttributes); + User::WaitForRequest(requestStatus); + ret = requestStatus.Int(); + ASSERT_EQUALS(KErrNone, ret); + ussdMessaging.AcceptIncomingDialogue(); + + AssertMockLtsyStatusL(); + ASSERT_EQUALS(KErrNone, requestStatus.Int()); + + //------------------------------------------------------------------------- + // Release the dialogue + //------------------------------------------------------------------------- + + //------------------------------------------------------------------------- + // function parameters + + RMobilePhone::TMobilePhoneSendSSRequestV3 sendV3; + TPckg pckgSendV3(sendV3); + + //------------------------------------------------------------------------- + + RMobilePhone::TMobilePhoneSendSSRequestV3 completeSendV3; + + TUint8 opCode = 100; + _LIT(KAdditionalInfo1, "additionalInfo1"); + + completeSendV3.iOpCode = opCode; + completeSendV3.iAdditionalInfo = KAdditionalInfo1; + + TMockLtsyData1< RMobilePhone::TMobilePhoneSendSSRequestV3 > mockData1(completeSendV3); + mockData1.SerialiseL(data); + + //------------------------------------------------------------------------- + // Failure on completion of pending request from LTSY->CTSY + //------------------------------------------------------------------------- + + iMockLTSY.ExpectL(EMobileUssdMessagingSendRelease); + iMockLTSY.CompleteL(EMobileUssdMessagingSendRelease, KErrGeneral, data); + ussdMessaging.SendRelease(requestStatus, pckgSendV3); + + User::WaitForRequest(requestStatus); + AssertMockLtsyStatusL(); + ASSERT_EQUALS(KErrGeneral, requestStatus.Int()); + + CleanupStack::PopAndDestroy(3, this); // data, this, ussdMessaging, dataTest } /** @@ -710,22 +1134,70 @@ */ void CCTsyUssdMessagingFU::TestSendRelease0002L() { - - OpenEtelServerL(EUseExtendedError); - CleanupStack::PushL(TCleanupItem(Cleanup,this)); - OpenPhoneL(); - - RBuf8 data; - CleanupClosePushL(data); - - TRequestStatus mockLtsyStatus; - TRequestStatus requestStatus; - - RMobileUssdMessaging ussdMessaging; - TInt ret = ussdMessaging.Open(iPhone); - ASSERT_EQUALS(KErrNone, ret); - CleanupClosePushL(ussdMessaging); - + OpenEtelServerL(EUseExtendedError); + CleanupStack::PushL(TCleanupItem(Cleanup,this)); + OpenPhoneL(); + + RBuf8 data; + CleanupClosePushL(data); + + RMobileUssdMessaging ussdMessaging; + TInt ret = ussdMessaging.Open(iPhone); + ASSERT_EQUALS(KErrNone, ret); + CleanupClosePushL(ussdMessaging); + + //------------------------------------------------------------------------- + // Setup: This block is taken from TestReceiveMessage0001L. All we want to + // do is to initiate a dialogue and then end it. Once the dialogue has ended + // then we can call Accept and Reject. + //------------------------------------------------------------------------- + + TRequestStatus requestStatus; + TRequestStatus mockLtsyStatus; + + TUint32 flags = 100; + RMobileUssdMessaging::TMobileUssdDataFormat format = RMobileUssdMessaging::EFormatUnspecified; + RMobileUssdMessaging::TMobileUssdMessageType type = RMobileUssdMessaging::EUssdMORequest; + TUint8 dcs = 200; + + //------------------------------------------------------------------------- + // function parameters + + RMobileUssdMessaging::TMobileUssdAttributesV1 attributes; + TPckg msgAttributes(attributes); + + RMobileUssdMessaging::TGsmUssdMessageData name; + + //------------------------------------------------------------------------- + + RMobileUssdMessaging::TMobileUssdAttributesV1 completeAttributes; + + completeAttributes.iFlags = flags; + completeAttributes.iFormat = format; + completeAttributes.iType = type; + completeAttributes.iDcs = dcs; + + TBuf8 completeName = _L8("Name1"); + + TMockLtsyData2, RMobileUssdMessaging::TMobileUssdAttributesV1> + mockData2(completeName, completeAttributes); + mockData2.SerialiseL(data); + + iMockLTSY.CompleteL(EMobileUssdMessagingReceiveMessage, KErrNone, data); + + ussdMessaging.ReceiveMessage(requestStatus, name, msgAttributes); + User::WaitForRequest(requestStatus); + ret = requestStatus.Int(); + ASSERT_EQUALS(KErrNone, ret); + ussdMessaging.AcceptIncomingDialogue(); + + AssertMockLtsyStatusL(); + ASSERT_EQUALS(KErrNone, requestStatus.Int()); + + //------------------------------------------------------------------------- + // Release the dialogue + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- // function parameters @@ -771,6 +1243,111 @@ /** +@SYMTestCaseID BA-CTSY-USSDM-USR-0002b +@SYMComponent telephony_ctsy +@SYMTestCaseDesc Test support in CTSY for cancelling of RMobileUssdMessaging::SendRelease +@SYMTestPriority High +@SYMTestActions Invokes cancelling of RMobileUssdMessaging::SendRelease +@SYMTestExpectedResults Pass +@SYMTestType CT +*/ +void CCTsyUssdMessagingFU::TestSendRelease0002bL() + { + OpenEtelServerL(EUseExtendedError); + CleanupStack::PushL(TCleanupItem(Cleanup,this)); + OpenPhoneL(); + + RBuf8 data; + CleanupClosePushL(data); + + RMobileUssdMessaging ussdMessaging; + TInt ret = ussdMessaging.Open(iPhone); + ASSERT_EQUALS(KErrNone, ret); + CleanupClosePushL(ussdMessaging); + + //------------------------------------------------------------------------- + // Setup: This block is taken from TestReceiveMessage0001L. All we want to + // do is to initiate a dialogue and then end it. Once the dialogue has ended + // then we can call Accept and Reject. + //------------------------------------------------------------------------- + + TRequestStatus requestStatus; + TRequestStatus mockLtsyStatus; + + TUint32 flags = 100; + RMobileUssdMessaging::TMobileUssdDataFormat format = RMobileUssdMessaging::EFormatUnspecified; + RMobileUssdMessaging::TMobileUssdMessageType type = RMobileUssdMessaging::EUssdMTRequest; + TUint8 dcs = 200; + + //------------------------------------------------------------------------- + // function parameters + + RMobileUssdMessaging::TMobileUssdAttributesV1 attributes; + TPckg msgAttributes(attributes); + + RMobileUssdMessaging::TGsmUssdMessageData name; + + //------------------------------------------------------------------------- + + RMobileUssdMessaging::TMobileUssdAttributesV1 completeAttributes; + + completeAttributes.iFlags = flags; + completeAttributes.iFormat = format; + completeAttributes.iType = type; + completeAttributes.iDcs = dcs; + + TBuf8 completeName = _L8("Name1"); + + TMockLtsyData2, RMobileUssdMessaging::TMobileUssdAttributesV1> + mockData2(completeName, completeAttributes); + mockData2.SerialiseL(data); + + iMockLTSY.CompleteL(EMobileUssdMessagingReceiveMessage, KErrNone, data); + + ussdMessaging.ReceiveMessage(requestStatus, name, msgAttributes); + User::WaitForRequest(requestStatus); + ret = requestStatus.Int(); + ASSERT_EQUALS(KErrNone, ret); + + //------------------------------------------------------------------------- + // Release the dialogue + //------------------------------------------------------------------------- + + //------------------------------------------------------------------------- + // function parameters + + RMobilePhone::TMobilePhoneSendSSRequestV3 sendV3; + TPckg pckgSendV3(sendV3); + + //------------------------------------------------------------------------- + + RMobilePhone::TMobilePhoneSendSSRequestV3 completeSendV3; + + TUint8 opCode = 100; + _LIT(KAdditionalInfo1, "additionalInfo1"); + + completeSendV3.iOpCode = opCode; + completeSendV3.iAdditionalInfo = KAdditionalInfo1; + + TMockLtsyData1< RMobilePhone::TMobilePhoneSendSSRequestV3 > mockData1(completeSendV3); + + mockData1.SerialiseL(data); + + //------------------------------------------------------------------------- + + ussdMessaging.SendRelease(requestStatus, pckgSendV3); + + ussdMessaging.AcceptIncomingDialogue(); + AssertMockLtsyStatusL(); + ASSERT_EQUALS(KErrDisconnected, requestStatus.Int()); + + CleanupStack::PopAndDestroy(3); // data, this, ussdMessaging + + } + + + +/** @SYMTestCaseID BA-CTSY-USSDM-USR-0003 @SYMComponent telephony_ctsy @SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::SendRelease with bad parameter data @@ -781,21 +1358,70 @@ */ void CCTsyUssdMessagingFU::TestSendRelease0003L() { - - OpenEtelServerL(EUseExtendedError); - CleanupStack::PushL(TCleanupItem(Cleanup,this)); - OpenPhoneL(); - - RBuf8 data; - CleanupClosePushL(data); - - TRequestStatus requestStatus; - - RMobileUssdMessaging ussdMessaging; - TInt ret = ussdMessaging.Open(iPhone); - ASSERT_EQUALS(KErrNone, ret); - CleanupClosePushL(ussdMessaging); - + OpenEtelServerL(EUseExtendedError); + CleanupStack::PushL(TCleanupItem(Cleanup,this)); + OpenPhoneL(); + + RBuf8 data; + CleanupClosePushL(data); + + RMobileUssdMessaging ussdMessaging; + TInt ret = ussdMessaging.Open(iPhone); + ASSERT_EQUALS(KErrNone, ret); + CleanupClosePushL(ussdMessaging); + + //------------------------------------------------------------------------- + // Setup: This block is taken from TestReceiveMessage0001L. All we want to + // do is to initiate a dialogue and then end it. Once the dialogue has ended + // then we can call Accept and Reject. + //------------------------------------------------------------------------- + + TRequestStatus requestStatus; + TRequestStatus mockLtsyStatus; + + TUint32 flags = 100; + RMobileUssdMessaging::TMobileUssdDataFormat format = RMobileUssdMessaging::EFormatUnspecified; + RMobileUssdMessaging::TMobileUssdMessageType type = RMobileUssdMessaging::EUssdMORequest; + TUint8 dcs = 200; + + //------------------------------------------------------------------------- + // function parameters + + RMobileUssdMessaging::TMobileUssdAttributesV1 attributes; + TPckg msgAttributes(attributes); + + RMobileUssdMessaging::TGsmUssdMessageData name; + + //------------------------------------------------------------------------- + + RMobileUssdMessaging::TMobileUssdAttributesV1 completeAttributes; + + completeAttributes.iFlags = flags; + completeAttributes.iFormat = format; + completeAttributes.iType = type; + completeAttributes.iDcs = dcs; + + TBuf8 completeName = _L8("Name1"); + + TMockLtsyData2, RMobileUssdMessaging::TMobileUssdAttributesV1> + mockData2(completeName, completeAttributes); + mockData2.SerialiseL(data); + + iMockLTSY.CompleteL(EMobileUssdMessagingReceiveMessage, KErrNone, data); + + ussdMessaging.ReceiveMessage(requestStatus, name, msgAttributes); + User::WaitForRequest(requestStatus); + ret = requestStatus.Int(); + ASSERT_EQUALS(KErrNone, ret); + ussdMessaging.AcceptIncomingDialogue(); + + AssertMockLtsyStatusL(); + ASSERT_EQUALS(KErrNone, requestStatus.Int()); + + //------------------------------------------------------------------------- + // Release the dialogue + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- RMobilePhone::TMobilePhoneSendSSRequestV3 completeSendV3; @@ -822,7 +1448,7 @@ ASSERT_EQUALS(KErrArgument, requestStatus.Int()); CleanupStack::PopAndDestroy(3, this); // data, this, ussdMessaging - + } @@ -837,27 +1463,81 @@ */ void CCTsyUssdMessagingFU::TestSendRelease0004L() { - - OpenEtelServerL(EUseExtendedError); - CleanupStack::PushL(TCleanupItem(Cleanup,this)); - OpenPhoneL(); - - // Open second client - RTelServer telServer2; - TInt ret = telServer2.Connect(); - ASSERT_EQUALS(KErrNone, ret); - CleanupClosePushL(telServer2); - - RMobilePhone phone2; - ret = phone2.Open(telServer2,KMmTsyPhoneName); - ASSERT_EQUALS(KErrNone, ret); - CleanupClosePushL(phone2); - - RMobileUssdMessaging ussdMessaging1; - ret = ussdMessaging1.Open(iPhone); - ASSERT_EQUALS(KErrNone, ret); - CleanupClosePushL(ussdMessaging1); - + OpenEtelServerL(EUseExtendedError); + CleanupStack::PushL(TCleanupItem(Cleanup,this)); + OpenPhoneL(); + + RBuf8 data; + CleanupClosePushL(data); + + RMobileUssdMessaging ussdMessaging; + TInt ret = ussdMessaging.Open(iPhone); + ASSERT_EQUALS(KErrNone, ret); + CleanupClosePushL(ussdMessaging); + + //------------------------------------------------------------------------- + // Setup: This block is taken from TestReceiveMessage0001L. All we want to + // do is to initiate a dialogue and then end it. Once the dialogue has ended + // then we can call Accept and Reject. + //------------------------------------------------------------------------- + + TRequestStatus requestStatus; + TRequestStatus mockLtsyStatus; + + TUint32 flags = 100; + RMobileUssdMessaging::TMobileUssdDataFormat format = RMobileUssdMessaging::EFormatUnspecified; + RMobileUssdMessaging::TMobileUssdMessageType type = RMobileUssdMessaging::EUssdMORequest; + TUint8 dcs = 200; + + //------------------------------------------------------------------------- + // function parameters + + RMobileUssdMessaging::TMobileUssdAttributesV1 attributes; + TPckg msgAttributes(attributes); + + RMobileUssdMessaging::TGsmUssdMessageData name; + + //------------------------------------------------------------------------- + + RMobileUssdMessaging::TMobileUssdAttributesV1 completeAttributes; + + completeAttributes.iFlags = flags; + completeAttributes.iFormat = format; + completeAttributes.iType = type; + completeAttributes.iDcs = dcs; + + TBuf8 completeName = _L8("Name1"); + + TMockLtsyData2, RMobileUssdMessaging::TMobileUssdAttributesV1> + mockData2(completeName, completeAttributes); + mockData2.SerialiseL(data); + + iMockLTSY.CompleteL(EMobileUssdMessagingReceiveMessage, KErrNone, data); + + ussdMessaging.ReceiveMessage(requestStatus, name, msgAttributes); + User::WaitForRequest(requestStatus); + ret = requestStatus.Int(); + ASSERT_EQUALS(KErrNone, ret); + ussdMessaging.AcceptIncomingDialogue(); + + AssertMockLtsyStatusL(); + ASSERT_EQUALS(KErrNone, requestStatus.Int()); + + //------------------------------------------------------------------------- + // Release the dialogue + //------------------------------------------------------------------------- + + // Open second client + RTelServer telServer2; + ret = telServer2.Connect(); + ASSERT_EQUALS(KErrNone, ret); + CleanupClosePushL(telServer2); + + RMobilePhone phone2; + ret = phone2.Open(telServer2,KMmTsyPhoneName); + ASSERT_EQUALS(KErrNone, ret); + CleanupClosePushL(phone2); + RMobileUssdMessaging ussdMessaging2; ret = ussdMessaging2.Open(phone2); ASSERT_EQUALS(KErrNone, ret); @@ -894,28 +1574,152 @@ // Test A: Test multiple clients requesting RMobileUssdMessaging::SendRelease //------------------------------------------------------------------------- - RBuf8 data; - CleanupClosePushL(data); // PUSH mockData11.SerialiseL(data); iMockLTSY.ExpectL(EMobileUssdMessagingSendRelease); iMockLTSY.CompleteL(EMobileUssdMessagingSendRelease, KErrNone, data, 10); - ussdMessaging1.SendRelease(requestStatus1, pckgSendV31); + ussdMessaging.SendRelease(requestStatus, pckgSendV31); ussdMessaging2.SendRelease(requestStatus2, pckgSendV32); - User::WaitForRequest(requestStatus1); - ASSERT_EQUALS(KErrNone, requestStatus1.Int()); - - User::WaitForRequest(requestStatus2); - ASSERT_EQUALS(KErrServerBusy, requestStatus2.Int()); + User::WaitForRequest(requestStatus); + ASSERT_EQUALS(KErrNone, requestStatus.Int()); + + User::WaitForRequest(requestStatus2); + ASSERT_EQUALS(KErrAccessDenied, requestStatus2.Int()); ASSERT_EQUALS(opCode, sendV31.iOpCode); ASSERT_EQUALS(0, sendV31.iAdditionalInfo.Compare(KAdditionalInfo1)); - + AssertMockLtsyStatusL(); - CleanupStack::PopAndDestroy(6, this); // data, ussdMessaging2, ussdMessaging1, - // phone2, telServer2, this + CleanupStack::PopAndDestroy(6, this); // data, ussdMessaging2, ussdMessaging, + // phone2, telServer2, this } +/** +@SYMTestCaseID BA-CTSY-USSDM-USR-0004a +@SYMComponent telephony_ctsy +@SYMTestCaseDesc Test support in CTSY for multiple client requests to RMobileUssdMessaging::SendRelease +@SYMTestPriority High +@SYMTestActions Invokes multiple client requests to RMobileUssdMessaging::SendRelease +@SYMTestExpectedResults Pass +@SYMTestType CT +*/ +void CCTsyUssdMessagingFU::TestSendRelease0004bL() + { + OpenEtelServerL(EUseExtendedError); + CleanupStack::PushL(TCleanupItem(Cleanup,this)); + OpenPhoneL(); + + RBuf8 data; + CleanupClosePushL(data); + + RMobileUssdMessaging ussdMessaging; + TInt ret = ussdMessaging.Open(iPhone); + ASSERT_EQUALS(KErrNone, ret); + CleanupClosePushL(ussdMessaging); + + //------------------------------------------------------------------------- + // Setup: This block is taken from TestReceiveMessage0001L. All we want to + // do is to initiate a dialogue and then end it. Once the dialogue has ended + // then we can call Accept and Reject. + //------------------------------------------------------------------------- + + TRequestStatus requestStatus; + TRequestStatus mockLtsyStatus; + + TUint32 flags = 100; + RMobileUssdMessaging::TMobileUssdDataFormat format = RMobileUssdMessaging::EFormatUnspecified; + RMobileUssdMessaging::TMobileUssdMessageType type = RMobileUssdMessaging::EUssdMTRequest; + TUint8 dcs = 200; + + //------------------------------------------------------------------------- + // function parameters + + RMobileUssdMessaging::TMobileUssdAttributesV1 attributes; + TPckg msgAttributes(attributes); + + RMobileUssdMessaging::TGsmUssdMessageData name; + + //------------------------------------------------------------------------- + + RMobileUssdMessaging::TMobileUssdAttributesV1 completeAttributes; + + completeAttributes.iFlags = flags; + completeAttributes.iFormat = format; + completeAttributes.iType = type; + completeAttributes.iDcs = dcs; + + TBuf8 completeName = _L8("Name1"); + + TMockLtsyData2, RMobileUssdMessaging::TMobileUssdAttributesV1> + mockData2(completeName, completeAttributes); + mockData2.SerialiseL(data); + + iMockLTSY.CompleteL(EMobileUssdMessagingReceiveMessage, KErrNone, data); + + ussdMessaging.ReceiveMessage(requestStatus, name, msgAttributes); + User::WaitForRequest(requestStatus); + ret = requestStatus.Int(); + ASSERT_EQUALS(KErrNone, ret); + ussdMessaging.AcceptIncomingDialogue(); + + AssertMockLtsyStatusL(); + + //------------------------------------------------------------------------- + // Try to release the dialogue + //------------------------------------------------------------------------- + + // Open second client + RTelServer telServer2; + ret = telServer2.Connect(); + ASSERT_EQUALS(KErrNone, ret); + CleanupClosePushL(telServer2); + + RMobilePhone phone2; + ret = phone2.Open(telServer2,KMmTsyPhoneName); + ASSERT_EQUALS(KErrNone, ret); + CleanupClosePushL(phone2); + + RMobileUssdMessaging ussdMessaging2; + ret = ussdMessaging2.Open(phone2); + ASSERT_EQUALS(KErrNone, ret); + CleanupClosePushL(ussdMessaging2); + + //------------------------------------------------------------------------- + // function parameters + + RMobilePhone::TMobilePhoneSendSSRequestV3 sendV3; + TPckg pckgSendV3(sendV3); + + //------------------------------------------------------------------------- + + RMobilePhone::TMobilePhoneSendSSRequestV3 completeSendV3; + + TUint8 opCode = 100; + _LIT(KAdditionalInfo1, "additionalInfo1"); + + completeSendV3.iOpCode = opCode; + completeSendV3.iAdditionalInfo = KAdditionalInfo1; + + TMockLtsyData1< RMobilePhone::TMobilePhoneSendSSRequestV3 > mockData1(completeSendV3); + mockData1.SerialiseL(data); + + //------------------------------------------------------------------------- + // Test: The second client requests RMobileUssdMessaging::SendRelease + //------------------------------------------------------------------------- + + iMockLTSY.ExpectL(EMobileUssdMessagingSendRelease); + iMockLTSY.CompleteL(EMobileUssdMessagingSendRelease, KErrDisconnected, data, 10); + + TRequestStatus requestStatus2; + ussdMessaging2.SendRelease(requestStatus2, pckgSendV3); + + User::WaitForRequest(requestStatus2); + AssertMockLtsyStatusL(); + ASSERT_EQUALS(KErrDisconnected, requestStatus2.Int()); + + CleanupStack::PopAndDestroy(6, this); // data, ussdMessaging2, ussdMessaging, + // phone2, telServer2, this + } /** @SYMTestCaseID BA-CTSY-USSDM-USR-0005 @@ -928,20 +1732,69 @@ */ void CCTsyUssdMessagingFU::TestSendRelease0005L() { - - OpenEtelServerL(EUseExtendedError); - CleanupStack::PushL(TCleanupItem(Cleanup,this)); - OpenPhoneL(); - - RBuf8 data; - CleanupClosePushL(data); - - RMobileUssdMessaging ussdMessaging; - TInt ret = ussdMessaging.Open(iPhone); - ASSERT_EQUALS(KErrNone, ret); - CleanupClosePushL(ussdMessaging); - - TRequestStatus requestStatus; + OpenEtelServerL(EUseExtendedError); + CleanupStack::PushL(TCleanupItem(Cleanup,this)); + OpenPhoneL(); + + RBuf8 data; + CleanupClosePushL(data); + + RMobileUssdMessaging ussdMessaging; + TInt ret = ussdMessaging.Open(iPhone); + ASSERT_EQUALS(KErrNone, ret); + CleanupClosePushL(ussdMessaging); + + //------------------------------------------------------------------------- + // Setup: This block is taken from TestReceiveMessage0001L. All we want to + // do is to initiate a dialogue and then end it. Once the dialogue has ended + // then we can call Accept and Reject. + //------------------------------------------------------------------------- + + TRequestStatus requestStatus; + TRequestStatus mockLtsyStatus; + + TUint32 flags = 100; + RMobileUssdMessaging::TMobileUssdDataFormat format = RMobileUssdMessaging::EFormatUnspecified; + RMobileUssdMessaging::TMobileUssdMessageType type = RMobileUssdMessaging::EUssdMORequest; + TUint8 dcs = 200; + + //------------------------------------------------------------------------- + // function parameters + + RMobileUssdMessaging::TMobileUssdAttributesV1 attributes; + TPckg msgAttributes(attributes); + + RMobileUssdMessaging::TGsmUssdMessageData name; + + //------------------------------------------------------------------------- + + RMobileUssdMessaging::TMobileUssdAttributesV1 completeAttributes; + + completeAttributes.iFlags = flags; + completeAttributes.iFormat = format; + completeAttributes.iType = type; + completeAttributes.iDcs = dcs; + + TBuf8 completeName = _L8("Name1"); + + TMockLtsyData2, RMobileUssdMessaging::TMobileUssdAttributesV1> + mockData2(completeName, completeAttributes); + mockData2.SerialiseL(data); + + iMockLTSY.CompleteL(EMobileUssdMessagingReceiveMessage, KErrNone, data); + + ussdMessaging.ReceiveMessage(requestStatus, name, msgAttributes); + User::WaitForRequest(requestStatus); + ret = requestStatus.Int(); + ASSERT_EQUALS(KErrNone, ret); + ussdMessaging.AcceptIncomingDialogue(); + + AssertMockLtsyStatusL(); + ASSERT_EQUALS(KErrNone, requestStatus.Int()); + + //------------------------------------------------------------------------- + // Release the dialogue + //------------------------------------------------------------------------- //------------------------------------------------------------------------- // function parameters @@ -956,12 +1809,11 @@ iMockLTSY.ExpectL(EMobileUssdMessagingSendRelease); ussdMessaging.SendRelease(requestStatus, pckgSendV3); - User::WaitForRequest(requestStatus); + User::WaitForRequest(requestStatus); AssertMockLtsyStatusL(); - ASSERT_EQUALS(KErrTimedOut, requestStatus.Int()); + ASSERT_EQUALS(KErrTimedOut, requestStatus.Int()); CleanupStack::PopAndDestroy(3, this); // data, this, ussdMessaging - } @@ -1289,8 +2141,9 @@ ASSERT_EQUALS(KErrNone, requestStatus1.Int()); ussd1.AcceptIncomingDialogue(); User::After(1000000); - ussd1.CancelAsyncRequest(EMobileUssdMessagingReceiveMessage); - + ussd1.CancelAsyncRequest(EMobileUssdMessagingReceiveMessage); + ASSERT_EQUALS(KErrNone, requestStatus1.Int()); + CleanupStack::PopAndDestroy(4, this); // this, data, ussd1, ussd2 } @@ -1545,6 +2398,8 @@ ASSERT_EQUALS(KErrCancel, requestStatus2.Int()); // dialogue offered to third client + ussd3.AcceptIncomingDialogue(); + User::WaitForRequest(requestStatus3); ASSERT_EQUALS(KErrNone, requestStatus3.Int()); CleanupStack::PopAndDestroy(5, this); // this, data, ussd1, ussd2, ussd3 @@ -1615,10 +2470,7 @@ //------------------------------------------------------------------------- // TEST : Have two clients. 1) Request offered to 1st. 2) 1st client cancels. // 3) 2nd client should now be offered request. - //------------------------------------------------------------------------- - ret1 = ussd1.Open(iPhone); - ASSERT_EQUALS(KErrNone, ret1); - + //------------------------------------------------------------------------- ussd1.ReceiveMessage(requestStatus1 ,name, msgAttributes); ussd2.ReceiveMessage(requestStatus2 ,name, msgAttributes); iMockLTSY.CompleteL(EMobileUssdMessagingReceiveMessage, KErrNone, data); @@ -1629,14 +2481,16 @@ // Offered to first client ASSERT_EQUALS(KErrNone, requestStatus1.Int()); - // Cancel first client - ussd1.CancelAsyncRequest(EMobileUssdMessagingReceiveMessage); - + // Cancel first client + ussd2.CancelAsyncRequest(EMobileUssdMessagingReceiveMessage); + + User::WaitForRequest(requestStatus2); + ASSERT_EQUALS(KErrCancel, requestStatus2.Int()); + // dialogue offered to second client - User::WaitForRequest(requestStatus2); - ASSERT_EQUALS(KErrNone, requestStatus2.Int()); - - + ussd1.RejectIncomingDialogue(); + ASSERT_EQUALS(KErrNone, requestStatus1.Int()); + CleanupStack::PopAndDestroy(4, this); // this, data, ussd1, ussd2 } @@ -1737,7 +2591,95 @@ CleanupStack::PopAndDestroy(5, this); // this, data, ussd1, ussd2, ussd3 } - + +/** +@SYMTestCaseID BA-CTSY-USSDM-URM-0002i +@SYMComponent telephony_ctsy +@SYMTestCaseDesc Test support of RMobileUssdMessaging::ReceiveMessage for consecutive reception of two USSD dialogues/messages by two different clients. +@SYMTestPriority High +@SYMTestActions Two clients present, second client calls Cancel. +@SYMTestExpectedResults Pass +@SYMTestType CT +*/ +void CCTsyUssdMessagingFU::TestReceiveMessage0002iL() + { + OpenEtelServerL(EUseExtendedError); + CleanupStack::PushL(TCleanupItem(Cleanup,this)); + OpenPhoneL(); + + RBuf8 data; + CleanupClosePushL(data); + + RMobileUssdMessaging ussd1; + RMobileUssdMessaging ussd2; + TInt ret1 = ussd1.Open(iPhone); + TInt ret2 = ussd2.Open(iPhone); + ASSERT_EQUALS(KErrNone, ret1); + ASSERT_EQUALS(KErrNone, ret2); + CleanupClosePushL(ussd1); + CleanupClosePushL(ussd2); + + TRequestStatus requestStatus1; + TRequestStatus requestStatus2; + + //------------------------------------------------------------------------- + TUint32 flags = 100; + RMobileUssdMessaging::TMobileUssdDataFormat format = RMobileUssdMessaging::EFormatUnspecified; + RMobileUssdMessaging::TMobileUssdMessageType type = RMobileUssdMessaging::EUssdMTNotify; + TUint8 dcs = 200; + + // function parameters + + RMobileUssdMessaging::TMobileUssdAttributesV1 attributes; + TPckg msgAttributes(attributes); + + RMobileUssdMessaging::TGsmUssdMessageData name; + + //------------------------------------------------------------------------- + + RMobileUssdMessaging::TMobileUssdAttributesV1 completeAttributes; + + completeAttributes.iFlags = flags; + completeAttributes.iFormat = format; + completeAttributes.iType = type; + completeAttributes.iDcs = dcs; + + TBuf8 completeName = _L8("Name1"); + + TMockLtsyData2, RMobileUssdMessaging::TMobileUssdAttributesV1> + mockData2(completeName, completeAttributes); + + mockData2.SerialiseL(data); + + //------------------------------------------------------------------------- + // TEST: The first client accepts the first USSD notification. + // The SECOND client accepts the second USSD notification. + //------------------------------------------------------------------------- + + //first notification + ussd1.ReceiveMessage(requestStatus1, name, msgAttributes); + iMockLTSY.CompleteL(EMobileUssdMessagingReceiveMessage, KErrNone, data); + + User::WaitForRequest(requestStatus1); + AssertMockLtsyStatusL(); + + ASSERT_EQUALS(KErrNone, requestStatus1.Int()); + ussd1.AcceptIncomingDialogue(); + + //second notification + ussd2.ReceiveMessage(requestStatus2, name, msgAttributes); + iMockLTSY.CompleteL(EMobileUssdMessagingReceiveMessage, KErrNone, data); + + User::WaitForRequest(requestStatus2); + AssertMockLtsyStatusL(); + + ASSERT_EQUALS(KErrNone, requestStatus2.Int()); + ussd2.AcceptIncomingDialogue(); + + CleanupStack::PopAndDestroy(4, this); // this, data, ussd1, ussd2 + } + + /** @SYMTestCaseID BA-CTSY-USSDM-URM-0003 @SYMComponent telephony_ctsy @@ -1949,7 +2891,6 @@ */ void CCTsyUssdMessagingFU::TestReceiveMessage0004cL() { - OpenEtelServerL(EUseExtendedError); CleanupStack::PushL(TCleanupItem(Cleanup,this)); OpenPhoneL(); @@ -1995,6 +2936,7 @@ thread1.Close(); thread2.Close(); CleanupStack::PopAndDestroy(this); // this + } /** @@ -2008,7 +2950,6 @@ */ void CCTsyUssdMessagingFU::TestReceiveMessage0004dL() { - OpenEtelServerL(EUseExtendedError); CleanupStack::PushL(TCleanupItem(Cleanup,this)); OpenPhoneL(); @@ -2066,7 +3007,6 @@ */ void CCTsyUssdMessagingFU::TestReceiveMessage0004eL() { - OpenEtelServerL(EUseExtendedError); CleanupStack::PushL(TCleanupItem(Cleanup,this)); OpenPhoneL(); @@ -2123,7 +3063,6 @@ */ void CCTsyUssdMessagingFU::TestReceiveMessage0004fL() { - OpenEtelServerL(EUseExtendedError); CleanupStack::PushL(TCleanupItem(Cleanup,this)); OpenPhoneL(); @@ -2214,22 +3153,344 @@ */ void CCTsyUssdMessagingFU::TestNotifyNetworkRelease0001L() { - - OpenEtelServerL(EUseExtendedError); - CleanupStack::PushL(TCleanupItem(Cleanup,this)); - OpenPhoneL(); - - TRequestStatus requestStatus; + OpenEtelServerL(EUseExtendedError); + CleanupStack::PushL(TCleanupItem(Cleanup,this)); + OpenPhoneL(); + + RBuf8 data; + CleanupClosePushL(data); + + RMobileUssdMessaging ussdMessaging; + TInt ret = ussdMessaging.Open(iPhone); + ASSERT_EQUALS(KErrNone, ret); + CleanupClosePushL(ussdMessaging); + + //------------------------------------------------------------------------- + // Setup: This block is taken from TestReceiveMessage0001L. All we want to + // do is to initiate a dialogue and then end it. Once the dialogue has ended + // then we can call Accept and Reject. + //------------------------------------------------------------------------- + + TRequestStatus requestStatus; + + TRequestStatus mockLtsyStatus; + + TUint32 flags = 100; + RMobileUssdMessaging::TMobileUssdDataFormat format = RMobileUssdMessaging::EFormatUnspecified; + RMobileUssdMessaging::TMobileUssdMessageType type = RMobileUssdMessaging::EUssdMORequest; + TUint8 dcs = 200; + + //------------------------------------------------------------------------- + // function parameters + + RMobileUssdMessaging::TMobileUssdAttributesV1 attributes; + TPckg msgAttributes(attributes); + + RMobileUssdMessaging::TGsmUssdMessageData name; + + //------------------------------------------------------------------------- + + RMobileUssdMessaging::TMobileUssdAttributesV1 completeAttributes; + + completeAttributes.iFlags = flags; + completeAttributes.iFormat = format; + completeAttributes.iType = type; + completeAttributes.iDcs = dcs; + + TBuf8 completeName = _L8("Name1"); + + TMockLtsyData2, RMobileUssdMessaging::TMobileUssdAttributesV1> + mockData2(completeName, completeAttributes); + mockData2.SerialiseL(data); + + iMockLTSY.CompleteL(EMobileUssdMessagingReceiveMessage, KErrNone, data); + + ussdMessaging.ReceiveMessage(requestStatus, name, msgAttributes); + User::WaitForRequest(requestStatus); + ret = requestStatus.Int(); + ASSERT_EQUALS(KErrNone, ret); + ussdMessaging.AcceptIncomingDialogue(); + + AssertMockLtsyStatusL(); + ASSERT_EQUALS(KErrNone, requestStatus.Int()); + + //------------------------------------------------------------------------- + // Terminate the dialogue + //------------------------------------------------------------------------- + + //------------------------------------------------------------------------- + // function parameters + + RMobilePhone::TMobilePhoneSendSSRequestV3 sendV3; + TPckg pckgSendV3(sendV3); + + // optional parameter + RMobileUssdMessaging::TMobileUssdAttributesV1 attrV1; + RMobileUssdMessaging::TMobileUssdAttributesV1Pckg pckgAttrV1(attrV1); + //------------------------------------------------------------------------- + + RMobilePhone::TMobilePhoneSendSSRequestV3 completeSendV3; + + TUint8 opCode = 100; + _LIT(KAdditionalInfo1, "additionalInfo1"); + + completeSendV3.iOpCode = opCode; + completeSendV3.iAdditionalInfo = KAdditionalInfo1; + + TMockLtsyData1< RMobilePhone::TMobilePhoneSendSSRequestV3 > mockData1(completeSendV3); + mockData1.SerialiseL(data); + + // optional parameter + RMobileUssdMessaging::TMobileUssdAttributesV1 completeAttrV1; + completeAttrV1.iFlags = RMobileUssdMessaging::KUssdDataFormat | RMobileUssdMessaging::KUssdMessageType; + completeAttrV1.iFormat = RMobileUssdMessaging::EFormatPackedString; + completeAttrV1.iType = RMobileUssdMessaging::EUssdMOAcknowledgement; + + TMockLtsyData2< RMobilePhone::TMobilePhoneSendSSRequestV3, + RMobileUssdMessaging::TMobileUssdAttributesV1 > + mockData2Release(completeSendV3,completeAttrV1); + + RBuf8 data2; + CleanupClosePushL(data2); + mockData2Release.SerialiseL(data2); + + //------------------------------------------------------------------------- + // TEST C: Successful completion request of + // RMobileUssdMessaging::NotifyNetworkRelease when result is not cached. + //------------------------------------------------------------------------- + iMockLTSY.CompleteL(EMobileUssdMessagingNotifyNetworkRelease, KErrNone, data); + ussdMessaging.NotifyNetworkRelease(requestStatus, pckgSendV3); + + + User::WaitForRequest(requestStatus); + AssertMockLtsyStatusL(); + ASSERT_EQUALS(KErrNone, requestStatus.Int()); + + ASSERT_EQUALS(opCode, sendV3.iOpCode); + ASSERT_EQUALS(0, sendV3.iAdditionalInfo.Compare(KAdditionalInfo1)); + + //------------------------------------------------------------------------- + // TEST E: Unsolicited completion of RMobileUssdMessaging::NotifyNetworkRelease + // from LTSY. + //------------------------------------------------------------------------- + + iMockLTSY.NotifyTerminated(mockLtsyStatus); + iMockLTSY.CompleteL(EMobileUssdMessagingNotifyNetworkRelease, KErrNone, data); + + // other version of API (with optional TMobileUssdAttributesV1 parameter) + + iMockLTSY.CompleteL(EMobileUssdMessagingNotifyNetworkRelease, KErrNone, data2); + User::WaitForRequest(mockLtsyStatus); + AssertMockLtsyStatusL(); + ASSERT_EQUALS(KErrNone, mockLtsyStatus.Int()); + + CleanupStack::PopAndDestroy(4, this); // data2, ussdMessaging, data, this, + + } + +/** +@SYMTestCaseID BA-CTSY-USSDM-UNNR-0001a +@SYMComponent telephony_ctsy +@SYMTestCaseDesc Test support in CTSY for failure on completion of pending comRMobileUssdMessaging::SendRelease request from LTSY->CTSY +@SYMTestPriority High +@SYMTestActions Invokes RMobileUssdMessaging::NotifyNetworkRelease +@SYMTestExpectedResults Pass +@SYMTestType CT +*/ +void CCTsyUssdMessagingFU::TestNotifyNetworkRelease0001eL() + { + OpenEtelServerL(EUseExtendedError); + CleanupStack::PushL(TCleanupItem(Cleanup,this)); + OpenPhoneL(); + + RBuf8 data; + CleanupClosePushL(data); + + RMobileUssdMessaging ussdMessaging; + TInt ret = ussdMessaging.Open(iPhone); + ASSERT_EQUALS(KErrNone, ret); + CleanupClosePushL(ussdMessaging); + + //------------------------------------------------------------------------- + // Setup: This block is taken from TestReceiveMessage0001L. All we want to + // do is to initiate a dialogue and then end it. Once the dialogue has ended + // then we can call Accept and Reject. + //------------------------------------------------------------------------- + + TRequestStatus requestStatus; + TRequestStatus mockLtsyStatus; - RBuf8 data; - CleanupClosePushL(data); - - RMobileUssdMessaging ussdMessaging; - TInt ret = ussdMessaging.Open(iPhone); - ASSERT_EQUALS(KErrNone, ret); - CleanupClosePushL(ussdMessaging); - + TUint32 flags = 100; + RMobileUssdMessaging::TMobileUssdDataFormat format = RMobileUssdMessaging::EFormatUnspecified; + RMobileUssdMessaging::TMobileUssdMessageType type = RMobileUssdMessaging::EUssdMORequest; + TUint8 dcs = 200; + + //------------------------------------------------------------------------- + // function parameters + + RMobileUssdMessaging::TMobileUssdAttributesV1 attributes; + TPckg msgAttributes(attributes); + + RMobileUssdMessaging::TGsmUssdMessageData name; + + //------------------------------------------------------------------------- + + RMobileUssdMessaging::TMobileUssdAttributesV1 completeAttributes; + + completeAttributes.iFlags = flags; + completeAttributes.iFormat = format; + completeAttributes.iType = type; + completeAttributes.iDcs = dcs; + + TBuf8 completeName = _L8("Name1"); + + TMockLtsyData2, RMobileUssdMessaging::TMobileUssdAttributesV1> + mockData2(completeName, completeAttributes); + mockData2.SerialiseL(data); + + iMockLTSY.CompleteL(EMobileUssdMessagingReceiveMessage, KErrNone, data); + + ussdMessaging.ReceiveMessage(requestStatus, name, msgAttributes); + User::WaitForRequest(requestStatus); + ret = requestStatus.Int(); + ASSERT_EQUALS(KErrNone, ret); + ussdMessaging.AcceptIncomingDialogue(); + + AssertMockLtsyStatusL(); + ASSERT_EQUALS(KErrNone, requestStatus.Int()); + + //------------------------------------------------------------------------- + // Terminate the dialogue + //------------------------------------------------------------------------- + + //------------------------------------------------------------------------- + // function parameters + + RMobilePhone::TMobilePhoneSendSSRequestV3 sendV3; + TPckg pckgSendV3(sendV3); + + // optional parameter + RMobileUssdMessaging::TMobileUssdAttributesV1 attrV1; + RMobileUssdMessaging::TMobileUssdAttributesV1Pckg pckgAttrV1(attrV1); + //------------------------------------------------------------------------- + + RMobilePhone::TMobilePhoneSendSSRequestV3 completeSendV3; + + TUint8 opCode = 100; + _LIT(KAdditionalInfo1, "additionalInfo1"); + + completeSendV3.iOpCode = opCode; + completeSendV3.iAdditionalInfo = KAdditionalInfo1; + + TMockLtsyData1< RMobilePhone::TMobilePhoneSendSSRequestV3 > mockData1(completeSendV3); + mockData1.SerialiseL(data); + + // optional parameter + RMobileUssdMessaging::TMobileUssdAttributesV1 completeAttrV1; + completeAttrV1.iFlags = RMobileUssdMessaging::KUssdDataFormat | RMobileUssdMessaging::KUssdMessageType; + completeAttrV1.iFormat = RMobileUssdMessaging::EFormatPackedString; + completeAttrV1.iType = RMobileUssdMessaging::EUssdMOAcknowledgement; + + TMockLtsyData2< RMobilePhone::TMobilePhoneSendSSRequestV3, + RMobileUssdMessaging::TMobileUssdAttributesV1 > + mockData2Release(completeSendV3,completeAttrV1); + + RBuf8 data2; + CleanupClosePushL(data2); + mockData2Release.SerialiseL(data2); + + //------------------------------------------------------------------------- + // TEST B: failure on completion of pending request from LTSY->CTSY + //------------------------------------------------------------------------- + + iMockLTSY.CompleteL(EMobileUssdMessagingNotifyNetworkRelease, KErrGeneral, data); + ussdMessaging.NotifyNetworkRelease(requestStatus, pckgSendV3); + + User::WaitForRequest(requestStatus); + AssertMockLtsyStatusL(); + ASSERT_EQUALS(KErrGeneral, requestStatus.Int()); + + CleanupStack::PopAndDestroy(4, this); // data2, ussdMessaging, data, this + + } + +/** +@SYMTestCaseID BA-CTSY-USSDM-UNNR-0001b +@SYMComponent telephony_ctsy +@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::NotifyNetworkRelease with optional paramter +@SYMTestPriority High +@SYMTestActions Invokes RMobileUssdMessaging::NotifyNetworkRelease +@SYMTestExpectedResults Pass +@SYMTestType CT +*/ +void CCTsyUssdMessagingFU::TestNotifyNetworkRelease0001bL() + { + OpenEtelServerL(EUseExtendedError); + CleanupStack::PushL(TCleanupItem(Cleanup,this)); + OpenPhoneL(); + + RBuf8 data; + CleanupClosePushL(data); + + RMobileUssdMessaging ussdMessaging; + TInt ret = ussdMessaging.Open(iPhone); + ASSERT_EQUALS(KErrNone, ret); + CleanupClosePushL(ussdMessaging); + + //------------------------------------------------------------------------- + // Setup: This block is taken from TestReceiveMessage0001L. All we want to + // do is to initiate a dialogue and then end it. Once the dialogue has ended + // then we can call Accept and Reject. + //------------------------------------------------------------------------- + + TRequestStatus requestStatus; + + TRequestStatus mockLtsyStatus; + + TUint32 flags = 100; + RMobileUssdMessaging::TMobileUssdDataFormat format = RMobileUssdMessaging::EFormatUnspecified; + RMobileUssdMessaging::TMobileUssdMessageType type = RMobileUssdMessaging::EUssdMORequest; + TUint8 dcs = 200; + + //------------------------------------------------------------------------- + // function parameters + + RMobileUssdMessaging::TMobileUssdAttributesV1 attributes; + TPckg msgAttributes(attributes); + + RMobileUssdMessaging::TGsmUssdMessageData name; + + //------------------------------------------------------------------------- + + RMobileUssdMessaging::TMobileUssdAttributesV1 completeAttributes; + + completeAttributes.iFlags = flags; + completeAttributes.iFormat = format; + completeAttributes.iType = type; + completeAttributes.iDcs = dcs; + + TBuf8 completeName = _L8("Name1"); + + TMockLtsyData2, RMobileUssdMessaging::TMobileUssdAttributesV1> + mockData2(completeName, completeAttributes); + mockData2.SerialiseL(data); + + iMockLTSY.CompleteL(EMobileUssdMessagingReceiveMessage, KErrNone, data); + + ussdMessaging.ReceiveMessage(requestStatus, name, msgAttributes); + User::WaitForRequest(requestStatus); + ret = requestStatus.Int(); + ASSERT_EQUALS(KErrNone, ret); + ussdMessaging.AcceptIncomingDialogue(); + + AssertMockLtsyStatusL(); + ASSERT_EQUALS(KErrNone, requestStatus.Int()); + + //------------------------------------------------------------------------- + // Terminate the dialogue + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- // function parameters @@ -2260,74 +3521,23 @@ TMockLtsyData2< RMobilePhone::TMobilePhoneSendSSRequestV3, RMobileUssdMessaging::TMobileUssdAttributesV1 > - mockData2(completeSendV3,completeAttrV1); + mockData2Release(completeSendV3,completeAttrV1); RBuf8 data2; CleanupClosePushL(data2); - mockData2.SerialiseL(data2); - - //------------------------------------------------------------------------- - // TEST B: failure on completion of pending request from LTSY->CTSY + mockData2Release.SerialiseL(data2); + //------------------------------------------------------------------------- - iMockLTSY.CompleteL(EMobileUssdMessagingNotifyNetworkRelease, KErrGeneral, data); - ussdMessaging.NotifyNetworkRelease(requestStatus, pckgSendV3); - - User::WaitForRequest(requestStatus); - AssertMockLtsyStatusL(); - ASSERT_EQUALS(KErrGeneral, requestStatus.Int()); - - + // TEST C: Successful completion request of + // RMobileUssdMessaging::NotifyNetworkRelease when result is not cached. // other version of API (with optional TMobileUssdAttributesV1 parameter) - - iMockLTSY.CompleteL(EMobileUssdMessagingNotifyNetworkRelease, KErrNotReady, data2); + //------------------------------------------------------------------------- + + iMockLTSY.CompleteL(EMobileUssdMessagingNotifyNetworkRelease, KErrNone, data2); ussdMessaging.NotifyNetworkRelease(requestStatus, pckgSendV3, pckgAttrV1); User::WaitForRequest(requestStatus); AssertMockLtsyStatusL(); - ASSERT_EQUALS(KErrNotReady, requestStatus.Int()); - - //------------------------------------------------------------------------- - // TEST E: Unsolicited completion of RMobileUssdMessaging::NotifyNetworkRelease - // from LTSY. - //------------------------------------------------------------------------- - - iMockLTSY.NotifyTerminated(mockLtsyStatus); - iMockLTSY.CompleteL(EMobileUssdMessagingNotifyNetworkRelease, KErrNone, data); - - // other version of API (with optional TMobileUssdAttributesV1 parameter) - - iMockLTSY.CompleteL(EMobileUssdMessagingNotifyNetworkRelease, KErrNone, data2); - User::WaitForRequest(mockLtsyStatus); - AssertMockLtsyStatusL(); - ASSERT_EQUALS(KErrNone, mockLtsyStatus.Int()); - - //------------------------------------------------------------------------- - // TEST C: Successful completion request of - // RMobileUssdMessaging::NotifyNetworkRelease when result is not cached. - //------------------------------------------------------------------------- - - iMockLTSY.CompleteL(EMobileUssdMessagingNotifyNetworkRelease, KErrNone, data); - ussdMessaging.NotifyNetworkRelease(requestStatus, pckgSendV3); - - User::WaitForRequest(requestStatus); - AssertMockLtsyStatusL(); - ASSERT_EQUALS(KErrNone, requestStatus.Int()); - - ASSERT_EQUALS(opCode, sendV3.iOpCode); - ASSERT_EQUALS(0, sendV3.iAdditionalInfo.Compare(KAdditionalInfo1)); - - - // other version of API (with optional TMobileUssdAttributesV1 parameter) - - ussdMessaging.Close(); - ret = ussdMessaging.Open(iPhone); - ASSERT_EQUALS(KErrNone, ret); - - iMockLTSY.CompleteL(EMobileUssdMessagingNotifyNetworkRelease, KErrNone, data2); - ussdMessaging.NotifyNetworkRelease(requestStatus, pckgSendV3, pckgAttrV1); - - User::WaitForRequest(requestStatus); - AssertMockLtsyStatusL(); ASSERT_EQUALS(KErrNone, requestStatus.Int()); ASSERT_EQUALS(opCode, sendV3.iOpCode); @@ -2336,11 +3546,262 @@ ASSERT_EQUALS(completeAttrV1.iFlags ,attrV1.iFlags); ASSERT_EQUALS(completeAttrV1.iFormat ,attrV1.iFormat); ASSERT_EQUALS(completeAttrV1.iType ,attrV1.iType); - - CleanupStack::PopAndDestroy(4, this); // data2, ussdMessaging, data, this, + + CleanupStack::PopAndDestroy(4, this); // data2, ussdMessaging, data, this, } +/** +@SYMTestCaseID BA-CTSY-USSDM-UNNR-0001c +@SYMComponent telephony_ctsy +@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::NotifyNetworkRelease +@SYMTestPriority High +@SYMTestActions Invokes RMobileUssdMessaging::NotifyNetworkRelease +@SYMTestExpectedResults Pass +@SYMTestType CT +*/ +void CCTsyUssdMessagingFU::TestNotifyNetworkRelease0001cL() + { + OpenEtelServerL(EUseExtendedError); + CleanupStack::PushL(TCleanupItem(Cleanup,this)); + OpenPhoneL(); + + RBuf8 data; + CleanupClosePushL(data); + + RMobileUssdMessaging ussdMessaging; + TInt ret = ussdMessaging.Open(iPhone); + ASSERT_EQUALS(KErrNone, ret); + CleanupClosePushL(ussdMessaging); + + //------------------------------------------------------------------------- + // Setup: This block is taken from TestReceiveMessage0001L. All we want to + // do is to initiate a dialogue and then end it. Once the dialogue has ended + // then we can call Accept and Reject. + //------------------------------------------------------------------------- + + TRequestStatus requestStatus; + + TRequestStatus mockLtsyStatus; + + TUint32 flags = 100; + RMobileUssdMessaging::TMobileUssdDataFormat format = RMobileUssdMessaging::EFormatUnspecified; + RMobileUssdMessaging::TMobileUssdMessageType type = RMobileUssdMessaging::EUssdMORequest; + TUint8 dcs = 200; + + //------------------------------------------------------------------------- + // function parameters + + RMobileUssdMessaging::TMobileUssdAttributesV1 attributes; + TPckg msgAttributes(attributes); + + RMobileUssdMessaging::TGsmUssdMessageData name; + + //------------------------------------------------------------------------- + + RMobileUssdMessaging::TMobileUssdAttributesV1 completeAttributes; + + completeAttributes.iFlags = flags; + completeAttributes.iFormat = format; + completeAttributes.iType = type; + completeAttributes.iDcs = dcs; + + TBuf8 completeName = _L8("Name1"); + + TMockLtsyData2, RMobileUssdMessaging::TMobileUssdAttributesV1> + mockData2(completeName, completeAttributes); + mockData2.SerialiseL(data); + + iMockLTSY.CompleteL(EMobileUssdMessagingReceiveMessage, KErrNone, data); + + ussdMessaging.ReceiveMessage(requestStatus, name, msgAttributes); + User::WaitForRequest(requestStatus); + ret = requestStatus.Int(); + ASSERT_EQUALS(KErrNone, ret); + ussdMessaging.AcceptIncomingDialogue(); + + AssertMockLtsyStatusL(); + ASSERT_EQUALS(KErrNone, requestStatus.Int()); + + //------------------------------------------------------------------------- + // Terminate the dialogue + //------------------------------------------------------------------------- + + //------------------------------------------------------------------------- + // function parameters + + RMobilePhone::TMobilePhoneSendSSRequestV3 sendV3; + TPckg pckgSendV3(sendV3); + + // optional parameter + RMobileUssdMessaging::TMobileUssdAttributesV1 attrV1; + RMobileUssdMessaging::TMobileUssdAttributesV1Pckg pckgAttrV1(attrV1); + //------------------------------------------------------------------------- + + RMobilePhone::TMobilePhoneSendSSRequestV3 completeSendV3; + + TUint8 opCode = 100; + _LIT(KAdditionalInfo1, "additionalInfo1"); + + completeSendV3.iOpCode = opCode; + completeSendV3.iAdditionalInfo = KAdditionalInfo1; + + TMockLtsyData1< RMobilePhone::TMobilePhoneSendSSRequestV3 > mockData1(completeSendV3); + mockData1.SerialiseL(data); + + // optional parameter + RMobileUssdMessaging::TMobileUssdAttributesV1 completeAttrV1; + completeAttrV1.iFlags = RMobileUssdMessaging::KUssdDataFormat | RMobileUssdMessaging::KUssdMessageType; + completeAttrV1.iFormat = RMobileUssdMessaging::EFormatPackedString; + completeAttrV1.iType = RMobileUssdMessaging::EUssdMOAcknowledgement; + + TMockLtsyData2< RMobilePhone::TMobilePhoneSendSSRequestV3, + RMobileUssdMessaging::TMobileUssdAttributesV1 > + mockData2Release(completeSendV3,completeAttrV1); + + RBuf8 data2; + CleanupClosePushL(data2); + mockData2Release.SerialiseL(data2); + + //------------------------------------------------------------------------- + // TEST B: failure on completion of pending request from LTSY->CTSY + //------------------------------------------------------------------------- + + // other version of API (with optional TMobileUssdAttributesV1 parameter) + iMockLTSY.CompleteL(EMobileUssdMessagingNotifyNetworkRelease, KErrNotReady, data2); + ussdMessaging.NotifyNetworkRelease(requestStatus, pckgSendV3, pckgAttrV1); + + User::WaitForRequest(requestStatus); + AssertMockLtsyStatusL(); + ASSERT_EQUALS(KErrNotReady, requestStatus.Int()); + + CleanupStack::PopAndDestroy(4, this); // data2, ussdMessaging, data, this, + + } + +/** +@SYMTestCaseID BA-CTSY-USSDM-UNNR-0001d +@SYMComponent telephony_ctsy +@SYMTestCaseDesc Test support in CTSY for RMobileUssdMessaging::NotifyNetworkRelease before accepting a dialogue +@SYMTestPriority High +@SYMTestActions Invokes RMobileUssdMessaging::NotifyNetworkRelease +@SYMTestExpectedResults Pass +@SYMTestType CT +*/ +void CCTsyUssdMessagingFU::TestNotifyNetworkRelease0001dL() + { + OpenEtelServerL(EUseExtendedError); + CleanupStack::PushL(TCleanupItem(Cleanup,this)); + OpenPhoneL(); + + RBuf8 data; + CleanupClosePushL(data); + + RMobileUssdMessaging ussdMessaging; + TInt ret = ussdMessaging.Open(iPhone); + ASSERT_EQUALS(KErrNone, ret); + CleanupClosePushL(ussdMessaging); + + //------------------------------------------------------------------------- + // Setup: This block is taken from TestReceiveMessage0001L. All we want to + // do is to initiate a dialogue and then end it. Once the dialogue has ended + // then we can call Accept and Reject. + //------------------------------------------------------------------------- + + TRequestStatus requestStatus; + + TRequestStatus mockLtsyStatus; + + TUint32 flags = 100; + RMobileUssdMessaging::TMobileUssdDataFormat format = RMobileUssdMessaging::EFormatUnspecified; + RMobileUssdMessaging::TMobileUssdMessageType type = RMobileUssdMessaging::EUssdMORequest; + TUint8 dcs = 200; + + //------------------------------------------------------------------------- + // function parameters + + RMobileUssdMessaging::TMobileUssdAttributesV1 attributes; + TPckg msgAttributes(attributes); + + RMobileUssdMessaging::TGsmUssdMessageData name; + + //------------------------------------------------------------------------- + + RMobileUssdMessaging::TMobileUssdAttributesV1 completeAttributes; + + completeAttributes.iFlags = flags; + completeAttributes.iFormat = format; + completeAttributes.iType = type; + completeAttributes.iDcs = dcs; + + TBuf8 completeName = _L8("Name1"); + + TMockLtsyData2, RMobileUssdMessaging::TMobileUssdAttributesV1> + mockData2(completeName, completeAttributes); + mockData2.SerialiseL(data); + + iMockLTSY.CompleteL(EMobileUssdMessagingReceiveMessage, KErrNone, data); + + ussdMessaging.ReceiveMessage(requestStatus, name, msgAttributes); + User::WaitForRequest(requestStatus); + ret = requestStatus.Int(); + ASSERT_EQUALS(KErrNone, ret); + + AssertMockLtsyStatusL(); + ASSERT_EQUALS(KErrNone, requestStatus.Int()); + + //------------------------------------------------------------------------- + // Terminate the dialogue + //------------------------------------------------------------------------- + + //------------------------------------------------------------------------- + // function parameters + + RMobilePhone::TMobilePhoneSendSSRequestV3 sendV3; + TPckg pckgSendV3(sendV3); + + // optional parameter + RMobileUssdMessaging::TMobileUssdAttributesV1 attrV1; + RMobileUssdMessaging::TMobileUssdAttributesV1Pckg pckgAttrV1(attrV1); + //------------------------------------------------------------------------- + + RMobilePhone::TMobilePhoneSendSSRequestV3 completeSendV3; + + TUint8 opCode = 100; + _LIT(KAdditionalInfo1, "additionalInfo1"); + + completeSendV3.iOpCode = opCode; + completeSendV3.iAdditionalInfo = KAdditionalInfo1; + + TMockLtsyData1< RMobilePhone::TMobilePhoneSendSSRequestV3 > mockData1(completeSendV3); + mockData1.SerialiseL(data); + + // optional parameter + RMobileUssdMessaging::TMobileUssdAttributesV1 completeAttrV1; + completeAttrV1.iFlags = RMobileUssdMessaging::KUssdDataFormat | RMobileUssdMessaging::KUssdMessageType; + completeAttrV1.iFormat = RMobileUssdMessaging::EFormatPackedString; + completeAttrV1.iType = RMobileUssdMessaging::EUssdMOAcknowledgement; + + TMockLtsyData2< RMobilePhone::TMobilePhoneSendSSRequestV3, + RMobileUssdMessaging::TMobileUssdAttributesV1 > + mockData2Release(completeSendV3,completeAttrV1); + + RBuf8 data2; + CleanupClosePushL(data2); + mockData2Release.SerialiseL(data2); + + //Testing NotifyNetworkRelease() before accepting the dialogue, + //so that the requests are not always very sequential + ussdMessaging.NotifyNetworkRelease(requestStatus, pckgSendV3, pckgAttrV1); + ussdMessaging.AcceptIncomingDialogue(); + + User::WaitForRequest(requestStatus); + AssertMockLtsyStatusL(); + ASSERT_EQUALS(KErrDisconnected, requestStatus.Int()); + + CleanupStack::PopAndDestroy(4, this); // data2, ussdMessaging, data, this + + } /** @SYMTestCaseID BA-CTSY-USSDM-UNNR-0002 @@ -2353,24 +3814,78 @@ */ void CCTsyUssdMessagingFU::TestNotifyNetworkRelease0002L() { - OpenEtelServerL(EUseExtendedError); - CleanupStack::PushL(TCleanupItem(Cleanup,this)); - OpenPhoneL(); - - TRequestStatus requestStatus; - - RMobileUssdMessaging ussdMessaging; - TInt ret = ussdMessaging.Open(iPhone); - ASSERT_EQUALS(KErrNone, ret); - CleanupClosePushL(ussdMessaging); + OpenEtelServerL(EUseExtendedError); + CleanupStack::PushL(TCleanupItem(Cleanup,this)); + OpenPhoneL(); + + RBuf8 data; + CleanupClosePushL(data); + + RMobileUssdMessaging ussdMessaging; + TInt ret = ussdMessaging.Open(iPhone); + ASSERT_EQUALS(KErrNone, ret); + CleanupClosePushL(ussdMessaging); + + //------------------------------------------------------------------------- + // Setup: This block is taken from TestReceiveMessage0001L. All we want to + // do is to initiate a dialogue and then end it. Once the dialogue has ended + // then we can call Accept and Reject. + //------------------------------------------------------------------------- + + TRequestStatus requestStatus; + + TRequestStatus mockLtsyStatus; + + TUint32 flags = 100; + RMobileUssdMessaging::TMobileUssdDataFormat format = RMobileUssdMessaging::EFormatUnspecified; + RMobileUssdMessaging::TMobileUssdMessageType type = RMobileUssdMessaging::EUssdMORequest; + TUint8 dcs = 200; + + //------------------------------------------------------------------------- + // function parameters + + RMobileUssdMessaging::TMobileUssdAttributesV1 attributes; + TPckg msgAttributes(attributes); + + RMobileUssdMessaging::TGsmUssdMessageData name; + + //------------------------------------------------------------------------- + + RMobileUssdMessaging::TMobileUssdAttributesV1 completeAttributes; + + completeAttributes.iFlags = flags; + completeAttributes.iFormat = format; + completeAttributes.iType = type; + completeAttributes.iDcs = dcs; + + TBuf8 completeName = _L8("Name1"); + + TMockLtsyData2, RMobileUssdMessaging::TMobileUssdAttributesV1> + mockData2(completeName, completeAttributes); + mockData2.SerialiseL(data); + + iMockLTSY.CompleteL(EMobileUssdMessagingReceiveMessage, KErrNone, data); + + ussdMessaging.ReceiveMessage(requestStatus, name, msgAttributes); + User::WaitForRequest(requestStatus); + ret = requestStatus.Int(); + ASSERT_EQUALS(KErrNone, ret); + ussdMessaging.AcceptIncomingDialogue(); + + AssertMockLtsyStatusL(); + ASSERT_EQUALS(KErrNone, requestStatus.Int()); + + //------------------------------------------------------------------------- + // Terminate the dialogue + //------------------------------------------------------------------------- RMobilePhone::TMobilePhoneSendSSRequestV3 sendV3; TPckg pckgSendV3(sendV3); - + //------------------------------------------------------------------------- // Test cancelling of RMobileUssdMessaging::NotifyNetworkRelease //------------------------------------------------------------------------- - + ussdMessaging.NotifyNetworkRelease(requestStatus, pckgSendV3); ussdMessaging.CancelAsyncRequest(EMobileUssdMessagingNotifyNetworkRelease); @@ -2380,18 +3895,19 @@ AssertMockLtsyStatusL(); // again with the optional parameter + RMobileUssdMessaging::TMobileUssdAttributesV1 attrV1; RMobileUssdMessaging::TMobileUssdAttributesV1Pckg pckgAttrV1(attrV1); ussdMessaging.NotifyNetworkRelease(requestStatus, pckgSendV3, pckgAttrV1); ussdMessaging.CancelAsyncRequest(EMobileUssdMessagingNotifyNetworkRelease); - + User::WaitForRequest(requestStatus); ASSERT_EQUALS(KErrCancel, requestStatus.Int()); - AssertMockLtsyStatusL(); - CleanupStack::PopAndDestroy(2); // this, ussdMessaging - + AssertMockLtsyStatusL(); + + CleanupStack::PopAndDestroy(3); // this, ussdMessaging, data } /** @@ -2405,19 +3921,70 @@ */ void CCTsyUssdMessagingFU::TestNotifyNetworkRelease0003L() { - OpenEtelServerL(EUseExtendedError); - CleanupStack::PushL(TCleanupItem(Cleanup,this)); - OpenPhoneL(); - - RBuf8 data; - CleanupClosePushL(data); - - TRequestStatus requestStatus; - - RMobileUssdMessaging ussdMessaging; - TInt ret = ussdMessaging.Open(iPhone); - ASSERT_EQUALS(KErrNone, ret); - CleanupClosePushL(ussdMessaging); + OpenEtelServerL(EUseExtendedError); + CleanupStack::PushL(TCleanupItem(Cleanup,this)); + OpenPhoneL(); + + RBuf8 data; + CleanupClosePushL(data); + + RMobileUssdMessaging ussdMessaging; + TInt ret = ussdMessaging.Open(iPhone); + ASSERT_EQUALS(KErrNone, ret); + CleanupClosePushL(ussdMessaging); + + //------------------------------------------------------------------------- + // Setup: This block is taken from TestReceiveMessage0001L. All we want to + // do is to initiate a dialogue and then end it. Once the dialogue has ended + // then we can call Accept and Reject. + //------------------------------------------------------------------------- + + TRequestStatus requestStatus; + + TRequestStatus mockLtsyStatus; + + TUint32 flags = 100; + RMobileUssdMessaging::TMobileUssdDataFormat format = RMobileUssdMessaging::EFormatUnspecified; + RMobileUssdMessaging::TMobileUssdMessageType type = RMobileUssdMessaging::EUssdMORequest; + TUint8 dcs = 200; + + //------------------------------------------------------------------------- + // function parameters + + RMobileUssdMessaging::TMobileUssdAttributesV1 attributes; + TPckg msgAttributes(attributes); + + RMobileUssdMessaging::TGsmUssdMessageData name; + + //------------------------------------------------------------------------- + + RMobileUssdMessaging::TMobileUssdAttributesV1 completeAttributes; + + completeAttributes.iFlags = flags; + completeAttributes.iFormat = format; + completeAttributes.iType = type; + completeAttributes.iDcs = dcs; + + TBuf8 completeName = _L8("Name1"); + + TMockLtsyData2, RMobileUssdMessaging::TMobileUssdAttributesV1> + mockData2(completeName, completeAttributes); + mockData2.SerialiseL(data); + + iMockLTSY.CompleteL(EMobileUssdMessagingReceiveMessage, KErrNone, data); + + ussdMessaging.ReceiveMessage(requestStatus, name, msgAttributes); + User::WaitForRequest(requestStatus); + ret = requestStatus.Int(); + ASSERT_EQUALS(KErrNone, ret); + ussdMessaging.AcceptIncomingDialogue(); + + AssertMockLtsyStatusL(); + ASSERT_EQUALS(KErrNone, requestStatus.Int()); + + //------------------------------------------------------------------------- + // Terminate the dialogue + //------------------------------------------------------------------------- //------------------------------------------------------------------------- // Test B: Test passing wrong descriptor size to parameter in @@ -2442,6 +4009,7 @@ ASSERT_EQUALS(KErrArgument, requestStatus.Int()); CleanupStack::PopAndDestroy(3); // this, ussdMessaging, data + } /** @@ -2517,7 +4085,7 @@ User::WaitForRequest(requestStatus1); AssertMockLtsyStatusL(); ASSERT_EQUALS(KErrNone, requestStatus1.Int()); - + //------------------------------------------------------------------------- // parameters for first function @@ -2545,6 +4113,7 @@ RMobileUssdMessaging::TMobileUssdAttributesV1 > mockData2(completeSendV31,completeAttrV1); + RBuf8 data2; CleanupClosePushL(data2); mockData2.SerialiseL(data2); @@ -2559,8 +4128,8 @@ // Test A: Test multiple clients requesting RMobileUssdMessaging::NotifyNetworkRelease //------------------------------------------------------------------------- - mockData11.SerialiseL(data); - iMockLTSY.CompleteL(EMobileUssdMessagingNotifyNetworkRelease, KErrNone, data, 10); + mockData11.SerialiseL(data2); + iMockLTSY.CompleteL(EMobileUssdMessagingNotifyNetworkRelease, KErrNone, data2, 10); ussdMessaging1.NotifyNetworkRelease(requestStatus1, pckgSendV31); ussdMessaging2.NotifyNetworkRelease(requestStatus2, pckgSendV32); @@ -2576,14 +4145,131 @@ ASSERT_EQUALS(opCode1, sendV32.iOpCode); ASSERT_EQUALS(0, sendV32.iAdditionalInfo.Compare(KAdditionalInfo1)); - - AssertMockLtsyStatusL(); - - // - // repeat tests with optional second parameter - // + + CleanupStack::PopAndDestroy(7, this); // phone2, telServer2, data, this + // ussdMessaging1, ussdMessaging2, data2 (inv. order) + } + +//// +/** +@SYMTestCaseID BA-CTSY-USSDM-UNNR-0004b +@SYMComponent telephony_ctsy +@SYMTestCaseDesc Test support in CTSY for multiple client requests to RMobileUssdMessaging::NotifyNetworkRelease +@SYMTestPriority High +@SYMTestActions Invokes multiple client requests to RMobileUssdMessaging::NotifyNetworkRelease +@SYMTestExpectedResults Pass +@SYMTestType CT +*/ +void CCTsyUssdMessagingFU::TestNotifyNetworkRelease0004bL() + { + OpenEtelServerL(EUseExtendedError); + CleanupStack::PushL(TCleanupItem(Cleanup,this)); + OpenPhoneL(); + + TRequestStatus requestStatus1; + TRequestStatus requestStatus2; + + RBuf8 data; + CleanupClosePushL(data); + + // Open second client + RTelServer telServer2; + TInt ret = telServer2.Connect(); + ASSERT_EQUALS(KErrNone, ret); + CleanupClosePushL(telServer2); + + RMobilePhone phone2; + ret = phone2.Open(telServer2,KMmTsyPhoneName); + ASSERT_EQUALS(KErrNone, ret); + CleanupClosePushL(phone2); + + RMobileUssdMessaging ussdMessaging1; + ret = ussdMessaging1.Open(iPhone); + ASSERT_EQUALS(KErrNone, ret); + CleanupClosePushL(ussdMessaging1); + + RMobileUssdMessaging ussdMessaging2; + ret = ussdMessaging2.Open(iPhone); + ASSERT_EQUALS(KErrNone, ret); + CleanupClosePushL(ussdMessaging2); + + //------------------------------------------------------------------------- + // The first client needs to send a message. This will cause a session to be opened + // which will be owned by the first client. + TUint32 flags = 100; + RMobileUssdMessaging::TMobileUssdDataFormat format = RMobileUssdMessaging::EFormatUnspecified; + RMobileUssdMessaging::TMobileUssdMessageType type = RMobileUssdMessaging::EUssdMORequest; + TUint8 dcs = 200; + + RMobileUssdMessaging::TMobileUssdAttributesV1 attributes; + TPckg msgAttributes(attributes); + + attributes.iFlags = flags; + attributes.iFormat = format; + attributes.iType = type; + attributes.iDcs = dcs; + + TName name = _L("Name1"); + TPckg msgData(name); + + TMockLtsyData2 + mockSendData2(name, attributes); + mockSendData2.SerialiseL(data); + + iMockLTSY.ExpectL(EMobileUssdMessagingSendMessage, data); + iMockLTSY.CompleteL(EMobileUssdMessagingSendMessage, KErrNone); + + ussdMessaging1.SendMessage(requestStatus1, msgData, msgAttributes); + + User::WaitForRequest(requestStatus1); + AssertMockLtsyStatusL(); + ASSERT_EQUALS(KErrNone, requestStatus1.Int()); + + //------------------------------------------------------------------------- + // parameters for first function + + RMobilePhone::TMobilePhoneSendSSRequestV3 sendV31; + TPckg pckgSendV31(sendV31); + + //------------------------------------------------------------------------- + + RMobilePhone::TMobilePhoneSendSSRequestV3 completeSendV31; + + TUint8 opCode1 = 100; + _LIT(KAdditionalInfo1, "additionalInfo1"); + + completeSendV31.iOpCode = opCode1; + completeSendV31.iAdditionalInfo = KAdditionalInfo1; + + TMockLtsyData1< RMobilePhone::TMobilePhoneSendSSRequestV3 > mockData11(completeSendV31); + + RMobileUssdMessaging::TMobileUssdAttributesV1 completeAttrV1; + completeAttrV1.iFlags = RMobileUssdMessaging::KUssdDataFormat | RMobileUssdMessaging::KUssdMessageType; + completeAttrV1.iFormat = RMobileUssdMessaging::EFormatPackedString; + completeAttrV1.iType = RMobileUssdMessaging::EUssdMTRequest; + + TMockLtsyData2< RMobilePhone::TMobilePhoneSendSSRequestV3, + RMobileUssdMessaging::TMobileUssdAttributesV1 > + mockData2(completeSendV31,completeAttrV1); + + + RBuf8 data2; + CleanupClosePushL(data2); + mockData2.SerialiseL(data2); + + //------------------------------------------------------------------------- + // parameters for second function + + RMobilePhone::TMobilePhoneSendSSRequestV3 sendV32; + TPckg pckgSendV32(sendV32); + + //------------------------------------------------------------------------- + // Test B: Test multiple clients requesting RMobileUssdMessaging::NotifyNetworkRelease + // with optional second parameter + //------------------------------------------------------------------------- + ussdMessaging1.Close(); ret = ussdMessaging1.Open(iPhone); ASSERT_EQUALS(KErrNone, ret); @@ -2601,17 +4287,17 @@ ussdMessaging1.NotifyNetworkRelease(requestStatus1, pckgSendV31, pckgAttrV1); ussdMessaging2.NotifyNetworkRelease(requestStatus2, pckgSendV32, pckgAttrV12); - User::WaitForRequest(requestStatus1); + User::WaitForRequest(requestStatus1); ASSERT_EQUALS(KErrNone, requestStatus1.Int()); - User::WaitForRequest(requestStatus2); + User::WaitForRequest(requestStatus2); ASSERT_EQUALS(KErrNone, requestStatus2.Int()); - + ASSERT_EQUALS(opCode1, sendV31.iOpCode); ASSERT_EQUALS(0, sendV31.iAdditionalInfo.Compare(KAdditionalInfo1)); ASSERT_EQUALS(opCode1, sendV32.iOpCode); - ASSERT_EQUALS(0, sendV32.iAdditionalInfo.Compare(KAdditionalInfo1)); + ASSERT_EQUALS(0, sendV32.iAdditionalInfo.Compare(KAdditionalInfo1)); ASSERT_EQUALS(completeAttrV1.iFlags ,attrV1.iFlags); ASSERT_EQUALS(completeAttrV1.iFormat ,attrV1.iFormat); @@ -2620,11 +4306,11 @@ ASSERT_EQUALS(completeAttrV1.iFlags ,attrV12.iFlags); ASSERT_EQUALS(completeAttrV1.iFormat ,attrV12.iFormat); ASSERT_EQUALS(completeAttrV1.iType ,attrV12.iType); - + CleanupStack::PopAndDestroy(7, this); // phone2, telServer2, data, this // ussdMessaging1, ussdMessaging2, data2 (inv. order) - } +//// /** @SYMTestCaseID BA-CTSY-USSDM-USMNFC-0001 @@ -2697,12 +4383,10 @@ ussdMessaging.SendMessageNoFdnCheck(requestStatus, msgData, msgAttributes); - /* - * Wrong IPC is passed to ResetTsyReqHandle() EMultimodeUssdSendMessage - * instead of EMultimodeUssdSendMessageNoFdnCheck by call of - * CMmUssdTsy::CompleteSendMessageNoFdnCheck(). This reduces to panic - * with EEtelFaultNotRecognisedTsyHandle. - */ + //Wrong IPC is passed to ResetTsyReqHandle() EMultimodeUssdSendMessage + //instead of EMultimodeUssdSendMessageNoFdnCheck by call of + //CMmUssdTsy::CompleteSendMessageNoFdnCheck(). This reduces to panic + //with EEtelFaultNotRecognisedTsyHandle. User::WaitForRequest(requestStatus); AssertMockLtsyStatusL(); @@ -2750,6 +4434,7 @@ */ void CCTsyUssdMessagingFU::TestSendMessageNoFdnCheck0002L() { + OpenEtelServerL(EUseExtendedError); CleanupStack::PushL(TCleanupItem(Cleanup,this)); OpenPhoneL(); @@ -2825,7 +4510,6 @@ */ void CCTsyUssdMessagingFU::TestSendMessageNoFdnCheck0003L() { - OpenEtelServerL(EUseExtendedError); CleanupStack::PushL(TCleanupItem(Cleanup,this)); OpenPhoneL(); @@ -2860,7 +4544,6 @@ ASSERT_EQUALS(KErrArgument, requestStatus.Int()); CleanupStack::PopAndDestroy(3, this); // data, this, ussdMessaging, ussdMessaging - } /** @@ -2874,8 +4557,6 @@ */ void CCTsyUssdMessagingFU::TestSendMessageNoFdnCheck0004L() { - - OpenEtelServerL(EUseExtendedError); CleanupStack::PushL(TCleanupItem(Cleanup,this)); OpenPhoneL(); @@ -2970,7 +4651,6 @@ CleanupStack::PopAndDestroy(6, this); // phone2, telServer2, data, this, // ussdMessaging1, ussdMessaging2 - } /** @@ -2984,8 +4664,6 @@ */ void CCTsyUssdMessagingFU::TestSendMessageNoFdnCheck0005L() { - - OpenEtelServerL(EUseExtendedError); CleanupStack::PushL(TCleanupItem(Cleanup,this)); OpenPhoneL(); @@ -3038,7 +4716,6 @@ ASSERT_EQUALS(KErrTimedOut, requestStatus.Int()); CleanupStack::PopAndDestroy(3, this); // data, this, ussdMessaging - } /** @@ -3051,8 +4728,7 @@ @SYMTestType CT */ void CCTsyUssdMessagingFU::TestGetCaps0001L() - { - + { OpenEtelServerL(EUseExtendedError); CleanupStack::PushL(TCleanupItem(Cleanup,this)); OpenPhoneL(); @@ -3061,11 +4737,11 @@ TInt ret = ussdMessaging.Open(iPhone); ASSERT_EQUALS(KErrNone, ret); CleanupClosePushL(ussdMessaging); - + TUint32 format = RMobileUssdMessaging::KCapsPackedString; TUint32 types = KUssdTypeCaps; - - //------------------------------------------------------------------------- + + //------------------------------------------------------------------------- // TEST C: Successful completion request of // RMobileUssdMessaging::GetCaps when result is not cached. //------------------------------------------------------------------------- @@ -3074,12 +4750,10 @@ TPckg pckg(capsV1); ret = ussdMessaging.GetCaps(pckg); ASSERT_EQUALS(KErrNone, ret); - ASSERT_EQUALS(format, capsV1.iUssdFormat); // hard coded value ASSERT_EQUALS(types , capsV1.iUssdTypes ); // hard coded value CleanupStack::PopAndDestroy(2, this); // this, ussdMessaging - } /** @@ -3093,7 +4767,7 @@ */ void CCTsyUssdMessagingFU::TestGetCaps0003L() { - + OpenEtelServerL(EUseExtendedError); CleanupStack::PushL(TCleanupItem(Cleanup,this)); OpenPhoneL(); @@ -3114,7 +4788,7 @@ ASSERT_EQUALS(KErrArgument, ret); CleanupStack::PopAndDestroy(2, this); // this, ussdMessaging - + } @@ -3293,6 +4967,7 @@ void CCTsyUssdMessagingFU::TestReceiveMessageWithTestClientL(RArray & aClientTestData, TBool aRandomLoopingTest) { + OpenEtelServerL(EUseExtendedError); CleanupStack::PushL(TCleanupItem(Cleanup,this)); OpenPhoneL(); @@ -3337,7 +5012,7 @@ // Fail the test if any client has not been created properly ASSERT_EQUALS(err, KErrNone); } - + // All processes created successfully, start their execution for (TInt i = 0; i < numClients; i++) { @@ -3347,7 +5022,7 @@ // Resolves timing issues in WDP/SMP. User::After(500000); } - + if (aRandomLoopingTest) { // Special case just for TestReceiveMessageWithTestClient0017L @@ -3697,7 +5372,7 @@ } /* -@SYMTestCaseID BA-CTSY-USSDM-URM-0020 +@SYMTestCaseID BA-CTSY-USSDM-URM-0021 @SYMComponent telephony_ctsy @SYMTestCaseDesc Test ReceiveMessage with multiple clients. @SYMTestPriority High @@ -3728,8 +5403,7 @@ @SYMTestType CT */ void CCTsyUssdMessagingFU::TestAcceptRejectMisuse0001L() - { - + { OpenEtelServerL(EUseExtendedError); CleanupStack::PushL(TCleanupItem(Cleanup,this)); OpenPhoneL(); @@ -3750,6 +5424,7 @@ AssertMockLtsyStatusL(); CleanupStack::PopAndDestroy(2, this); // this, ussdMessaging + } /** @@ -3763,7 +5438,7 @@ */ void CCTsyUssdMessagingFU::TestAcceptRejectMisuse0002L() { - + OpenEtelServerL(EUseExtendedError); CleanupStack::PushL(TCleanupItem(Cleanup,this)); OpenPhoneL(); @@ -3862,14 +5537,15 @@ AssertMockLtsyStatusL(); CleanupStack::PopAndDestroy(3, this); // data, this, ussdMessaging + } /** @SYMTestCaseID BA-CTSY-USSDM-MIUM-0001 @SYMComponent telephony_ctsy -@SYMTestCaseDesc xxx +@SYMTestCaseDesc BA-CTSY-USSDM-MIUM-0001 @SYMTestPriority High -@SYMTestActions xxx +@SYMTestActions Client calls ReceiveMessage. First USSD message arrives and is offered to client. @SYMTestExpectedResults Pass @SYMTestType CT */ @@ -3938,5 +5614,6 @@ AssertMockLtsyStatusL(); CleanupStack::PopAndDestroy(3, this); // data, this, ussdMessaging + } diff -r 6fbc08ed9c42 -r 930a53cdc2d3 telephonyserverplugins/ctsydispatchlayer/inc/csupplementaryservicesdispatcher.h --- a/telephonyserverplugins/ctsydispatchlayer/inc/csupplementaryservicesdispatcher.h Fri Jun 04 13:03:15 2010 +0100 +++ b/telephonyserverplugins/ctsydispatchlayer/inc/csupplementaryservicesdispatcher.h Thu Oct 07 19:32:01 2010 +0300 @@ -91,6 +91,7 @@ TInt DispatchSetSsPasswordL(const CMmDataPackage* aDataPackage); TInt DispatchGetCallForwardingStatusL(const CMmDataPackage* aDataPackage); TInt DispatchSendUssdMessageL(const CMmDataPackage* aDataPackage); + TInt DispatchSendUssdMessageDefaultHandlerL(const CMmDataPackage* aDataPackage); TInt DispatchSendUssdMessageNoFdnCheckL(const CMmDataPackage* aDataPackage); TInt DispatchSendUssdReleaseL(); TInt DispatchClearBlacklistL(); diff -r 6fbc08ed9c42 -r 930a53cdc2d3 telephonyserverplugins/ctsydispatchlayer/src/cmessagerouter.cpp --- a/telephonyserverplugins/ctsydispatchlayer/src/cmessagerouter.cpp Fri Jun 04 13:03:15 2010 +0100 +++ b/telephonyserverplugins/ctsydispatchlayer/src/cmessagerouter.cpp Thu Oct 07 19:32:01 2010 +0300 @@ -867,7 +867,10 @@ break; case EMobileUssdMessagingSendMessage: ret = iCtsyDispatcherSupplementaryServicesDispatcher->DispatchSendUssdMessageL(aDataPackage); - break; + break; + case EMobileUssdMessagingSendMessageDefaultHandler: + ret = iCtsyDispatcherSupplementaryServicesDispatcher->DispatchSendUssdMessageDefaultHandlerL(aDataPackage); + break; case EMobileUssdMessagingSendMessageNoFdnCheck: ret = iCtsyDispatcherSupplementaryServicesDispatcher->DispatchSendUssdMessageNoFdnCheckL(aDataPackage); break; diff -r 6fbc08ed9c42 -r 930a53cdc2d3 telephonyserverplugins/ctsydispatchlayer/src/csupplementaryservicesdispatcher.cpp --- a/telephonyserverplugins/ctsydispatchlayer/src/csupplementaryservicesdispatcher.cpp Fri Jun 04 13:03:15 2010 +0100 +++ b/telephonyserverplugins/ctsydispatchlayer/src/csupplementaryservicesdispatcher.cpp Thu Oct 07 19:32:01 2010 +0300 @@ -519,6 +519,42 @@ return TSYLOGSETEXITERR(ret); } // CSupplementaryServicesDispatcher::DispatchSendUssdMessageL +TInt CSupplementaryServicesDispatcher::DispatchSendUssdMessageDefaultHandlerL(const CMmDataPackage* aDataPackage) +/** + * Unpack data related to EMobileUssdMessagingSendMessage + * and pass request on to Licensee LTSY. + * + * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if + * the Licensee LTSY does not support this request. + */ + { + TSYLOGENTRYEXIT; + TInt ret = KErrNotSupported; + + __ASSERT_DEBUG(aDataPackage, CtsyDispatcherPanic(EInvalidNullPtr)); + + // Call Handle... method in Licensee LTSY + if (iLtsyDispatchSupplementaryServicesSendUssdMessage) + { + RMobileUssdMessaging::TMobileUssdAttributesV1Pckg** attributesPckg = NULL; + RMobileUssdMessaging::TGsmUssdMessageData* data = NULL; + aDataPackage->UnPackData(&data, &attributesPckg); + + __ASSERT_DEBUG(attributesPckg, CtsyDispatcherPanic(EInvalidNullPtr)); + __ASSERT_DEBUG(data, CtsyDispatcherPanic(EInvalidNullPtr)); + + const RMobileUssdMessaging::TMobileUssdAttributesV1& attributes =(**attributesPckg)(); + + ret = iLtsyDispatchSupplementaryServicesSendUssdMessage->HandleSendUssdMessageReqL(*data, + attributes.iDcs, + attributes.iFormat, + attributes.iType); + } + + return TSYLOGSETEXITERR(ret); + } // CSupplementaryServicesDispatcher::DispatchSendUssdMessageL + + TInt CSupplementaryServicesDispatcher::DispatchSendUssdMessageNoFdnCheckL(const CMmDataPackage* aDataPackage) /** * Unpack data related to EMobileUssdMessagingSendMessageNoFdnCheck diff -r 6fbc08ed9c42 -r 930a53cdc2d3 telephonyserverplugins/licenseetsystub/licensee_tsy_stub/src/cmmmockmesshandler.cpp --- a/telephonyserverplugins/licenseetsystub/licensee_tsy_stub/src/cmmmockmesshandler.cpp Fri Jun 04 13:03:15 2010 +0100 +++ b/telephonyserverplugins/licenseetsystub/licensee_tsy_stub/src/cmmmockmesshandler.cpp Thu Oct 07 19:32:01 2010 +0300 @@ -109,6 +109,7 @@ case EMobilePhoneStoreWrite: case EMobileBroadcastMessagingReceiveMessage: case EMobileUssdMessagingSendMessage: + case EMobileUssdMessagingSendMessageDefaultHandler: case EMobileSmsMessagingGetMessageStoreInfo: case EMobileSmsMessagingGetSmspListPhase1: case EMobilePhoneStoreReadAllPhase1: