enum TVerdict CTestIdna07::doTestStepL() { INFO_PRINTF1(_L(" Testing Punycode to IDN Conversion functionality ")); INFO_PRINTF1(_L("****************************************************")); SetTestStepResult(EFail); // By default start the test case with failure. _LIT8(KPunyCodeName,"xn--rksmrgs-5wao1o.josefsson.org"); TPunyCodeDndName punyCodeName; punyCodeName.Copy(KPunyCodeName()); _LIT(KIDNName1,"räksmörgås.josefsson.org"); TName myHostName ; TInt start =0; TInt err=punyCodeName.PunycodeToIdn(myHostName,start); if(err != KErrNone) { User::LeaveIfError(KErrNone); // just to suppress the LeaveScan warning INFO_PRINTF1(_L("Conversion of Punycode to IDN is NOT successful ")); SetTestStepResult(EFail); return TestStepResult(); } if( myHostName.Compare(KIDNName1()) == 0) { INFO_PRINTF1(_L(" Conversion of Punycode to IDN is successful")); SetTestStepResult(EPass); } return TestStepResult(); }
// --------------------------------------------------------------------------- // CMmCallList::RemoveCallsByLine // Removes Call objects from Call list that has been opened // from the Line (which name is given as a input parameter). // --------------------------------------------------------------------------- // void CMmCallList::RemoveCallsByLine( const TName* aLineName ) { //if call list exists if ( iObjectContainer ) { TInt callCount = iObjectContainer->Count(); TInt index( 0 ); //search through call list for ( TInt i = 0; i < callCount; i++ ) { //get current call CMmCallTsy* mmCall = reinterpret_cast<CMmCallTsy*>( iObjectContainer->At( index ) ); //get the name of the line from which this call has been opened. //see class CMmLineTsy to see how the call object naming works. TName curLineName = mmCall-> CallName().Left( aLineName->Length() ); //if the name is the same as the line name given as input param. if ( curLineName.Compare( *aLineName ) == 0 ) { //close this call mmCall->Close(); index--; } index++; } } }
TBool CFsObjectCon::NamesMatch(const TName& anObjectName, const CFsObject* aCurrentObject) const // // // { if (aCurrentObject->iName==NULL) // current object has no name, therefore not the same return(EFalse); return(anObjectName.Compare(*aCurrentObject->iName)==0); // short names are different, therefore not the same }
/** @SYMTestCaseID BA-CTSY-SESMG-TGTN-0001 @SYMComponent telephony_ctsy @SYMTestCaseDesc Test support in CTSY for RTelServer::GetTsyName @SYMTestPriority High @SYMTestActions Invokes RTelServer::GetTsyName @SYMTestExpectedResults Pass @SYMTestType CT */ void CCTsySessionManagementFU::TestGetTsyName0001L() { OpenEtelServerL(EUseExtendedError); CleanupStack::PushL(TCleanupItem(Cleanup,this)); TInt index(0); TName tsyName; _LIT(KTsyName, "PHONETSY"); TInt ret = iTelServer.GetTsyName(index, tsyName); ASSERT_EQUALS(KErrNone, ret); ASSERT_EQUALS(0, tsyName.Compare(KTsyName)); CleanupStack::PopAndDestroy(1, this); }
void CTsyConfig::GetRequestedTableViewsL() { if (iDbSession == NULL) { #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY iDbSession = CMDBSession::NewL(KCDVersion1_2); #else iDbSession = CMDBSession::NewL(KCDVersion1_1); #endif __ASSERT_DEBUG(iDbSession,Panic(ETsyConfigNullDBPointer)); iModemBearer = 0; CMDBField<TUint32>* bearerField = new(ELeave) CMDBField<TUint32>(KCDTIdIAPBearer); CleanupStack::PushL(bearerField); bearerField->SetRecordId(iMMTableSettings.iLocId); bearerField->LoadL(*iDbSession); iModemBearer = *bearerField; CleanupStack::PopAndDestroy(bearerField); } TName modem; CMDBField<TDesC>* tsyField = new(ELeave) CMDBField<TDesC>(KCDTIdTsyName); CleanupStack::PushL(tsyField); tsyField->SetRecordId(iModemBearer); tsyField->SetMaxLengthL(KMaxTextLength); tsyField->LoadL(*iDbSession); modem = *tsyField; CleanupStack::PopAndDestroy(tsyField); if(modem.Compare(_L("MM"))!=KErrNone) { // Selected bearer does not mention the MMTSY LOCAL_LOGTEXT("GetCurrentSettingsL","Bearer for selected IAP does not use MMTSY"); __ASSERT_DEBUG(EFalse,Panic(ETsyConfigMMTSYNotInModemTables)); User::Leave(KErrNotFound); } }
// --------------------------------------------------------------------------- // CMmCallList::GetMmCallByIndexAndLine // Returns call object by index and line. // --------------------------------------------------------------------------- // CMmCallTsy* CMmCallList::GetMmCallByIndexAndLine( TInt aIndex, const TName* aLineName ) { CMmCallTsy* mmCall = NULL; CMmCallTsy* mmCallSeek = NULL; TInt callCount = iObjectContainer->Count(); TInt index( 0 ); //search through call list for ( TInt i = 0; i < callCount; i++ ) { //get current call mmCallSeek = reinterpret_cast<CMmCallTsy*>( iObjectContainer->At( i ) ); //get the name of the line from which this call has been opened. //see class CMmLineTsy to see how the call object naming works. TName curLineName = mmCallSeek-> CallName().Left( aLineName->Length() ); //if the name is the same as the line name given as input parameter if ( curLineName.Compare( *aLineName ) == 0 ) { if ( index == aIndex ) { //Break out mmCall = mmCallSeek; i = callCount; } else { index++; } } } return mmCall; }
// --------------------------------------------------------------------------- // CMmCallList::GetMmCallByName // Returns call object by name. // --------------------------------------------------------------------------- // CMmCallTsy* CMmCallList::GetMmCallByName( const TName* aName ) { CMmCallTsy* mmCall = NULL; CMmCallTsy* mmCallSeek = NULL; if ( iObjectContainer ) { for ( TInt i = 0; i < iObjectContainer->Count(); i++ ) { mmCallSeek = reinterpret_cast<CMmCallTsy*>( iObjectContainer->At( i ) ); TName aCurrCallName = mmCallSeek->CallName(); if ( aCurrCallName.Compare( *aName ) == KErrNone ) { mmCall = mmCallSeek; break; } } } return mmCall; }
void CListCertificates::TestAction() { TInt count = iCertInfos.Count(); if (count == iExpectedLabels.Count()) { TInt i; for (i = 0; i < count; i++) { TName expected; TName retrieved; expected.Copy(iExpectedLabels[i].iName.Ptr()); retrieved.Copy(iCertInfos[i]->Label()); if (expected.Compare(retrieved)) { break; } // this fails the test if any of the certs are marked as not // deletable if (iCertInfos[i]->IsDeletable() != !iExpectedLabels[i].iReadOnly) break; } if (i == count) { iResult = ETrue; } else { iResult = EFalse; } } else { iResult = EFalse; } }
// do Test step 1.1 enum TVerdict CEtelPacketTest1_3::doTestStepL( void ) { RPhone phone; TInt ret=phone.Open(iTelServer,DPCKTTSY_PHONE_NAME); CHECKPOINT(ret,KErrNone,CHP_OPEN_PHONE); RPacketService gprs; ret=gprs.Open(phone); CHECKPOINT(ret,KErrNone,CHP_SRVS_CASE("A.1")); RPacketContext gprsContext; TName contextName; ret=gprsContext.OpenNewContext(gprs, contextName); CHECKPOINT(ret,KErrNone,CHP_CNTXT_CASE("B.1")); RPacketQoS gprsQoS; TName qosName; ret = gprsQoS.OpenNewQoS(gprsContext, qosName); CHECKPOINT(ret,KErrNone,CHP_QOS_CASE("C.1")); CHECKPOINT(qosName.Compare(DPCKTTSY_QOS_NAME),KErrNone,CHP_QOS_CASE("C.1")); // local variables used throughout the gprs tests TRequestStatus reqStatus; TRequestStatus notifyStatus; // post a notification RPacketQoS::TQoSGPRSNegotiated aNotifyQoS; TPckg<RPacketQoS::TQoSGPRSNegotiated> aNotifyQoSPckg(aNotifyQoS); gprsQoS.NotifyProfileChanged(notifyStatus, aNotifyQoSPckg); User::WaitForRequest(notifyStatus); CHECKPOINT(notifyStatus.Int(),KErrNone,CHP_QOS_CASE("C.7")); CHECKPOINT(aNotifyQoS.iDelay , DPCKTTSY_DELAY_MIN1,CHP_QOS_CASE("C.7")); CHECKPOINT(aNotifyQoS.iMeanThroughput , DPCKTTSY_MEAN_THROUGHPUT_MIN1,CHP_QOS_CASE("C.7")); CHECKPOINT(aNotifyQoS.iPeakThroughput , DPCKTTSY_PEAK_THROUGHPUT_MIN1,CHP_QOS_CASE("C.7")); CHECKPOINT(aNotifyQoS.iPrecedence , DPCKTTSY_PRECEDENCE_MIN1,CHP_QOS_CASE("C.7")); CHECKPOINT(aNotifyQoS.iReliability , DPCKTTSY_RELIABILITY_MIN1,CHP_QOS_CASE("C.7")); //fix for defect MPO-576M6R: added cancel case gprsQoS.NotifyProfileChanged(notifyStatus, aNotifyQoSPckg); gprsQoS.CancelAsyncRequest(EPacketQoSNotifyProfileChanged); User::WaitForRequest(notifyStatus); CHECKPOINT(notifyStatus.Int(),KErrCancel,CHP_QOS_CASE("C.3")); // Get QoS GPRS Capabilities RPacketQoS::TQoSCapsGPRS aQoSCaps; TPckg<RPacketQoS::TQoSCapsGPRS> aQoSCapsPckg(aQoSCaps); gprsQoS.GetProfileCapabilities(reqStatus, aQoSCapsPckg); User::WaitForRequest(reqStatus); CHECKPOINT(reqStatus.Int(),KErrNone,CHP_QOS_CASE("C.6")); CHECKPOINT(aQoSCaps.ExtensionId(),TPacketDataConfigBase::KConfigGPRS,CHP_QOS_CASE("C.6")); CHECKPOINT(aQoSCaps.iDelay,DPCKTTSY_DELAY,CHP_QOS_CASE("C.6")); CHECKPOINT(aQoSCaps.iMean,DPCKTTSY_MEAN_THROUGHPUT,CHP_QOS_CASE("C.6")); CHECKPOINT(aQoSCaps.iPeak,DPCKTTSY_PEAK_THROUGHPUT,CHP_QOS_CASE("C.6")); CHECKPOINT(aQoSCaps.iPrecedence,DPCKTTSY_PRECEDENCE,CHP_QOS_CASE("C.6")); CHECKPOINT(aQoSCaps.iReliability,DPCKTTSY_RELIABILITY,CHP_QOS_CASE("C.6")); //fix for defect MPO-576M6R: added cancel case gprsQoS.GetProfileCapabilities(reqStatus, aQoSCapsPckg); gprsQoS.CancelAsyncRequest(EPacketQoSGetProfileCaps); User::WaitForRequest(notifyStatus); CHECKPOINT(notifyStatus.Int(),KErrCancel,CHP_QOS_CASE("C.3")); // Set QoS Profile Params RPacketQoS::TQoSGPRSRequested aQoSReqConfig; TPckg<RPacketQoS::TQoSGPRSRequested> aQoSReqPckg(aQoSReqConfig); aQoSReqConfig.iMinDelay = DPCKTTSY_DELAY_MIN1; aQoSReqConfig.iMinMeanThroughput = DPCKTTSY_MEAN_THROUGHPUT_MIN1; aQoSReqConfig.iMinPeakThroughput = DPCKTTSY_PEAK_THROUGHPUT_MIN1; aQoSReqConfig.iMinPrecedence = DPCKTTSY_PRECEDENCE_MIN1; aQoSReqConfig.iMinReliability = DPCKTTSY_RELIABILITY_MIN1; aQoSReqConfig.iReqDelay = DPCKTTSY_DELAY_REQ1; aQoSReqConfig.iReqMeanThroughput = DPCKTTSY_MEAN_THROUGHPUT_REQ1; aQoSReqConfig.iReqPeakThroughput = DPCKTTSY_PEAK_THROUGHPUT_REQ1; aQoSReqConfig.iReqPrecedence = DPCKTTSY_PRECEDENCE_REQ1; aQoSReqConfig.iReqReliability = DPCKTTSY_RELIABILITY_REQ1; gprsQoS.SetProfileParameters(reqStatus, aQoSReqPckg); User::WaitForRequest(reqStatus); CHECKPOINT(reqStatus.Int(),KErrNone,CHP_QOS_CASE("C.4")); //fix for defect MPO-576M6R: added cancel case gprsQoS.SetProfileParameters(reqStatus, aQoSReqPckg); gprsQoS.CancelAsyncRequest(EPacketQoSSetProfileParams); User::WaitForRequest(notifyStatus); CHECKPOINT(notifyStatus.Int(),KErrCancel,CHP_QOS_CASE("C.3")); // Get QoS Profile Params RPacketQoS::TQoSGPRSNegotiated aQoSNegConfig; TPckg<RPacketQoS::TQoSGPRSNegotiated> aQoSNegPckg(aQoSNegConfig); gprsQoS.GetProfileParameters(reqStatus, aQoSNegPckg); User::WaitForRequest(reqStatus); CHECKPOINT(reqStatus.Int(),KErrNone,CHP_QOS_CASE("C.5")); CHECKPOINT(aQoSNegConfig.ExtensionId(),TPacketDataConfigBase::KConfigGPRS,CHP_QOS_CASE("C.5")); CHECKPOINT(aQoSNegConfig.iDelay,DPCKTTSY_DELAY_NEG2,CHP_QOS_CASE("C.5")); CHECKPOINT(aQoSNegConfig.iMeanThroughput,DPCKTTSY_MEAN_THROUGHPUT_NEG2,CHP_QOS_CASE("C.5")); CHECKPOINT(aQoSNegConfig.iPeakThroughput,DPCKTTSY_PEAK_THROUGHPUT_NEG2,CHP_QOS_CASE("C.5")); CHECKPOINT(aQoSNegConfig.iPrecedence,DPCKTTSY_PRECEDENCE_NEG2,CHP_QOS_CASE("C.5")); CHECKPOINT(aQoSNegConfig.iReliability,DPCKTTSY_RELIABILITY_NEG2,CHP_QOS_CASE("C.5")); //fix for defect MPO-576M6R: added cancel case gprsQoS.GetProfileParameters(reqStatus, aQoSNegPckg); gprsQoS.CancelAsyncRequest(EPacketQoSGetProfileParams); User::WaitForRequest(notifyStatus); CHECKPOINT(notifyStatus.Int(),KErrCancel,CHP_QOS_CASE("C.3")); //Fix for defect MPO-576M6R: Added call to RPacket::OpenExistingQos() RPacketQoS gprsQoS2; ret = gprsQoS2.OpenExistingQoS(gprsContext, qosName); CHECKPOINT(ret,KErrNone,CHP_QOS_CASE("C.2")); gprsQoS.Close(); gprsQoS2.Close(); gprsContext.Close(); gprs.Close(); phone.Close(); return TestStepResult(); }
TVerdict CSimPacketGPRSQOSTest::doTestStepL() { INFO_PRINTF1(_L("BeginPacketGPRSQOSTest")); CreateConfigFileL(_L("c:\\config3.txt")); SetTestNumberL(6); TInt ret = iPhone.Open(iTelServer,KPhoneName); INFO_PRINTF2(_L("Result: %d"),ret); TESTL(ret == KErrNone); INFO_PRINTF1(_L("Opened phone object")); TESTL(iPacketService.Open(iPhone)==KErrNone); INFO_PRINTF1(_L("Opened Packet object")); TName contextName; TName contextNameCompare; TESTL(iFirstPrimaryPacketContext.OpenNewContext(iPacketService, contextName)==KErrNone); contextNameCompare.Append(KSimPrimaryPacketContextName); contextNameCompare.AppendNum(1); TESTL(contextName.Compare(contextNameCompare)==KErrNone); INFO_PRINTF1(_L("Opened Context object")); TRequestStatus reqStatus; TRequestStatus notifyStatus; TName gprsQosName; TESTL(iGPRSPacketqos.OpenNewQoS(iFirstPrimaryPacketContext, gprsQosName)==KErrNone); TName gprsQosNameCompare; gprsQosNameCompare.Append(KSimPacketQosName); gprsQosNameCompare.AppendNum(1); TESTL(gprsQosName.Compare(gprsQosNameCompare)==KErrNone); INFO_PRINTF1(_L("Opened GPRS QoS object")); TName qosname; iFirstPrimaryPacketContext.GetProfileName(qosname); INFO_PRINTF1(_L("Retrieved GPRS QoS object reference name")); // Set QoS Profile Params RPacketQoS::TQoSGPRSRequested aGPRSQoSReqConfig; TPckg<RPacketQoS::TQoSGPRSRequested> aGPRSQoSReqPckg(aGPRSQoSReqConfig); // post a notification RPacketQoS::TQoSGPRSNegotiated aGPRSNotifyQoS; TPckg<RPacketQoS::TQoSGPRSNegotiated> aGPRSNotifyQoSPckg(aGPRSNotifyQoS); //Profile data aGPRSQoSReqConfig.iMinDelay = RPacketQoS::EDelayClass1; aGPRSQoSReqConfig.iMinMeanThroughput = RPacketQoS::EMeanThroughput200; aGPRSQoSReqConfig.iMinPeakThroughput = RPacketQoS::EPeakThroughput16000; aGPRSQoSReqConfig.iMinPrecedence = RPacketQoS::EPriorityLowPrecedence; aGPRSQoSReqConfig.iMinReliability = RPacketQoS::EReliabilityClass1; aGPRSQoSReqConfig.iReqDelay = RPacketQoS::EDelayClass2; aGPRSQoSReqConfig.iReqMeanThroughput = RPacketQoS::EMeanThroughput2000; aGPRSQoSReqConfig.iReqPeakThroughput = RPacketQoS::EPeakThroughput64000; aGPRSQoSReqConfig.iReqPrecedence = RPacketQoS::EPriorityMediumPrecedence; aGPRSQoSReqConfig.iReqReliability = RPacketQoS::EReliabilityClass2; //post the notification iGPRSPacketqos.NotifyProfileChanged(notifyStatus, aGPRSNotifyQoSPckg); //Set the config iGPRSPacketqos.SetProfileParameters(reqStatus, aGPRSQoSReqPckg); User::WaitForRequest(notifyStatus); User::WaitForRequest(reqStatus); TESTL(aGPRSNotifyQoS.ExtensionId()==TPacketDataConfigBase::KConfigGPRS); TESTL(aGPRSNotifyQoS.iDelay == RPacketQoS::EDelayClass2); TESTL(aGPRSNotifyQoS.iDelay == RPacketQoS::EDelayClass2); TESTL(aGPRSNotifyQoS.iMeanThroughput == RPacketQoS::EMeanThroughput2000); TESTL(aGPRSNotifyQoS.iPeakThroughput == RPacketQoS::EPeakThroughput64000); TESTL(aGPRSNotifyQoS.iPrecedence == RPacketQoS::EPriorityMediumPrecedence); TESTL(aGPRSNotifyQoS.iReliability == RPacketQoS::EReliabilityClass2); // post a notification TRequestStatus cancelStatus; iGPRSPacketqos.NotifyProfileChanged(cancelStatus, aGPRSNotifyQoSPckg); iGPRSPacketqos.CancelAsyncRequest(EPacketQoSNotifyProfileChanged); User::WaitForRequest(cancelStatus); TESTL(cancelStatus.Int()==KErrCancel); INFO_PRINTF1(_L("Set Profile Test passed")); // need to call Notify first to set pending to true after // cancel event which sets it to false iGPRSPacketqos.NotifyProfileChanged(notifyStatus, aGPRSNotifyQoSPckg); iGPRSPacketqos.SetProfileParameters(reqStatus, aGPRSQoSReqPckg); User::WaitForRequest(notifyStatus); TESTL(notifyStatus.Int()==KErrNone); User::WaitForRequest(reqStatus); TESTL(reqStatus.Int()==KErrNone); // test RPacketContext::Activate - before calling ModifyActiveContext StartNTRasSimulation(); iFirstPrimaryPacketContext.Activate(reqStatus); User::WaitForRequest(reqStatus); TESTL(reqStatus.Int()==KErrNone); INFO_PRINTF1(_L("Activate test passed")); // test RPacketContext::ModifyActiveContext - it shouldn't work unless // a profile/tft has changed since activation TRequestStatus modifyStatus; iFirstPrimaryPacketContext.ModifyActiveContext(modifyStatus); User::WaitForRequest(modifyStatus); TESTL(modifyStatus.Int()==KErrNotReady); iGPRSPacketqos.SetProfileParameters(reqStatus, aGPRSQoSReqPckg); User::WaitForRequest(reqStatus); TESTL(reqStatus.Int()==KErrNone); iFirstPrimaryPacketContext.ModifyActiveContext(modifyStatus); User::WaitForRequest(modifyStatus); TESTL(modifyStatus.Int()==KErrNone); INFO_PRINTF1(_L("ModifyActiveContext Test Passed")); INFO_PRINTF1(_L("Notify GPRS QoS Profile Test passed")); // Get QoS GPRS Capabilities RPacketQoS::TQoSCapsGPRS aQoSCaps; TPckg<RPacketQoS::TQoSCapsGPRS> aQoSCapsPckg(aQoSCaps); iGPRSPacketqos.GetProfileCapabilities(reqStatus, aQoSCapsPckg); User::WaitForRequest(reqStatus); TESTL(reqStatus.Int()==KErrNone); TESTL(aQoSCaps.ExtensionId()==TPacketDataConfigBase::KConfigGPRS); TESTL(aQoSCaps.iDelay == RPacketQoS::EDelayClass2); TESTL(aQoSCaps.iMean == RPacketQoS::EMeanThroughput100); TESTL(aQoSCaps.iPeak == RPacketQoS::EPeakThroughput64000); TESTL(aQoSCaps.iPrecedence == RPacketQoS::EPriorityMediumPrecedence); TESTL(aQoSCaps.iReliability == RPacketQoS::EReliabilityClass2); INFO_PRINTF1(_L("Get QoS Profile Capabilities Test passed")); //Get QoS Profile Params RPacketQoS::TQoSGPRSNegotiated aGPRSQoSNegConfig; TPckg<RPacketQoS::TQoSGPRSNegotiated> aGPRSQoSNegPckg(aGPRSQoSNegConfig); iGPRSPacketqos.GetProfileParameters(cancelStatus, aGPRSQoSNegPckg); iGPRSPacketqos.CancelAsyncRequest(EPacketQoSGetProfileParams);//no implementation-does nothing User::WaitForRequest(cancelStatus); TESTL(cancelStatus.Int()==KErrNone); TESTL(aGPRSQoSNegConfig.ExtensionId()==TPacketDataConfigBase::KConfigGPRS); TESTL(aGPRSQoSNegConfig.iDelay==RPacketQoS::EDelayClass2); TESTL(aGPRSQoSNegConfig.iMeanThroughput==RPacketQoS::EMeanThroughput100); TESTL(aGPRSQoSNegConfig.iPeakThroughput==RPacketQoS::EPeakThroughput64000); TESTL(aGPRSQoSNegConfig.iPrecedence==RPacketQoS::EPriorityMediumPrecedence); TESTL(aGPRSQoSNegConfig.iReliability==RPacketQoS::EReliabilityClass2); INFO_PRINTF1(_L("Get QoS Profile Test passed")); // End of RPacketQos tests iGPRSPacketqos.Close(); iFirstPrimaryPacketContext.Close(); iPacketService.Close(); iPhone.Close(); ASSERT(RThread().RequestCount()==0); return TestStepResult(); }
TVerdict CSimPacketGPRSRel99NotifyProfileChangeTest::doTestStepL() { INFO_PRINTF1(_L("BeginPacketGPRSRel99NotifyProfileChangeTest")); CreateConfigFileL(_L("c:\\config3.txt")); SetTestNumberL(6); TRequestStatus gprsReqStatus, rel99ReqStatus; TRequestStatus gprsNotifyStatus, rel99NotifyStatus; // Open phone TInt ret = iPhone.Open(iTelServer,KPhoneName); INFO_PRINTF2(_L("Result: %d"),ret); TESTL(ret == KErrNone); INFO_PRINTF1(_L("Opened phone object")); // Open GPRS packet service TESTL(iGPRSPacketService.Open(iPhone)==KErrNone); INFO_PRINTF1(_L("Opened Packet object")); // Open GPRS context TName contextName; TName contextNameCompare; TESTL(iGPRSPacketContext.OpenNewContext(iGPRSPacketService, contextName)==KErrNone); contextNameCompare.Append(KSimPrimaryPacketContextName); contextNameCompare.AppendNum(1); TESTL(contextName.Compare(contextNameCompare)==KErrNone); INFO_PRINTF1(_L("Opened Context object")); // Open GPRS PacketQoS TName gprsQosName; TESTL(iGPRSPacketqos.OpenNewQoS(iGPRSPacketContext, gprsQosName)==KErrNone); TName gprsQosNameCompare; gprsQosNameCompare.Append(KSimPacketQosName); gprsQosNameCompare.AppendNum(1); TESTL(gprsQosName.Compare(gprsQosNameCompare)==KErrNone); INFO_PRINTF1(_L("Opened GPRS QoS object")); // Open UMTS Rel99 packet service - opened from same session RTelServer object as GPRS packet service TESTL(iRel99PacketService.Open(iPhone)==KErrNone); INFO_PRINTF1(_L("Opened Rel99 Packet object")); // Open UMTS Rel99 context TESTL(iRel99PacketContext.OpenExistingContext(iRel99PacketService, contextName) == KErrNone); // Open Rel99 PacketQoS TESTL(iRel99Packetqos.OpenExistingQoS(iRel99PacketContext, gprsQosName)==KErrNone); INFO_PRINTF1(_L("Opened Rel99 QoS object")); //Configure GPRS parameters // // // Set GPRS QoS Profile Params RPacketQoS::TQoSGPRSRequested aGPRSQoSReqConfig; TPckg<RPacketQoS::TQoSGPRSRequested> aGPRSQoSReqPckg(aGPRSQoSReqConfig); // post a GPRS notification RPacketQoS::TQoSGPRSNegotiated aGPRSNotifyQoS; TPckg<RPacketQoS::TQoSGPRSNegotiated> aGPRSNotifyQoSPckg(aGPRSNotifyQoS); //GPRS Profile data aGPRSQoSReqConfig.iMinDelay = RPacketQoS::EDelayClass1; aGPRSQoSReqConfig.iMinMeanThroughput = RPacketQoS::EMeanThroughput200; aGPRSQoSReqConfig.iMinPeakThroughput = RPacketQoS::EPeakThroughput16000; aGPRSQoSReqConfig.iMinPrecedence = RPacketQoS::EPriorityLowPrecedence; aGPRSQoSReqConfig.iMinReliability = RPacketQoS::EReliabilityClass1; aGPRSQoSReqConfig.iReqDelay = RPacketQoS::EDelayClass2; aGPRSQoSReqConfig.iReqMeanThroughput = RPacketQoS::EMeanThroughput2000; aGPRSQoSReqConfig.iReqPeakThroughput = RPacketQoS::EPeakThroughput64000; aGPRSQoSReqConfig.iReqPrecedence = RPacketQoS::EPriorityMediumPrecedence; aGPRSQoSReqConfig.iReqReliability = RPacketQoS::EReliabilityClass2; // // //Configure Rel99 QoS Profile Params // // RPacketQoS::TQoSR99_R4Requested aR99QoSReqConfig; TESTL(aR99QoSReqConfig.ExtensionId()==TPacketDataConfigBase::KConfigRel99Rel4); TPckg<RPacketQoS::TQoSR99_R4Requested> aR99QoSReqPckg(aR99QoSReqConfig); RPacketQoS::TQoSR99_R4Negotiated aR99NotifyQoS; TPckg<RPacketQoS::TQoSR99_R4Negotiated> aR99NotifyQoSPckg(aR99NotifyQoS); TInt req = 4; TInt min = 2; //Profile data aR99QoSReqConfig.iReqTrafficClass = RPacketQoS::ETrafficClassStreaming; // 0x04 aR99QoSReqConfig.iMinTrafficClass = RPacketQoS::ETrafficClassConversational; // 0x02 aR99QoSReqConfig.iReqDeliveryOrderReqd = RPacketQoS::EDeliveryOrderNotRequired; // 0x04 aR99QoSReqConfig.iMinDeliveryOrderReqd = RPacketQoS::EDeliveryOrderRequired; // 0x02 aR99QoSReqConfig.iReqDeliverErroneousSDU = RPacketQoS::EErroneousSDUDeliveryNotRequired; // 0x08 aR99QoSReqConfig.iMinDeliverErroneousSDU = RPacketQoS::EErroneousSDUDeliveryRequired; // 0x04 aR99QoSReqConfig.iReqMaxSDUSize = req; // 4 aR99QoSReqConfig.iMinAcceptableMaxSDUSize = min; // 2 aR99QoSReqConfig.iReqMaxRate.iUplinkRate = min; // between 0 - 1840 aR99QoSReqConfig.iReqMaxRate.iDownlinkRate = min; aR99QoSReqConfig.iMinAcceptableMaxRate.iDownlinkRate = min-1; // between 0 - 1840 aR99QoSReqConfig.iMinAcceptableMaxRate.iUplinkRate = req; aR99QoSReqConfig.iReqBER = RPacketQoS::EBEROnePerHundred; // 0x04 aR99QoSReqConfig.iMaxBER = RPacketQoS::EBERFivePerHundred; // 0x02 aR99QoSReqConfig.iReqSDUErrorRatio = RPacketQoS::ESDUErrorRatioSevenPerThousand; // 0x08 aR99QoSReqConfig.iMaxSDUErrorRatio = RPacketQoS::ESDUErrorRatioOnePerHundred; // 0x04 aR99QoSReqConfig.iReqTrafficHandlingPriority = RPacketQoS::ETrafficPriority2; // 0x04 aR99QoSReqConfig.iMinTrafficHandlingPriority = RPacketQoS::ETrafficPriority1; // 0x02 aR99QoSReqConfig.iReqTransferDelay = req; aR99QoSReqConfig.iMaxTransferDelay = min; aR99QoSReqConfig.iReqGuaranteedRate.iDownlinkRate = min; aR99QoSReqConfig.iReqGuaranteedRate.iUplinkRate = req; aR99QoSReqConfig.iMinGuaranteedRate.iDownlinkRate = min; aR99QoSReqConfig.iMinGuaranteedRate.iUplinkRate = req; // // //post the notifications iRel99Packetqos.NotifyProfileChanged(rel99NotifyStatus, aR99NotifyQoSPckg); iGPRSPacketqos.NotifyProfileChanged(gprsNotifyStatus, aGPRSNotifyQoSPckg); //Set the profile iRel99Packetqos.SetProfileParameters(rel99ReqStatus, aR99QoSReqPckg); iGPRSPacketqos.SetProfileParameters(gprsReqStatus, aGPRSQoSReqPckg); User::WaitForRequest(rel99NotifyStatus); User::WaitForRequest(gprsNotifyStatus); //User::WaitForRequest(rel99ReqStatus); User::WaitForRequest(rel99ReqStatus); User::WaitForRequest(gprsReqStatus); //Test the notification packages are correct //Rel99 TESTL(aR99NotifyQoS.ExtensionId()==TPacketDataConfigBase::KConfigRel99Rel4); TESTL(aR99NotifyQoS.iTrafficClass==RPacketQoS::ETrafficClassConversational); TESTL(aR99NotifyQoS.iDeliveryOrderReqd==RPacketQoS::EDeliveryOrderNotRequired); TESTL(aR99NotifyQoS.iDeliverErroneousSDU==RPacketQoS::EErroneousSDUNoDetection); TESTL(aR99NotifyQoS.iMaxSDUSize==min); TESTL(aR99NotifyQoS.iMaxRate.iUplinkRate==min); TESTL(aR99NotifyQoS.iMaxRate.iDownlinkRate==req); TESTL(aR99NotifyQoS.iBER==RPacketQoS::EBEROnePerHundred); TESTL(aR99NotifyQoS.iSDUErrorRatio==RPacketQoS::ESDUErrorRatioOnePerTen); TESTL(aR99NotifyQoS.iTrafficHandlingPriority==RPacketQoS::ETrafficPriority2); TESTL(aR99NotifyQoS.iTransferDelay==min); TESTL(aR99NotifyQoS.iGuaranteedRate.iUplinkRate==min); TESTL(aR99NotifyQoS.iGuaranteedRate.iDownlinkRate==req); //Gprs TESTL(aGPRSNotifyQoS.ExtensionId()==TPacketDataConfigBase::KConfigGPRS); TESTL(aGPRSNotifyQoS.iDelay == RPacketQoS::EDelayClass2); TESTL(aGPRSNotifyQoS.iDelay == RPacketQoS::EDelayClass2); TESTL(aGPRSNotifyQoS.iMeanThroughput == RPacketQoS::EMeanThroughput2000); TESTL(aGPRSNotifyQoS.iPeakThroughput == RPacketQoS::EPeakThroughput64000); TESTL(aGPRSNotifyQoS.iPrecedence == RPacketQoS::EPriorityMediumPrecedence); TESTL(aGPRSNotifyQoS.iReliability == RPacketQoS::EReliabilityClass2); // Close iGPRSPacketqos.Close(); iGPRSPacketContext.Close(); iGPRSPacketService.Close(); iRel99Packetqos.Close(); iRel99PacketContext.Close(); iRel99PacketService.Close(); iPhone.Close(); ASSERT(RThread().RequestCount()==0); return TestStepResult(); }