--- a/telephonyprotocols/csdagt/group/CSD.MMP Wed Aug 18 10:57:47 2010 +0300
+++ b/telephonyprotocols/csdagt/group/CSD.MMP Thu Sep 02 21:42:07 2010 +0300
@@ -59,12 +59,12 @@
LIBRARY commsdat.lib
-#if defined(WINS)
+#if defined(EABI)
+deffile /epoc32/include/def/eabi/agent.def
+#elif defined(WINS)
deffile /epoc32/release/wins/agent.def
-#elif defined(GCC32)
+#else
deffile /epoc32/release/marm/agent.def
-#else
-deffile /epoc32/include/def/eabi/agent.def
#endif
START WINS
--- a/telephonyprotocols/csdagt/script/SCHAT.CPP Wed Aug 18 10:57:47 2010 +0300
+++ b/telephonyprotocols/csdagt/script/SCHAT.CPP Thu Sep 02 21:42:07 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -114,7 +114,6 @@
: (cs->LastChar()==aChar && Match(cs)) )
{
iNotify->ChatStringMatch(index);
- cs=iter; // In case user removed cs;
}
index++;
}
--- a/telephonyprotocols/pdplayer/src/PDPCPR.cpp Wed Aug 18 10:57:47 2010 +0300
+++ b/telephonyprotocols/pdplayer/src/PDPCPR.cpp Thu Sep 02 21:42:07 2010 +0300
@@ -49,19 +49,12 @@
using namespace ESock;
-
//-=========================================================
//
// CPDPConnectionProvider methods
//
//-=========================================================
-//We reserve space for two preallocated activities that may start concurrently on the CPR
-//node: destroy and data client stop.
-static const TUint KDefaultMaxPreallocatedActivityCount = 2;
-static const TUint KMaxPreallocatedActivitySize = sizeof(MeshMachine::CNodeRetryParallelActivity) + sizeof(MeshMachine::APreallocatedOriginators<4>);
-static const TUint KPDPCPRPreallocatedActivityBufferSize = KDefaultMaxPreallocatedActivityCount * KMaxPreallocatedActivitySize;
-
#ifdef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
namespace PDPCprLinkCharacteristicActivity
{
@@ -108,7 +101,7 @@
* @return void
*/
{
- CCoreConnectionProvider::ConstructL(KPDPCPRPreallocatedActivityBufferSize);
+ CCoreConnectionProvider::ConstructL();
}
CPDPConnectionProvider::CPDPConnectionProvider(ESock::CConnectionProviderFactoryBase& aFactory)
--- a/telephonyprotocols/pdplayer/src/PDPSCPR.cpp Wed Aug 18 10:57:47 2010 +0300
+++ b/telephonyprotocols/pdplayer/src/PDPSCPR.cpp Thu Sep 02 21:42:07 2010 +0300
@@ -42,12 +42,6 @@
using namespace NetStateMachine;
using namespace Factories;
-//We reserve space for two preallocated activities that may start concurrently on the SCPR
-//node: destroy and data client stop.
-static const TUint KDefaultMaxPreallocatedActivityCount = 2;
-static const TUint KMaxPreallocatedActivitySize = sizeof(MeshMachine::CNodeRetryParallelActivity) + sizeof(MeshMachine::APreallocatedOriginators<4>);
-static const TUint KPDPSCPRPreallocatedActivityBufferSize = KDefaultMaxPreallocatedActivityCount * KMaxPreallocatedActivitySize;
-
//-=========================================================
//
// CPDPSubConnectionProvider Activities
@@ -266,7 +260,7 @@
IP SubConnection Provider Second Phase Constructor
*/
{
- CCoreSubConnectionProvider::ConstructL(KPDPSCPRPreallocatedActivityBufferSize);
+ CCoreSubConnectionProvider::ConstructL();
}
void CPDPSubConnectionProvider::Received(TNodeContextBase& aContext)
--- a/telephonyprotocols/pdplayer/umts/test/te_spudNetworkSide/group/TE_spudNetworkSide.iby Wed Aug 18 10:57:47 2010 +0300
+++ b/telephonyprotocols/pdplayer/umts/test/te_spudNetworkSide/group/TE_spudNetworkSide.iby Thu Sep 02 21:42:07 2010 +0300
@@ -39,6 +39,7 @@
data=EPOCROOT##epoc32\data\z\testdata\configs\te_spudnetworkside_PppLoopback.xml testdata\configs\te_spudnetworkside_PppLoopback.xml
data=EPOCROOT##epoc32\data\z\testdata\configs\te_spudnetworkside_nifman.xml testdata\configs\te_spudnetworkside_nifman.xml
data=EPOCROOT##epoc32\data\z\testdata\configs\te_spudnetworkside_r4_and_r5.xml testdata\configs\te_spudnetworkside_r4_and_r5.xml
+data=EPOCROOT##epoc32\data\z\testdata\configs\te_spudnetworkside_promptforauth.xml testdata\configs\te_spudnetworkside_promptforauth.xml
data=EPOCROOT##epoc32\data\z\testdata\configs\te_spudnetworkside.ini testdata\configs\te_spudnetworkside.ini
data=EPOCROOT##epoc32\data\z\testdata\configs\te_spudnetworkside_nifman.ini testdata\configs\te_spudnetworkside_nifman.ini
data=EPOCROOT##epoc32\data\z\testdata\configs\te_spudnetworkside_platsec.ini testdata\configs\te_spudnetworkside_platsec.ini
--- a/telephonyprotocols/rawipnif/group/BLD.INF Wed Aug 18 10:57:47 2010 +0300
+++ b/telephonyprotocols/rawipnif/group/BLD.INF Thu Sep 02 21:42:07 2010 +0300
@@ -19,12 +19,6 @@
@file
*/
-#ifndef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
-
-#include "../version1/group/bld.inf"
-
-#else
-
PRJ_PLATFORMS
DEFAULT
@@ -47,5 +41,3 @@
#ifdef SYMBIAN_ZERO_COPY_NETWORKING
#include "../rawipnif2/group/bld.inf"
#endif
-
-#endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
--- a/telephonyprotocols/rawipnif/version1/bmarm/RawIPNifU.DEF Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- NewInterfaceFactoryL @ 1 NONAME R3UNUSED ; (null)
-
--- a/telephonyprotocols/rawipnif/version1/bwins/RawIPNifU.DEF Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- NewInterfaceFactoryL @ 1 NONAME
-
--- a/telephonyprotocols/rawipnif/version1/data/rawip.ini Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-[link]
-highmark= 5
--- a/telephonyprotocols/rawipnif/version1/eabi/RawIPNifU.def Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-EXPORTS
- NewInterfaceFactoryL @ 1 NONAME ; extracted from ..\..\..\..\..\EPOC32\BUILD\gt139\dev_branch\gprsbtt\Nif\GROUP\BTTNIF\ARMV4\UDEB\Btt.in
--- a/telephonyprotocols/rawipnif/version1/group/BLD.INF Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Network interface for supporting multiple primary PDP contexts on the telephony reference platform
-//
-//
-
-/**
- @file
-*/
-
-PRJ_PLATFORMS
-
-DEFAULT
-
-PRJ_EXPORTS
-RawIpNif.iby /epoc32/rom/include/rawipnif.iby
-
-PRJ_MMPFILES
-
-RawIPNif.mmp
-
-// Note that there is no PRJ_TESTMMPFILES here. This is intentional, because
-// building the NIF unit test stops the other unit tests from working. If you
-// want to run the NIF unit test, build it explicitly.
--- a/telephonyprotocols/rawipnif/version1/group/RawIPNif.mmp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-TARGET rawip.nif
-TARGETTYPE DLL
-UID 0x10003d3a 0x10206860
-
-// Used to specify if the rawip.nif should be specifically built to the
-// functionality of TI basebands, where a two-byte header is appended
-// to all incoming and outgoing packets (to specify the protocol being
-// used). This macro is commented out as part of fix INC113695 propagation to v94
-// MACRO RAWIP_HEADER_APPENDED_TO_PACKETS
-
-// Used by UmtsNifControlIf. Networking defect DEF027856 reversed the meaning
-// of this, so we don't define it any more.
-//MACRO MM_ETEL_API
-
-// Do not add the non-callable exports to the DEF files
-// Remove this line temporarily if we need to add new exports
-NOEXPORTLIBRARY
-
-#if defined(WINS)
-DEFFILE RawIPNif.DEF
-#elif defined(GCC32)
-DEFFILE RawIPNif.DEF
-#else
-DEFFILE RawIPNif.def
-#endif
-
-SOURCEPATH ../src
-
-SOURCE DllMain.cpp
-SOURCE RawIPNifMain.cpp
-SOURCE RawIPNifMainFactory.cpp
-SOURCE IPv4ProtocolIf.cpp
-SOURCE IPv6ProtocolIf.cpp
-SOURCE ProtocolIfBase.cpp
-SOURCE BcaIoController.cpp
-SOURCE BcaController.cpp
-SOURCE Sender.cpp
-SOURCE Receiver.cpp
-SOURCE IPTagHeader.cpp
-SOURCE bttlog.cpp
-
-
-USERINCLUDE ../inc
-
-OS_LAYER_SYSTEMINCLUDE
-
-#include <networking/packetlogger.mmh>
-
-LIBRARY euser.lib
-LIBRARY nifman.lib
-LIBRARY insock.lib
-LIBRARY etelpckt.lib
-LIBRARY mbufmgr.lib
-LIBRARY esock.lib
-
-
-START WINS
- BASEADDRESS 0x47E00000
-END
-
-CAPABILITY CommDD PowerMgmt ReadDeviceData WriteDeviceData TrustedUI ProtServ NetworkControl NetworkServices LocalServices ReadUserData WriteUserData
-VENDORID 0x70000001
-
-UNPAGED
--- a/telephonyprotocols/rawipnif/version1/group/RawIpNif.iby Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#ifndef __RAWIPNIF_IBY__
-#define __RAWIPNIF_IBY__
-
-// Raw IP NIF
-
-#include <packetlogger.iby>
-
-// The default BCA is C32, but may be replaced by another BCA if desired
-#include <c32bca.iby>
-
-file=ABI_DIR\DEBUG_DIR\rawip.nif System\libs\rawip.nif
-
-#endif // __RAWIPNIF_IBY__
--- a/telephonyprotocols/rawipnif/version1/group/networking_rawipnif.history.xml Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-<?xml version="1.0"?>
-<relnotes schema="1.0.0" name="Raw IP NIF" purpose="" type="component">
- <revision major="1" functional="0" minor="0" date="20071109">
- <ref name="PDEF113864" type="defect"/>
- <description>The RawIP NIF and TRP PCO implementation is not correct. TProtocolConfigOptionV2::iMiscBuffer is not the correct way to pass a gateway address - data needs to be passed in TLV format but there are no TLV content tags defined for a gateway address and any UMTS/GPRS hardware which claims to be able to supply this address is erroneous (3gpp standard 24.008, section 10.5.6.3). We no longer pass any gateway information in the buffer so that other correctly formed parameters can be passed.</description>
- </revision>
- <purpose>
- Required to support multiple primary PDP contexts (multi-homing over GPRS) on the telephony reference platform.
- </purpose>
-</relnotes>
--- a/telephonyprotocols/rawipnif/version1/group/networking_rawipnif.mrp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-component networking_rawipnif
-source \sf\os\cellularsrv\telephonyprotocols\rawipnif
-binary \sf\os\cellularsrv\telephonyprotocols\rawipnif\group all
-exports \sf\os\cellularsrv\telephonyprotocols\rawipnif\group
-notes_source \component_defs\release.src
--- a/telephonyprotocols/rawipnif/version1/inc/BcaController.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Defines the interface to the BCA & flow control.
-//
-//
-
-/**
- @file
-*/
-
-#ifndef BCACONTROLLER_H
-#define BCACONTROLLER_H
-
-#include <e32base.h>
-#include <c32comm.h>
-
-#include "MControllerObserver.h"
-#include "bttlog.h"
-#include "Constants.h"
-
-#ifdef RAWIP_HEADER_APPENDED_TO_PACKETS
-#include "IPTagHeader.h"
-#endif // RAWIP_HEADER_APPENDED_TO_PACKETS
-
-class CBttLogger;
-
-/**
-@internalComponent
-*/
-class CBcaController : public CBase
- {
-public:
- CBcaController(MControllerObserver& aObserver, CBttLogger* aTheLogger);
- void BaseConstructL();
- ~CBcaController();
-
-public: // Flow Control
- void UpdateInternalFlowFlag(TFlowControl aValue);
- void UpdateContextStateFlag(TBool aValue);
- TBool IsTxPossible();
-
-public:
- virtual void StartL() = 0;
- virtual void Stop(TInt aError = KErrNone) = 0;
-
-#ifdef RAWIP_HEADER_APPENDED_TO_PACKETS
-public: //tag headers
- void SetType(TUint16 aType);
- void AddHeader(TDes8& aDes);
- TUint16 RemoveHeader(RMBufChain& aPdu);
-#endif // RAWIP_HEADER_APPENDED_TO_PACKETS
-
-public: // Process Down/Up stack data packets
- void Process(TDesC8& aPdu);
- TInt Send(RMBufChain& aPdu);
- void SendComplete();
- // Get the NIF reference.
- inline MControllerObserver& GetObserver();
-protected:
- virtual void BcaSend(RMBufChain& aPdu) = 0;
- virtual void BcaProcess(TDesC8& aPdu) = 0;
- virtual void BcaSendComplete() = 0;
- virtual TInt BcaSendBufferLength() = 0;
-
-protected:
- enum TSendState
- {
- EIdle,
- ESending,
- EShuttingDown
- };
-
- enum TInitialisationState
- {
- EStart,
- EBcaController,
- EInitialised
- };
-
- inline TInt GetSendState();
- inline void SendState(TSendState aState);
-
-private: // Flow Control
- void ResumeSending();
- //Buffer control
- TBool IsSendQueueEmpty();
- TBool IsSendQueueFull();
- void AppendToSendQueue(RMBufChain& aPdu);
- TBool RemoveFromSendQueue(RMBufChain& aPdu);
- void EmptySendQueue();
-
-private: // Unowned data.
- MControllerObserver& iObserver;
-protected:
- CBttLogger* iTheLogger;
-
-private:
- // Flow control flags
- TFlowControl iTxFlowControl;
- TBool iTxContextActive;
- TSendState iSendState;
-
- /** The internal packet buffer */
- RMBufPktQ iSendQueue;
- /** The maximum number of packets that we want in an internal queue */
- TInt iMaxSendQueueLen;
- /** Current number of packets in the internal packet buffer */
- TInt iNumPacketsInSendQueue;
-
-#ifdef RAWIP_HEADER_APPENDED_TO_PACKETS
- CIPTagHeader* iIPTagHeader;
-#endif // RAWIP_HEADER_APPENDED_TO_PACKETS
- };
-
-void CBcaController::SendState(TSendState aState)
- {
- iSendState = aState;
- }
-
-TInt CBcaController::GetSendState()
- {
- return iSendState;
- }
-
-
-MControllerObserver& CBcaController::GetObserver()
- {
- return iObserver;
- }
-
-#endif // BCACONTROLLER_H
--- a/telephonyprotocols/rawipnif/version1/inc/BcaIoController.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,239 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Defines the interface to the BCA interface
-//
-//
-
-/**
- @file
-*/
-
-#ifndef BCAIOCONTROLLER_H
-#define BCAIOCONTROLLER_H
-
-#include <e32base.h>
-#include <c32comm.h>
-#include <networking/bca.h>
-#include <networking/bcafactory.h>
-
-#include "BcaController.h"
-using namespace BasebandChannelAdaptation;
-
-class CBttLogger;
-class CSender;
-class CReceiver;
-class CBcaControl;
-
-/**
-
-@internalComponent
-*/
-void Panic(TRawIPNifPanic aPanic);
-
-/**
-
-@internalComponent
-*/
-typedef MBcaFactory* (*TNewBcaFactoryL)();
-
-
-/**
-@internalComponent
-*/
-class CBcaIoController : public CBcaController
- {
-public:
- CBcaIoController(MControllerObserver& aObserver, CBttLogger* aTheLogger);
- static CBcaIoController* NewL(MControllerObserver& aObserver, CBttLogger* aTheLogger);
- void ConstructL();
- ~CBcaIoController();
-
-public:
- void StartL();
- void Stop(TInt aError = KErrNone);
-
-public: // Process Down/Up stack data packets
- void BcaProcess(TDesC8& aPdu);
- void BcaSend(RMBufChain& aPdu);
- void BcaSendComplete();
-
-public:
- inline CSender& Sender();
- inline CReceiver& Receiver();
- inline TUint Nsapi();
- void SetBcaStackAndName(TDesC& aBcaStack);
- inline const TName& BcaStack()const;
- inline const TName& BcaName()const;
- inline MBca* Bca();
- inline void SetBca(MBca* aBca);
- inline void SetPort(TDesC& aPortName);
- inline const TName& Port()const;
- inline void SetIapId(TUint32 aIapId);
- inline TUint32 IapId();
- TInt BcaSendBufferLength();
-
-private:
- void InitialiseBcaL();
-
-private: // Flow Control
- void ResumeSending();
-
-private: // Unowned data.
- /** Pointer to the BCA */
- MBca* iMBca;
-
- /** used to send data*/
- CSender* iSender;
- /** used to receive data*/
- CReceiver* iReceiver;
- /** used to load, open and close the BCA*/
- CBcaControl* iLoader;
- /** IAP ID used to open CommDB*/
- TUint32 iIapId;
- /** Bca name*/
- TName iBcaName;
- /** Bca Stack*/
- TName iBcaStack;
- /** CommPort Name*/
- TName iCommPort;
- };
-
-inline CSender& CBcaIoController::Sender()
-/**
- * Returns reference to CSender object
- *
- * @return iSender The CSender reference
- */
- {
- return *iSender;
- }
-
-inline CReceiver& CBcaIoController::Receiver()
-/**
- * Returns reference to CReceiver object
- *
- * @return iReceiver The CReceiver reference
- */
- {
- return *iReceiver;
- }
-
-/** returns the BCA Stack*/
-inline const TName& CBcaIoController::BcaStack()const
- {
- return iBcaStack;
- }
-
-/** returns the BCA name*/
-inline const TName& CBcaIoController::BcaName()const
- {
- return iBcaName;
- }
-
-/** retrurns the BCA pointer.*/
-inline MBca* CBcaIoController::Bca()
- {
- return iMBca;
- }
-/** sets the BCA pointer.
-
-* @param aBca BCA pointer.
-*/
-inline void CBcaIoController::SetBca(MBca* aBca)
- {
- iMBca = aBca;
- }
-
-/** sets the IAP ID
-
-* @param aIapId IAP ID to be set.
-*/
-inline void CBcaIoController::SetIapId(TUint32 aIapId)
- {
- iIapId = aIapId;
- }
-
-/** returns the IAP ID*/
-inline TUint32 CBcaIoController::IapId()
- {
- return iIapId;
- }
-
-/** sets the port name
-
-* @param aPortName port name to be set.
-*/
-inline void CBcaIoController::SetPort(TDesC& aPortName)
- {
- iCommPort = aPortName;
- }
-
-/** returns the port name*/
-inline const TName& CBcaIoController::Port()const
- {
- return iCommPort;
- }
-
-/** class used to load, open and shutdown the BCA and also start and shutdown the NIF.
-@internalComponent
-*/
-class CBcaControl : public CActive
- {
-public:
- CBcaControl(CBcaIoController& aObserver, CBttLogger* aTheLogger);
- ~CBcaControl();
-public:
- void StartLoadL();
- void ShutdownBca(TInt aError);
- inline MBca* Bca();
-protected:
- // Inherited from CActive.
- virtual void RunL();
- virtual void DoCancel();
-private: // Unowned data.
- CBcaIoController& iObserver;
- CBttLogger* iTheLogger;
-private:
- enum TBcaState
- {
- /** Bca ready to start */
- EIdling,
- /** Bca to be closed*/
- EClosing,
- /** Bca IAP is set*/
- EIAPSet,
- /** Bca stack is set*/
- EBcaStackSet
- };
-
-private:
-
- /** BCA owned by NIF*/
- MBca* iMBca;
- /** used to load library*/
- TAutoClose<RLibrary> iBcaDll;
- /** BCA state*/
- TBcaState iState;
- /** NIF shut down error*/
- TInt iError;
- };
-
-/** returns the BCA pointer. */
-inline MBca* CBcaControl::Bca()
- {
- return iMBca;
- }
-
-#endif // BCAIOCONTROLLER_H
-
--- a/telephonyprotocols/rawipnif/version1/inc/Constants.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-/**
- @file
-*/
-
-#ifndef CONSTANTS_H
-#define CONSTANTS_H
-
-#include <e32base.h>
-#include <etelqos.h>
-
-const TUint KNifMajorVersionNumber=1;
-const TUint KNifMinorVersionNumber=0;
-const TUint KNifBuildVersionNumber=0;
-
-// For CommDb usage
-const TUint KSlashChar='\\';
-
-// Constants for IPv4 protocol interface
-_LIT(KDescIp, "ip");
-_LIT(KDescIcmp, "icmp");
-_LIT(KIPv4ProtocolIfName, "Bttint4");
-
-// Constants for IPv6 protocol interface
-_LIT(KDescIp6, "ip6");
-_LIT(KIPv6ProtocolIfName, "Bttint6");
-
-_LIT(KNifName, "rawipnif");
-enum TRawIPNifPanic
- {
- KNifUnknownInitState,
- KNifUnknownShutDownState,
- KNifProtocolInUse,
- /** Bca in unkonwn State */
- KBcaUnkownState,
- /** BCA not exist*/
- KBcaNotExist
- };
-
-
-const TUint16 KIp4FrameType = 0x21;
-const TUint16 KVanJacCompTCPIPFrameType = 0x2d;
-const TUint16 KVanJacUnCompTCPIPFrameType = 0x2f;
-const TUint16 KIp6FrameType = 0x57;
-
-const TUint KDefaultSpeedMetric = 1;
-const TUint KDefaultMtu = 1500;
-
-const TUint KDataPacketMaxSize = 4096;
-
-// BTT TSY contants
-const TInt KTsyPhone = 0;
-
-// Flow control constants
-const TInt KStopSending = 0;
-const TInt KContinueSending = 1;
-
-_LIT(KRawIPNifName, "RawIP");
-
-// constants for diagnostic logging
-_LIT8(KNifSubDir, "RawIp");
-_LIT8(KRefFile, "RawIP.txt");
-
-// Max size of IP packet
-const TInt KMaxIPPacket = 1500;
-const TInt KIPTagHeaderLength = 2;
-const TInt KMaxIPPacketAndHeader = KMaxIPPacket + KIPTagHeaderLength;
-
-const TInt KIPTagHeaderByte1 = 0x00;
-const TInt KIPTagHeaderByte2 = 0x21;
-
-#endif //CONSTANTS_H
--- a/telephonyprotocols/rawipnif/version1/inc/IPTagHeader.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Defines the Class that adds and extracts specific header tags.
-//
-//
-
-/**
- @file
-*/
-
-#ifdef RAWIP_HEADER_APPENDED_TO_PACKETS
-
-#ifndef IPTAGHEADER_H__
-#define IPTAGHEADER_H__
-
-#include "bttlog.h"
-#include "Constants.h"
-#include <nifmbuf.h>
-
-class CBttLogger;
-
-class CIPTagHeader : public CBase
- {
-public:
- CIPTagHeader(CBttLogger* aTheLogger);
- ~CIPTagHeader();
- void SetType(TUint16 aType);
- void AddHeader(TDes8& aDes);
- TUint16 RemoveHeader(RMBufChain& aPdu);
-
-private: // Unowned data.
- CBttLogger* iTheLogger;
-
- //CLASSNAMEDECL(CIPTagHeader);
-
- TBuf8<KIPTagHeaderLength> iHeaderByte; // Owned
- };
-
-#endif // IPTAGHEADER_H__
-
-#endif // RAWIP_HEADER_APPENDED_TO_PACKETS
--- a/telephonyprotocols/rawipnif/version1/inc/IPv4ProtocolIf.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// This file defines the CIPv4ProtocolIf class, which handles the transmission
-// of IPv4 data to and from the TCP/IP stack.
-//
-//
-
-/**
- @file
-*/
-
-#ifndef IPV4PROTOCOLIF_H__
-#define IPV4PROTOCOLIF_H__
-
-#include "ProtocolIfBase.h"
-
-class CBttLogger;
-
-class CIPv4ProtocolIf : public CProtocolIfBase
-{
-public:
- CIPv4ProtocolIf(CRawIPNifMain& aNifMain, CBttLogger* aTheLogger);
- ~CIPv4ProtocolIf();
-
-public: //NifIfBase support.
- virtual void BindL(TAny *aId);
- virtual TInt Control(TUint aLevel,TUint aName,TDes8& aOption, TAny* aSource);
- virtual TInt Send(RMBufChain& aPdu, TAny* aSource);
- virtual void Info(TNifIfInfo& aInfo) const;
- virtual TInt Notification(TAgentToNifEventType aEvent, void * aInfo);
- virtual void StartSending(CProtocolBase* aProtocol);
-
- virtual TBool WantsProtocol(TUint16 aProtocolCode);
- virtual void Process(RMBufChain& aPdu);
-
- virtual void UpdateContextConfigL(const RPacketContext::TContextConfigGPRS&
- aConfig);
- virtual void UpdateConnectionSpeed(TUint aConnectionSpeed);
-
- // Define the class that will hold the IPv4 setting required by the Nif.
- class TIPv4Settings
- {
- public:
- // As this is IPv4, all addresses are 32-bit.
- TUint32 iLocalAddr;
- TUint32 iNetMask;
- TUint32 iBroadcastAddr;
- TUint32 iDefGateway;
- TUint32 iPrimaryDns;
- TUint32 iSecondaryDns;
- TBool iGetGatewayFromServer;
- TBool iGetDnsFromServer;
- };
-
-private:
- void ReadCommDbGprsSettingsL();
- void ReadIPv4SettingL(const TDesC& aFieldName, TUint32& aIpAddr);
-
- TInt WriteIfConfig(TDes8& aIfConfig);
- TInt WriteIfInfo(TDes8& aIfInfo);
-
- TInt WriteConnectionInfo(TDes8& aConnectionInfo);
-
-#ifdef WCDMA_STUB
- TInt DeleteContext(TDes8& aContextParameters);
-#endif
-
- inline void WriteIfName(TDes& aName) const;
-
-#ifdef __BTT_LOGGING__
- void LogPacket(const RMBufChain& aPacket);
-#endif // __BTT_LOGGING__
-
-private: //unowned
- CBttLogger* iTheLogger;
-
-private: //owned
- TIPv4Settings iSettings;
- TUint iSpeedMetric;
-};
-
-void CIPv4ProtocolIf::WriteIfName(TDes& aName) const
-/**
- * Used to uniquely identify the current Nif instance
- *
- * @param aName Descriptor that will be initialised.
- */
- {
- aName.Format(_L("%S[0x%X]"), &KIPv4ProtocolIfName, this);
- }
-
-#endif // IPV4PROTOCOLIF_H__
--- a/telephonyprotocols/rawipnif/version1/inc/IPv6ProtocolIf.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// This file defines the CIPv6ProtocolIf class, which handles the transmission
-// of IPv6 data to and from the TCP/IP stack.
-//
-//
-
-/**
- @file
-*/
-
-#ifndef IPV6PROTOCOLIF_H__
-#define IPV6PROTOCOLIF_H__
-
-#include "ProtocolIfBase.h"
-#include <eui_addr.h>
-
-class CBttLogger;
-
-class CIPv6ProtocolIf : public CProtocolIfBase
-{
-public:
- CIPv6ProtocolIf(CRawIPNifMain& aNifMain, CBttLogger* aTheLogger);
- ~CIPv6ProtocolIf();
-
-public: //NifIfBase support.
- virtual void BindL(TAny *aId);
- virtual TInt Control(TUint aLevel,TUint aName,TDes8& aOption, TAny* aSource);
- virtual TInt Send(RMBufChain& aPdu, TAny* aSource);
- virtual void Info(TNifIfInfo& aInfo) const;
- virtual TInt Notification(TAgentToNifEventType aEvent, void * aInfo);
- virtual void StartSending(CProtocolBase* aProtocol); // It seems not needed for ipv6
-
- virtual TBool WantsProtocol(TUint16 aProtocolCode);
- virtual void Process(RMBufChain& aPdu);
-
-
- virtual void UpdateContextConfigL(const RPacketContext::TContextConfigGPRS&
- aConfig);
- virtual void UpdateConnectionSpeed(TUint aConnectionSpeed);
-
- // Define the class that will hold the IPv6 setting required by the Nif.
- class TIPv6Settings
- {
- public:
- TIp6Addr iLocalAddr;
- TIp6Addr iPrimaryDns;
- TIp6Addr iSecondaryDns;
- TBool iGetDnsFromServer;
- TBool iGetIpFromServer;
- TE64Addr iLocalIfId;
- //TE64Addr iRemoteIfId;
- };
-
-private:
- void ReadCommDbGprsSettingsL();
- // This method is only used to get GPRS_IP_ADDR.
- void ReadIPv4SettingL(const TDesC& aFieldName, TUint32& aIpAddr);
- void ReadIPv6SettingL(const TDesC& aFieldName, TIp6Addr& aIpAddr);
-
- TInt WriteIfConfig(TDes8& aIfConfig);
- TInt WriteIfInfo(TDes8& aIfInfo);
-
- TInt WriteConnectionInfo(TDes8& aConnectionInfo);
-#ifdef WCDMA_STUB
- TInt DeleteContext(TDes8& aContextParameters);
-#endif
- inline void WriteIfName(TDes& aName) const;
-
-#ifdef __BTT_LOGGING__
- void LogPacket(const RMBufChain& aPacket);
-#endif // __BTT_LOGGING__
-
-private: //unowned
- CBttLogger* iTheLogger;
-
-private: //owned
- TIPv6Settings iSettings;
- TUint iSpeedMetric;
-};
-
-void CIPv6ProtocolIf::WriteIfName(TDes& aName) const
-/**
- * Used to uniquely identify the current Nif instance
- *
- * @param aName Descriptor that will be initialised.
- */
- {
- aName.Format(_L("%S[0x%X]"), &KIPv6ProtocolIfName, this);
- }
-
-#endif // IPV6PROTOCOLIF_H__
--- a/telephonyprotocols/rawipnif/version1/inc/MControllerObserver.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Interface class for objects which need to observe the BCA controller.
-//
-//
-
-/**
- @file
-*/
-
-#ifndef MCONTROLLEROBSERVER_H__
-#define MCONTROLLEROBSERVER_H__
-
-#include "MRawIPNifObserverBase.h"
-#include <es_mbuf.h>
-
-class MControllerObserver : public MRawIPNifObserverBase
- {
-public:
- virtual void Process(RMBufChain& aPdu, TUint16 aProtocolCode)=0;
- virtual void ResumeSending()=0;
- };
-
-#endif // MCONTROLLEROBSERVER_H__
--- a/telephonyprotocols/rawipnif/version1/inc/MRawIPNifObserverBase.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Defines the class MRawIPNifObserverBase. All internal NIF observer mixins
-// derive from this class.
-//
-//
-
-/**
- @file
-*/
-
-#ifndef MRAWIPNIFOBSERVERBASE_H__
-#define MRAWIPNIFOBSERVERBASE_H__
-
-class MNifIfNotify;
-class CBcaIoController;
-class CProtocolIfBase;
-
-class MRawIPNifObserverBase
- {
-public:
- enum TInitialisationState
- {
- EStart,
- EBcaController,
- EInitialised
- };
-
-public:
- virtual void InitialiseL(TInitialisationState aState, TInt aError)=0;
- virtual void ShutDown(TInitialisationState aState, TInt aError=KErrNone)=0;
-
-public:
- virtual MNifIfNotify* GetAgent()=0;
- virtual CProtocolIfBase* GetProtocolIf()=0;
- };
-
-#endif // MRAWIPNIFOBSERVERBASE_H__
--- a/telephonyprotocols/rawipnif/version1/inc/ProtocolIfBase.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// This file defines the base class for the protocol interface classes.
-//
-//
-
-/**
- @file
-*/
-
-#ifndef PROTOCOLIFBASE_H__
-#define PROTOCOLIFBASE_H__
-
-#include <comms-infras/nifif.h>
-#include <es_mbuf.h>
-
-#include "Constants.h"
-
-class CRawIPNifMain;
-class CBttLogger;
-
-class CProtocolIfBase : public CNifIfBase
- {
-public:
- CProtocolIfBase(CRawIPNifMain& aNifMain, CBttLogger* aTheLogger);
- virtual ~CProtocolIfBase();
-
-public:
- virtual void BindL(TAny *aId);
- virtual TInt State();
- virtual TInt Control(TUint aLevel,TUint aName,TDes8& aOption, TAny* aSource);
- virtual TInt Send(RMBufChain& aPdu, TAny* aSource);
- virtual void Info(TNifIfInfo& aInfo) const;
- virtual TInt Notification(TAgentToNifEventType aEvent, void * aInfo);
- virtual void StartSending(CProtocolBase* aProtocol);
-
-public:
- virtual void UpdateContextConfigL(const RPacketContext::TContextConfigGPRS&
- aConfig);
- virtual void UpdateConnectionSpeed(TUint aConnectionSpeed);
-
- virtual TBool WantsProtocol(TUint16 aProtocolCode)=0;
- virtual void Process(RMBufChain& aPdu) = 0;
-
-public:
- inline CRawIPNifMain& GetNifMain();
-
-protected:
- CProtocolBase* iProtocol;
- CRawIPNifMain& iNifMain;
-
-private:
- CBttLogger* iTheLogger;
- };
-
-CRawIPNifMain& CProtocolIfBase::GetNifMain()
-/**
- * Returns to reference to RawIPNifMain
- *
- * @return reference to CRawIPNifMain class
- */
- {
- return iNifMain;
- }
-
-#endif
--- a/telephonyprotocols/rawipnif/version1/inc/RawIPNifMain.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,127 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Defines the CRawIPNifMain class, which provides a central point for the NIF
-// to communicate with NifMan and the BCA controller. This class creates an
-// interface to the IPv4 protocol when it is required.
-//
-//
-
-/**
- @file
-*/
-
-#ifndef RAWIPNIFMAIN_H
-#define RAWIPNIFMAIN_H
-
-#include <comms-infras/nifif.h>
-#include <networking/packetlogger.h>
-#include <in_sock.h>
-#include "ProtocolIfBase.h"
-#include "BcaIoController.h"
-#include "MControllerObserver.h"
-#include "bttlog.h"
-
-class CBttLogger;
-class CPacketLogger;
-
-class CRawIPNifMain : public CNifIfLink, public MControllerObserver
- {
-public:
- CRawIPNifMain(CNifIfFactory& aFactory, MNifIfNotify* aNotify, CBttLogger* aTheLogger);
- ~CRawIPNifMain();
- void ConstructL(const TDesC& aName);
- // Used to be :Pure virtuals inherited from MContextSmObserver
- CBcaIoController* GetBcaController();
- void UpdateContextState(RPacketContext::TContextStatus aState,
- TInt aError);
- void UpdateContextConfig(
- RPacketContext::TContextConfigGPRS aConfig);
-
-public: // Pure virtuals inherited from CNifIfBase
- virtual void Info(TNifIfInfo&) const;
- virtual TInt Send(RMBufChain& aPdu, TAny* aSource=0);
- virtual TInt Notification(TAgentToNifEventType aEvent, void * aInfo);
-
-public: // Virtuals inherited from CNifIfBase
- virtual void BindL(TAny *aId);
- virtual TInt Control(TUint aLevel, TUint aName, TDes8& aOption,
- TAny* aSource);
- virtual TInt State();
-
-public: // Pure virtuals inherited from CNifIfLink
- virtual TInt Start();
- virtual void Stop(TInt aReason,MNifIfNotify::TAction aAction);
- virtual CNifIfBase* GetBinderL(const TDesC& aName);
- virtual void Restart(CNifIfBase* aIf);
-
-public: // Virtuals inherited from CNifIfLink
- virtual void AuthenticateComplete(TInt aResult);
-
-public: // Pure virtuals inherited from MRawIPNifObserverBase
- virtual void InitialiseL(TInitialisationState aState, TInt aError);
- virtual void ShutDown(TInitialisationState aState, TInt aError);
- virtual MNifIfNotify* GetAgent();
-
- virtual CProtocolIfBase* GetProtocolIf();
-
-public: // Pure virtuals inherited from MControllerObserver
- // Data going upstack
- virtual void Process(RMBufChain& aPdu, TUint16 aProtocolCode);
- // Flow Control unblocked
- virtual void ResumeSending();
-
-public: // Inherited from MNifIfNotify
- // Notify that link is Up/Down
- virtual void LinkLayerUp();
- virtual void LinkLayerDown(TInt aError);
-
-public: // Send data to CBcaIoController
- TInt SendPacket(RMBufChain& aPdu, TAny* /*aSource=0*/,
- TUint16 /*aType=KIp4FrameType*/);
-
-public: // Context status retrieval.
- inline RPacketContext::TContextStatus GetContextStatus();
-
-private:// Unowned
- /** networking packet logger for debugging packets */
- __PACKETLOG_DECLARATION_MEMBER;
- CBttLogger* iTheLogger;
-
- // Upstack bound protocol reference
- CProtocolBase* iProtocol;
-
- // The protocol to use (IPv4).Note: This is not owned by this class.
- CProtocolIfBase* iProtocolIf;
-
-private:// Owned
- TInt iInitError;
- TIfStatus iState; // One of EIfPending, EIfUp, EIfBusy or EIfDown.
-
- RPacketContext::TContextStatus iContextStatus;
- RPacketContext::TContextConfigGPRS iContextConfig;
-
- CBcaIoController* iBcaController;
- };
-
-inline RPacketContext::TContextStatus CRawIPNifMain::GetContextStatus()
-/**
- * Returns Context status
- *
- * @return iContextStatus The context status
- */
- {
- return iContextStatus;
- }
-
-#endif // RAWIPNIFMAIN_H
--- a/telephonyprotocols/rawipnif/version1/inc/RawIPNifMainFactory.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Defines the factory class which is used to instantiate the RAW IP NIF.
-//
-//
-
-/**
- @file
-*/
-
-#ifndef RAWIPNIFMAINFACTORY_H__
-#define RAWIPNIFMAINFACTORY_H__
-
-#include <comms-infras/nifif.h>
-#include "bttlog.h"
-
-class CRawIPNifMainFactory : public CNifIfFactory
- {
-public:
- virtual CNifIfBase* NewInterfaceL(const TDesC& aName);
- virtual CNifIfBase* NewInterfaceL(const TDesC& aName,MNifIfNotify* aNotify);
-
-protected:
- virtual void InstallL();
- virtual TInt Info(TNifIfInfo& aInfo, TInt aIndex) const;
-
-private:
- CBttLogger* iTheLogger;
- };
-
-#endif
--- a/telephonyprotocols/rawipnif/version1/inc/Receiver.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Defines the active object that controls the BCA Read() requests.
-//
-//
-
-/**
- @file
-*/
-
-#ifndef RECEIVER_H
-#define RECEIVER_H
-
-#include "BcaIoController.h"
-#include "bttlog.h"
-#include "Constants.h"
-
-class CBttLogger;
-
-class CReceiver : public CActive
- {
-public:
- CReceiver(CBcaIoController& aObserver, CBttLogger* aTheLogger);
- ~CReceiver();
-
-public: // Inherited from CActive.
- virtual void RunL();
- virtual void DoCancel();
-
-public:
- void StartListening();
-
-private: // Unowned data.
- CBcaIoController& iObserver;
- CBttLogger* iTheLogger;
-
-private:
- TBuf8<KMaxIPPacketAndHeader> iData;
- };
-
-#endif // RECEIVER_H
--- a/telephonyprotocols/rawipnif/version1/inc/Sender.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Defines the active object that controls the BCA Write() requests.
-//
-//
-
-/**
- @file
-*/
-
-#ifndef SENDER_H
-#define SENDER_H
-
-#include "BcaIoController.h"
-#include "bttlog.h"
-#include "Constants.h"
-
-class CBttLogger;
-
-class CSender : public CActive
- {
-public:
- CSender(CBcaIoController& aObserver, CBttLogger* aTheLogger);
- ~CSender();
-
-public: // Inherited from CActive.
- virtual void RunL();
- virtual void DoCancel();
-
-public:
- void Send(RMBufChain& aPdu);
- void SendBuffer(const TDesC8& aBuffer);
- inline TInt SendBufferLength();
-
-private: // Unowned data.
- CBcaIoController& iObserver;
- CBttLogger* iTheLogger;
-
-private:
- //CLASSNAMEDECL(CSender);
-
- TBuf8<KMaxIPPacketAndHeader> iSendBuffer;
- };
-
-TInt CSender::SendBufferLength()
- {
- return iSendBuffer.MaxLength();
- }
-
-#endif // SENDER_H
--- a/telephonyprotocols/rawipnif/version1/inc/bttlog.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,135 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Defines logger for RawIP NIF.
-//
-//
-
-/**
- @file
-*/
-
-#ifndef BTTLOG_H__
-#define BTTLOG_H__
-
-#include <comms-infras/commsdebugutility.h>
-
-#if defined(__FLOG_ACTIVE) || defined(__DEBUGRAWIPSERIALPORT__)
-// Uncomment any of these macros if you want logging.
-// -> BTT_LOG_1 : For general logging
-// -> BTT_LOG_2 : For error and warning logging
-// -> BTT_LOG_3 : For IP packet information
-#define __BTT_LOG_1__ 1
-//#define __BTT_LOG_2__ 1
-//#define __BTT_LOG_3__ 1
-#endif
-
-#ifdef __BTT_LOG_1__
-#define _LOG_L1C1(AAA) iTheLogger->Write(AAA)
-#define _LOG_L1C2(AAA, BBB) iTheLogger->WriteFormat(AAA, BBB)
-#define _LOG_L1C3(AAA, BBB, CCC) iTheLogger->WriteFormat(AAA, BBB, CCC)
-#define _LOG_L1C4(AAA, BBB, CCC, DDD) iTheLogger->WriteFormat(AAA, BBB, CCC, DDD)
-#define _LOG_L1C5(AAA, BBB, CCC, DDD, EEE) iTheLogger->WriteFormat(AAA, BBB, CCC, DDD, EEE)
-#else
-#define _LOG_L1C1(AAA)
-#define _LOG_L1C2(AAA, BBB)
-#define _LOG_L1C3(AAA, BBB, CCC)
-#define _LOG_L1C4(AAA, BBB, CCC, DDD)
-#define _LOG_L1C5(AAA, BBB, CCC, DDD, EEE)
-#endif // __BTT_LOG_1__
-
-#ifdef __BTT_LOG_2__
-#define _LOG_L2C1(AAA) iTheLogger->Write(AAA)
-#define _LOG_L2C2(AAA, BBB) iTheLogger->WriteFormat(AAA, BBB)
-#define _LOG_L2C3(AAA, BBB, CCC) iTheLogger->WriteFormat(AAA, BBB, CCC)
-#define _LOG_L2C4(AAA, BBB, CCC, DDD) iTheLogger->WriteFormat(AAA, BBB, CCC, DDD)
-#define _LOG_L2C5(AAA, BBB, CCC, DDD, EEE) iTheLogger->WriteFormat(AAA, BBB, CCC, DDD, EEE)
-#else
-#define _LOG_L2C1(AAA)
-#define _LOG_L2C2(AAA, BBB)
-#define _LOG_L2C3(AAA, BBB, CCC)
-#define _LOG_L2C4(AAA, BBB, CCC, DDD)
-#define _LOG_L2C5(AAA, BBB, CCC, DDD, EEE)
-#endif // __BTT_LOG_2__
-
-#ifdef __BTT_LOG_3__
-#define _LOG_L3C1(AAA) iTheLogger->Write(AAA)
-#define _LOG_L3C2(AAA, BBB) iTheLogger->WriteFormat(AAA, BBB)
-#define _LOG_L3C3(AAA, BBB, CCC) iTheLogger->WriteFormat(AAA, BBB, CCC)
-#define _LOG_L3C4(AAA, BBB, CCC, DDD) iTheLogger->WriteFormat(AAA, BBB, CCC, DDD)
-#define _LOG_L3C5(AAA, BBB, CCC, DDD, EEE) iTheLogger->WriteFormat(AAA, BBB, CCC, DDD, EEE)
-#else
-#define _LOG_L3C1(AAA)
-#define _LOG_L3C2(AAA, BBB)
-#define _LOG_L3C3(AAA, BBB, CCC)
-#define _LOG_L3C4(AAA, BBB, CCC, DDD)
-#define _LOG_L3C5(AAA, BBB, CCC, DDD, EEE)
-#endif // __BTT_LOG_3__
-
-#ifdef __BTT_LOG_1__
-#ifndef __BTT_LOGGING__
-#define __BTT_LOGGING__
-#endif
-#endif
-
-#ifdef __BTT_LOG_2__
-#ifndef __BTT_LOGGING__
-#define __BTT_LOGGING__
-#endif
-#endif
-
-#ifdef __BTT_LOG_3__
-#ifndef __BTT_LOGGING__
-#define __BTT_LOGGING__
-#endif
-#endif
-
-#ifdef __BTT_LOGGING__
-#define _BTT_LEAVEIFERROR(a) iTheLogger->VerboseLeaveL(__FILE__, __LINE__, a)
-#define _BTT_PANIC(CAT, CODE) iTheLogger->VerbosePanic(__FILE__, __LINE__, CODE, (TText8*)#CODE, CAT)
-#else
-#define _BTT_LEAVEIFERROR(a) User::LeaveIfError(a)
-#define _BTT_PANIC(CAT, CODE) User::Panic(CAT, CODE)
-#endif // __BTT_LOGGING__
-
-/**
- * static class containing methods for logging
- * text to a logfile.
- */
-class CBttLogger : public CBase
- {
-public:
- static CBttLogger* NewL(const TDesC8& aTag, const TDesC8& aFileName, const TUint32 aInstanceId);
- ~CBttLogger();
-
-public:
- void Write(const TDesC8& aText);
- void WriteFormat(TRefByValue<const TDesC8> aFmt, ...);
- void VerboseLeaveL(char* aFile, TInt aLine, TInt aReason);
- void VerbosePanic(char* aFile,
- TInt aLine,
- TInt aPanicCode,
- TText8* aPanicName,
- const TDesC& aPanicCategory);
-
-protected:
- CBttLogger();
- void ConstructL(const TDesC8& aSubDir, const TDesC8& aFileName, const TUint32 aInstanceId);
-
-private: // owned
-
- TUint32 iInstanceId;
- __FLOG_DECLARATION_MEMBER;
- };
-
-#endif // BTTLOG_H__
--- a/telephonyprotocols/rawipnif/version1/src/BcaController.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,437 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Implements the interface to Bca & flow control.
-//
-//
-
-/**
- @file
-*/
-
-#include <e32uid.h>
-#include <nifmbuf.h>
-#include <es_ini.h>
-#include "BcaController.h"
-
-_LIT(KRawIpIniFile, "rawip.ini");
-_LIT(KLinkLit, "link");
-_LIT(KHighmarkLit, "highmark");
-//In order not to flow off SPUD everytime we set the default to 1
-const TUint KDefaultBufferSize=1;
-
-CBcaController::CBcaController(MControllerObserver& aObserver,
- CBttLogger* aTheLogger)
-/**
- * Constructor.
- */
- : iObserver(aObserver),
- iTheLogger(aTheLogger),
- iTxFlowControl(EFlowControlOff),
- iTxContextActive(ETrue),
- iSendState(EIdle),
- iMaxSendQueueLen(0),
- iNumPacketsInSendQueue(0)
- {
- iSendQueue.Init();
- }
-
-
-CBcaController::~CBcaController()
-/**
- * Destructor.
- */
- {
- iSendQueue.Free();
- iNumPacketsInSendQueue = 0;
-
-#ifdef RAWIP_HEADER_APPENDED_TO_PACKETS
- delete iIPTagHeader;
-#endif // RAWIP_HEADER_APPENDED_TO_PACKETS
- }
-
-void CBcaController::BaseConstructL()
- {
- _LOG_L1C1(_L8("CBcaController::BaseConstructL"));
-
-#ifdef RAWIP_HEADER_APPENDED_TO_PACKETS
- iIPTagHeader = new (ELeave) CIPTagHeader(iTheLogger);
-#endif // RAWIP_HEADER_APPENDED_TO_PACKETS
- CESockIniData* iniData = NULL;
- TRAPD(res, iniData = CESockIniData::NewL(KRawIpIniFile));
- CleanupStack::PushL(iniData);
-
- if(res!=KErrNone)
- {
- _LOG_L1C2(_L8("RawIp ini file %S not found. Default values will be used."), &KRawIpIniFile);
- CleanupStack::PopAndDestroy();
- return;
- }
-
- //here process the file
- if(!iniData->FindVar(KLinkLit(), KHighmarkLit(), iMaxSendQueueLen))
- {
- iMaxSendQueueLen = KDefaultBufferSize;
- }
-
- CleanupStack::PopAndDestroy();
- }
-
-void CBcaController::UpdateInternalFlowFlag(TFlowControl aValue)
-/**
- * Updates Internal Flow flag and resumes the data flow if
- * necessary.
- *
- * @param aValue the new state of iInternalFlow
- */
- {
- _LOG_L1C3(_L8("CBcaController::UpdateInternalFlowFlag[NewValue=%d, iSendState=%d]"),
- aValue, iSendState);
-
- if(iTxFlowControl == aValue)
- {
- // C32 Sent the same indication signal twice. Nif will ignore it.
- _LOG_L2C1(_L8("WARNING CBcaController: Received same indication twice"));
- return;
- }
-
- // Update the flag value.
- iTxFlowControl = aValue;
-
- if(iTxFlowControl == EFlowControlOff)
- {
- // If the indication received turned flow control off...
- if (IsTxPossible() && (iSendState == EIdle))
- {
- // ... if the NIF is in the EWaiting state
- // then the data flow can be resumed.
- ResumeSending();
- }
- }
- else
- {
- // if the Flow Control is on we can remove all queued write requests
- EmptySendQueue();
- }
- }
-
-void CBcaController::UpdateContextStateFlag(TBool aValue)
-/**
- * Updates Context State flag and resumes the data flow if
- * necessary.
- *
- * @param aValue the new state of iTxContextState
- */
- {
- _LOG_L1C3(_L8("CBcaController::UpdateContextStateFlag[NewValue=%d, OldValue=%d]"),
- aValue, iTxContextActive);
-
- if(iTxContextActive == aValue)
- {
- return;
- }
-
- // Update the flag value.
- iTxContextActive = aValue;
-
- if(iTxContextActive)
- {
- // If the PDP context is active and...
- if (IsTxPossible() && (iSendState == EIdle))
- {
- // ... if the NIF is in the EWaiting state
- // then the data flow can be resumed.
- ResumeSending();
- }
- }
- else
- {
- // if the PDP context is suspended we can remove all queued write requests
- EmptySendQueue();
- }
- }
-
-TInt CBcaController::Send(RMBufChain& aPdu)
-/**
- * This method is called by CRawIPNifMain in order to send a packet down
- * to the BCA.
- *
- * @param aPdu a data packet
- */
- {
- _LOG_L1C1(_L8(">>CBcaController::Send"));
-
- // Check if NIF is shutting down
- if (iSendState == EShuttingDown)
- {
- _LOG_L2C1(_L8(" ERROR: Nif is shutting down"));
-
- aPdu.Free();
-
- return KErrDisconnected;
- }
-
- // check that this packet isnt too big - If it is, we dont want to send it or
- // add it to our queue
- if ((aPdu.Length() - aPdu.First()->Length()) > BcaSendBufferLength())
- {
- _LOG_L2C1(_L8("Packet is too large - discarding"));
- _LOG_L1C1(_L8("<<CSender::Send -> Error"));
-
- aPdu.Free();
- return KErrArgument;
- }
-
- if (iSendState == ESending)
- // If this happens, it means that TCP/IP has sent us an IP packet
- // while we're still sending the previous one.
- {
- // check that the queue isnt full NB. this check should not be needed as when the
- // queue becomes full the IP layer shouldnt send any more packets until it is told to
- if (!IsSendQueueFull())
- {
- _LOG_L1C1(_L8(" Sender busy, appending packet to queue"));
- //We know that flow control is off and context isnt suspended so can add to queue
- AppendToSendQueue(aPdu);
-
- return IsSendQueueFull() ? KStopSending : KContinueSending;
- }
-
- _LOG_L1C1(_L8(" Queue is full, upper layer is still sending packets, potential memory problems."));
- AppendToSendQueue(aPdu);
- return KStopSending;
- }
-
- // If we have got here then a write isnt currently happening
- // We dont need to check flow control is off and context isnt suspended as the BCA always
- // has room for one packet, so send the packet
-
- if(!IsSendQueueEmpty())
- {
- //make sure that we don't change the order of packets!
- //first send what has already been lined up
- RMBufChain tmpPdu;
- _LOG_L1C1(_L8(" Packet removed from queue to send"));
- RemoveFromSendQueue(tmpPdu);
- AppendToSendQueue(aPdu);
-
- // Update module state
- _LOG_L2C1(_L8(" set State to ESending"));
- iSendState = ESending;
-
- BcaSend(tmpPdu);
- }
- else
- {
- // Update module state
- _LOG_L2C1(_L8(" set State to ESending"));
- iSendState = ESending;
-
- BcaSend(aPdu);
- }
-
- _LOG_L2C1(_L8("<<CBcaController::Send - return StopSending/ContinueSending"));
- return IsSendQueueFull() ? KStopSending : KContinueSending;
- }
-
-void CBcaController::SendComplete()
-/**
- * This method is called after a packet was sent to the board.
- * If allowed by flow contol flags the NIF can signal the TCP/IP
- * protocol indicating that is available to send more packets.
- */
- {
- _LOG_L1C1(_L8("CBcaController::SendComplete"));
- _LOG_L2C1(_L8(" set State to EIdle"));
-
- iSendState = EIdle;
-
- if (IsTxPossible())
- ResumeSending();
- }
-
-TBool CBcaController::IsTxPossible()
-/**
- * This method returns ETrue if both TX flags are set to ETrue
- *
- * @return The Flow control state
- */
- {
- _LOG_L1C3(_L8("CBcaController::IsTxPossible (contextActive %d, flowcontrol %d)"),
- iTxContextActive, iTxFlowControl);
-
- if(iTxContextActive && (iTxFlowControl == EFlowControlOff))
- return ETrue;
- else
- return EFalse;
- }
-
-void CBcaController::Process(TDesC8& aPdu)
-/**
- * This method will pass on the received data to CBttNifMain.
- *
- * @param aPdu a data packet
- */
- {
- _LOG_L1C1(_L8(">>CBcaController::Process"));
-
- TInt ret;
-
- // Create a packet object.
- RMBufPacket packet;
- TRAP(ret, packet.CreateL(aPdu));
- if (ret != KErrNone)
- {
- // Couldn't create package. Packet will be ignored...
- _LOG_L1C2(_L8("<<CBcaController::Process couldn't create MBuf [ret=%d]"), ret);
- return;
- }
- else
- // Package created...
- {
-#ifdef RAWIP_HEADER_APPENDED_TO_PACKETS
- TUint16 protocolCode = iIPTagHeader->RemoveHeader(packet);
-#else
- TUint16 protocolCode = 0;
-#endif // RAWIP_HEADER_APPENDED_TO_PACKETS
-
- packet.Pack();
- // Process the packet
- GetObserver().Process(packet, protocolCode);
- }
-
- _LOG_L1C1(_L8("<<CBcaController::Process"));
- }
-
-void CBcaController::ResumeSending()
-/**
- * Used to indicate to the TCP/IP protocol layer that the NIF is ready to
- * process more packets.
- */
- {
- _LOG_L1C1(_L8("CBcaIoController::ResumeSending"));
-
- // If there are still some packets in the queue to be sent, then carry
- // on sending them.
- // NB. we only want to send more packets from the queue if we are currently EIdle
- if (iSendState == EIdle)
- {
- if(!IsSendQueueEmpty())
- {
- RMBufChain tmpPdu;
- _LOG_L1C1(_L8(" Packet removed from queue to send"));
- RemoveFromSendQueue(tmpPdu);
-
- // Update module state
- _LOG_L2C1(_L8(" set State to ESending"));
- iSendState = ESending;
-
- BcaSend(tmpPdu);
- }
- if(IsSendQueueEmpty())
- {
- iObserver.ResumeSending();
- }
- }
- // if iSendState = ESending - do nothing
- }
-
-#ifdef RAWIP_HEADER_APPENDED_TO_PACKETS
-void CBcaController::SetType(TUint16 aType)
-{
-/**
- * Used to specify the type of the IP header.
- */
- _LOG_L1C1(_L8("CBcaController::SetType"));
-
- iIPTagHeader->SetType(aType);
-}
-
-void CBcaController::AddHeader(TDes8& aDes)
-/**
- * Used to add the IP header to the packet before sending to the BCA.
- */
- {
- _LOG_L1C1(_L8("CBcaController::AddHeader"));
-
- iIPTagHeader->AddHeader(aDes);
- }
-
-TUint16 CBcaController::RemoveHeader(RMBufChain& aPdu)
-/**
- * Used to remove the IP header from the received the packet before sending to the
- * TCP/IP layer.
- * @return The IP header that has been removed from the packet
- */
- {
- _LOG_L1C1(_L8("CBcaController::RemoveHeader"));
-
- return (iIPTagHeader->RemoveHeader(aPdu));
- }
-#endif // RAWIP_HEADER_APPENDED_TO_PACKETS
-
-TBool CBcaController::IsSendQueueEmpty()
-/**
- * Indicator of whether the BufferQueue is empty
- * @return TBool. ETrue if bufferQueue is emtpy, EFalse if queue is not empty
- */
- {
- return iSendQueue.IsEmpty();
- }
-
-TBool CBcaController::IsSendQueueFull()
-/**
- * Indicator of whether the BufferQueue is full
- * @return TBool. ETrue if bufferQueue is full, EFalse if queue is not full
- */
- {
- return iNumPacketsInSendQueue >= iMaxSendQueueLen;
- }
-
-void CBcaController::AppendToSendQueue(RMBufChain& aPdu)
-/**
- * Appends the packet aPdu to the queue.
- * Increments the packet count. Doesn't do error checking.
- * @param aChain buffer chain to be added
- */
- {
- iSendQueue.Append(aPdu);
- iNumPacketsInSendQueue++;
- }
-
-TBool CBcaController::RemoveFromSendQueue(RMBufChain& aPdu)
-/**
- * Removes the packet aPdu from the queue.
- * Decrements the packet count.
- * @param aChain buffer chain to be added
- * @return False if chain is empty
- */
- {
- TBool ret = iSendQueue.Remove(aPdu);
- if(ret)
- {
- iNumPacketsInSendQueue--;
- }
- return ret;
- }
-
-void CBcaController::EmptySendQueue()
-/**
- * Removes all the packets from the send queue. Initializes the
- * send queue and sets the packet count to 0.
- */
- {
- iSendQueue.Free();
- iSendQueue.Init();
- iNumPacketsInSendQueue = 0;
- }
--- a/telephonyprotocols/rawipnif/version1/src/BcaIoController.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,474 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Implements the interface to BCA.
-//
-//
-
-/**
- @file BcaIoController.cpp
-*/
-
-#include <e32uid.h>
-#include <nifmbuf.h>
-
-#include "Constants.h"
-#include "BcaIoController.h"
-#include "Sender.h"
-#include "Receiver.h"
-
-CBcaIoController::CBcaIoController(MControllerObserver& aObserver,
- CBttLogger* aTheLogger)
-/**
- * Constructor.
- *
- * @param aObserver Reference to the observer of this state machine
- * @param aTheLogger The logging object
- */
- :
- CBcaController(aObserver, aTheLogger),
- iMBca(NULL),
- iSender(NULL),
- iReceiver(NULL),
- iLoader(NULL)
- {
- }
-
-CBcaIoController* CBcaIoController::NewL(MControllerObserver& aObserver, CBttLogger* aTheLogger)
-/**
- * Two-phase constructor. Creates a new CBcaIoController object, performs
- * second-phase construction, then returns it.
- *
- * @param aObserver The observer, to which events will be reported
- * @param aTheLogger The logging object
- * @return A newly constructed CBcaIoController object
- */
- {
- CBcaIoController* self = new (ELeave) CBcaIoController(aObserver, aTheLogger);
- CleanupStack::PushL(self);
- self->ConstructL();
- CleanupStack::Pop(self);
- return self;
- }
-
-void CBcaIoController::ConstructL()
-/**
- * Second-phase constructor. Creates all the state objects it owns.
- */
- {
- _LOG_L1C1(_L8("CBcaIoController::ConstructL"));
- BaseConstructL();
- iSender = new (ELeave) CSender(*this, iTheLogger);
- iReceiver = new (ELeave) CReceiver(*this, iTheLogger);
- iLoader = new (ELeave) CBcaControl(*this, iTheLogger);
- }
-
-
-CBcaIoController::~CBcaIoController()
-/**
- * Destructor.
- */
- {
- delete iReceiver;
- delete iSender;
- delete iLoader;
-
- }
-
-/** sets the BCA Stack name
-
-* @param aBcaStack Text composed of bca stack and next bca names
-*/
-void CBcaIoController::SetBcaStackAndName(TDesC& aBcaStack)
- {
- const TChar stackDelimiter(',');
-
- TInt length = aBcaStack.Length();
- TInt delimiterLoc = aBcaStack.Locate(stackDelimiter);
-
- if(delimiterLoc > 0)
- {
- iBcaName.Copy(aBcaStack.Left(delimiterLoc));
-
- if(delimiterLoc < length)
- {
- iBcaStack.Copy(aBcaStack.Right(length-delimiterLoc-1));
- }
- }
- else
- {
- iBcaName.Copy(aBcaStack);
- }
- }
-
-
-void CBcaIoController::StartL()
-/**
- * Used to kick off the initialisation for this module
- */
- {
- _LOG_L1C1(_L8("CBcaIoController::StartL is called."));
-
- InitialiseBcaL();
- }
-
-void CBcaIoController::Stop(TInt aError)
-/**
- * Used to shutdown this module. This will cancel all the outstanding
- * requests on the active objects owned by this module and shutdown.
- * @param aError the passed in error code as to why Stop has been called
- */
- {
- _LOG_L1C1(_L8("CBcaIoController::Stop is called."));
-
- //Stop all the active objects
- iReceiver->Cancel();
-
- if(GetSendState() == ESending)
- {
- iSender->Cancel();
- }
-
- // Update module state
- SendState(EShuttingDown);
-
- //It does nothing here.
- iLoader->Cancel();
- MBca* bca = iLoader->Bca();
- if(bca)
- {
- if(aError == KErrConnectionTerminated )
- {
- _LOG_L1C1(_L8("This is an emergency shutdown, it kills the NIF immediately."));
- // It is a emergency shutdown, it kills the NIF immediately.
- bca->Close();
- GetObserver().ShutDown(MControllerObserver::EBcaController, aError);
- }
-
- else
- {
- _LOG_L1C1(_L8("This is a graceful termination which takes a while."));
- //It is a graceful termination which takes a while.
- iLoader->ShutdownBca(aError);
- }
- }
- else //nothing to shutdown, just notify linklayer down.
- {
- _LOG_L1C1(_L8("Bca is not initialized, bring the linklayer down"));
- GetObserver().ShutDown(MControllerObserver::EBcaController, aError);
- }
-
- }
-
-void CBcaIoController::InitialiseBcaL()
-/**
- * Load & Initialise Bca.
- */
- {
- _LOG_L1C1(_L8("<<CBcaIoController::InitialiseBcaL"));
- iLoader->StartLoadL();
- }
-
-void CBcaIoController::BcaProcess(TDesC8& aPdu)
-/**
- * This method will pass on the received data to CRawIPNifMain.
- *
- * @param aPdu a data packet
- */
- {
- _LOG_L1C1(_L8(">>CBcaIoController::Process"));
-
- Process(aPdu);
-
- _LOG_L1C1(_L8("<<CBcaIoController::Process"));
- }
-
-void CBcaIoController::BcaSend(RMBufChain& aPdu)
-/**
- * This method is called by CRawIPNifMain in order to send a packet down
- * to the BCA. The CSender active object will be activated by calling the send
- * method.
- *
- * @param aPdu a data packet
- */
- {
- _LOG_L1C1(_L8("CBcaIoController::BcaSend"));
-
- iSender->Send(aPdu);
- }
-
-TInt CBcaIoController::BcaSendBufferLength()
- {
- return iSender->SendBufferLength();
- }
-
-void CBcaIoController::BcaSendComplete()
-/**
- * This method is called after a packet was sent to the board.
- * If allowed by flow contol flags the NIF can signal the TCP/IP
- * protocol indicating that is available to send more packets.
- */
- {
- _LOG_L1C1(_L8("CBcaController::SendComplete"));
-
- SendComplete();
- }
-
-
-CBcaControl::CBcaControl(CBcaIoController& aObserver, CBttLogger* aTheLogger)
-/**
- * Constructor. Performs standard active object initialisation.
- *
- * @param aObserver Reference to the observer of this state machine
- * @param aTheLogger The logging object
- */
- : CActive(EPriorityNormal),
- iObserver(aObserver),
- iTheLogger(aTheLogger),
- iMBca(NULL),
- iState(EIdling),
- iError(KErrNone)
-
- {
- CActiveScheduler::Add(this);
- }
-
-CBcaControl::~CBcaControl()
-/**
- * Destructor.
- */
- {
- Cancel();
- if(iMBca)
- {
- iMBca->Release();
- }
-
- // Library will be Closed when iBcaDll is destroyed.
- }
-
-void CBcaControl::RunL()
-/**
- * Called after request is completed.
- *
- */
- {
- _LOG_L1C1(_L8("CBcaControl::RunL() called"));
- switch (iState)
- {
- //in this state, Ioctl is called to set IAP ID, check the result of
- // Ioctl, then either set the BCA stack with another Ioctl call,
- // open the BCA (if there's no BCA stack to set), or stop the NIF.
- case EIdling:
- {
- if(iStatus == KErrNone || iStatus == KErrNotSupported)
- {
- if(iStatus == KErrNotSupported)
- {
- _LOG_L1C1(_L8("This BCA does not support IAPID set"));
- }
- else
- {
- _LOG_L2C1(_L8("This BCA supports IAPID set"));
- }
-
- TPtrC bcaStack = iObserver.BcaStack();
- if(bcaStack.Length())
- {
- TBuf8<KMaxName> remainingBcaStack8;
- remainingBcaStack8.Copy(bcaStack);
- iMBca->Ioctl(iStatus, KBcaOptLevelGeneric,KBCASetBcaStack,remainingBcaStack8);
- }
- else
- {
- TRequestStatus* statusPtr=&iStatus;
- User::RequestComplete(statusPtr,KErrNone);
- }
- iState = EIAPSet;
- SetActive();
- }
- else
- {
- _LOG_L1C2(_L8("ERROR in BCA IAPID set = %d"), iStatus.Int());
- iObserver.Stop(iStatus.Int());
- }
-
- break;
- }
-
- //in this case, we receive the result of Ioctl call to set Bca Stack.
- // Check the result of Ioctl, then Open the Bca or stop the NIF
- case EIAPSet:
- {
- if(iStatus == KErrNotSupported || iStatus == KErrNone)
- {
- if(iStatus == KErrNotSupported)
- {
- _LOG_L1C1(_L8("This BCA does not support BCA stacking"));
- }
- else
- {
- _LOG_L2C1(_L8("This BCA supports BCA stacking"));
- }
- iMBca->Open(iStatus, iObserver.Port());
- iState = EBcaStackSet;
- SetActive();
- }
- else
- {
- _LOG_L2C2(_L8("ERROR in BCA stack set = %d"), iStatus.Int());
- iObserver.Stop(iStatus.Int());
- }
- break;
- }
-
- //in this state, BCA Open is called. Checks the result of Open.
- // If it is successful,then start the NIF. Otherwise stops the NIF.
- case EBcaStackSet:
- {
- if(iStatus != KErrNone && iStatus != KErrAlreadyExists)
- {
- _LOG_L2C2(_L8("ERROR in BCA Open = %d"), iStatus.Int());
- iObserver.Stop(iStatus.Int());
- }
- else
- {
- iObserver.Receiver().StartListening();
- _LOG_L1C1(_L8("CBcaIoController Is Initialised"));
- TRAPD(err, iObserver.GetObserver().InitialiseL(MRawIPNifObserverBase::EBcaController,KErrNone));
- if(err != KErrNone)
- {
- _LOG_L2C2(_L8("ERROR in BCA Open Initialise observer = %d"), err);
- iObserver.Stop(err);
- }
- }
- break;
- }
-
- //in this state, BCA is Shutdown, shutdown the NIF.
- case EClosing:
- {
- // linklayer shutdown
- iObserver.GetObserver().ShutDown(MControllerObserver::EBcaController, iError);
- break;
- }
- // Wrong state.
- default:
- {
- _LOG_L1C1(_L8("ERROR CBcaControl::RunL(): Unknown state"));
- _BTT_PANIC(KNifName, KBcaUnkownState);
- break;
- }
- }
-
- }
-
-void CBcaControl::DoCancel()
-/**
- * cancel active request.
- */
- {
- _LOG_L1C1(_L8("CBcaControl::DoCancel called."));
- _LOG_L2C2(_L8("iState value is %d"), iState);
- switch (iState)
- {
- case EIdling:
- case EIAPSet:
- if(iMBca)
- {
- iMBca->CancelIoctl();
- }
- iState = EIdling;
- break;
- case EBcaStackSet:
- case EClosing:
- if(iMBca)
- {
- iMBca->Close();
- }
- iState = EIdling;
- break;
- default:
- _LOG_L2C1(_L8("ERROR CBcaControl::DoCancel(): Unknown state"));
- _BTT_PANIC(KNifName, KBcaUnkownState);
- break;
- }
- }
-
-void CBcaControl::StartLoadL()
-/**
- * This method loads the C32BCA library and uses Ioctl to set the Bca iIapId.
- */
- {
- _LOG_L1C1(_L8("CBcaControl::StartLoad"));
-
- // Loads Bca Dll and creates a Bca instance;
- User::LeaveIfError(iBcaDll.iObj.Load(iObserver.BcaName()));
-
- TNewBcaFactoryL newBcaFactoryProcL = (TNewBcaFactoryL)iBcaDll.iObj.Lookup(1);
- if (NULL == newBcaFactoryProcL)
- {
- _LOG_L1C2(_L8("Library entry point found error %d"), KErrBadLibraryEntryPoint);
- User::Leave(KErrBadLibraryEntryPoint);
- }
-
- MBcaFactory* bcaFactory = (*newBcaFactoryProcL)();
-
- if(!bcaFactory)
- {
- _LOG_L1C2(_L8("BcaFactory creation error %d"), KErrCompletion);
- User::Leave(KErrCompletion);
- }
- CleanupReleasePushL(*bcaFactory);
-
- iMBca = bcaFactory->NewBcaL();
- CleanupStack::PopAndDestroy(bcaFactory);
-
- iObserver.SetBca(iMBca); //Pass BCA pointer.
-
- TPckg<TUint32> aOpt(iObserver.IapId());
- iMBca->Ioctl(iStatus,KBcaOptLevelGeneric,KBCASetIapId,aOpt);
-
- iState = EIdling;
- SetActive();
- }
-
-
-void CBcaControl::ShutdownBca(TInt aError)
-/**
- * Bca Shutdown.
-
- * @param aError the error code to shutdown the NIF.
- */
- {
- __ASSERT_DEBUG(iMBca,Panic(KBcaNotExist));
- Cancel();
- iError = aError;
- iState = EClosing;
- if(iMBca)
- {
- iMBca->Shutdown(iStatus);
- SetActive();
- }
- }
-
-/** Panic function for RawIpNif
-
-* @param aPanic panic code */
-void Panic(TRawIPNifPanic aPanic)
- {
- _LOG_L2C2(_L8("Panic code for RawIpNif = %d"), aPanic);
- User::Panic(KNifName,aPanic);
-
- }
-
--- a/telephonyprotocols/rawipnif/version1/src/DllMain.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Defines the global functions which provide DLL entry points.
-//
-//
-
-/**
- @file
-*/
-
-#include "RawIPNifMainFactory.h"
-
-
-extern "C"
- {
- IMPORT_C CNifFactory* NewInterfaceFactoryL(); // Force export
- }
-
-EXPORT_C CNifFactory* NewInterfaceFactoryL()
-/**
- * Creates a new RAW IP NIF main factory. This must be the first exported function
- * in the NIF's DLL.
- *
- * @return A newly created RAW IP NIF main factory
- */
- {
- return new (ELeave) CRawIPNifMainFactory;
- }
--- a/telephonyprotocols/rawipnif/version1/src/IPTagHeader.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,101 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Implements the adding and removal of tag headers.
-//
-//
-
-/**
- @file
-*/
-
-#ifdef RAWIP_HEADER_APPENDED_TO_PACKETS
-
-#include "IPTagHeader.h"
-#include "Constants.h"
-
-/**
-Default constructor.
-*/
-CIPTagHeader::CIPTagHeader(CBttLogger* aTheLogger)
- : iTheLogger(aTheLogger)
- {
- iHeaderByte.SetMax();
- iHeaderByte.FillZ();
- }
-
-/**
-Default destructor.
-*/
-CIPTagHeader::~CIPTagHeader()
- {
- }
-
-/**
-This method will set the type of the IP header.
-
-@param aType IP header type
-*/
-void CIPTagHeader::SetType(TUint16 aType)
- {
- _LOG_L1C1(_L8("CIPTagHeader::SetType"));
-
- iHeaderByte[0] = (TUint8)(aType>>8);
- iHeaderByte[1] = (TUint8)(aType&0xff);
- }
-
-/**
-This method will add a two-byte header to the send buffer detailing the
-protocol the aDes data packet is encoded with; in this case an IPv4
-header tag is appended.
-
-@param aDes the send buffer
-*/
-void CIPTagHeader::AddHeader(TDes8& aDes)
- {
- _LOG_L1C1(_L8("CIPTagHeader::AddHeader"));
-
- // Add the protocol code as a header to the buffer
- aDes.Insert(0,iHeaderByte);
- }
-
-/**
-This method will remove the two-byte header from the received data,
-which specifies whether it is an IPv4/IPv6 packet. This information
-will be stored in protocolCode and returned to the caller.
-
-@param aPdu The received data packet
-@return The protocol header tag stripped from aPdu
-*/
-TUint16 CIPTagHeader::RemoveHeader(RMBufChain& aPdu)
- {
- _LOG_L1C1(_L8("CIPTagHeader::RemoveHeader"));
-
- if (aPdu.Length() > KIPTagHeaderLength)
- {
- //Strip off the first part of the header
- aPdu.TrimStart(1);
- //Read the remaining part of the header as this contains the protocol code
- TUint8* payloadPtr = aPdu.First()->Ptr();
- TUint16 protocolCode = static_cast<TUint16>(*payloadPtr);
- //Strip off the remaining protocol code part of the header
-
- aPdu.TrimStart(1);
-
- return protocolCode;
- }
-
- return 0;
- }
-
-#endif // RAWIP_HEADER_APPENDED_TO_PACKETS
--- a/telephonyprotocols/rawipnif/version1/src/IPv4ProtocolIf.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,776 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// This file implements the CIPv4ProtocolIf class, which handles the transmission
-// of IPv4 data to and from the TCP/IP stack.
-//
-//
-
-/**
- @file
-*/
-
-#include <etelpckt.h>
-#include <in_iface.h>
-#include "RawIPNifMain.h"
-#include "IPv4ProtocolIf.h"
-#ifdef WCDMA_STUB
-#include <UMTSNifControlIf.h>
-#endif
-#define LOG_IP_ADDRESS(desc,addr) _LOG_L2C5(_L8(" " desc " = %d.%d.%d.%d from context"), \
- addr >> 24, (addr >> 16) & 0xFF, (addr >> 8) & 0xFF, addr & 0xFF);
-
-CIPv4ProtocolIf::CIPv4ProtocolIf(CRawIPNifMain& aNifMain, CBttLogger* aTheLogger)
-/**
- * Constructor
- */
- : CProtocolIfBase(aNifMain,aTheLogger),
- iTheLogger(aTheLogger),
- iSpeedMetric(KDefaultSpeedMetric)
- {
- }
-
-CIPv4ProtocolIf::~CIPv4ProtocolIf()
-/**
- * Destructor
- */
- {
- }
-
-void CIPv4ProtocolIf::BindL(TAny* aId)
-/**
- * Binds protocol to the Nif
- *
- * @param aId A point the the protocol(TCP/IP)
- */
- {
- _LOG_L1C2(_L8("CIPv4ProtocolIf::BindL [aId=%X]"), aId);
-
- CProtocolIfBase::BindL(aId); // Call the superclass's method.
- iNotify = iNifMain.Notify();
- }
-
-TInt CIPv4ProtocolIf::Control(TUint aLevel, TUint aName, TDes8& aOption,
- TAny* /*aSource*/)
-/**
- * The main function called by the TCP/IP protocol to control the interface.
- * Can perform a variety of general IP tasks (such as getting IP config)
- * and "3G" specific tasks (such as deleting the context).
- *
- * @param aLevel The level of the interface to control - always KSOLInterface
- * @param aName The command to perform
- * @param aOption Data to be input/output as a result of the command
- * @param aSource The source of the command (unused)
- * @return Standard error codes
- */
- {
- _LOG_L1C3(_L8("CIPv4ProtocolIf::Control [aLevel=%d, aName=%d]"),
- aLevel, aName);
-
- if (aLevel == KSOLInterface)
- {
- switch (aName)
- {
- // General IP configuration commands are below this point.
-
- case KSoIfInfo:
- // Gets information about the interface, such as name and MTU.
- return WriteIfInfo(aOption);
-
- case KSoIfConfig:
- // Gets interface configuration, eg. IP address and DNS servers.
- return WriteIfConfig(aOption);
-
- case KSoIfGetConnectionInfo:
- // Gets IAP and network information.
- return WriteConnectionInfo(aOption);
-
- case KSoIfHardwareAddr:
- // unsupported because we don't have a h/w address
- case KSoIfCompareAddr:
- // this never actually appears to be called
- break;
-
- // 3G-specific configuration commands are below this point.
-#ifdef WCDMA_STUB
- case KRegisterEventHandler:
- // Raw IP NIF Events are not supported
- case KContextSetEvents:
- // Raw IP NIF Events are not supported
- break;
-
- case KContextCreate:
- // We don't support creating new secondary contexts.
- break;
-
- case KContextDelete:
- // Deletes the primary PDP context. This will shut down the Nif.
- return DeleteContext(aOption);
-
- case KContextActivate:
- // If the IPv4 interface is up, then the context will already have
- // been activated. So this command should fail with
- // KErrAlreadyExists
- {
- TUint8* ptr = CONST_CAST(TUint8*, aOption.Ptr());
- TContextParameters* contextParams =
- REINTERPRET_CAST(TContextParameters*, ptr);
-
- if (contextParams->iContextInfo.iContextId !=
- STATIC_CAST(TInt8, GetNifMain().GetBcaController()->Nsapi()))
- {
- contextParams->iReasonCode = KErrNotFound;
- }
- else
- {
- contextParams->iContextInfo.iStatus =
- GetNifMain().GetContextStatus();
- contextParams->iReasonCode = KErrAlreadyExists;
- }
- return KErrNone;
- }
-
- case KNifSetDefaultQoS:
- case KContextQoSSet:
- // Setting the QoS is meaningless over GPRS, so we just return that
- // we don't support these operations.
- break;
-
- case KContextTFTModify:
- // As we only have one primary context, we don't support anything
- // to do with traffic flow templates, which are used by secondary
- // contexts.
- break;
-
- case KContextModifyActive:
- // This command is only valid aftermodifying TFT/QoS parameters.
- // As we don't support any of these operations,
- // this command is never valid.
- break;
-#endif
- default:
- break;
- }
- }
- return KErrNotSupported;
- }
-
-TInt CIPv4ProtocolIf::WriteIfConfig(TDes8& aIfConfig)
-/**
- * Writes the configuration of the interface (eg. IP address, DNS servers)
- * into the supplied descriptor.
- *
- * @param aIfConfig Will contain the interface configuration
- * @return KErrNotSupported if an incorrect structure is passed,
- * otherwise KErrNone
- */
- {
- _LOG_L1C1(_L8("CIPv4ProtocolIf::WriteIfConfig"));
-
- if (aIfConfig.Length() != sizeof(TSoInetIfConfig))
- {
- return KErrArgument;
- }
-
- TUint8* ptr = CONST_CAST(TUint8*, aIfConfig.Ptr());
- TSoInetIfConfig* config = REINTERPRET_CAST(TSoInetIfConfig*, ptr);
-
- if (config->iFamily != KAfInet)
- {
- return KErrNotSupported;
- }
-
- TInetAddr::Cast(config->iConfig.iAddress).SetAddress(iSettings.iLocalAddr);
- TInetAddr::Cast(config->iConfig.iNetMask).SetAddress(iSettings.iNetMask);
- TInetAddr::Cast(config->iConfig.iBrdAddr).
- SetAddress(iSettings.iBroadcastAddr);
- TInetAddr::Cast(config->iConfig.iDefGate).SetAddress(iSettings.iDefGateway);
- TInetAddr::Cast(config->iConfig.iNameSer1).
- SetAddress(iSettings.iPrimaryDns);
- TInetAddr::Cast(config->iConfig.iNameSer2).
- SetAddress(iSettings.iSecondaryDns);
-
- return KErrNone;
- }
-
-TInt CIPv4ProtocolIf::WriteIfInfo(TDes8& aIfInfo)
-/**
- * Writes information about the interface into the supplied descriptor.
- *
- * @param aIfInfo Will contain the interface information
- * @return KErrArgument if an incorrect structure is passed, otherwise KErrNone
- */
- {
- _LOG_L1C1(_L8("CIPv4ProtocolIf::WriteIfInfo"));
-
- if (aIfInfo.Length() != sizeof(TSoIfInfo))
- {
- return KErrArgument;
- }
-
- TSoIfInfo* info = (TSoIfInfo*) aIfInfo.Ptr();
- info->iFeatures = KIfCanBroadcast | KIfCanMulticast;
- info->iSpeedMetric = iSpeedMetric;
- info->iMtu = KDefaultMtu;
- WriteIfName(info->iName);
-
- return KErrNone;
- }
-
-TInt CIPv4ProtocolIf::WriteConnectionInfo(TDes8& aConnectionInfo)
-/**
- * Writes information about the IAP and network we're associated with. This
- * is used to route data in a multi-homing environment.
- *
- * @param aConnectionInfo Will contain the connection information
- * @return Standard CommDB error codes
- */
- {
- _LOG_L1C1(_L8("CIPv4ProtocolIf::WriteConnectionInfo"));
-
- TSoIfConnectionInfo* connectionInfo =
- (TSoIfConnectionInfo*) aConnectionInfo.Ptr();
-
- TInt err;
- // Append the 2 commdb filed into this descriptor
- TBuf<2*KCommsDbSvrMaxColumnNameLength+1> fieldName;
-
- fieldName.Copy(TPtrC(IAP));
- fieldName.Append(KSlashChar);
- fieldName.Append(TPtrC(COMMDB_ID));
- err = GetNifMain().GetAgent()->ReadInt(fieldName, connectionInfo->iIAPId);
- if (err != KErrNone)
- {
- return err;
- }
-
- fieldName.Copy(TPtrC(IAP));
- fieldName.Append(KSlashChar);
- fieldName.Append(TPtrC(IAP_NETWORK));
- err = GetNifMain().GetAgent()->ReadInt(fieldName, connectionInfo->iNetworkId);
- if (err != KErrNone)
- {
- return err;
- }
-
- return KErrNone;
- }
-#ifdef WCDMA_STUB
-
-TInt CIPv4ProtocolIf::DeleteContext(TDes8& aContextParameters)
-/**
- * Deletes a context. As the NIF is responsible for one primary context,
- * this is equivalent to closing down the NIF.
- *
- * @param aContextParameters Parameters of the context to delete
- * @return KErrArgument if an incorrect structure is passed, otherwise KErrNone
- */
- {
- _LOG_L1C1(_L8("CIPv4ProtocolIf::DeleteContext"));
-
- if (aContextParameters.Length() != sizeof(TContextParameters))
- {
- return KErrArgument;
- }
-
- TUint8* ptr = CONST_CAST(TUint8*, aContextParameters.Ptr());
- TContextParameters* params = REINTERPRET_CAST(TContextParameters*, ptr);
-
- if (params->iContextInfo.iContextId !=
- STATIC_CAST(TInt8, GetNifMain().GetBcaController()->Nsapi()))
- {
- params->iReasonCode = KErrBadName;
- }
- else
- {
- params->iReasonCode = KErrNone;
- GetNifMain().Stop(KErrNone, MNifIfNotify::EDisconnect);
- }
-
- return KErrNone;
- }
-
-#endif
-
-void CIPv4ProtocolIf::ReadCommDbGprsSettingsL()
-/**
- * Reads GPRS IP settings from CommDB via the agent.
- */
- {
- _LOG_L1C1(_L8("CIPv4ProtocolIf::ReadCommDbGprsSettings"));
-
- // Read the IP address settings from CommDB.
- ReadIPv4SettingL(TPtrC(GPRS_IP_ADDR), iSettings.iLocalAddr);
- ReadIPv4SettingL(TPtrC(GPRS_IP_NETMASK), iSettings.iNetMask);
- ReadIPv4SettingL(TPtrC(GPRS_IP_NAME_SERVER1), iSettings.iPrimaryDns);
- ReadIPv4SettingL(TPtrC(GPRS_IP_NAME_SERVER2), iSettings.iSecondaryDns);
- ReadIPv4SettingL(TPtrC(GPRS_IP_GATEWAY), iSettings.iDefGateway);
-
- // Read whether to get the gateway IP address from the server.
- _BTT_LEAVEIFERROR(GetNifMain().GetAgent()->ReadBool(
- TPtrC(GPRS_IP_ADDR_FROM_SERVER),
- iSettings.iGetGatewayFromServer));
-
- // Read whether to get the DNS addresses from the server.
- _BTT_LEAVEIFERROR(GetNifMain().GetAgent()->ReadBool(
- TPtrC(GPRS_IP_DNS_ADDR_FROM_SERVER),
- iSettings.iGetDnsFromServer));
-
- // Because CommDB doesn't define a Broadcast Address field, we must
- // calculate the broadcast address. This is based on the localAddr
- // and the netMask.
- TInetAddr localAddr(iSettings.iLocalAddr, 0);
- TInetAddr netMask(iSettings.iNetMask, 0);
- TInetAddr broadcast;
- broadcast.SubNetBroadcast(localAddr, netMask);
- iSettings.iBroadcastAddr = broadcast.Address();
- }
-
-void CIPv4ProtocolIf::UpdateContextConfigL(const
- RPacketContext::TContextConfigGPRS&
- aConfig)
-/**
- * Called when the context has been activated to set our IP address and get
- * any other required settings from CommDB.
- *
- * @param aConfig The new context config
- */
- {
- _LOG_L1C1(_L8("CIPv4ProtocolIf::UpdateContextConfig"));
-
- // Get the settings which are stored in CommDB.
- ReadCommDbGprsSettingsL();
-
- // Get our IP address from the GPRS context config.
- TInetAddr address;
-
- TBuf<RPacketContext::KMaxPDPAddressLength> tempAddr;
- tempAddr.Copy(aConfig.iPdpAddress);
- TInt ret = address.Input(tempAddr);
-
- // We've got our IP address! Let's save it.
- if (ret == KErrNone)
- {
- iSettings.iLocalAddr = address.Address();
- LOG_IP_ADDRESS("Got local IP address", iSettings.iLocalAddr);
- }
- else
- {
- _LOG_L2C2(_L8("Couldn't get IP address from GPRS config (err: %d)"),
- ret);
-
- // Don't leave on this error: we may still be OK if we read some
- // settings from CommDB.
- }
-
- // @todo - is this correct. We can only get the DNS addresses
- // from the TSY using the iProtocolConfigOption data. Yet a client could
- // access those DNS config details without knowing about the state of the
- // iSettings.iGetDnsFromServer flag.
-
- if ((iSettings.iGetDnsFromServer) ||
- ((iSettings.iPrimaryDns == 0) &&
- (iSettings.iSecondaryDns == 0)) )
- {
- TBuf<RPacketContext::KMaxPDPAddressLength> tempAddr;
- tempAddr.Copy(aConfig.iProtocolConfigOption.iDnsAddresses.iPrimaryDns);
- ret = address.Input(tempAddr);
-
- if (ret == KErrNone)
- {
- iSettings.iPrimaryDns = address.Address();
- LOG_IP_ADDRESS("Got primary DNS", iSettings.iPrimaryDns);
- }
- else
- {
- _LOG_L2C2(_L8("Couldn't get primary DNS address from GPRS config (err: %d)"),
- ret);
-
- // Don't leave on this error: we may still be OK if we read some
- // settings from CommDB.
- }
-
- tempAddr.Copy(aConfig.iProtocolConfigOption.iDnsAddresses.iSecondaryDns);
- ret = address.Input(tempAddr);
-
- if (ret == KErrNone)
- {
- iSettings.iSecondaryDns = address.Address();
- LOG_IP_ADDRESS("Got secondary DNS", iSettings.iPrimaryDns);
- }
- else
- {
- _LOG_L2C2(_L8("Couldn't get secondary DNS address from GPRS config (err: %d)"),
- ret);
-
- // Don't leave on this error: we may still be OK if we read some
- // settings from CommDB.
- }
- }
- else
- {
- LOG_IP_ADDRESS("Using CommDB DNS address - Primary ", iSettings.iPrimaryDns);
- LOG_IP_ADDRESS(" - Secondary ", iSettings.iSecondaryDns);
- }
-
-
- // TProtocolConfigOptionV2::iMiscBuffer is not the correct way to pass a gateway
- // address - data needs to be passed in TLV format but there are no TLV content tags
- // defined for a gateway address and any UMTS/GPRS hardware which claims to be able
- // to supply this address is erroneous (3gpp standard 24.008, section 10.5.6.3).
- // This misuse of iMiscBuffer was preventing other correctly formed parameters from
- // being passed (INC113612).
-/* if (iSettings.iGetGatewayFromServer)
- {
- tempAddr.Copy(aConfig.iProtocolConfigOption.iMiscBuffer);
- ret = address.Input(tempAddr);
-
- if (ret == KErrNone)
- {
- iSettings.iDefGateway = address.Address();
- LOG_IP_ADDRESS("Got default gateway", iSettings.iDefGateway);
- }
- else
- {
- _LOG_L2C2(_L8("Couldn't get default gateway from GPRS config (err: %d)"),
- ret);
- }
- }*/
- }
-
-void CIPv4ProtocolIf::UpdateConnectionSpeed(TUint aConnectionSpeed)
-/**
- * Sets the speed metric to return to TCP/IP, based on what the TSY tells us.
- *
- * @param aConnectionSpeed Our connection speed
- */
- {
- _LOG_L1C1(_L8("CIPv4ProtocolIf::UpdateConnectionSpeed"));
-
- iSpeedMetric = aConnectionSpeed;
- }
-
-void CIPv4ProtocolIf::ReadIPv4SettingL(const TDesC& aFieldName,
- TUint32& aIpAddr)
-/**
- * Reads an IPv4 address from CommDB, via the TRP agent. It leaves if an error
- * other than KErrNotFound occurs.
- *
- * @param aFieldName The name of the field to read
- * @param aIpAddr Will contain the IP address
- */
- {
-#ifdef __BTT_LOGGING__
- TBuf8<256> debugBuffer;
- debugBuffer.Copy(aFieldName);
- _LOG_L1C2(_L8("CIPv4ProtocolIf::ReadIp4Setting [aFieldName=%S]"),
- &debugBuffer);
-#endif
-
- TBuf<KCommsDbSvrMaxFieldLength> name;
- TInetAddr ip4Addr;
-
- TInt ret = GetNifMain().GetAgent()->ReadDes(aFieldName, name);
-
- if (ret == KErrNone)
- {
- // We've successfully read an IP address, so convert it into a number.
- ip4Addr.Input(name);
- aIpAddr = ip4Addr.Address();
- }
- else
- {
- // We couldn't get the IP address, so set it to 0.0.0.0. Note that we
- // only leave here if we got a more serious error than "not found".
- aIpAddr = 0;
- if (ret != KErrNotFound)
- {
- _BTT_LEAVEIFERROR(ret);
- }
- }
- }
-
-TInt CIPv4ProtocolIf::Send(RMBufChain& aPdu, TAny* aSource)
-/**
- * Called by the protocol to send an outgoing IP packet to the network.
- *
- * @param aPdu The outgoing packet
- * @param aSource The source of the packet
- * @return Standard error codes
- */
- {
- _LOG_L1C1(_L8("CIPv4ProtocolIf::Send"));
-
-#ifdef __BTT_LOGGING__
- LogPacket(aPdu);
-#endif
-
- // Return <0: an error occurred
- // Return 0: no error, but don't send any more packets
-
- return GetNifMain().SendPacket(aPdu, aSource, KIp4FrameType);
- }
-
-void CIPv4ProtocolIf::Info(TNifIfInfo& aInfo) const
-/**
- * Called by the protocol to get information about the NIF.
- *
- * @param aInfo Will contain NIF information
- */
- {
- _LOG_L1C1(_L8("CIPv4ProtocolIf::Info"));
-
- // The parent class sets everything except the name...
- CProtocolIfBase::Info(aInfo);
- // ...which we set here.
- WriteIfName(aInfo.iName);
- }
-
-TInt CIPv4ProtocolIf::Notification(TAgentToNifEventType /*aEvent*/,
- void* /*aInfo*/)
-/**
- * The Nif will ignore any notification sent
- *
- * @param aEvent Not used
- * @param aInfo Not used
- */
- {
- _LOG_L1C1(_L8("CIPv4ProtocolIf::Notification"));
-
- return KErrNone;
- }
-
-void CIPv4ProtocolIf::StartSending(CProtocolBase* aProtocol)
-/**
- * Indicates to the protocol layer that the NIF is ready to send packets.
- *
- * @param aProtocol A pointer to a protocol
- */
- {
- _LOG_L1C2(_L8("CIPv4ProtocolIf::StartSending [aProtocol=%X]"), aProtocol);
-
- CProtocolIfBase::StartSending(aProtocol);
- }
-
-TBool CIPv4ProtocolIf::WantsProtocol(TUint16 aProtocolCode)
-/**
- * Indicates the type of protocol implemented by this class.
- *
- * @param aProtocolCode The protocol type
- */
- {
- _LOG_L1C2(_L8("CIPv4ProtocolIf::WantsProtocol [aProtocolCode=%X]"),
- aProtocolCode);
-
-#ifdef RAWIP_HEADER_APPENDED_TO_PACKETS
- return ((aProtocolCode & 0x00FF) == KIp4FrameType);
-#else
- (void) aProtocolCode; // disable compiler warning
- return ETrue;
-#endif // RAWIP_HEADER_APPENDED_TO_PACKETS
- }
-
-void CIPv4ProtocolIf::Process(RMBufChain& aPdu)
-/**
- * Called when an incoming IP packet has arrived. Send packets up to the
- * TCP/IP stack.
- *
- * @param aPdu The incoming packet
- */
- {
- _LOG_L1C1(_L8("CIPv4ProtocolIf::Process"));
-
-#ifdef __BTT_LOGGING__
- LogPacket(aPdu);
-#endif
-
- // Pass incoming packets up to the protocol, unless it hasn't
- // been bound yet.
- if (iProtocol)
- {
- _LOG_L1C1(_L8("CIPv4ProtocolIf: Packet Sent to TCP/IP Protocol!!!"));
- iProtocol->Process(aPdu, reinterpret_cast<CProtocolBase*>(this));
- }
- else
- {
- _LOG_L2C1(_L8("WARNING: dumping incoming packet, no protocol bound"));
- aPdu.Free();
- }
- }
-
-#ifdef __BTT_LOGGING__
-void CIPv4ProtocolIf::LogPacket(const RMBufChain& aPacket)
-/**
-* Logs packet information into log file.
-*
-* @param aPacket The packet
-*/
- {
- _LOG_L1C1(_L8("CIPv4ProtocolIf::LogPacket"));
-
- TInt mBufLength = aPacket.Length() - aPacket.First()->Length();
-
- _LOG_L3C2(_L8("Analysis of %d byte packet:"), mBufLength);
-
- //Note: All the constants used on this method are a pragmatic guess of the
- //IP header fields. The only porpose of this method is logging.
-
- if (mBufLength < 20)
- {
- _LOG_L3C2(_L8(" -doesn't appear to be a valid IPv4 packet (length=%d)")
- , mBufLength);
- return;
- }
-
- // Get a pointer to the packet's payload.
- const TUint8* payloadPtr = aPacket.First()->Next()->Ptr();
-
- if ((payloadPtr[0] & 0xF0) != 0x40)
- {
- _LOG_L3C2(_L8(" - doesn't appear to be an IPv4 packet (version=0x%X)"),
- (payloadPtr[0] & 0xF0) >> 4);
- return;
- }
-
- if ((payloadPtr[0] & 0xF) != 0x5)
- {
- _LOG_L3C2(_L8(" - doesn't have a standard IP header (length=0x%X)"),
- payloadPtr[0] & 0xF);
- return;
- }
-
- _LOG_L3C5(_L8(" - src addr: %d.%d.%d.%d"), payloadPtr[12], payloadPtr[13],
- payloadPtr[14], payloadPtr[15]);
- _LOG_L3C5(_L8(" - dst addr: %d.%d.%d.%d"), payloadPtr[16], payloadPtr[17],
- payloadPtr[18], payloadPtr[19]);
-
- if (payloadPtr[9] == 0x06)
- {
- _LOG_L3C1(_L8(" - appears to be a TCP packet"));
- if (mBufLength < 40)
- {
- _LOG_L3C2(_L8(" - but is too short (length=0x%X)"), mBufLength);
- return;
- }
- _LOG_L3C3(_L8(" - src port: %d, dst port: %d"),
- (payloadPtr[20] << 8) + payloadPtr[21],
- (payloadPtr[22] << 8) + payloadPtr[23]);
- _LOG_L3C3(_L8(" - seq #: 0x%08X, ack #: 0x%08X"),
- (payloadPtr[24] << 24) + (payloadPtr[25] << 16) +
- (payloadPtr[26] << 8) + payloadPtr[27],
- (payloadPtr[28] << 24) + (payloadPtr[29] << 16) +
- (payloadPtr[30] << 8) + payloadPtr[31]);
-
- TBuf8<100> flagsSet;
- flagsSet.Copy(_L8(" - flags set: "));
-
- // Write description of payload's flags to "flagsSet"
- if (payloadPtr[33] & 0x01)
- {
- flagsSet.Append(_L8("FIN "));
- }
- if (payloadPtr[33] & 0x02)
- {
- flagsSet.Append(_L8("SYN "));
- }
- if (payloadPtr[33] & 0x04)
- {
- flagsSet.Append(_L8("RST "));
- }
- if (payloadPtr[33] & 0x08)
- {
- flagsSet.Append(_L8("PSH "));
- }
- if (payloadPtr[33] & 0x10)
- {
- flagsSet.Append(_L8("ACK "));
- }
- if (payloadPtr[33] & 0x20)
- {
- flagsSet.Append(_L8("URG "));
- }
- _LOG_L3C1(flagsSet);
-
- TInt dataOffset = payloadPtr[32] >> 2; // in bytes
- if ((dataOffset > 0) && (mBufLength > dataOffset + 30))
- {
- TBuf8<100> data;
- data.Copy(_L8(" - data begins: "));
- for (TInt i = dataOffset + 20; i < dataOffset + 100; i++)
- {
- // We skip some bytes at the end of the MBuf, as they're junk.
- if (i >= (mBufLength - 10))
- {
- break;
- }
- if (TChar(payloadPtr[i]).IsPrint())
- {
- data.Append(TChar(payloadPtr[i]));
- }
- else
- {
- data.Append(TChar('?'));
- }
- }
- _LOG_L3C1(data);
- }
- }
- else if (payloadPtr[9] == 0x01)
- {
- _LOG_L3C1(_L8(" - appears to be an ICMP packet"));
- if (mBufLength < 24)
- {
- _LOG_L3C2(_L8(" - but is too short (length=0x%X)"), mBufLength);
- return;
- }
-
- if (payloadPtr[20] == 0x8)
- {
- _LOG_L3C1(_L8(" - is an echo request"));
- }
- else if (payloadPtr[20] == 0x0)
- {
- _LOG_L3C1(_L8(" - is an echo reply"));
- }
- else
- {
- _LOG_L3C2(_L8(" - unknown type (0x%02X)"), payloadPtr[20]);
- return;
- }
-
- if (mBufLength >= 28)
- {
- _LOG_L3C3(_L8(" - ID: 0x%04X, seq #: 0x%04X"),
- (payloadPtr[24] << 8) + payloadPtr[25],
- (payloadPtr[26] << 8) + payloadPtr[27]);
- }
- }
- else if (payloadPtr[9] == 0x11)
- {
- _LOG_L3C1(_L8(" - appears to be a UDP packet"));
- if (mBufLength < 28)
- {
- _LOG_L3C2(_L8(" - but is too short (length=0x%X)"), mBufLength);
- return;
- }
- _LOG_L3C3(_L8(" - src port: %d, dst port: %d"),
- (payloadPtr[20] << 8) + payloadPtr[21],
- (payloadPtr[22] << 8) + payloadPtr[23]);
- }
- else
- {
- _LOG_L3C2(_L8(" - appears to be for an unknown protocol (0x%X)"),
- payloadPtr[9]);
- }
- }
-#endif // __BTT_LOGGING__
--- a/telephonyprotocols/rawipnif/version1/src/IPv6ProtocolIf.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,696 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// This file implements the CIPv6ProtocolIf class, which handles the transmission
-// of IPv6 data to and from the TCP/IP stack.
-//
-//
-
-/**
- @file
-*/
-
-#include <e32hal.h> // UserHal::MachineInfo()
-#include <etelpckt.h>
-#include <in_iface.h>
-#include <in6_if.h>
-#include "RawIPNifMain.h"
-#include "IPv6ProtocolIf.h"
-#ifdef WCDMA_STUB
-#include <UMTSNifControlIf.h>
-#endif
-#define LOG_IP_ADDRESS(desc,addr) _LOG_L2C5(_L8(" " desc " = %d:%d:%d:%d from context"), \
- addr[3], addr[2], addr[1], addr[0]);
-
-CIPv6ProtocolIf::CIPv6ProtocolIf(CRawIPNifMain& aNifMain, CBttLogger* aTheLogger)
-/**
- * Constructor
- */
- : CProtocolIfBase(aNifMain,aTheLogger),
- iTheLogger(aTheLogger),
- iSpeedMetric(KDefaultSpeedMetric)
- {
- }
-
-CIPv6ProtocolIf::~CIPv6ProtocolIf()
-/**
- * Destructor
- */
- {
- }
-
-void CIPv6ProtocolIf::BindL(TAny* aId)
-/**
- * Binds protocol to the Nif
- *
- * @param aId A point the the protocol(TCP/IP)
- */
- {
- _LOG_L1C2(_L8("CIPv6ProtocolIf::BindL [aId=%X]"), aId);
-
- CProtocolIfBase::BindL(aId); // Call the superclass's method.
- iNotify = iNifMain.Notify();
- }
-
-TInt CIPv6ProtocolIf::Control(TUint aLevel, TUint aName, TDes8& aOption,
- TAny* /*aSource*/)
-/**
- * The main function called by the TCP/IP protocol to control the interface.
- * Can perform a variety of general IP tasks (such as getting IP config)
- * and "3G" specific tasks (such as deleting the context).
- *
- * @param aLevel The level of the interface to control - always KSOLInterface
- * @param aName The command to perform
- * @param aOption Data to be input/output as a result of the command
- * @param aSource The source of the command (unused)
- * @return Standard error codes
- */
- {
- _LOG_L1C3(_L8("CIPv6ProtocolIf::Control [aLevel=%d, aName=%d]"),
- aLevel, aName);
-
- if (aLevel == KSOLInterface)
- {
- switch (aName)
- {
- // General IP configuration commands are below this point.
-
- case KSoIfInfo6:
- // Gets information about the interface, such as name and MTU.
- return WriteIfInfo(aOption);
-
- case KSoIfConfig:
- // Gets interface configuration, eg. IP address and DNS servers.
- return WriteIfConfig(aOption);
-
- case KSoIfGetConnectionInfo:
- // Gets IAP and network information.
- return WriteConnectionInfo(aOption);
-
- case KSoIfHardwareAddr:
- // unsupported because we don't have a h/w address
- case KSoIfCompareAddr:
- // this never actually appears to be called
- break;
-
- // 3G-specific configuration commands are below this point.
-#ifdef WCDMA_STUB
- case KRegisterEventHandler:
- // Raw IP NIF Events are not supported
- case KContextSetEvents:
- // Raw IP NIF Events are not supported
- break;
-
- case KContextCreate:
- // We don't support creating new secondary contexts.
- break;
-
- case KContextDelete:
- // Deletes the primary PDP context. This will shut down the Nif.
- return DeleteContext(aOption);
-
- case KContextActivate:
- // If the IPv6 interface is up, then the context will already have
- // been activated. So this command should fail with
- // KErrAlreadyExists
- {
- TUint8* ptr = CONST_CAST(TUint8*, aOption.Ptr());
- TContextParameters* contextParams =
- REINTERPRET_CAST(TContextParameters*, ptr);
-
- if (contextParams->iContextInfo.iContextId !=
- STATIC_CAST(TInt8, GetNifMain().GetBcaController()->Nsapi()))
- {
- contextParams->iReasonCode = KErrNotFound;
- }
- else
- {
- contextParams->iContextInfo.iStatus =
- GetNifMain().GetContextStatus();
- contextParams->iReasonCode = KErrAlreadyExists;
- }
- return KErrNone;
- }
-
- case KNifSetDefaultQoS:
- case KContextQoSSet:
- // Setting the QoS is meaningless over GPRS, so we just return that
- // we don't support these operations.
- break;
-
- case KContextTFTModify:
- // As we only have one primary context, we don't support anything
- // to do with traffic flow templates, which are used by secondary
- // contexts.
- break;
-
- case KContextModifyActive:
- // This command is only valid aftermodifying TFT/QoS parameters.
- // As we don't support any of these operations,
- // this command is never valid.
- break;
-#endif
- default:
- break;
- }
- }
- return KErrNotSupported;
- }
-
-TInt CIPv6ProtocolIf::WriteIfConfig(TDes8& aIfConfig)
-/**
- * Writes the configuration of the interface (eg. IP address, DNS servers)
- * into the supplied descriptor.
- *
- * @param aIfConfig Will contain the interface configuration
- * @return KErrNotSupported if an incorrect structure is passed,
- * otherwise KErrNone
- */
- {
- _LOG_L1C1(_L8("CIPv6ProtocolIf::WriteIfConfig"));
- __ASSERT_DEBUG((TUint)aIfConfig.MaxLength() >= sizeof (TSoInet6IfConfig), User::Panic(KIPv6ProtocolIfName, 0));
-
- if ((TUint)aIfConfig.MaxLength() < sizeof(TSoInet6IfConfig))
- {
- return KErrArgument;
- }
-
- TUint8* ptr = CONST_CAST(TUint8*, aIfConfig.Ptr());
- TSoInet6IfConfig* config = REINTERPRET_CAST(TSoInet6IfConfig*, ptr);
-
- TEui64Addr& localId = TEui64Addr::Cast(config->iLocalId);
- localId = iSettings.iLocalIfId;
-
- // If required, configure static DNS addresses
- if (!iSettings.iPrimaryDns.IsUnspecified())
- {
- config->iNameSer1.SetAddress(iSettings.iPrimaryDns);
- if (!iSettings.iSecondaryDns.IsUnspecified())
- config->iNameSer2.SetAddress(iSettings.iSecondaryDns);
- }
-
- config->idPaddingBits = 0;
-
- return KErrNone;
- }
-
-TInt CIPv6ProtocolIf::WriteIfInfo(TDes8& aIfInfo)
-/**
- * Writes information about the interface into the supplied descriptor.
- *
- * @param aIfInfo Will contain the interface information
- * @return KErrArgument if an incorrect structure is passed, otherwise KErrNone
- */
- {
- _LOG_L1C1(_L8("CIPv6ProtocolIf::WriteIfInfo"));
- __ASSERT_DEBUG((TUint)aIfInfo.MaxLength() >= sizeof (TSoIfInfo6), User::Panic(KIPv6ProtocolIfName, 0));
-
- if ((TUint)aIfInfo.MaxLength() < sizeof(TSoIfInfo6))
- {
- return KErrArgument;
- }
-
- TSoIfInfo6* info = (TSoIfInfo6*) aIfInfo.Ptr();
- info->iFeatures = KIfCanBroadcast | KIfCanMulticast;
- info->iSpeedMetric = iSpeedMetric;
- info->iMtu = KDefaultMtu;
- info->iRMtu = KDefaultMtu;
- WriteIfName(info->iName);
-
- return KErrNone;
- }
-
-TInt CIPv6ProtocolIf::WriteConnectionInfo(TDes8& aConnectionInfo)
-/**
- * Writes information about the IAP and network we're associated with. This
- * is used to route data in a multi-homing environment.
- *
- * @param aConnectionInfo Will contain the connection information
- * @return Standard CommDB error codes
- */
- {
- _LOG_L1C1(_L8("CIPv6ProtocolIf::WriteConnectionInfo"));
-
- TSoIfConnectionInfo* connectionInfo =
- (TSoIfConnectionInfo*) aConnectionInfo.Ptr();
-
- TInt err;
- // Append the 2 commdb filed into this descriptor
- TBuf<2*KCommsDbSvrMaxColumnNameLength+1> fieldName;
-
- fieldName.Copy(TPtrC(IAP));
- fieldName.Append(KSlashChar);
- fieldName.Append(TPtrC(COMMDB_ID));
- err = GetNifMain().GetAgent()->ReadInt(fieldName, connectionInfo->iIAPId);
- if (err != KErrNone)
- {
- return err;
- }
-
- fieldName.Copy(TPtrC(IAP));
- fieldName.Append(KSlashChar);
- fieldName.Append(TPtrC(IAP_NETWORK));
- err = GetNifMain().GetAgent()->ReadInt(fieldName, connectionInfo->iNetworkId);
- if (err != KErrNone)
- {
- return err;
- }
-
- return KErrNone;
- }
-#ifdef WCDMA_STUB
-
-TInt CIPv6ProtocolIf::DeleteContext(TDes8& aContextParameters)
-/**
- * Deletes a context. As the NIF is responsible for one primary context,
- * this is equivalent to closing down the NIF.
- *
- * @param aContextParameters Parameters of the context to delete
- * @return KErrArgument if an incorrect structure is passed, otherwise KErrNone
- */
- {
- _LOG_L1C1(_L8("CIPv6ProtocolIf::DeleteContext"));
-
- if (aContextParameters.Length() != sizeof(TContextParameters))
- {
- return KErrArgument;
- }
-
- TUint8* ptr = CONST_CAST(TUint8*, aContextParameters.Ptr());
- TContextParameters* params = REINTERPRET_CAST(TContextParameters*, ptr);
-
- if (params->iContextInfo.iContextId !=
- STATIC_CAST(TInt8, GetNifMain().GetBcaController()->Nsapi()))
- {
- params->iReasonCode = KErrBadName;
- }
- else
- {
- params->iReasonCode = KErrNone;
- GetNifMain().Stop(KErrNone, MNifIfNotify::EDisconnect);
- }
-
- return KErrNone;
- }
-
-#endif
-
-void CIPv6ProtocolIf::ReadCommDbGprsSettingsL()
-/**
- * Reads GPRS IP settings from CommDB via the agent.
- */
- {
- _LOG_L1C1(_L8("CIPv6ProtocolIf::ReadCommDbGprsSettings"));
-
- // Read he DNS addresses..
- ReadIPv6SettingL(TPtrC(GPRS_IP6_NAME_SERVER1), iSettings.iPrimaryDns);
- ReadIPv6SettingL(TPtrC(GPRS_IP6_NAME_SERVER2), iSettings.iSecondaryDns);
- // Read whether to get the DNS addresses from the server.
- _BTT_LEAVEIFERROR(GetNifMain().GetAgent()->ReadBool(
- TPtrC(GPRS_IP6_DNS_ADDR_FROM_SERVER),
- iSettings.iGetDnsFromServer));
-
- // Read whether to get IPv4 address from the server
- // This is only needed for the integration tests. If it's true then
- // the IPv4 address will be used to build up the IPv6 address.
- _BTT_LEAVEIFERROR(GetNifMain().GetAgent()->ReadBool(
- TPtrC(GPRS_IP_ADDR_FROM_SERVER),
- iSettings.iGetIpFromServer));
-
-
- if (iSettings.iGetIpFromServer == EFalse)
- {
- // Sets the IPv6 Link-local address from IpAddr.
- // LocalId is derived from IpAddr and it's further used to set the Link-local
- // address elsewhere by adding a prefix (FE80::) in front.
- // For IpAddr: 192.168.1.1, link-local address will be FE80::C0A8:101.
- TUint32 ipAddr;
- ReadIPv4SettingL(TPtrC(GPRS_IP_ADDR), ipAddr);
- const TUint8 constantId[8] = { 0, 0, 0, 0,
- ipAddr >> 24, (ipAddr >> 16) & 0xFF,
- (ipAddr >> 8) & 0xFF, ipAddr & 0xFF };
- iSettings.iLocalIfId.SetAddr(constantId, sizeof (constantId));
- }
- else
- {
-
- //
- // Use the 64 bit id of MARM machines as our interface id
- //
- TMachineInfoV1Buf machineInfo;
- UserHal::MachineInfo(machineInfo);
- iSettings.iLocalIfId.SetAddr(machineInfo().iMachineUniqueId);
- iSettings.iLocalIfId.SetUniversalBit(0);
- //
- // In WINS environment the id is zero which is no-no
- //
- if (iSettings.iLocalIfId.IsZero())
- {
- iSettings.iLocalIfId.SetAddrRandomNZ();
- }
-
- }
- }
-
-void CIPv6ProtocolIf::UpdateContextConfigL(const
- RPacketContext::TContextConfigGPRS&
- aConfig)
-/**
- * Called when the context has been activated to set our IP address and get
- * any other required settings from CommDB.
- *
- * @param aConfig The new context config
- */
- {
- _LOG_L1C1(_L8("CIPv6ProtocolIf::UpdateContextConfig"));
-
- // Get the settings which are stored in CommDB.
- ReadCommDbGprsSettingsL();
-
- // Get our IP address from the GPRS context config.
- TInetAddr address;
-
- TBuf<RPacketContext::KMaxPDPAddressLength> tempAddr;
- tempAddr.Copy(aConfig.iPdpAddress);
- TInt ret = address.Input(tempAddr);
-
- // We've got our IP address! Let's save it.
- if (ret == KErrNone)
- {
- iSettings.iLocalAddr = address.Ip6Address();
- LOG_IP_ADDRESS("Got local IP address", iSettings.iLocalAddr);
- }
- else
- {
- _LOG_L2C2(_L8("Couldn't get IP address from GPRS config (err: %d)"),
- ret);
-
- // Don't leave on this error: we may still be OK if we read some
- // settings from CommDB.
- }
-
- // @todo - is this correct. We can only get the DNS addresses
- // from the TSY using the iProtocolConfigOption data. Yet a client could
- // access those DNS config details without knowing about the state of the
- // iSettings.iGetDnsFromServer flag.
-
- if ((iSettings.iGetDnsFromServer) ||
- ((iSettings.iPrimaryDns.IsUnspecified()) &&
- (iSettings.iSecondaryDns.IsUnspecified())) )
- {
- TBuf<RPacketContext::KMaxPDPAddressLength> tempAddr;
- tempAddr.Copy(aConfig.iProtocolConfigOption.iDnsAddresses.iPrimaryDns);
- ret = address.Input(tempAddr);
-
- if (ret == KErrNone)
- {
- iSettings.iPrimaryDns = address.Ip6Address();
- LOG_IP_ADDRESS("Got primary DNS", iSettings.iPrimaryDns);
- }
- else
- {
- _LOG_L2C2(_L8("Couldn't get primary DNS address from GPRS config (err: %d)"),
- ret);
-
- // Don't leave on this error: we may still be OK if we read some
- // settings from CommDB.
- }
-
- tempAddr.Copy(aConfig.iProtocolConfigOption.iDnsAddresses.iSecondaryDns);
- ret = address.Input(tempAddr);
-
- if (ret == KErrNone)
- {
- iSettings.iSecondaryDns = address.Ip6Address();
- LOG_IP_ADDRESS("Got secondary DNS", iSettings.iPrimaryDns);
- }
- else
- {
- _LOG_L2C2(_L8("Couldn't get secondary DNS address from GPRS config (err: %d)"),
- ret);
-
- // Don't leave on this error: we may still be OK if we read some
- // settings from CommDB.
- }
- }
- else
- {
- LOG_IP_ADDRESS("Using CommDB DNS address - Primary ", iSettings.iPrimaryDns);
- LOG_IP_ADDRESS(" - Secondary ", iSettings.iSecondaryDns);
- }
- }
-
-void CIPv6ProtocolIf::UpdateConnectionSpeed(TUint aConnectionSpeed)
-/**
- * Sets the speed metric to return to TCP/IP, based on what the TSY tells us.
- *
- * @param aConnectionSpeed Our connection speed
- */
- {
- _LOG_L1C1(_L8("CIPv6ProtocolIf::UpdateConnectionSpeed"));
-
- iSpeedMetric = aConnectionSpeed;
- }
-
-void CIPv6ProtocolIf::ReadIPv4SettingL(const TDesC& aFieldName,
- TUint32& aIpAddr)
-/**
- * Reads an IPv4 address from CommDB, via the TRP agent. It leaves if an error
- * other than KErrNotFound occurs.
- *
- * @param aFieldName The name of the field to read
- * @param aIpAddr Will contain the IP address
- */
- {
-#ifdef __BTT_LOGGING__
- TBuf8<256> debugBuffer;
- debugBuffer.Copy(aFieldName);
- _LOG_L1C2(_L8("CIPv6ProtocolIf::ReadIp4Setting [aFieldName=%S]"),
- &debugBuffer);
-#endif
-
- TBuf<KCommsDbSvrMaxFieldLength> name;
- TInetAddr ip4Addr;
-
- TInt ret = GetNifMain().GetAgent()->ReadDes(aFieldName, name);
-
- if (ret == KErrNone)
- {
- // We've successfully read an IP address, so convert it into a number.
- ip4Addr.Input(name);
- aIpAddr = ip4Addr.Address();
- }
- else
- {
- // We couldn't get the IP address, so set it to 0.0.0.0. Note that we
- // only leave here if we got a more serious error than "not found".
- aIpAddr = 0;
- if (ret != KErrNotFound)
- {
- _BTT_LEAVEIFERROR(ret);
- }
- }
- }
-
-void CIPv6ProtocolIf::ReadIPv6SettingL(const TDesC& aFieldName,
- TIp6Addr& aIpAddr)
-/**
- * Reads an IPv6 address from CommDB, via the TRP agent. It leaves if an error
- * other than KErrNotFound occurs.
- *
- * @param aFieldName The name of the field to read
- * @param aIpAddr Will contain the IP address
- */
- {
-#ifdef __BTT_LOGGING__
- TBuf8<256> debugBuffer;
- debugBuffer.Copy(aFieldName);
- _LOG_L1C2(_L8("CIPv6ProtocolIf::ReadIp6Setting [aFieldName=%S]"),
- &debugBuffer);
-#endif
-
- TBuf<KCommsDbSvrMaxFieldLength> name;
- TInetAddr ip6Addr;
-
- TInt ret = GetNifMain().GetAgent()->ReadDes(aFieldName, name);
-
- if (ret == KErrNone)
- {
- // We've successfully read an IP address, so convert it into a number.
- ip6Addr.Input(name);
- aIpAddr = ip6Addr.Ip6Address();
- }
- else
- {
- // We couldn't get the IP address, so set it to 0.0.0.0. Note that we
- // only leave here if we got a more serious error than "not found".
- aIpAddr = KInet6AddrNone;
- if (ret != KErrNotFound)
- {
- _BTT_LEAVEIFERROR(ret);
- }
- }
- }
-
-TInt CIPv6ProtocolIf::Send(RMBufChain& aPdu, TAny* aSource)
-/**
- * Called by the protocol to send an outgoing IP packet to the network.
- *
- * @param aPdu The outgoing packet
- * @param aSource The source of the packet
- * @return Standard error codes
- */
- {
- _LOG_L1C1(_L8("CIPv6ProtocolIf::Send"));
-
-#ifdef __BTT_LOGGING__
- LogPacket(aPdu);
-#endif
-
- // Return <0: an error occurred
- // Return 0: no error, but don't send any more packets
-
- return GetNifMain().SendPacket(aPdu, aSource, KIp6FrameType);
- }
-
-void CIPv6ProtocolIf::Info(TNifIfInfo& aInfo) const
-/**
- * Called by the protocol to get information about the NIF.
- *
- * @param aInfo Will contain NIF information
- */
- {
- _LOG_L1C1(_L8("CIPv6ProtocolIf::Info"));
-
- // The parent class sets everything except the name...
- CProtocolIfBase::Info(aInfo);
- // ...which we set here.
- WriteIfName(aInfo.iName);
- }
-
-TInt CIPv6ProtocolIf::Notification(TAgentToNifEventType /*aEvent*/,
- void* /*aInfo*/)
-/**
- * The Nif will ignore any notification sent
- *
- * @param aEvent Not used
- * @param aInfo Not used
- */
- {
- _LOG_L1C1(_L8("CIPv6ProtocolIf::Notification"));
-
- return KErrNone;
- }
-
-void CIPv6ProtocolIf::StartSending(CProtocolBase* aProtocol)
-/**
- * Indicates to the protocol layer that the NIF is ready to send packets.
- *
- * @param aProtocol A pointer to a protocol
- */
- {
- _LOG_L1C2(_L8("CIPv6ProtocolIf::StartSending [aProtocol=%X]"), aProtocol);
-
- CProtocolIfBase::StartSending(aProtocol);
- }
-
-TBool CIPv6ProtocolIf::WantsProtocol(TUint16 aProtocolCode)
-/**
- * Indicates the type of protocol implemented by this class.
- *
- * @param aProtocolCode The protocol type
- */
- {
- _LOG_L1C2(_L8("CIPv6ProtocolIf::WantsProtocol [aProtocolCode=%X]"),
- aProtocolCode);
-
-#ifdef RAWIP_HEADER_APPENDED_TO_PACKETS
- return ((aProtocolCode & 0x00FF) == KIp6FrameType);
-#else
- (void) aProtocolCode; // disable compiler warning
- return ETrue;
-#endif // RAWIP_HEADER_APPENDED_TO_PACKETS
- }
-
-void CIPv6ProtocolIf::Process(RMBufChain& aPdu)
-/**
- * Called when an incoming IP packet has arrived. Send packets up to the
- * TCP/IP stack.
- *
- * @param aPdu The incoming packet
- */
- {
- _LOG_L1C1(_L8("CIPv6ProtocolIf::Process"));
-
-#ifdef __BTT_LOGGING__
- LogPacket(aPdu);
-#endif
-
- // Pass incoming packets up to the protocol, unless it hasn't
- // been bound yet.
- if (iProtocol)
- {
- _LOG_L1C1(_L8("CIPv6ProtocolIf: Packet Sent to TCP/IP Protocol!!!"));
- iProtocol->Process(aPdu, reinterpret_cast<CProtocolBase*>(this));
- }
- else
- {
- _LOG_L2C1(_L8("WARNING: dumping incoming packet, no protocol bound"));
- aPdu.Free();
- }
- }
-
-#ifdef __BTT_LOGGING__
-void CIPv6ProtocolIf::LogPacket(const RMBufChain& aPacket)
-/**
-* Logs packet information into log file.
-*
-* @param aPacket The packet
-*/
- {
- _LOG_L1C1(_L8("CIPv6ProtocolIf::LogPacket"));
-
- TInt mBufLength = aPacket.Length() - aPacket.First()->Length();
-
- _LOG_L3C2(_L8("Analysis of %d byte packet:"), mBufLength);
-
- //Note: All the constants used on this method are a pragmatic guess of the
- //IP header fields. The only porpose of this method is logging.
-
- if (mBufLength < 40)
- {
- _LOG_L3C2(_L8(" -doesn't appear to be a valid IPv6 packet (length=%d)")
- , mBufLength);
- return;
- }
-
- // Get a pointer to the packet's payload.
- const TUint8* payloadPtr = aPacket.First()->Next()->Ptr();
-
- if ((payloadPtr[0] & 0xF0) != 0x60)
- {
- _LOG_L3C2(_L8(" - doesn't appear to be an IPv6 packet (version=0x%X)"),
- (payloadPtr[0] & 0xF0) >> 4);
- return;
- }
-
- _LOG_L3C2(_L8(" - traffic class: 0x%X"),
- ((payloadPtr[0] & 0xF) << 4) | ((payloadPtr[1] & 0xF0) >> 4));
- _LOG_L3C2(_L8(" - flow label: 0x%X"),
- ((payloadPtr[1] & 0x0F) << 16) | (payloadPtr[2] << 8) | payloadPtr[3]);
- _LOG_L3C2(_L8(" - payload length: 0x%X"),
- (payloadPtr[4] << 16) | payloadPtr[5]);
- _LOG_L3C2(_L8(" - next header: 0x%08X"), payloadPtr[6]);
- _LOG_L3C2(_L8(" - hop limit: 0x%08X"), payloadPtr[7]);
- }
-#endif // __BTT_LOGGING__
--- a/telephonyprotocols/rawipnif/version1/src/ProtocolIfBase.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,159 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// This file implements the base class for the protocol interface classes.
-//
-//
-
-/**
- @file
-*/
-
-#include <nifmbuf.h>
-#include "ProtocolIfBase.h"
-#include "RawIPNifMain.h"
-
-CProtocolIfBase::CProtocolIfBase(CRawIPNifMain& aNifMain, CBttLogger* aTheLogger)
-/**
- * Constructor
- *
- * @param aNifMain A pointer to CRawIPNifMain
- */
- :iNifMain(aNifMain),
- iTheLogger(aTheLogger)
- {
- }
-
-CProtocolIfBase::~CProtocolIfBase()
-/**
- * Destructor
- */
- {
- }
-
-void CProtocolIfBase::BindL(TAny *aId)
-/**
- * Binds TCP/IP protocol to Nif
- *
- * @param aId A pointer to protocol object
- */
-
- {
- _LOG_L1C2(_L8("CProtocolIfBase::BindL [aId=%X]"), aId);
-
- if (iProtocol)
- _BTT_PANIC(KNifName, KNifProtocolInUse);
- iProtocol = reinterpret_cast<CProtocolBase*>(aId);
- }
-
-TInt CProtocolIfBase::State()
-/**
- * Used to retrieve the Nif state
- *
- * @return The Nif state
- */
- {
- _LOG_L1C1(_L8("CProtocolIfBase::State"));
-
- return GetNifMain().State();
- }
-
-TInt CProtocolIfBase::Control(TUint aLevel, TUint aName, TDes8& aOption, TAny* aSource)
-/**
- * This method will call the control method in IPv4Protocol
- *
- */
- {
- _LOG_L1C1(_L8("CProtocolIfBase::Control"));
-
- return GetNifMain().Control(aLevel, aName, aOption, aSource);
- }
-
-TInt CProtocolIfBase::Send(RMBufChain& aPdu, TAny* aSource)
-/**
- * Send and IP packet. This method is overriden by the IPv4ProtocolIf class.
- *
- * @param aPdu The outgoing packet
- * @param aSource The source of the packet
- * @return Standard error codes
- */
- {
- _LOG_L1C1(_L8("CProtocolIfBase::Send"));
-
- return GetNifMain().Send(aPdu, aSource);
- }
-
-void CProtocolIfBase::Info(TNifIfInfo& aInfo) const
-/**
- * Used to retrieved Nif information
- *
- * @param aInfo Nif Information structure
- */
- {
- _LOG_L1C1(_L8("CProtocolIfBase::Info"));
-
- aInfo.iVersion = TVersion(KNifMajorVersionNumber, KNifMinorVersionNumber,
- KNifBuildVersionNumber);
- aInfo.iFlags = KNifIfIsBase | KNifIfUsesNotify | KNifIfCreatedByLink;
- // Doesn't fill in aInfo.iName, as this is done by derived classes.
- aInfo.iProtocolSupported = KProtocolInetIp;
- }
-
-TInt CProtocolIfBase::Notification(TAgentToNifEventType /*aEvent*/, void* /*aInfo*/)
-/**
- * Method overidden by the notification method on IPv4ProtocolIf class.
- *
- * @param aEvent Not used
- * @param aInfo Not used
- */
- {
- _LOG_L1C1(_L8("CProtocolIfBase::Notification"));
-
- return KErrNone;
- }
-
-void CProtocolIfBase::StartSending(CProtocolBase* /*aProtocol*/)
-/**
- * Indicates to the protocol layer that the NIF is ready to send packets.
- *
- * @param aProtocol A pointer to a protocol
- */
- {
- _LOG_L1C1(_L8("CProtocolIfBase::StartSending"));
-
- // Default implementation.
- // Uses iProtocol instead aProtocol.
- iProtocol->StartSending(reinterpret_cast<CProtocolBase*>(this));
- }
-
-
-void CProtocolIfBase::UpdateContextConfigL(const
- RPacketContext::TContextConfigGPRS& /*aConfig*/)
-/**
- * Method overidden by UpdateContextConfig on IPv4ProtocolIf class
- *
- * @param aConfig Not used
- */
- {
- // Default implementation does nothing.
- }
-
-void CProtocolIfBase::UpdateConnectionSpeed(TUint /*aConnectionSpeed*/)
-/**
- * Method overidden by UpdateConnectionSpeed on IPv4ProtocolIf class
- *
- * @param aConnectionSpeed Not used
- */
- {
- // Default implementation does nothing.
- }
--- a/telephonyprotocols/rawipnif/version1/src/RawIPNifMain.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,670 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Implements the CRawIPNifMain class, which provides a central point for the NIF
-// to communicate with NifMan and the BCA controllers. This class creates an interface
-// to the IPv4 protocol when it is required.
-//
-//
-
-/**
- @file
-*/
-
-#include <f32file.h>
-#include <nifman.h>
-#include <nifmbuf.h>
-#include <in_iface.h>
-#include <nifvar.h>
-#include "IPv4ProtocolIf.h"
-#include "IPv6ProtocolIf.h"
-#include "RawIPNifMain.h"
-
-#ifdef __FLOG_ACTIVE
-//These variables are used only if flog is active.
-_LIT8(KTcpDumpFirstTag,"TcpDump");
-static const TUint16 KTcpDumpLinkType = 12;
-#endif
-
-CRawIPNifMain::CRawIPNifMain(CNifIfFactory& aFactory, MNifIfNotify* aNotify, CBttLogger* aTheLogger)
-/**
- * Constructor.
- *
- * @param aFactory Reference to the factory which created this object.
- * @param aTheLogger The logging object, ownership is passed to this object
- */
- : CNifIfLink(aFactory),
- iTheLogger(aTheLogger),
- iInitError(KErrNone),
- iState(EIfDown)
- {
- // To aid debugging.
- iNotify = aNotify;
- }
-
-void CRawIPNifMain::Info(TNifIfInfo& aInfo) const
-/**
- * Provides information about the NIF.
- *
- * @param aInfo Information structure to be filled in
- */
- {
- _LOG_L1C1(_L8("CRawIPNifMain::Info"));
-
- aInfo.iVersion = TVersion(KNifMajorVersionNumber, KNifMinorVersionNumber,
- KNifBuildVersionNumber);
- aInfo.iFlags = KNifIfIsBase |
- KNifIfUsesNotify |
- KNifIfIsLink |
- KNifIfCreatedByFactory |
- KNifIfCreatesBinder;
- aInfo.iName = KRawIPNifName;
- aInfo.iProtocolSupported = KProtocolUnknown;
- }
-
-void CRawIPNifMain::ConstructL(const TDesC& /*aName*/)
-/**
- * Second-phase constructor. Creates the Etel
- * control engine
- *
- * @param aName The name of the NIF (unused)
- */
- {
- _LOG_L1C1(_L8("CRawIPNifMain::ConstructL"));
-
- iBcaController = CBcaIoController::NewL(*this, iTheLogger);
- }
-
-CRawIPNifMain::~CRawIPNifMain()
-/**
- * Destructor. Cancels and deletes all owned active objects.
- */
- {
- // Note that we don't delete iProtocolIf because it's not owned by us.
- delete iBcaController;
- // This class also deletes the logging object
- delete iTheLogger;
- // Cleanup when stop was not called - harmless as it null's the pointer
- __PACKETLOG_DELETE;
- }
-
-TInt CRawIPNifMain::Control(TUint /*aLevel*/, TUint /*aName*/,
- TDes8& /*aOption*/, TAny* /*aSource*/)
-/**
- * Method to set up NIF parameters. This is unused; instead, the Control()
- * method on the IPv4 interface will be called to configure the NIF.
- *
- * @param aLevel The network level of the parameter to be set (unused)
- * @param aName The name of the parameter to be set (unused)
- * @param aOption The parameter to be written to (unused)
- * @param aSource The source of the method call (unused)
- * @return Always KErrNotSupported
- */
- {
- _LOG_L1C1(_L8("CRawIPNifMain::Control"));
-
- return KErrNotSupported;
- }
-
-TInt CRawIPNifMain::State()
-/**
- * Returns the current state of the NIF. This will be one of EIfUp or EIfDown.
- *
- * @return The state of the NIF
- */
- {
- _LOG_L1C1(_L8("CRawIPNifMain::State"));
-
- return iState;
- }
-
-TInt CRawIPNifMain::Start()
-/**
- * Starts the NIF up. This process involves connecting to the BCA. When startup is
- * complete, LinkLayerUp() will be called.
- *
- * @return Allways KErrNone
- */
- {
- _LOG_L1C1(_L8("CRawIPNifMain::Start"));
-
- TRAPD(err1,InitialiseL(MControllerObserver::EStart, KErrNone));
- if (err1)
- {
- return err1;
- }
-
-
- //the name calculation should be done only if logging is enabled
-#ifdef __FLOG_ACTIVE
- const TUint KModemNameLen = KCommsDbSvrMaxColumnNameLength + 10; // need enough for ppp-XXX.txt - e.g. ppp-comm-1.txt, ppp-btcomm-10.txt etc
- TBuf8<KModemNameLen> modemName;
-
- //first add modem name
- _LIT(KModemPortName, "ModemBearer\\PortName");
- _LIT8(KStupidCharacters, "::");
- iNotify->ReadDes(KModemPortName, modemName);
- const TInt pos = modemName.FindC((const TDesC8&)KStupidCharacters);
- if(pos != KErrNotFound)
- {
- modemName.Delete(pos, 2);
- }
-
- //append time stamp
- const TUint KTimeStampLen = 8;
- TBuf8<KTimeStampLen> logFileName;
-
- _LIT8(KTimeFormat, "%08X");
- TUint32 counter = User::FastCounter();
- logFileName.Format(KTimeFormat, counter);
-
- TRAPD(err,__PACKETLOG_NEWL(KTcpDumpFirstTag, logFileName, CPacketLogger::ETcpDump, KTcpDumpLinkType));
- if (err)
- {
- _LOG_L1C1(_L8("Trapped leave from __PACKETLOG_NEWL"));
- }
-
- const TUint KLogTextLen = KModemNameLen+KTimeStampLen+30;
- TBuf8<KLogTextLen> logText;
- _LIT8(KLogTimeText, "TcpDump log file time stamp:");
- _LIT8(KLogModemText, " for modem:");
- logText.Append(KLogTimeText);
- logText.Append(logFileName);
- logText.Append(KLogModemText);
- logText.Append(modemName);
- _LOG_L1C1(logText);
-#endif
-
- return KErrNone;
- }
-
-
-void CRawIPNifMain::LinkLayerUp()
-/**
- * This function is called when initialisation is complete and the NIF is
- * ready to send/receive data. It notifies NifMan and the IP interface that it's
- * ready to go.
- */
- {
- _LOG_L1C1(_L8("CRawIPNifMain::LinkLayerUp"));
-
- iState = EIfUp;
- iNotify->LinkLayerUp();
-
- iNotify->IfProgress(KLinkLayerOpen, KErrNone);
-
- iProtocolIf->StartSending(reinterpret_cast<CProtocolBase*>(this));
- }
-
-void CRawIPNifMain::LinkLayerDown(TInt aError)
-/**
- * This function is called when the context has been deactivated and the NIF
- * is ready to be deleted, or if there is an error on startup. Its job is to
- * notify NifMan that the link has gone down, so it can delete the NIF.
- *
- * @param aError An error code to propagate to NifMan
- */
- {
- _LOG_L1C2(_L8("CRawIPNifMain::LinkLayerDown [aError=%d]"), aError);
-
- iState = EIfDown;
-
- iNotify->IfProgress(KLinkLayerClosed, aError);
-
- iNotify->LinkLayerDown(aError, MNifIfNotify::EDisconnect);
- }
-
-void CRawIPNifMain::Stop(TInt aError, MNifIfNotify::TAction /*aAction*/)
-/**
- * This function is called by NifMan to bring down the link. It starts
- * the asynchronous context deactivation process; LinkLayerDown() will be
- * called when the context has been deactivated.
- *
- * @param aError A code specifying why the link is to be brought down
- * @param aAction The action to take: disconnect or reconnect
- */
- {
- _LOG_L1C2(_L8("CRawIPNifMain::Stop [aError=%d]"), aError);
- __PACKETLOG_DELETE;
- ShutDown(MControllerObserver::EInitialised, aError);
- }
-
-void CRawIPNifMain::Restart(CNifIfBase* /*aIf*/)
-/**
- * This is just an empty implementation of the CNifIfLink derived method.
- * It is used as part of functionality to allow a NIF to specify that
- * one of its binders has gone down but the link layer has not.
- *
- * @param Pointer to the protocol interface object
- */
- {
- _LOG_L1C1(_L8("CRawIPNifMain::Restart called"));
- }
-
-TInt CRawIPNifMain::Send(RMBufChain& /*aPdu*/, TAny* /*aProtocol*/)
-/**
- * Unused. The Send() method on the IPv4 protocol interface should be used
- * to send IPv4 packets.
- *
- * @return Always KErrNotSupported
- */
- {
- _LOG_L1C1(_L8("CRawIPNifMain::Send"));
-
- // Only the bearers' Send functions should be called.
- return KErrNotSupported;
- }
-
-TInt CRawIPNifMain::SendPacket(RMBufChain& aPdu, TAny* /*aProtocol*/,
- TUint16 /*aType*/)
-/**
- * Sends a packet, via the BCA controller. This method is protocol-agnostic,
- * and is called by the IPv4 protocol interface to actually send packets.
- *
- * @param aPdu The packet to send
- * @return A standard error code
- */
- {
- _LOG_L1C2(_L8("CRawIPNifMain::SendPacket [length=%d]"),
- aPdu.Length() - aPdu.First()->Length());
-
- __PACKETLOG_WRITE_PACKET(aPdu, 0);
- TInt ret = iBcaController->Send(aPdu);
-
- return ret;
- }
-
-void CRawIPNifMain::Process(RMBufChain& aPdu, TUint16 aProtocolCode)
-/**
- * Handles incoming packets which have been passed up from the BCA controller.
- * If the IPv4 interface wants to process the packet, it hands it on; otherwise,
- * the packet is binned.
- *
- * @param aPdu The incoming packet
- */
- {
- _LOG_L1C2(_L8("CRawIPNifMain::Process [aPdu length=%d]"),
- aPdu.Length() - aPdu.First()->Length());
-
- // If the packet has zero or negative length, bin it.
- if ((aPdu.Length() - aPdu.First()->Length()) <= 0)
- {
- _LOG_L1C1(_L8("Dumped packet: illegal length"));
- aPdu.Free();
- return;
- }
-
- // See if the protocol interface wants the packet.
- if (iProtocolIf->WantsProtocol(aProtocolCode))
- {
- __PACKETLOG_WRITE_PACKET(aPdu, 0);
- iProtocolIf->Process(aPdu);
- }
- else
- {
- // The protocol didn't want the packet, so bin it.
- _LOG_L1C2(_L8("Packet was not processed: freeing (protocol code: %X)"),
- aProtocolCode);
- aPdu.Free();
- }
- }
-
-void CRawIPNifMain::ResumeSending()
-/**
- * Notifies the protocol interface that it can resume sending packets.
- */
- {
- _LOG_L1C1(_L8("CRawIPNifMain::ResumeSending"));
-
- iProtocolIf->StartSending(reinterpret_cast<CProtocolBase*>(this));
- }
-
-void CRawIPNifMain::AuthenticateComplete(TInt /*aResult*/)
-/**
- * Notifies NifMan when authentication is complete. This function is never
- * actually called.
- *
- * @param aResult The result of the authentication (unused)
- */
- {
- _LOG_L1C1(_L8("CRawIPNifMain::AuthenticateComplete"));
- }
-
-TInt CRawIPNifMain::Notification(TAgentToNifEventType aEvent,
- void* aInfo)
-/**
- * Provides a mechanism for the notification of events.
- *
- * @param aEvent The event type (unused)
- * @param aInfo Event information (unused)
- */
- {
- _LOG_L1C2(_L8("CRawIPNifMain::Notification [%d]"), aEvent);
-
-
- switch (aEvent)
- {
- case (EAgentToNifEventTypeDisableTimers) : //GPRS suspension
- {
- _LOG_L1C1(_L8("CRawIPNifMain::Received Suspend from Agent..."));
-
- // Let the BCA controller know that data can no longer be sent over
- // the PDP context.
- iBcaController->UpdateContextStateFlag(EFalse);
-
- break;
- }
-
- case (EAgentToNifEventTypeEnableTimers) : //GPRS resumption
- {
- _LOG_L1C1(_L8("CRawIPNifMain::Received Resume from Agent..."));
- iBcaController->UpdateContextStateFlag(ETrue);
-
- break;
- }
-
- case (EAgentToNifEventTsyConfig) :
- {
- _LOG_L1C1(_L8("CRawIPNifMain::Received context config from Agent..."));
-
- RPacketContext::TContextConfigGPRS* localPtr = (reinterpret_cast<RPacketContext::TContextConfigGPRS*>(aInfo));
-
- TRAPD(err, GetProtocolIf()->UpdateContextConfigL(*localPtr));
-
- if (err)
- {
- _LOG_L1C1(_L8("Trapped leave from UpdateContextConfigL"));
- }
- break;
- }
-
- case (EAgentToNifEventTsyConnectionSpeed) :
- {
- TUint connectionSpeed = reinterpret_cast<TUint>(aInfo);
- _LOG_L1C2(_L8("CRawIPNifMain::Connection Speed Received [%d]"), connectionSpeed);
-
- GetProtocolIf()->UpdateConnectionSpeed(connectionSpeed);
- break;
- }
-
- case (EAgentToNifEventTypeDisableConnection) :
- {
- // This is handled by NIFMAN and passed to NifMain as a Stop() call
- _LOG_L1C1(_L8("CRawIPNifMain::Received Disable connection from Agent..."));
- break;
- }
-
- case (EAgentToNifEventTypeGetDataTransfer) :
- {
- _LOG_L1C1(_L8("CRawIPNifMain::Received Get Data Transfer from Agent..."));
- break;
- }
-
- default :
- {
- _LOG_L1C2(_L8("CRawIPNifMain::Received Notification [%d] from Agent..."), aEvent);
- break;
- }
- }
-
- return KErrNone;
- }
-
-void CRawIPNifMain::BindL(TAny *aId)
-/**
- * Called by NifMan to bind the NIF to a specific protocol. This is never
- * actually called; instead, the BindL() function of the IPv4 interface is used.
- *
- * @param aId A pointer to the protocol to be bound to
- * @leave KErrAlreadyExists when already bound
- */
- {
- _LOG_L1C2(_L8("CRawIPNifMain::BindL [aId=%X]"), aId);
-
- if (iProtocol)
- {
- User::Leave(KErrAlreadyExists);
- }
- iProtocol = reinterpret_cast<CProtocolBase*>(aId);
- }
-
-CNifIfBase* CRawIPNifMain::GetBinderL(const TDesC& aName)
-/**
- * Creates a new protocol interface, for supported protocols. This is currently
- * only IPv4 and ICMP, both of which use the IPv4 protocol interface class.
- *
- * @param aName The name of the protocol
- * @return A newly created protocol interface object
- * @leave KErrNotSupported if protocol is not supported
- */
- {
-#ifdef __BTT_LOGGING__
- TBuf8<256> debugBuffer;
- debugBuffer.Copy(aName);
- _LOG_L1C2(_L8("CRawIPNifMain::GetBinderL [aName=%S]"), &debugBuffer);
-#endif
-
- // IPv4 and ICMP Protocols.
- if (!aName.CompareF(KDescIp) || !aName.CompareF(KDescIcmp))
- {
- if (!iProtocolIf)
- {
- iProtocolIf = new (ELeave) CIPv4ProtocolIf(*this, iTheLogger);
-#ifdef RAWIP_HEADER_APPENDED_TO_PACKETS
- iBcaController->SetType(KIp4FrameType);
-#endif // RAWIP_HEADER_APPENDED_TO_PACKETS
- }
- }
- // IPv6 Protocol
- else if (!aName.CompareF(KDescIp6))
- {
- if (!iProtocolIf)
- {
- iProtocolIf = new (ELeave) CIPv6ProtocolIf(*this, iTheLogger);
-#ifdef RAWIP_HEADER_APPENDED_TO_PACKETS
- iBcaController->SetType(KIp6FrameType);
-#endif // RAWIP_HEADER_APPENDED_TO_PACKETS
- }
- }
- else
- {
- User::Leave(KErrNotSupported);
- }
-
- return iProtocolIf;
- }
-
-void CRawIPNifMain::InitialiseL(TInitialisationState aState, TInt aError)
-/**
- * This method controls the initialisation sequence of the different modules
- * in the NIF. When a module completes all the initialisation tasks it will
- * call again this method with the new state. If an error occurs then the
- * ShutDown() method will be called.
- *
- * @param aState The current initialisation step
- * @param aError A possible error
- */
- {
- _LOG_L1C3(_L8("CRawIPNifMain::InitialiseL [aState=%d ,aError=%d]"),
- aState, aError);
-
- if (aError != KErrNone)
- {
- _LOG_L2C2(_L8(" *** FAILED to initialise NIF *** Error =%d"),aError);
-
- // Initialise shutdown sequence
- switch (aState)
- {
- case MControllerObserver::EBcaController:
- ShutDown(MControllerObserver::EInitialised, aError);
- break;
- default:
- _LOG_L2C3(_L8("ERROR CRawIPNifMain: Unknown state:%d in NIF: %S"), aState, &KNifName);
- User::Leave(KErrUnknown);
- break;
- }
- return;
- }
-
- switch (aState)
- {
- case MControllerObserver::EStart:
- {
- _LOG_L1C1(_L8("Calling Agent for TSY Config"));
-
- GetAgent()->Notification(ENifToAgentEventTsyConfig, NULL);
-
- _LOG_L1C1(_L8("Calling Agent for TSY Connection Speed"));
- GetAgent()->Notification(ENifToAgentEventTsyConnectionSpeed, NULL);
-
- //Read the port name from CommDB.
- _LOG_L1C1(_L8("Attempting to read Port Name..."));
- TBuf<2*KCommsDbSvrMaxColumnNameLength> columnName;
- _LIT(KModemNameFormatText,"%s\\%s");
- columnName.Format(KModemNameFormatText ,MODEM_BEARER,MODEM_PORT_NAME);
- TName tempBuf;
- GetAgent()->ReadDes(columnName,tempBuf);
-
- _LOG_L1C2(_L8("Port details %S"),&tempBuf);
- iBcaController->SetPort(tempBuf);
-
- //Read the BCA name from CommDB.
- columnName.Format(KModemNameFormatText ,MODEM_BEARER,BCA_STACK);
- tempBuf.SetLength(0); // Clear the buffer in case the next ReadDes() fails
- GetAgent()->ReadDes(columnName,tempBuf);
-
- _LOG_L1C2(_L8("bcaName details %S"),&tempBuf);
- iBcaController->SetBcaStackAndName(tempBuf);
-
- //Read IAPID from CommDB.
- //IAP ID is used in BCA Ioctl method to set IapId for accessing CommDB.
- TUint32 iapId(0);
- columnName.Format(KModemNameFormatText ,IAP,COMMDB_ID);
- GetAgent()->ReadInt(columnName,iapId);
- _LOG_L1C2(_L8("IAP ID details %u"),iapId);
- iBcaController->SetIapId(iapId);
-
- UpdateContextState(RPacketContext::EStatusActive, KErrNone);
-
- iBcaController->StartL();
- }
- break;
- case MControllerObserver::EBcaController:
- _LOG_L1C1(_L8(" ***** NIF INITIALISED *****"));
- LinkLayerUp();
- break;
- default:
- _LOG_L2C3(_L8("ERROR CRawIPNifMain: Unknown state:%d in NIF: %S"), aState, &KNifName);
- User::Leave(KErrUnknown);
- break;
- }
- }
-
-void CRawIPNifMain::ShutDown(TInitialisationState aState, TInt aError)
-/**
- * This method controls the shutdown sequence of the different modules
- * in the NIF. When a module completes all the shutdown tasks it will
- * call again this method with the new state.
- *
- * @param aState The current state
- * @param aError A possible error (only during initialisation)
- */
- {
- _LOG_L1C3(_L8("CRawIPNifMain::ShutDown [aState=%d ,aError=%d]"),
- aState, aError);
-
- if (aError != KErrNone)
- {
- // NIF is shutting down due to an error.
- // The error code must be stored in order to call linklayer down
- // passing that value
- iInitError = aError;
- }
-
- switch (aState)
- {
- case MControllerObserver::EInitialised:
- iBcaController->Stop(aError);
- break;
- case MControllerObserver::EBcaController:
- LinkLayerDown(iInitError);
- break;
- default:
- _LOG_L2C1(_L8("ERROR CRawIPNifMain: Unknown Shutdown step"));
- _BTT_PANIC(KNifName,KNifUnknownShutDownState);
- break;
- }
- }
-
-MNifIfNotify* CRawIPNifMain::GetAgent()
-/**
- * Returns a pointer to the MNifIfNotify class used to comunicate with the Agent
- *
- * @return a pointer to MNifIfNotify
- */
- {
- return iNotify;
- }
-
-CProtocolIfBase* CRawIPNifMain::GetProtocolIf()
-/**
- * Returns a pointer to the CIPv4ProtocolIf class
- *
- * @return a pointer to a CProtocolIfBase derived class
- */
- {
- return iProtocolIf;
- }
-
-CBcaIoController* CRawIPNifMain::GetBcaController()
-/**
- * Returns a pointer to the CBcaIoController class
- *
- * @return a pointer to CBcaIoController
- */
- {
- return iBcaController;
- }
-
-void CRawIPNifMain::UpdateContextState(
- RPacketContext::TContextStatus aState, TInt /*aError*/)
-/**
- * Updates the state of the iContextState variable
- *
- * @param aState The new state
- * @param aError A possible error
- */
- {
- _LOG_L1C2(_L8("CRawIPNifMain::UpdateContextState [State=%d]"), aState);
-
- // Note that we do not need to close the NIF down if there's been an
- // error, as the context state machine will do this for us.
-
- iContextStatus = aState;
- }
-
-void CRawIPNifMain::UpdateContextConfig(
- RPacketContext::TContextConfigGPRS aConfig)
-/**
- * Updates the state of the iContextConfig variable
- *
- * @param aConfig The new config
- */
- {
- _LOG_L1C1(_L8("CRawIPNifMain::UpdateContextConfig"));
-
- // Note that we do not need to close the NIF down if there's been an
- // error, as the context state machine will do this for us.
-
- iContextConfig = aConfig;
- }
--- a/telephonyprotocols/rawipnif/version1/src/RawIPNifMainFactory.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Implements the factory class which is used to instantiate the RAW IP NIF.
-//
-//
-
-/**
- @file
-*/
-
-#include <f32file.h>
-#include "RawIPNifMainFactory.h"
-#include "RawIPNifMain.h"
-#include "bttlog.h"
-
-void CRawIPNifMainFactory::InstallL()
-/**
- * This function is pure virtual in CNifFactory, so we have to define it
- * here. It is called by NifMan before NewInterfaceL().
- * However, it doesn't do anything.
- */
- {
- }
-
-CNifIfBase* CRawIPNifMainFactory::NewInterfaceL(const TDesC& aName)
-/**
- * Factory function which creates an instance of the RAW IP NIF.
- *
- * @param aName The name of the NIF
- * @return A newly instantiated RAW IP NIF
- */
- {
- return NewInterfaceL(aName, NULL);
- }
-
-CNifIfBase* CRawIPNifMainFactory::NewInterfaceL(const TDesC& aName,MNifIfNotify* aNotify)
-/**
- * Factory function which creates an instance of the RAW IP NIF.
- *
- * @param aName The name of the NIF
- * @param aNotify supplies details from "IfParams" field in CommDb - not used in btt
- * @return A newly instantiated RAW IP NIF
- */
- {
-#ifdef __BTT_LOGGING__
- iTheLogger = CBttLogger::NewL(KNifSubDir, KRefFile, User::FastCounter());
-#endif // __BTT_LOGGING__
-
- _LOG_L1C1(_L8("Raw IP.NIF logging started."));
- _LOG_L1C2(_L8(" aNotify = %x"), aNotify);
-
- CRawIPNifMain* s = new (ELeave) CRawIPNifMain(*this, aNotify, iTheLogger);
- CleanupStack::PushL(s);
- s->ConstructL(aName);
- CleanupStack::Pop(s);
-
- return s;
- }
-
-TInt CRawIPNifMainFactory::Info(TNifIfInfo& /*aInfo*/, TInt /*aIndex*/) const
-/**
- * This function is pure virtual in CNifFactory, so we have to define it
- * here. However, it doesn't do anything, and is never called by NifMan.
- *
- * @param aInfo Ignored
- * @param aIndex Ignored
- * @return Always KErrNone
- */
- {
- return KErrNone;
- }
--- a/telephonyprotocols/rawipnif/version1/src/Receiver.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Implements the active object that controls the Read() requests.
-//
-//
-
-/**
- @file
-*/
-
-#include "Receiver.h"
-#include "Constants.h"
-
-
-CReceiver::CReceiver(CBcaIoController& aObserver, CBttLogger* aTheLogger)
-/**
- * Constructor. Performs standard active object initialisation.
- *
- * @param aObserver Reference to the observer of this state machine
- * @param aTheLogger The logging object
- */
- : CActive(EPriorityNormal),
- iObserver(aObserver),
- iTheLogger(aTheLogger)
- {
- CActiveScheduler::Add(this);
- }
-
-CReceiver::~CReceiver()
-/**
- * Destructor.
- */
- {
- Cancel();
- }
-
-void CReceiver::RunL()
-/**
- * Method called when read request completes. This will only be once the BCA has a full IP
- * packet in its buffer.
- */
- {
- _LOG_L1C2(_L8("CReceiver::RunL [iStatus=%d]"), iStatus.Int());
-
- if (iStatus!=KErrNone)
- {
- if(iStatus == KErrNoMemory)
- {
- _LOG_L2C1(
- _L8("WARNING! CReceiver: Read failed with KErrNoMemory"));
- // Read operation failed!! Nif will re-issue the read request.
- StartListening();
- }
- else
- {
- _LOG_L2C1(_L8("WARNING! CReceiver: Read failed"));
- iObserver.Stop(iStatus.Int());
- }
- return;
- }
-
- _LOG_L1C1(_L8("CReceiver: Data Packet Received"));
-
- // Process Ip packet
- iObserver.Process(iData);
-
- // The packet received was processed. NIF can start listening
- // for another one.
- StartListening();
-
- }
-
-void CReceiver::DoCancel()
-/**
- * Cancel active request
- */
- {
- _LOG_L1C1(_L8("CReceiver::DoCancel"));
-
- (iObserver.Bca())->CancelRead();
- }
-
-void CReceiver::StartListening()
-/**
- * This method issues a Read request. This is the API used to receive
- * packets from BCA.
- */
- {
- _LOG_L1C1(_L8("CReceiver::StartListening"));
-
- // The BCA will complete this read once it has a full IP packet in its buffer.
- (iObserver.Bca())->Read(iStatus, iData);
-
- SetActive();
- }
--- a/telephonyprotocols/rawipnif/version1/src/Sender.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,132 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Implements the active object that controls the Write() requests.
-//
-//
-
-/**
- @file
-*/
-
-#include "Sender.h"
-#include "Constants.h"
-
-CSender::CSender(CBcaIoController& aObserver, CBttLogger* aTheLogger)
-/**
- * Constructor. Performs standard active object initialisation.
- *
- * @param aObserver Reference to the observer of this state machine
- */
- : CActive(EPriorityNormal),
- iObserver(aObserver),
- iTheLogger(aTheLogger)
- {
- CActiveScheduler::Add(this);
- }
-
-CSender::~CSender()
-/**
- * Destructor.
- */
- {
- Cancel();
- }
-
-void CSender::RunL()
-/**
- * This method checks if any error occured in the write operation.
- */
- {
- _LOG_L1C2(_L8("CSender::RunL [iStatus=%d]"), iStatus.Int());
-
- if (iStatus!=KErrNone)
- {
- if(iStatus == KErrNoMemory)
- {
- _LOG_L2C1(_L8("WARNING! CSender: Write failed with KErrNoMemory"));
- _LOG_L2C1(_L8("WARNING! CSender: Ignoring packet!!!!"));
- // Write operation failed!! Nif will ignore this packet.
- iObserver.SendComplete();
- }
- else if (iStatus == KErrNotReady)
- {
- _LOG_L2C1(_L8("WARNING! CSender: Write failed with KErrNotReady"));
- _LOG_L2C1(_L8("WARNING! CSender: Ignoring packet!!!!"));
- // Write operation failed!! Nif will ignore this packet.
- iObserver.SendComplete();
- }
- else
- {
- _LOG_L2C1(_L8("ERROR! CSender: Write failed!!!!"));
- // Nif will shut down
- iObserver.Stop(iStatus.Int());
- }
- return;
- }
-
- else
- {
- // The Ip packet was sent successfuly
- _LOG_L1C1(_L8("***** CSender: Packet Sent."));
- iObserver.SendComplete();
- }
- }
-
-void CSender::DoCancel()
-/**
- * Cancel active request
- */
- {
- _LOG_L1C1(_L8("CSender::DoCancel"));
-
- (iObserver.Bca())->CancelWrite();
- }
-
-void CSender::Send(RMBufChain& aPdu)
-/**
- * Copies the specified RMBufChain into a descriptor and sends it.
- *
- * @param aPdu The IP packet to be sent.
- * @return KStopSending, or KErrArgument if the packet is too large.
- */
- {
- _LOG_L1C1(_L8("CSender::Send"));
-
- // Copy the IP portion of the RMBufChain to the buffer.
- iSendBuffer.SetMax();
- aPdu.CopyOut(iSendBuffer, aPdu.First()->Length());
-
-#ifdef RAWIP_HEADER_APPENDED_TO_PACKETS
- iObserver.AddHeader(iSendBuffer);
-#endif // RAWIP_HEADER_APPENDED_TO_PACKETS
-
- aPdu.Free();
-
- SendBuffer(iSendBuffer);
- }
-
-void CSender::SendBuffer(const TDesC8& aBuffer)
-/**
- * Sends an IP packet, contained in the specified descriptor
- *
- * @param aBuffer The IP packet to send.
- * @return Always KStopSending.
- */
- {
- _LOG_L1C1(_L8("CSender::SendBuffer"));
-
- // Finally, send the packet to BCA
- (iObserver.Bca())->Write(iStatus, aBuffer);
- SetActive();
- }
--- a/telephonyprotocols/rawipnif/version1/src/bttlog.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,210 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Implements CBttLogger.
-//
-//
-
-/**
- @file
-*/
-
-#include "bttlog.h"
-
-#ifdef __BTT_LOGGING__
-
-#ifdef __DEBUGRAWIPSERIALPORT__
-#include <e32svr.h>
-#endif
-
-//Enable this if you want time stamps for each log statements.
-//This is computation ineffective and not recommended.
-//#define __TIME_STAMP_ENABLED__
-
-CBttLogger* CBttLogger::NewL(const TDesC8& aTag, const TDesC8& aFileName, const TUint32 aInstanceId)
-/**
- * Factory method for CBttLogger.
- *
- * @param aSubDir The subdirectory of c:\logs\gprsbtt to log to.
- * @param aFileName The filename to log to.
- * @return Ownership of a new CBttLogger.
- */
- {
- CBttLogger* self = new(ELeave) CBttLogger;
- CleanupStack::PushL(self);
- self->ConstructL(aTag, aFileName, aInstanceId);
- CleanupStack::Pop(self);
- return self;
- }
-
-#ifdef __FLOG_ACTIVE
-void CBttLogger::ConstructL(const TDesC8& aTag, const TDesC8& aFileName, const TUint32 aInstanceId)
-#else
-void CBttLogger::ConstructL(const TDesC8&, const TDesC8&, const TUint32 aInstanceId)
-#endif
-/**
- * 2nd-phase construction.
- * Hurricane/Typhoon - we can log to a particular directory
- */
- {
- iInstanceId = aInstanceId;
- __FLOG_OPEN(aTag, aFileName);
- }
-
-//#endif
-
-CBttLogger::CBttLogger()
-/**
- * Constructor
- */
- {
- }
-
-CBttLogger::~CBttLogger()
-/**
- * Destructor
- */
- {
- __FLOG_CLOSE;
- }
-
-void CBttLogger::Write(const TDesC8& aText)
-/**
- * Write an 8-bit descriptor to the log file
- *
- * @param aText The test to write
- */
- {
- TBuf8<KLogBufferSize> buf;
- // put the instance id to identify which nif we are
- // logging from
- _LIT8(KInstanceFormat, "RawIp 0x%08X: ");
- buf.Format(KInstanceFormat, iInstanceId);
-
-#ifdef __TIME_STAMP_ENABLED__
- // log to our own file in Hurricane/Typhoon
- _LIT8(KTimeFormat, "%02d.%02d:%02d:%06d ");
-
- TTime now;
- now.UniversalTime();
- TDateTime dateTime;
- dateTime = now.DateTime();
- buf.AppendFormat(KTimeFormat,
- dateTime.Hour(),
- dateTime.Minute(),
- dateTime.Second(),
- dateTime.MicroSecond());
-#endif
-
- buf.Append(aText);
-
-#ifdef __DEBUGRAWIPSERIALPORT__
- TBuf<KLogBufferSize> buf2;
- // TEMP: Do not print single % since appear as format char to RDebug::Print
- for (TInt i = 0; i < buf.Length(); i++)
- {
- if (buf[i] == '%')
- buf2.Append(_L("."));
- else
- buf2.Append(buf[i]);
- }
- RDebug::Print(buf2);
-#else
- __FLOG(buf);
-#endif
- }
-
-void CBttLogger::WriteFormat(TRefByValue<const TDesC8> aFmt, ...)
-/**
- * Write an 8-bit format list to the log file
- */
- {
- VA_LIST list;
- VA_START(list, aFmt);
-
- // log to our own file in Hurricane/Typhoon
- TBuf8<KLogBufferSize> buf;
- buf.AppendFormatList(aFmt, list);
- Write(buf);
- }
-
-void CBttLogger::VerboseLeaveL(char* aFile, TInt aLine, TInt aReason)
-/**
- * Make a verbose leave - write name of file and line number to the log just
- * before leaving.
- *
- * @param aFile The file we're leaving from.
- * @param aLine The line number we're leaving from.
- * @param aReason The leave code.
- */
- {
- // only leave if non-zero value
- if ( aReason == KErrNone )
- {
- return;
- }
-
- _LIT8(KLeavePrefix, "LEAVE: " );
-
- TPtrC8 fullFileName((const TUint8*)aFile);
- TPtrC8 fileName(fullFileName.Ptr()+fullFileName.LocateReverse('\\')+1);
-
- TBuf8<256> buf;
- buf.Append(KLeavePrefix);
- buf.AppendFormat(_L8(" aReason=%d [file %S, line %d]"), aReason, &fileName,
- aLine);
- Write(buf);
-
- __FLOG_CLOSE;
-
- // finally
- User::Leave(aReason);
- }
-
-void CBttLogger::VerbosePanic(char* aFile,
- TInt aLine,
- TInt aPanicCode,
- TText8* aPanicName,
- const TDesC& aPanicCategory)
-/**
- * Make a verbose panic - write name of file and line number to the
- * log just before panicking.
- *
- * @param aFile The file that's panicking.
- * @param aLine The line number that's panicking.
- * @param aReason The panic code.
- * @param aPanicName The text of the panic code.
- * @param aPanicCategory The panic category.
- */
- {
- _LIT8(KLeavePrefix, "PANIC: " );
-
- TPtrC8 fullFileName((const TUint8*)aFile);
- TPtrC8 fileName(fullFileName.Ptr()+fullFileName.LocateReverse('\\')+1);
-
- TBuf8<256> buf;
- buf.Append(KLeavePrefix);
- buf.AppendFormat(_L8(" %d = %s [file %S, line %d]"),
- aPanicCode,
- aPanicName,
- &fileName,
- aLine);
- Write(buf);
-
- __FLOG_CLOSE;
-
- // finally
- User::Panic(aPanicCategory, aPanicCode);
- }
-
-#endif // __BTT_LOGGING__
--- a/telephonyprotocols/umtsgprsscpr/Test/te_spud/BWINS/TE_SPUDUNITU.DEF Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-EXPORTS
- ?NewServer@@YAHXZ @ 1 NONAME ; int NewServer(void)
- ?NewPdpFsmInterfaceL@@YAPAVRPdpFsmInterface@@XZ @ 2 NONAME ; class RPdpFsmInterface * NewPdpFsmInterfaceL(void)
-
--- a/telephonyprotocols/umtsgprsscpr/Test/te_spud/group/TE_SpudUnit.iby Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef __TE_SPUD_UNIT_IBY__
-#define __TE_SPUD_UNIT_IBY__
-
-file=ABI_DIR\DEBUG_DIR\TE_SpudUnit.exe System\Libs\TE_SpudUnit.exe
-
-data=EPOCROOT##epoc32\data\z\testdata\configs\Spud_config.txt TestData\configs\Spud_config.txt
-data=EPOCROOT##epoc32\data\z\testdata\scripts\TE_SpudUnitTest.script TestData\scripts\TE_SpudUnitTest.script
-
-#endif // __TE_SPUD_UNIT_IBY__
--- a/telephonyprotocols/umtsgprsscpr/Test/te_spud/group/TE_SpudUnit.mmp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// SpudTel and SpudFsm unit tests
-//
-//
-
-/**
- @file
-*/
-
-TARGET te_spudunit.exe
-CAPABILITY ReadDeviceData WriteDeviceData NetworkControl NetworkServices ReadUserData WriteUserData
-TARGETTYPE exe
-UID 0x1000007A 0x102075B1
-VENDORID 0x70000001
-
-MACRO _INFO_LOG
-MACRO _ERROR_LOG
-
-SOURCEPATH ../src
-SOURCE SpudUnitTestServer.cpp
-SOURCE SpudUnitTestStepBase.cpp
-SOURCE SpudFsmUnitTestStep.cpp
-SOURCE SpudTelUnitTestStep.cpp
-SOURCE InputRequestListener.cpp
-SOURCE ActiveSchedulerThread.cpp
-SOURCE CompareContextParameters.cpp
-SOURCE DefaultContextParameters.cpp
-SOURCE PdpFsmInterfaceTest.cpp
-SOURCE SpudManInterfaceTest.cpp
-SOURCE CPdpFsmInterface.cpp
-
-
-// UmtsGprsSCPR files
-SOURCEPATH ../../../src
-SOURCE RSpudManInterface.cpp
-
-// SpudFsm source files
-SOURCEPATH ../../../spudfsm/src
-SOURCE cpdpfsm.cpp
-SOURCE cpdpfsmfactory.cpp
-SOURCE tpdpstate.cpp
-SOURCE tpdpstatesuspended.cpp
-SOURCE tpdpstatechangingqos.cpp
-SOURCE tpdpstatechangingtft.cpp
-SOURCE tpdpstateopen.cpp
-SOURCE tpdpstatesettingqos.cpp
-SOURCE tpdpstateinitialised.cpp
-SOURCE tpdpstatecreatingprimary.cpp
-SOURCE tpdpstateopeningphone.cpp
-SOURCE tpdpstatecreatingSecondary.cpp
-SOURCE tpdpstateactivatingsecondary.cpp
-SOURCE tpdpstatecreatedSecondary.cpp
-SOURCE tpdpstateactivatingprimary.cpp
-SOURCE tpdpstateclosing.cpp
-SOURCE tpdpstatesettingtft.cpp
-SOURCE tpdpstategettingnegqos.cpp
-SOURCE tpdpstatemodifingactive.cpp
-SOURCE tpdpstatestopping.cpp
-
-// SpudTel source files
-SOURCEPATH ../../../spudtel/src
-SOURCE ceteldrivercontext.cpp
-SOURCE ceteldriverfactory.cpp
-SOURCE cservicechangenotifier.cpp
-SOURCE reteldriverinput.cpp
-SOURCE eteldriverstrategies.cpp
-SOURCE cspudcontextelem.cpp
-SOURCE ceteldrivernotifier.cpp
-SOURCE cpdpstatuschangenotifier.cpp
-SOURCE cqoschangenotifier.cpp
-SOURCE cpdpconfigchangenotifier.cpp
-
-
-USERINCLUDE ../inc
-USERINCLUDE ../../../inc
-USERINCLUDE ../../../spudtel/inc
-USERINCLUDE ../../../spudfsm/inc
-USERINCLUDE ../../../spudfsm/src
-
-SYSTEMINCLUDE /epoc32/include
-SYSTEMINCLUDE /epoc32/include/test
-
-LIBRARY euser.lib
-LIBRARY testexecuteutils.lib
-LIBRARY testexecutelogclient.lib
-LIBRARY umtsif.lib
-LIBRARY etelpckt.lib
-LIBRARY etel.lib
-LIBRARY c32root.lib
-
-DEBUGLIBRARY comsdbgutil.lib
--- a/telephonyprotocols/umtsgprsscpr/Test/te_spud/group/bld.inf Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Test SPUD
-//
-//
-
-/**
- @file
-*/
-
-PRJ_EXPORTS
-
-PRJ_TESTEXPORTS
-
-// script files required to run tests
-..\scripts\TE_SpudUnitTest.script z:\testdata\scripts\TE_SpudUnitTest.script
-..\testdata\Spud_config.txt z:\TestData\Configs\Spud_config.txt
-
-..\group\TE_SpudUnit.iby \epoc32\rom\include\TE_SpudUnit.iby
-
-PRJ_MMPFILES
-
-PRJ_TESTMMPFILES
-
-..\group\TE_SpudUnit.mmp
--- a/telephonyprotocols/umtsgprsscpr/Test/te_spud/inc/CPdpFsmInterface.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-/**
- @file
- @internalComponent
-*/
-
-// NOTE: This guard define is used to prevent the real PDPFSM.h from being included.
-// This file MUST be included first in test code
-#ifndef PDPFSM_H
-#define PDPFSM_H
-
-
-#include <networking/mpdpfsminterface.h>
-#include "RSpudManInterface.h"
-#include <etelpckt.h>
-
-class CPdpFsmFactory;
-
-/**
-Dummy implementation of the MPdpFsmInterface that is seperated from the UmtsGprsSCPR
-*/
-class CPdpFsmInterface : public MPdpFsmInterface
- {
-public:
- //-=========================================================
- // custom methods
- //-=========================================================
- CPdpFsmInterface();
- ~CPdpFsmInterface();
-
- // We need this 'factory' method since the test harness has to have a means (albeit indirect) of
- // creating the CPdpFsm objects, but within the Active Scheduler Thread (terminology from the test's
- // design document). and not within the test harness (which is what happens if they get created via
- // 'MPdpFsmInterface' Set() or Get() methods in this test harness). Because the 'CEtelDriverContext'
- // objects that are indirectly created are added to the test thread's ActiveScheduler
- //
- TInt NewFsmContext(TContextId aPdpId);
-
- void SpudInput (TContextId aPdpId, TInt aNotification, TInt aParam);
-
- //-=========================================================
- // MPdpFsmInterface methods
- //-=========================================================
- virtual void OpenL(MSpudManInterface * aSpudManInterface, TName& aName);
- virtual void Close();
-
- virtual TInt Input (TContextId aPdpId, const TInt aOperation, const TInt aParam=KErrNone);
-
-
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- virtual void SetIMCNSignalling(TBool aImCnSignalling);
- virtual TInt Set(TContextId aPdpId, const RPacketQoS::TQoSR5Requested& aParam);
- virtual TInt Set(TContextId aPdpId, const RPacketQoS::TQoSR5Negotiated& aParam);
- virtual TInt Get(TContextId aPdpId, RPacketQoS::TQoSR5Requested& aParam) const;
- virtual TInt Get(TContextId aPdpId, RPacketQoS::TQoSR5Negotiated& aParam) const;
-
-#else
-// !SYMBIAN_NETWORKING_UMTSR5
-
- virtual TInt Set(TContextId aPdpId, const RPacketQoS::TQoSR99_R4Requested& aParam);
- virtual TInt Set(TContextId aPdpId, const RPacketQoS::TQoSR99_R4Negotiated& aParam);
- virtual TInt Get(TContextId aPdpId, RPacketQoS::TQoSR99_R4Requested& aParam) const;
- virtual TInt Get(TContextId aPdpId, RPacketQoS::TQoSR99_R4Negotiated& aParam) const;
-#endif
-// SYMBIAN_NETWORKING_UMTSR5
-
-
- virtual TInt Set(TContextId aPdpId, const TTFTInfo& aParam);
- virtual TInt Set(TContextId aPdpId, const TTFTOperationCode& aParam);
- virtual TInt Set(TContextId aPdpId, const RPacketContext::TDataChannelV2& aParam);
- virtual TInt Set(TContextId aPdpId, const RPacketContext::TContextConfigGPRS& aParam);
- virtual TInt Set(TContextId aPdpId, const RPacketContext::TContextStatus& aParam);
-
- virtual TInt GetLastErrorCause(TContextId aPdpId, TInt& aLastErrorCause) const;
-
- virtual TInt Get(TContextId aPdpId, TTFTInfo& aParam) const;
- virtual TInt Get(TContextId aPdpId, TTFTOperationCode& aParam) const;
- virtual TInt Get(TContextId aPdpId, RPacketContext::TDataChannelV2& aParam) const;
- virtual TInt Get(TContextId aPdpId, RPacketContext::TContextConfigGPRS& aParam) const;
- virtual TInt Get(TContextId aPdpId, RPacketContext::TContextStatus& aParam) const;
-
- virtual void Set(const RPacketService::TStatus aParam); // applies to all contexts
- virtual void Get(RPacketService::TStatus& aParam);// applies to all contexts
-
- virtual const TName& TsyName(void);
-
- virtual void SetContextTerminationErrorAndStop(TContextId aPdpId, TInt aErrorCode);
-
-protected:
-private:
- // DO NOT provide implementations to these methods: Copying this object should be disabled
- CPdpFsmInterface(CPdpFsmInterface&);
- CPdpFsmInterface& operator= (CPdpFsmInterface& aInput);
-
-public:
-protected:
-private:
- // FSM Factory - churns out FSMs
- CPdpFsmFactory * iPdpFsmFactory;
-
- RPacketService::TStatus iNetworkStatus;
-
- RSpudManInterface iSpudManInterface;
-
- TBool iSpudMainInterfaceSet;
-};
-
-#endif
-// PDPFSM_H
--- a/telephonyprotocols/umtsgprsscpr/Test/te_spud/inc/CompareContextParameters.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Declarations for methods that compare various packet context related structures
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#ifndef COMPARE_CONTEXT_PARAMETERS
-#define COMPARE_CONTEXT_PARAMETERS
-
-#include <networking/umtsnifcontrolif.h>
-#include <etelpckt.h>
-
-TBool CompareContextConfigGPRS(const RPacketContext::TContextConfigGPRS &aFirst, const RPacketContext::TContextConfigGPRS &aSecond);
-TBool CompareContextParameters(const TContextParameters& aFirst, const TContextParameters& aSecond);
-
-TBool ComparePacketFilterV2(const RPacketContext::TPacketFilterV2 &aFirst, const RPacketContext::TPacketFilterV2 &aSecond);
-TBool CompareDataChannel(const RPacketContext::TDataChannelV2& aFirst, const RPacketContext::TDataChannelV2& aSecond);
-TBool CompareTFTInfo(TTFTInfo& aTFTInfo, RPacketContext& aPacketContext);
-TBool CompareContextInfo(const RPacketService& aPacketService, const TDesC& aContextName, RPacketContext::TContextStatus aContextStatus);
-
-TBool CompareUMTSQoSNeg(const RPacketQoS::TQoSR99_R4Negotiated &aFirst, const RPacketQoS::TQoSR99_R4Negotiated &aSecond);
-TBool CompareUMTSQoSNeg(const RPacketQoS::TQoSR99_R4Requested &aFirst, const RPacketQoS::TQoSR99_R4Requested &aSecond);
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
-TBool CompareUMTSQoSReq(const RPacketQoS::TQoSR5Requested &aFirst, const RPacketQoS::TQoSR5Requested &aSecond);
-#endif
-
-#endif
-// COMPARE_CONTEXT_PARAMETERS
--- a/telephonyprotocols/umtsgprsscpr/Test/te_spud/inc/DefaultContextParameters.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Declarations for methods that create default various packet context related structures
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#ifndef DEFAULT_CONTEXT_PARAMETERS
-#define DEFAULT_CONTEXT_PARAMETERS
-
-#include <networking/umtsnifcontrolif.h>
-#include <etelpckt.h>
-
-TName& SimTsyName();
-
-void DefaultContextConfigGPRS(RPacketContext::TContextConfigGPRS& aParam);
-
-void DefaultQoSR99_R4Requested(RPacketQoS::TQoSR99_R4Requested& aQosRequested);
-void SecondQoSR99_R4Requested(RPacketQoS::TQoSR99_R4Requested& aQosRequested);
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
-void DefaultQoSR5Requested(RPacketQoS::TQoSR5Requested& aQosRequested);
-void SecondQoSR5Requested(RPacketQoS::TQoSR5Requested& aQosRequested);
-#endif
-
-void DefaultQoSR99_R4Negotiated(RPacketQoS::TQoSR99_R4Negotiated& aQosNegotiated);
-void SecondQoSR99_R4Negotiated(RPacketQoS::TQoSR99_R4Negotiated& aQosNegotiated);
-
-void DefaultTftInfo(TTFTInfo& aTTFTInfo);
-void SecondDefaultTftInfo(TTFTInfo& aTTFTInfo);
-void CombinedDefaultTftInfo(TTFTInfo& aTTFTInfo);
-void DefaultContextStatus(RPacketContext::TContextStatus& aStatus);
-void DefaultServiceStatus(RPacketService::TStatus& aStatus);
-void DefaultDataChannel(RPacketContext::TDataChannelV2& aDataChannel);
-
-#endif
-// DEFAULT_CONTEXT_PARAMETERS
--- a/telephonyprotocols/umtsgprsscpr/Test/te_spud/inc/InputRequestListener.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,239 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Declaration for CInputRequestListener
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#ifndef INPUT_REQUEST_LISTENER_H
-#define INPUT_REQUEST_LISTENER_H
-
-#include <e32def.h>
-#include <networking/umtsnifcontrolif.h>
-
-#include "CompareContextParameters.h"
-#include "reteldriverinput.h"
-#include "meteldriverstrategy.h"
-#include "PdpFsmInterfaceTest.h"
-#include "SpudManInterfaceTest.h"
-#include "cpdpfsmfactory.h"
-
-/**
- Storage for parameters that are passed to REtelDriverInput::Input
- */
-class TEtelDriverInputRequestData
- {
- public:
- TContextId iPdpId;
- EtelDriver::TEtelInput iOperation;
- };
-
-/**
- Storage for parameters that are passed to RPdpFsmInterfaceTest::Input by SpudTel
- */
-class TEtelDriverInputResponseData
- {
- public:
- TContextId iPdpId;
- TInt iSignal;
- };
-
-/**
- Storage for parameters that are passed during Etel driver notifications
- */
-class TNotifyContextConfigData
- {
- public:
- TContextId iPdpId;
- RPacketContext::TContextConfigGPRS iContextConfigGPRS;
- };
-
-class TNotifyPacketQosData
- {
- public:
- TContextId iPdpId;
- TNegotiatedProfileBuffer iNegotiated;
- };
-
-class TNotifyContextStatusData
- {
- public:
- TContextId iPdpId;
- RPacketContext::TContextStatus iContextStatus;
- };
-
-class TNotifyContextDataChannelData
- {
- public:
- TContextId iPdpId;
- RPacketContext::TDataChannelV2 iDataChannelV2;
- };
-
-/**
- Storage for parameters that are passed to RPdpFsmInterface::Input by Spud man
- */
-class TFsmInputRequestData
- {
- public:
- TContextId iPdpId;
- TInt iOperation;
- TInt iParam;
- };
-
-/**
- Storage for parameters that are passed to RPdpFsmInterface::Input by Etel driver
- */
-class TFsmInputResponseData
- {
- public:
- TContextId iPdpId;
- TInt iEvent;
- TInt iParam;
- };
-
-/**
- Storage for parameters used for a context change notification by the FSM
- */
-class TNotifyContextParametersChangeData
- {
- public:
- TContextId iPdpId;
- TNegotiatedProfileBuffer iNegotiated;
- RPacketContext::TContextConfigGPRS iContextConfig;
- };
-
-class CInputRequestListener : public CActive
- {
-public:
- /**
- Enum of the types of requests supported by CInputRequestListener. When the iStatus is completed with
- these results, the associated method is called with the corresponding parameters.
- */
- enum TRequestType
- {
- EEtelDriverInputRequest,
- EEtelDriverCancelPdpRequest,
- EFsmInputRequest,
- ECleanup,
- EFsmObjectCreate
- };
-
-public:
- static CInputRequestListener* NewL(TBool aUseTestPdpFsmInterface);
- virtual ~CInputRequestListener();
- void Activate();
- void RunL();
- void DoCancel();
-
- void CreateUnitUnderTestL();
- void DeleteUnitUnderTest();
-
-private:
- CInputRequestListener(TBool aUseTestPdpFsmInterface);
- void ConstructL();
-
- void CreateEtelDriverL();
- void CreatePdpFsmL();
-
-public:
- /** Set to true when testing Etel driver, and as such the test FSM interface it used to interact with Etel driver
- and set to false when the real FSM is used */
- TBool iUseTestPdpFsmInterface;
- /** Contains the Etel driver under test */
- REtelDriverInput* iEtelDriver;
- /** Contains the RPdpFsmInterface used for Etel driver tests */
- CPdpFsmInterfaceTest *iPdpFsmInterfaceTest;
-
- /** Contains the RPdpFsmInterface under test */
- CPdpFsmInterface *iPdpFsmInterface;
- /** Contains the RSpudManInterface used for FSM tests */
- TSpudManInterfaceTest *iSpudManInterface;
-
- /** The thread that test execute is running in */
- RThread iParentThread;
- /** This active scheduler will run the SPUD TEL, SPUD FSM and this CActive object */
- CActiveScheduler* iScheduler;
-
- // contains the data that is passed to REtelDriverInput interface
- TEtelDriverInputRequestData iEtelDriverInputRequestData;
- TEtelDriverInputResponseData iEtelDriverInputResponseData;
- TContextId iEtelDriverCancelRequestPdpId;
-
- // contains the data that is passed to RPdpFsmInterface::Set
- TNotifyContextConfigData iNotifyContextConfigData;
- TNotifyContextStatusData iNotifyContextStatusData;
- TNotifyPacketQosData iNotifyQosNegotiatedData;
- TNotifyContextDataChannelData iNotifyContextDataChannelData;
- RPacketService::TStatus iPacketServiceStatus;
-
- // Data stored for FSM input requests
- TFsmInputRequestData iFsmInputRequestData;
- TFsmInputResponseData iFsmInputResponseData;
- TNotifyContextParametersChangeData iContextParametersEventData;
- TContextId iContextBlockedEventPdpId;
- TContextId iContextUnblockedEventPdpId;
-
- /** Completed when the Active Scheduler thread is initialized and ready to handle requests */
- TRequestStatus iThreadInitialized;
- /** Completed when the Active Scheduler thread has cleaned up any resources and can be destroyed */
- TRequestStatus iThreadDestructed;
-
- /** Must be pending before any Input requests are completed */
- TRequestStatus iReadyForInputRequest;
-
- /** Completed when RPdpFsmInterfaceTest::Input is called (with a non-notification aOperation parameter) */
- TRequestStatus iEtelDriverInputResponseStatus;
- /** Completed when RPdpFsmInterfaceTest::Input is called with a QoS notification as the aOperation parameter */
- TRequestStatus iEtelDriverQosNotificationStatus;
- /** Completed when RPdpFsmInterfaceTest::Input is called with a GPRS config notification as the aOperation parameter */
- TRequestStatus iEtelDriverConfigGPRSNotificationStatus;
- /** Completed when RPdpFsmInterfaceTest::Input is called with a context status change notification as the aOperation parameter */
- TRequestStatus iEtelDriverContextStatusNotificationStatus;
- /** Completed when RPdpFsmInterfaceTest::Input is called with a service status change as the aOperation parameter */
- TRequestStatus iEtelDriverServiceNotificationStatus;
-
- /** Completed when RSpudManInterfaceTest::Input is called (with a non-notification aOperation parameter) */
- TRequestStatus iFsmInputResponseStatus;
- /** Completed when RSpudManInterfaceTest::Input is called with a service status change as the aOperation parameter */
- TRequestStatus iFsmNetworkStatusStatus;
- /** Completed when RSpudManInterfaceTest::Input is called with a context status change as the aOperation parameter */
- TRequestStatus iFsmContextParameterChangeStatus;
- /** Completed when RSpudManInterfaceTest::Input is called with a context blocked event as the aOperation parameter */
- TRequestStatus iFsmContextSuspendedStatus;
- /** Completed when RSpudManInterfaceTest::Input is called with a context unblocked event as the aOperation parameter */
- TRequestStatus iFsmContextResumedStatus;
-
- /** Completed by RunL() */
- TRequestStatus iFsmObjectCreateResponse;
-
- };
-
-/** Contains the data passed from the test execute thread to the active object thread */
-class TActiveSchedulerThreadParams
- {
- public:
- CInputRequestListener* iListener;
- TThreadId iThreadId;
- };
-
-/** The start-up method for the thread running the active objects */
-TInt ActiveSchedulerThread(TAny* aActiveSchedulerParams);
-
-#endif
-// INPUT_REQUEST_LISTENER_H
-
--- a/telephonyprotocols/umtsgprsscpr/Test/te_spud/inc/PdpFsmInterfaceTest.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Declaration of the RPdpFsmInterface for SPUD TEL unit tests
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#ifndef PDPFSMINTERFACETEST_H
-#define PDPFSMINTERFACETEST_H
-
-#include "CPdpFsmInterface.h"
-
-// forward declarations
-class CInputRequestListener;
-
-/** Implementation of CPdpFsmInterface used to test the Etel driver */
-class CPdpFsmInterfaceTest : public CPdpFsmInterface
- {
-public:
- CPdpFsmInterfaceTest(CInputRequestListener& aListener);
-
- virtual TInt Input(TContextId aPdpId, const TInt aOperation, const TInt aParam);
-
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- virtual TInt Set(TContextId aPdpId, const RPacketQoS::TQoSR5Requested& aParam);
- virtual TInt Set(TContextId aPdpId, const RPacketQoS::TQoSR5Negotiated& aParam);
- virtual TInt Get(TContextId aPdpId, RPacketQoS::TQoSR5Requested& aParam) const;
- virtual TInt Get(TContextId aPdpId, RPacketQoS::TQoSR5Negotiated& aParam) const;
-
-#else
-// !SYMBIAN_NETWORKING_UMTSR5
-
- virtual TInt Set(TContextId aPdpId, const RPacketQoS::TQoSR99_R4Requested& aParam);
- virtual TInt Set(TContextId aPdpId, const RPacketQoS::TQoSR99_R4Negotiated& aParam);
- virtual TInt Get(TContextId aPdpId, RPacketQoS::TQoSR99_R4Requested& aParam) const;
- virtual TInt Get(TContextId aPdpId, RPacketQoS::TQoSR99_R4Negotiated& aParam) const;
-
-#endif
-// SYMBIAN_NETWORKING_UMTSR5
-
- virtual TInt Set(TContextId aPdpId, const TTFTInfo& aParam);
- virtual TInt Set(TContextId aPdpId, const TTFTOperationCode& aParam);
- virtual TInt Set(TContextId aPdpId, const RPacketContext::TDataChannelV2& aParam);
- virtual TInt Set(TContextId aPdpId, const RPacketContext::TContextConfigGPRS& aParam);
- virtual TInt Set(TContextId aPdpId, const RPacketContext::TContextStatus& aParam);
-
-
- virtual TInt Get(TContextId aPdpId, TTFTInfo& aParam) const;
- virtual TInt Get(TContextId aPdpId, TTFTOperationCode& aParam) const;
- virtual TInt Get(TContextId aPdpId, RPacketContext::TDataChannelV2& aParam) const;
- virtual TInt Get(TContextId aPdpId, RPacketContext::TContextConfigGPRS& aParam) const;
- virtual TInt Get(TContextId aPdpId, RPacketContext::TContextStatus& aParam) const;
-
- virtual TInt GetLastErrorCause(TContextId aPdpId, TInt& aLastErrorCause) const;
-
- virtual void Set(const RPacketService::TStatus aParam); // applies to all contexts
- virtual void Get(RPacketService::TStatus& aParam); // applies to all contexts
-
- const TName& TsyName();
-
- virtual void SetContextTerminationErrorAndStop(TContextId aPdpId, TInt aErrorCode);
-
-private:
- /** Used as the interface between the thread running the active objects and the test execute thread.
- Contains the data passed to/from Input requests */
- CInputRequestListener& iListener;
- /** Holds the next TFT operation code and data to be used for TFT operations */
- TTFTOperationCode iTftOperationCode;
- TTFTInfo iTftInfo;
-
- };
-
-#endif
-// PDPFSMINTERFACETEST_H
-
--- a/telephonyprotocols/umtsgprsscpr/Test/te_spud/inc/SpudManInterfaceTest.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Declaration of the SpudManInterface for SPUD FSM unit tests
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#ifndef SPUDMANINTERFACETEST_H
-#define SPUDMANINTERFACETEST_H
-
-#include <networking/mspudmaninterface.h>
-
-// forward declarations
-class CTestRequestListener;
-
-/** Implementation of MSpudManInterface used to test the FSM */
-class TSpudManInterfaceTest : public MSpudManInterface
- {
- public:
- TSpudManInterfaceTest(CInputRequestListener& aListener);
-
- void Input(TContextId aPdpId, TInt aEvent, TInt aParam);
-
- void SetContextTerminationErrorAndStop(TContextId aContextId, TInt aErrorCode);
-
-private:
- /** Used as the interface between the thread running the active objects and the test execute thread.
- Contains the data passed to/from Input requests */
- CInputRequestListener& iListener;
- };
-
-#endif
-// SPUDMANINTERFACETEST_H
-
--- a/telephonyprotocols/umtsgprsscpr/Test/te_spud/inc/SpudUnitTestServer.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#ifndef SPUD_UNIT_TEST_SERVER_H
-#define SPUD_UNIT_TEST_SERVER_H
-
-#include <testexecuteserverbase.h>
-#include "reteldriverinput.h"
-
-class CSpudUnitTestServer : public CTestServer
- {
-public:
- static CSpudUnitTestServer* NewL();
- virtual CTestStep* CreateTestStep(const TDesC& aStepName);
-private:
- };
-
-REtelDriverInput* NewEtelDriverInputL();
-
-#endif
-// SPUD_UNIT_TEST_SERVER_H
-
--- a/telephonyprotocols/umtsgprsscpr/Test/te_spud/inc/SpudUnitTestStep.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,208 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Declaration of test classes for SPUD TEL and SPUD FSM unit tests
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#ifndef SPUD_UNIT_TEST_STEP_H
-#define SPUD_UNIT_TEST_STEP_H
-
-#include <c32comm.h>
-#include <networking/umtsnifcontrolif.h>
-#include <testexecutestepbase.h>
-
-#include "CompareContextParameters.h"
-#include "meteldriverstrategy.h"
-#include "eteldrivernmspace.h"
-#include "pdpfsmnmspace.h"
-#include "InputRequestListener.h"
-
-#define TEST_SETRESULT(cond,result) if (!(cond)) SetTestStepResult((result))
-
-/** Identifiers for each of the simtsy parameters that can be changed using publish and subscribe */
-enum TEtelRequestType
- {
- /** Change QoS parameters */
- ENetworkQoSChange,
- /** Change network status */
- ENetworkChangeRegStatus,
- /** Change context status */
- EContextStatusChange,
- /** Change context config parameters */
- EContextConfigChange
- };
-
-/** Contains methods common to both SPUD FSM and SPUD TEL tests */
-class CSpudUnitTestStepBase : public CTestStep
- {
-public:
- CSpudUnitTestStepBase(TInt aTestNumber, TBool aUseTestPdpFsmInterface);
- TVerdict doTestStepPreambleL();
- TVerdict doTestStepPostambleL();
- static void SetSimTsyTestNumberL(TInt aTestNumber);
-
-protected:
- void InitPhoneAndPacketServiceL();
- void DestroyPhoneAndPacketService();
- void EtelRequest(TEtelRequestType aCommand, TInt aNewValue);
- TInt iTestNumber;
-
- /** Used as the interface between the thread running the active objects and the test execute thread.
- Contains the data passed to/from Input requests */
- CInputRequestListener *iListener;
- /** Set to true when testing Etel driver, and as such the test FSM interface it used to interact with Etel driver
- and set to false when the real FSM is used */
- TBool iUseTestPdpFsmInterface;
- /** The thread used to run the SPUD FSM and SPUD TEL active objects */
- RThread iActiveSchedulerThread;
-
- /** Etel parameters that can be used in test steps */
- RTelServer iTelServer;
- RPhone iPhone;
- RPacketService iPacketService;
- RPacketContext iPrimaryPacketContext, iSecondaryPacketContext;
- };
-
-/** Contains methods for SPUD TEL tests */
-class CSpudTelUnitTestStepBase : public CSpudUnitTestStepBase
- {
-public:
- CSpudTelUnitTestStepBase(TInt aTestNumber);
-
-protected:
- void EtelDriverInputRequest(TContextId aPdpId, EtelDriver::TEtelInput aOperation);
- void CancelPdpRequest(TContextId aPdpId);
- void WaitForEtelDriverInputResponse(TContextId aPdpId, PdpFsm::TEtelSignal aSignal, TInt aError=KErrNone);
-
- void WaitForNextContextConfigNotification(TContextId aPdpId, const RPacketContext::TContextConfigGPRS& aContextConfigGPRS);
- void WaitForGivenEtelContextStatusNotification(TContextId aPdpId, RPacketContext::TContextStatus aContextStatus);
-
- void WaitForNextQosNotification(TContextId aPdpId, const RPacketQoS::TQoSR99_R4Negotiated& aQoSR99_R4Negotiated);
-
- void WaitForNextServiceNotificationStatus(RPacketService::TStatus aServiceStatus);
- void WaitForEtelDriverSetDataChannel(TContextId aPdpId, RPacketContext::TDataChannelV2 aDataChannelV2);
- };
-
-/** Contains methods for SPUD FSM tests */
-class CSpudFsmUnitTestStepBase : public CSpudUnitTestStepBase
- {
-public:
- CSpudFsmUnitTestStepBase(TInt aTestNumber);
-
-protected:
- void FsmInputRequest(TContextId aPdpId, TInt aOperation, TInt aParam);
- void WaitForFsmInputResponse(TInt aPdpId, TInt aEvent, TInt aParam);
-
- void FsmObjectCreate(TContextId aPdpId);
- void WaitForFsmObjectCreateResponse(TInt aPdpId);
-
- void WaitForFsmSuspendedNotification(TContextId aPdpId);
- void WaitForFsmResumedNotification(TContextId aPdpId);
- void WaitForFsmServiceNotificationStatus();
- void WaitForFsmContextConfigNotification(TContextId aPdpId, const RPacketContext::TContextConfigGPRS& aContextConfig);
-
- void WaitForFsmQosChangeNotification(TContextId aPdpId, const RPacketQoS::TQoSR99_R4Negotiated& aQosParams);
-
- void WaitForGivenContextStatus(RPacketContext& aPacketContext, RPacketContext::TContextStatus aStatus);
- };
-
-/*
- Declarations for SPUD TEL unit tests - they all implement constructors, destructors and override doTestStep()
- */
-
-#define DEFINE_SPUD_TEL_UNIT_TEST_CLASS(state) class CSpudTelUnit##state : public CSpudTelUnitTestStepBase \
- { \
-public: \
- CSpudTelUnit##state(); \
- ~CSpudTelUnit##state(); \
- virtual TVerdict doTestStepL(); \
- };
-
-DEFINE_SPUD_TEL_UNIT_TEST_CLASS(NormalOperation)
-DEFINE_SPUD_TEL_UNIT_TEST_CLASS(Notifications)
-DEFINE_SPUD_TEL_UNIT_TEST_CLASS(CreatePrimaryError)
-DEFINE_SPUD_TEL_UNIT_TEST_CLASS(SetQosError)
-DEFINE_SPUD_TEL_UNIT_TEST_CLASS(SetTftError)
-DEFINE_SPUD_TEL_UNIT_TEST_CLASS(ActivateError1)
-DEFINE_SPUD_TEL_UNIT_TEST_CLASS(ActivateError2)
-DEFINE_SPUD_TEL_UNIT_TEST_CLASS(DeleteError1)
-DEFINE_SPUD_TEL_UNIT_TEST_CLASS(DeleteError2)
-DEFINE_SPUD_TEL_UNIT_TEST_CLASS(MultipleContexts)
-DEFINE_SPUD_TEL_UNIT_TEST_CLASS(Cancel)
-
-/*
- Declarations for SPUD FSM unit tests - they all implement constructors, destructors and override doTestStep()
- */
-
-#define DEFINE_SPUD_FSM_UNIT_TEST_CLASS(state) class CSpudFsmUnit##state : public CSpudFsmUnitTestStepBase \
-{ \
-public: \
- CSpudFsmUnit##state(); \
- ~CSpudFsmUnit##state(); \
- virtual TVerdict doTestStepL(); \
-};
-
-DEFINE_SPUD_FSM_UNIT_TEST_CLASS(NormalOperation)
-DEFINE_SPUD_FSM_UNIT_TEST_CLASS(CreatePrimaryError1)
-DEFINE_SPUD_FSM_UNIT_TEST_CLASS(CreatePrimaryError2)
-DEFINE_SPUD_FSM_UNIT_TEST_CLASS(CreatePrimaryError3)
-DEFINE_SPUD_FSM_UNIT_TEST_CLASS(SetQosAndTftError)
-DEFINE_SPUD_FSM_UNIT_TEST_CLASS(ChangeQosAndTftError)
-DEFINE_SPUD_FSM_UNIT_TEST_CLASS(Notifications)
-DEFINE_SPUD_FSM_UNIT_TEST_CLASS(NetworkDelete)
-
-/*
- Declarations for test names used by test execute script
- */
-_LIT(KSpudTelUnitNormalOperation,"SpudTelUnitNormalOperation");
-_LIT(KSpudTelUnitNotifications,"SpudTelUnitNotifications");
-_LIT(KSpudTelUnitCreatePrimaryError,"SpudTelUnitCreatePrimaryError");
-_LIT(KSpudTelUnitSetQosError,"SpudTelUnitSetQosError");
-_LIT(KSpudTelUnitSetTftError,"SpudTelUnitSetTftError");
-_LIT(KSpudTelUnitActivateError1,"SpudTelUnitActivateError1");
-_LIT(KSpudTelUnitActivateError2,"SpudTelUnitActivateError2");
-_LIT(KSpudTelUnitDeleteError1,"SpudTelUnitDeleteError1");
-_LIT(KSpudTelUnitDeleteError2,"SpudTelUnitDeleteError2");
-_LIT(KSpudTelUnitMultipleContexts,"SpudTelUnitMultipleContexts");
-_LIT(KSpudTelUnitCancel,"SpudTelUnitCancel");
-_LIT(KSpudFsmUnitNormalOperation,"SpudFsmUnitNormalOperation");
-_LIT(KSpudFsmCreatePrimaryError1,"SpudFsmCreatePrimaryError1");
-_LIT(KSpudFsmCreatePrimaryError2,"SpudFsmCreatePrimaryError2");
-_LIT(KSpudFsmCreatePrimaryError3,"SpudFsmCreatePrimaryError3");
-_LIT(KSpudFsmSetQosAndTftError,"SpudFsmSetQosAndTftError");
-_LIT(KSpudFsmChangeQosAndTftError,"SpudFsmChangeQosAndTftError");
-_LIT(KSpudFsmTestNotifications,"SpudFsmTestNotifications");
-_LIT(KSpudFsmNetworkDelete,"SpudFsmNetworkDelete");
-
-/*
- Declarations for names generated by SIMTSY for different contexts
- */
-_LIT(KFirstPrimaryContextName, "PRIMARY1");
-_LIT(KSecondPrimaryContextName, "PRIMARY2");
-_LIT(KThirdPrimaryContextName, "PRIMARY3");
-_LIT(KFirstSecondaryContextName, "SECONDARY1");
-_LIT(KSecondSecondaryContextName, "SECONDARY2");
-_LIT(KFirstQosName, "PACKET_QOS1");
-
-const TInt KContextId0 = 0;
-const TInt KContextId1 = 1;
-const TInt KContextId2 = 2;
-const TInt KContextId3 = 3;
-
-#endif // SPUD_UNIT_TEST_STEP_H
--- a/telephonyprotocols/umtsgprsscpr/Test/te_spud/scripts/TE_SpudUnitTest.script Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,282 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Secondary PDP-context UMTS Driver unit tests for SpudTel and SpudFsm.
-//
-
-
-RUN_UTILS MkDir c:\simtsy\
-RUN_UTILS MakeReadWrite c:\simtsy\config.txt
-RUN_UTILS MakeReadWrite c:\config.txt
-RUN_UTILS DeleteFile c:\simtsy\config.txt
-RUN_UTILS DeleteFile c:\config.txt
-RUN_UTILS CopyFile z:\TestData\Configs\Spud_config.txt c:\simtsy\config.txt
-RUN_UTILS CopyFile z:\TestData\Configs\Spud_config.txt c:\config.txt
-
-LOAD_SUITE TE_SpudUnit
-
-
-START_TESTCASE NET-UMTS-V1-Spud-0101
-//! @SYMTestCaseID NET-UMTS-V1-Spud-0101
-//! @SYMTestCaseDesc Test all operations on Etel driver under non-failure conditions
-//! @SYMFssID NETWORKING/Spud/Control Plane/Primary PDP Context Creation
-//! @SYMFssID NETWORKING/Spud/Control Plane/Secondary PDP Context Creation
-//! @SYMFssID NETWORKING/Spud/Control Plane/Network initiated PDP Context Modification
-//! @SYMFssID NETWORKING/Spud/Control Plane/MS initiated PDP Context Modification
-//! @SYMFssID NETWORKING/Spud/Control Plane/ PDP Context Deactivation
-//! @SYMTestActions Create primary and secondary contexts, set their QoS and TFTs, test activating them, and test deleting them
-//! @SYMTestExpectedResults Primary context and secondary context are created, with their QoS and TFTs set, and their status is activated. When they are deleted the contexts become deleted.
-//! @SYMTestPriority Critical
-//! @SYMTestStatus Implemented
-//! @SYMTestType UT
-RUN_TEST_STEP 100 TE_SpudUnit SpudTelUnitNormalOperation
-END_TESTCASE NET-UMTS-V1-Spud-0101
-
-START_TESTCASE NET-UMTS-V1-Spud-0102
-//! @SYMTestCaseID NET-UMTS-V1-Spud-0102
-//! @SYMTestCaseDesc Test Etel driver notifications
-//! @SYMFssID NETWORKING/Spud/Control Plane/MS initiated PDP Context Modification
-//! @SYMTestActions Create a context and change its context configuration and QoS parameters
-//! @SYMTestExpectedResults When the context is activated there is a service status change notification, when the context configuration is changed there is a context config change notification, and when the QoS is changed, there is a QoS change notification
-//! @SYMTestPriority Critical
-//! @SYMTestStatus Implemented
-//! @SYMTestType UT
-RUN_TEST_STEP 100 TE_SpudUnit SpudTelUnitNotifications
-END_TESTCASE NET-UMTS-V1-Spud-0102
-
-START_TESTCASE NET-UMTS-V1-Spud-0103
-//! @SYMTestCaseID NET-UMTS-V1-Spud-0103
-//! @SYMTestCaseDesc Test creating a primary context with a SetConfig error
-//! @SYMFssID NETWORKING/Spud/Control Plane/Primary PDP Context Creation
-//! @SYMTestActions Instruct Etel driver to create a primary context
-//! @SYMTestExpectedResults The request completes with an error
-//! @SYMTestPriority Critical
-//! @SYMTestStatus Implemented
-//! @SYMTestType UT
-RUN_TEST_STEP 100 TE_SpudUnit SpudTelUnitCreatePrimaryError
-END_TESTCASE NET-UMTS-V1-Spud-0103
-
-START_TESTCASE NET-UMTS-V1-Spud-0104
-//! @SYMTestCaseID NET-UMTS-V1-Spud-0104
-//! @SYMTestCaseDesc Test an error setting QoS
-//! @SYMFssID NETWORKING/Spud/Control Plane/MS initiated PDP Context Modification
-//! @SYMTestActions Instruct Etel driver to create a primary context and set its QoS
-//! @SYMTestExpectedResults The set QoS request completes with an error
-//! @SYMTestPriority Critical
-//! @SYMTestStatus Implemented
-//! @SYMTestType UT
-RUN_TEST_STEP 100 TE_SpudUnit SpudTelUnitSetQosError
-END_TESTCASE NET-UMTS-V1-Spud-0104
-
-START_TESTCASE NET-UMTS-V1-Spud-0105
-//! @SYMTestCaseID NET-UMTS-V1-Spud-0105
-//! @SYMTestCaseDesc Test an error setting TFT
-//! @SYMFssID NETWORKING/Spud/Control Plane/MS initiated PDP Context Modification
-//! @SYMTestActions Instruct Etel driver to create a primary context and set its TFT
-//! @SYMTestExpectedResults The set TFT request completes with an error
-//! @SYMTestPriority Critical
-//! @SYMTestStatus Implemented
-//! @SYMTestType UT
-RUN_TEST_STEP 100 TE_SpudUnit SpudTelUnitSetTftError
-END_TESTCASE NET-UMTS-V1-Spud-0105
-
-START_TESTCASE NET-UMTS-V1-Spud-0106
-//! @SYMTestCaseID NET-UMTS-V1-Spud-0106
-//! @SYMTestCaseDesc Test an error activating a context
-//! @SYMFssID NETWORKING/Spud/Control Plane/Primary PDP Context Creation
-//! @SYMTestActions Instruct Etel driver to create then activate a primary context
-//! @SYMTestExpectedResults The activation completes with an error
-//! @SYMTestPriority Critical
-//! @SYMTestStatus Implemented
-//! @SYMTestType UT
-RUN_TEST_STEP 100 TE_SpudUnit SpudTelUnitActivateError1
-END_TESTCASE NET-UMTS-V1-Spud-0106
-
-START_TESTCASE NET-UMTS-V1-Spud-0107
-//! @SYMTestCaseID NET-UMTS-V1-Spud-0107
-//! @SYMTestCaseDesc Test an error activating a context
-//! @SYMFssID NETWORKING/Spud/Control Plane/Primary PDP Context Creation
-//! @SYMTestActions Instruct Etel driver to create then activate a primary context
-//! @SYMTestExpectedResults The activation completes with an error
-//! @SYMTestPriority Critical
-//! @SYMTestStatus Implemented
-//! @SYMTestType UT
-RUN_TEST_STEP 100 TE_SpudUnit SpudTelUnitActivateError2
-END_TESTCASE NET-UMTS-V1-Spud-0107
-
-START_TESTCASE NET-UMTS-V1-Spud-0108
-//! @SYMTestCaseID NET-UMTS-V1-Spud-0108
-//! @SYMTestCaseDesc Test deleting a context with a deactivate error
-//! @SYMFssID NETWORKING/Spud/Control Plane/ PDP Context Deactivation
-//! @SYMTestActions Instruct Etel driver to create then activate then delete a primary context
-//! @SYMTestExpectedResults The delete completes with an error, and all resources are still closed
-//! @SYMTestPriority Critical
-//! @SYMTestStatus Implemented
-//! @SYMTestType UT
-RUN_TEST_STEP 100 TE_SpudUnit SpudTelUnitDeleteError1
-END_TESTCASE NET-UMTS-V1-Spud-0108
-
-START_TESTCASE NET-UMTS-V1-Spud-0109
-//! @SYMTestCaseID NET-UMTS-V1-Spud-0109
-//! @SYMTestCaseDesc Test deleting a context with a context delete error
-//! @SYMFssID NETWORKING/Spud/Control Plane/ PDP Context Deactivation
-//! @SYMTestActions Instruct Etel driver to create then activate then delete a primary context
-//! @SYMTestExpectedResults The delete completes with an error, and all resources are still closed
-//! @SYMTestPriority Critical
-//! @SYMTestStatus Implemented
-//! @SYMTestType UT
-RUN_TEST_STEP 100 TE_SpudUnit SpudTelUnitDeleteError2
-END_TESTCASE NET-UMTS-V1-Spud-0109
-
-START_TESTCASE NET-UMTS-V1-Spud-0110
-//! @SYMTestCaseID NET-UMTS-V1-Spud-0110
-//! @SYMTestCaseDesc Test creating multiple primary contexts
-//! @SYMFssID NETWORKING/Spud/Control Plane/Primary PDP Context Creation
-//! @SYMFssID NETWORKING/Spud/Control Plane/Secondary PDP Context Creation
-//! @SYMFssID NETWORKING/Spud/Control Plane/Network initiated PDP Context Modification
-//! @SYMFssID NETWORKING/Spud/Control Plane/MS initiated PDP Context Modification
-//! @SYMFssID NETWORKING/Spud/Control Plane/ PDP Context Deactivation
-//! @SYMTestActions Create 2 primary contexts, create secondary contexts on each of them, set all the contexts' QoS and TFTs, activate the contexts and delete them
-//! @SYMTestExpectedResults All requests are completed successfully
-//! @SYMTestPriority Critical
-//! @SYMTestStatus Implemented
-//! @SYMTestType UT
-RUN_TEST_STEP 100 TE_SpudUnit SpudTelUnitMultipleContexts
-END_TESTCASE NET-UMTS-V1-Spud-0110
-
-START_TESTCASE NET-UMTS-V1-Spud-0111
-//! @SYMTestCaseID NET-UMTS-V1-Spud-0111
-//! @SYMTestCaseDesc Test cancelling all Etel driver actions
-//! @SYMFssID NETWORKING/Spud/Control Plane/Primary PDP Context Creation
-//! @SYMFssID NETWORKING/Spud/Control Plane/Secondary PDP Context Creation
-//! @SYMFssID NETWORKING/Spud/Control Plane/Network initiated PDP Context Modification
-//! @SYMFssID NETWORKING/Spud/Control Plane/MS initiated PDP Context Modification
-//! @SYMFssID NETWORKING/Spud/Control Plane/ PDP Context Deactivation
-//! @SYMTestActions Instruct Etel driver to create a context and cancel the operation. Wait over a second and make sure the request never completed. Do the same for creating secondary context, setting TFT, setting QoS, activating PDP, and deleting PDP
-//! @SYMTestExpectedResults The request never completes
-//! @SYMTestPriority Critical
-//! @SYMTestStatus Implemented
-//! @SYMTestType UT
-RUN_TEST_STEP 100 TE_SpudUnit SpudTelUnitCancel
-END_TESTCASE NET-UMTS-V1-Spud-0111
-
-//
-// SPUD FSM Unit tests
-//
-
-START_TESTCASE NET-UMTS-V1-Spud-0112
-//! @SYMTestCaseID NET-UMTS-V1-Spud-0112
-//! @SYMTestCaseDesc Test all state transitions in the SPUD FSM
-//! @SYMFssID NETWORKING/Spud/Control Plane/Primary PDP Context Creation
-//! @SYMFssID NETWORKING/Spud/Control Plane/Secondary PDP Context Creation
-//! @SYMFssID NETWORKING/Spud/Control Plane/Network initiated PDP Context Modification
-//! @SYMFssID NETWORKING/Spud/Control Plane/MS initiated PDP Context Modification
-//! @SYMFssID NETWORKING/Spud/Control Plane/ PDP Context Deactivation
-//! @SYMTestActions Test creating a primay context before and after the phone is already opened, Test creating secondary context, Test setting QOS on secondary, Test setting TFT on secondary, Test activating secondary, Test network suspending/resuming context, Test SpudMan suspending/resuming context, Test changing TFT, Test changing QOS, Test deleting contexts, Test that we can still use a context that has been deleted
-//! @SYMTestExpectedResults All operations complete successfully
-//! @SYMTestPriority Critical
-//! @SYMTestStatus Implemented
-//! @SYMTestType UT
-RUN_TEST_STEP 100 TE_SpudUnit SpudFsmUnitNormalOperation
-END_TESTCASE NET-UMTS-V1-Spud-0112
-
-START_TESTCASE NET-UMTS-V1-Spud-0113
-//! @SYMTestCaseID NET-UMTS-V1-Spud-0113
-//! @SYMTestCaseDesc Test creating a primary context with an error initialising the context
-//! @SYMFssID NETWORKING/Spud/Control Plane/Primary PDP Context Creation
-//! @SYMTestActions Instruct FSM to create a primary context
-//! @SYMTestExpectedResults The create primary completes with an error
-//! @SYMTestPriority Critical
-//! @SYMTestStatus Implemented
-//! @SYMTestType UT
-RUN_TEST_STEP 100 TE_SpudUnit SpudFsmCreatePrimaryError1
-END_TESTCASE NET-UMTS-V1-Spud-0113
-
-START_TESTCASE NET-UMTS-V1-Spud-0114
-//! @SYMTestCaseID NET-UMTS-V1-Spud-0114
-//! @SYMTestCaseDesc Test creating a primary context with setting QoS
-//! @SYMFssID NETWORKING/Spud/Control Plane/Primary PDP Context Creation
-//! @SYMTestActions Instruct FSM to create a primary context
-//! @SYMTestExpectedResults The create primary completes with an error
-//! @SYMTestPriority Critical
-//! @SYMTestStatus Implemented
-//! @SYMTestType UT
-RUN_TEST_STEP 100 TE_SpudUnit SpudFsmCreatePrimaryError2
-END_TESTCASE NET-UMTS-V1-Spud-0114
-
-START_TESTCASE NET-UMTS-V1-Spud-0115
-//! @SYMTestCaseID NET-UMTS-V1-Spud-0115
-//! @SYMTestCaseDesc Test creating a primary context with an error activating
-//! @SYMFssID NETWORKING/Spud/Control Plane/Primary PDP Context Creation
-//! @SYMTestActions Instruct FSM to create a primary context
-//! @SYMTestExpectedResults The create primary completes with an error
-//! @SYMTestPriority Critical
-//! @SYMTestStatus Implemented
-//! @SYMTestType UT
-RUN_TEST_STEP 100 TE_SpudUnit SpudFsmCreatePrimaryError3
-END_TESTCASE NET-UMTS-V1-Spud-0115
-
-START_TESTCASE NET-UMTS-V1-Spud-0116
-//! @SYMTestCaseID NET-UMTS-V1-Spud-0116
-//! @SYMTestCaseDesc Test error setting QoS, TFT and activating secondary context
-//! @SYMFssID NETWORKING/Spud/Control Plane/Primary PDP Context Creation
-//! @SYMTestActions Instruct FSM to create a primary then secondary context. Instruct FSM to set the secondary context's QoS then TFT, then instruct FSM to activate the secondary context.
-//! @SYMTestExpectedResults The contexts are created successfully. The set QoS, set TFT and activate fail with an error
-//! @SYMTestPriority Critical
-//! @SYMTestStatus Implemented
-//! @SYMTestType UT
-RUN_TEST_STEP 100 TE_SpudUnit SpudFsmSetQosAndTftError
-END_TESTCASE NET-UMTS-V1-Spud-0116
-
-START_TESTCASE NET-UMTS-V1-Spud-0117
-//! @SYMTestCaseID NET-UMTS-V1-Spud-0117
-//! @SYMTestCaseDesc Test error changing QoS and TFT
-//! @SYMFssID NETWORKING/Spud/Control Plane/MS initiated PDP Context Modification
-//! @SYMTestActions Instruct FSM to create a primary then secondary context, then to activate the secondary. Instruct FSM to change the secondary context's QoS then TFT
-//! @SYMTestExpectedResults The contexts are created/activated successfully. The change QoS, and change TFT fail with an error
-//! @SYMTestPriority Critical
-//! @SYMTestStatus Implemented
-//! @SYMTestType UT
-RUN_TEST_STEP 100 TE_SpudUnit SpudFsmChangeQosAndTftError
-END_TESTCASE NET-UMTS-V1-Spud-0117
-
-START_TESTCASE NET-UMTS-V1-Spud-0118
-//! @SYMTestCaseID NET-UMTS-V1-Spud-0118
-//! @SYMTestCaseDesc Test FSM notifications
-//! @SYMFssID NETWORKING/Spud/Control Plane/MS initiated PDP Context Modification
-//! @SYMTestActions Instruct FSM to create a primary context. Call SetConfig on the RPacketContext and SetProfileParameters on its RPacketQoS
-//! @SYMTestExpectedResults Creating the context generates a packet service status change notification. SetConfig generates a context config change notification. SetProfileParameters generates a QoS change notification
-//! @SYMTestPriority Critical
-//! @SYMTestStatus Implemented
-//! @SYMTestType UT
-RUN_TEST_STEP 100 TE_SpudUnit SpudFsmTestNotifications
-END_TESTCASE NET-UMTS-V1-Spud-0118
-
-START_TESTCASE NET-UMTS-V1-Spud-0119
-//! @SYMTestCaseID NET-UMTS-V1-Spud-0119
-//! @SYMFssID NETWORKING/Spud/Control Plane/Network initiated PDP Context Modification
-//! @SYMFssID NETWORKING/Spud/Control Plane/ PDP Context Deactivation
-//! @SYMTestActions Instruct FSM to create a primary context. Trigger a deletion of the context from Etel while the context is activating. Instruct FSM to create another primary context. Trigger a deletion of the context from Etel when the context is open.
-//! @SYMTestExpectedResults Context delete events are generated, and resources associated with the contexts are cleaned up
-//! @SYMTestPriority Critical
-//! @SYMTestStatus Implemented
-//! @SYMTestType UT
-RUN_TEST_STEP 100 TE_SpudUnit SpudFsmNetworkDelete
-END_TESTCASE NET-UMTS-V1-Spud-0119
-
-
-RUN_UTILS MakeReadWrite c:\simtsy\config.txt
-RUN_UTILS MakeReadWrite c:\config.txt
-RUN_UTILS DeleteFile c:\simtsy\config.txt
-RUN_UTILS DeleteFile c:\config.txt
-
--- a/telephonyprotocols/umtsgprsscpr/Test/te_spud/src/ActiveSchedulerThread.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Thread entry point functions for the test framework's thread used to run the active scheduler
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include "InputRequestListener.h"
-#include <in_iface.h>
-#include "reteldriverinput.h"
-#include "ceteldriverfactory.h"
-#include "cpdpfsmfactory.h"
-
-/**
- Creates and starts the active scheduler, and initializes the units under test
- */
-void ActiveSchedulerMainL(CInputRequestListener* aListener, TThreadId aParentThreadId)
- {
- CActiveScheduler *sched = new(ELeave) CActiveScheduler;
- CleanupStack::PushL(sched);
- CActiveScheduler::Install(sched);
-
- aListener->iParentThread.Open(aParentThreadId);
-
- __UHEAP_MARK;
-
- CActiveScheduler::Add(aListener);
-
- aListener->CreateUnitUnderTestL();
-
- // listen for requests from the main test thread
- aListener->Activate();
-
- // notify the test execute thread that we are initialized and ready to handle FSM or Etel driver Input requests
- TRequestStatus *readyStatus = &aListener->iReadyForInputRequest;
- aListener->iParentThread.RequestComplete(readyStatus, KErrNone);
- TRequestStatus *initStatus = &aListener->iThreadInitialized;
- aListener->iParentThread.RequestComplete(initStatus, KErrNone);
-
- CActiveScheduler::Start();
-
- // this could be done in the destructor, but we do it here so that the UHEAP macros work out for this thread
- // (otherwise they would be deleted in the main test thread)
- aListener->DeleteUnitUnderTest();
-
- __UHEAP_MARKEND;
-
- CleanupStack::PopAndDestroy(sched);
-
- // inform the main test thread that this thread is finished and that there are no memory leaks
- TRequestStatus *destuctedStatus = &aListener->iThreadDestructed;
- aListener->iParentThread.RequestComplete(destuctedStatus, KErrNone);
- aListener->iParentThread.Close();
- }
-
-/**
- Create the trap cleanup and calls the main thread f'n
- */
-TInt ActiveSchedulerThread(TAny* aActiveSchedulerParams)
- {
- CTrapCleanup* cleanup = CTrapCleanup::New();
- if(!cleanup)
- {
- return KErrNoMemory;
- }
-
- TActiveSchedulerThreadParams *params = (TActiveSchedulerThreadParams*)aActiveSchedulerParams;
- TRAPD(err, ActiveSchedulerMainL(params->iListener, params->iThreadId));
-
- delete cleanup;
-
- return err;
- }
--- a/telephonyprotocols/umtsgprsscpr/Test/te_spud/src/CPdpFsmInterface.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,754 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Implementation file for the PDP Context Finite State Machine - Equivalent to CPDPFSM.CPP in SpudFsm
-//
-//
-
-/**
- @file
-*/
-
-
-
-
-#include "CPdpFsmInterface.h"
-#include "cpdpfsmfactory.h"
-#include "spudfsmdebuglogger.h"
-
-//-=========================================================
-// Custom methods
-//-=========================================================
-CPdpFsmInterface::CPdpFsmInterface()
-:iPdpFsmFactory(NULL),
- iNetworkStatus(RPacketService::EStatusUnattached),
- iSpudMainInterfaceSet(EFalse)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::()");
- }
-
-CPdpFsmInterface::~CPdpFsmInterface()
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::()");
-
- CPdpFsmInterface::Close();
- delete iPdpFsmFactory;
- }
-
-
-void CPdpFsmInterface::SpudInput (TContextId aPdpId, TInt aNotification, TInt aParam)
- {
- if (iSpudMainInterfaceSet)
- {
- iSpudManInterface.Input(aPdpId, aNotification, aParam);
- }
- else
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::SpudInput(): No SpudMan Interface");
- SPUDFSMVERBOSE_LOG3(_L("CPdpFsmInterface::SpudInput(): [aPdpId=%d] [aNotification=%d] [aParam=%d]"),
- aPdpId, aNotification, aParam);
- }
- }
-
-
-
-
-//-=========================================================
-// MPdpFsmInterface methods
-//-=========================================================
-/** request to open the FSM
-
-@param aSpudManInterface reference to SpudMan interface
-*/
-void CPdpFsmInterface::OpenL(MSpudManInterface * aSpudManInterface, TName& aTsyName)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::OpenL()");
-
- if (aSpudManInterface == NULL)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface - Opened with NULL SpudMan Interface");
- }
- else
- {
- iSpudManInterface.Init(aSpudManInterface);
- iSpudMainInterfaceSet = ETrue;
- }
-
-
- iPdpFsmFactory = CPdpFsmFactory::NewL();
- iPdpFsmFactory->InitL(aTsyName, this);
- }
-
-/** closes the FSM and frees underlying resources
-*/
-void CPdpFsmInterface::Close()
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Close()");
-
- iSpudManInterface.Close ();
-
- if (iPdpFsmFactory)
- {
- iPdpFsmFactory->Close();
- }
- }
-
-
-TInt CPdpFsmInterface::NewFsmContext(TContextId aPdpId)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::NewFsmContext()");
-
- ASSERT(iPdpFsmFactory);
-
- return iPdpFsmFactory->NewFsmContext(aPdpId);
- }
-
-
-/**
- Performs and input action/notification for context ID aPdpId
- If aPdpId is KAllContexts, the notification is sent to every context, unless it is of type EServiceStatusChangeNetwork
-
-@param aPdpId the PDP context ID, 0 to KMaxPdpContexts
-@param aOperation the operation id to perform
-@param aParam extra id for ETelDriver errors
-@return error code for the synchronus patrt of the operation
-*/
-TInt CPdpFsmInterface::Input(TContextId aPdpId, const TInt aOperation, const TInt aParam)
- {
- TInt ret = KErrNone;
-
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Input(aParam)");
-
- ASSERT(iPdpFsmFactory);
-
-
- // Control structure is in order of the most frequent operation first (hopefully)
- //
- if (iPdpFsmFactory->ContextIsValid(aPdpId))
- {
- // We have a valid PDP FSM Context, so go ahead with the operation...
- //
- ret = (iPdpFsmFactory->GetFsmContext(aPdpId))->Input(aOperation, aParam);
-
- // Recovering memory by deleting the Fsm Context
- //
- // Tricky, definitely don't try with 'SpudMan::EContextDelete' it's far too early.
- // You can get a bit further deleting on 'PdpFsm::EContextDeleted' (and 'PdpFsm::EContextDeletedFailed')
- // from TContextDeleteStrategy::NotifyFsm(), but you then find that GuQoS is calling into Spud in order to
- // transfer data from the deleted context to another...
- //
- // Additionally, the spud unit test is expecting to be able to "reuse" deleted contexts...
- }
- else if (aPdpId == KAllContexts)
- {
- TInt err = KErrNone;
-
- // this has to be here to avoid sending it from every context
- //
- if (aOperation == PdpFsm::EServiceStatusChangeNetwork)
- {
- iPdpFsmFactory->SpudInput(KAllContexts, KNetworkStatusEvent, KErrNone);
- }
- else
- {
- for (TContextId i = 0; (i < KMaxPdpContexts) && iPdpFsmFactory->HaveFsmContext(i); i++)
- {
- // Process any current PDP contexts.
-
- err = (iPdpFsmFactory->GetFsmContext(i))->Input(aOperation, aParam);
-
- // See above about trials and tribulations of trying to recover the memory taken by these
- // CPdpFsm objects.
-
- if (err != KErrNone)
- {
- // We return the last error found, ignoring any earlier ones
- //
- ret = err;
- }
- }
- }
- }
- else
- {
- ret = KErrBadHandle;
- }
-
- return ret;
- }
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
-/** Set context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts - 1
-@param aParam - RPacketQoS::TQoSR5Requested data to set
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Set(TContextId aPdpId, const RPacketQoS::TQoSR5Requested& aParam)
-{
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketQoS::TQoSR5Requested)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
- iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
- return KErrNone;
-}
-
-/** Set context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketQoS::TQoSR5Negotiated data to set
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Set(TContextId aPdpId, const RPacketQoS::TQoSR5Negotiated& aParam)
-{
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketQoS::TQoSR5Negotiated)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
-
- iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
- return KErrNone;
-}
-
-#else
-// !SYMBIAN_NETWORKING_UMTSR5
-
-/**
-Set context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketQoS::TQoSR99_R4Requested data to set
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Set(TContextId aPdpId, const RPacketQoS::TQoSR99_R4Requested& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketQoS::TQoSR99_R4Requested)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
-
- iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
- return KErrNone;
- }
-
-/** Set context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketQoS::TQoSR99_R4Negotiated data to set
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Set(TContextId aPdpId, const RPacketQoS::TQoSR99_R4Negotiated& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketQoS::TQoSR99_R4Negotiated)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
-
- iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
-
- return KErrNone;
- }
-
-
-
-#endif
-// SYMBIAN_NETWORKING_UMTSR5
-
-
-
-
-
-/** Set context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - TFTInfo data to set
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Set(TContextId aPdpId, const TTFTInfo& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(TFTInfo)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
- iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
- return KErrNone;
- }
-
-/** Set context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - TFTOperationCode to set to go with the data
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Set(TContextId aPdpId, const TTFTOperationCode& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(TTFTOperationCode)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
- iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
- return KErrNone;
- }
-
-/** Set context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketContext::TDataChannelV2 data to set
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Set(TContextId aPdpId, const RPacketContext::TDataChannelV2& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketContext::TDataChannelV2)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
- iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
- return KErrNone;
- }
-
-
-/** Set context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketContext::TContextStatus data to set
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Set(TContextId aPdpId, const RPacketContext::TContextStatus& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketContext::TContextStatus)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
- iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
- return KErrNone;
- }
-
-/** Set context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketContext::TContextConfigGPRS& data to set
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Set(TContextId aPdpId, const RPacketContext::TContextConfigGPRS& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketContext::TContextConfigGPRS)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
- iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
- return KErrNone;
- }
-
-/** Set network status
-
-@param aParam - RPacketService::TStatus data to set
-*/
-void CPdpFsmInterface::Set(const RPacketService::TStatus aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketService::TStatus)");
-
- ASSERT(iPdpFsmFactory);
-
- iNetworkStatus = aParam;
- }
-
-/** Set ETel termination error and stop context
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aErrorCode - the Etel error code detected on this context
-*/
-void CPdpFsmInterface::SetContextTerminationErrorAndStop(TContextId aPdpId, TInt aErrorCode)
-{
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::SetContextTerminationErrorAndStop(TContextId aPdpId, TInt aErrorCode)");
-
- iSpudManInterface.SetContextTerminationErrorAndStop(aPdpId, aErrorCode);
-
-
-}
-
-
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
-/** Get context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketQoS::TQoSR5Requested data to get
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Get(TContextId aPdpId, RPacketQoS::TQoSR5Requested& aParam) const
-{
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketQos::TQoSR5Requested)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
- iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
- return KErrNone;
-}
-
-/** Get context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts - 1
-@param aParam - RPacketQoS::TQoSR5Negotiated data to get
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Get(TContextId aPdpId, RPacketQoS::TQoSR5Negotiated& aParam) const
-{
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketQoS::TQoSR5Negotiated)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
- iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
- return KErrNone;
-}
-
-#else
-// !SYMBIAN_NETWORKING_UMTSR5
-
-/** Get context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketQoS::TQoSR99_R4Requested data to get
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Get(TContextId aPdpId, RPacketQoS::TQoSR99_R4Requested& aParam) const
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketQos::TQoSRequestedR99_R4)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
- iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
- return KErrNone;
- }
-
-/** Get context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts - 1
-@param aParam - RPacketQoS::TQoSR99_R4Negotiated data to get
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Get(TContextId aPdpId, RPacketQoS::TQoSR99_R4Negotiated& aParam) const
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketQoS::TQoSR99_R4Negotiated)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
- iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
- return KErrNone;
- }
-
-
-#endif
-// SYMBIAN_NETWORKING_UMTSR5
-
-
-
-
-/** Get context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - TTFTInfo data to get
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Get(TContextId aPdpId, TTFTInfo& aParam) const
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(TFTInfo)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
- iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
- return KErrNone;
- }
-
-/** Get context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - TTFTOperationCode for the TFT data
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Get(TContextId aPdpId, TTFTOperationCode& aParam) const
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(TFTInfo)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
- iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
- return KErrNone;
- }
-
-
-/** Get context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketContext::TDataChannelV2 data to set
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Get(TContextId aPdpId, RPacketContext::TDataChannelV2& aParam) const
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketContext::TDataChannelV2)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
- iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
- return KErrNone;
- }
-
-/** Get context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketContext::TContextConfigGPRS data to set
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Get(TContextId aPdpId, RPacketContext::TContextConfigGPRS& aParam) const
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketContext::TContextConfigGPRS)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
- iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
- return KErrNone;
- }
-
-/** Get context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketContext::TContextStatus data to get
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Get(TContextId aPdpId, RPacketContext::TContextStatus& aParam) const
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketContext::TContextStatus)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
- iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
- return KErrNone;
- }
-
-/** Get context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketContext::TContextConfigGPRS data to set
-@return - KErrBadHandle or KErrNone
-*/
-void CPdpFsmInterface::Get(RPacketService::TStatus& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketService::TStatus)");
-
- ASSERT(iPdpFsmFactory);
-
- aParam = iNetworkStatus;
- }
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
-void CPdpFsmInterface::SetIMCNSignalling(TBool/* aImCnSignalling*/)
- {
-
- }
-#endif //SYMBIAN_NETWORKING_UMTSR5
-
-TInt CPdpFsmInterface::GetLastErrorCause(TContextId aPdpId, TInt& aLastErrorCause) const
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::GetLastErrorCause(RPacketContext::GetLastErrorCause)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
-
- iPdpFsmFactory->GetFsmContext(aPdpId)->GetLastErrorCause(aLastErrorCause);
-
- return KErrNone;
- }
-
-/** Get the TsyName
-
-@return - TsyName in a TName
-*/
-const TName& CPdpFsmInterface::TsyName(void)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::TsyName");
-
- ASSERT(iPdpFsmFactory);
-
- return iPdpFsmFactory->TsyName();
- }
-
--- a/telephonyprotocols/umtsgprsscpr/Test/te_spud/src/CompareContextParameters.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,727 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Compares various packet context related structures
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include "CompareContextParameters.h"
-
-/**
- @return ETrue if the TContextInfo parameters match, EFalse if they don't
- */
-TBool CompareContextInfo(const TContextInfo& aFirst, const TContextInfo& aSecond)
- {
- if (aFirst.iContextId != aSecond.iContextId)
- {
- return EFalse;
- }
- if (aFirst.iStatus != aSecond.iStatus)
- {
- return EFalse;
- }
- return ETrue;
- }
-
-/**
- @return ETrue if the RPacketQoS::TBitRate parameters match, EFalse if they don't
- */
-TBool CompareBitRate(const RPacketQoS::TBitRate &aFirst, const RPacketQoS::TBitRate &aSecond)
- {
- if (aFirst.iDownlinkRate != aSecond.iDownlinkRate)
- {
- return EFalse;
- }
- if (aFirst.iUplinkRate != aSecond.iUplinkRate)
- {
- return EFalse;
- }
- return ETrue;
- }
-
-/**
- @return ETrue if the RPacketQoS::TQoSR99_R4Requested parameters match, EFalse if they don't
- */
-TBool CompareUMTSQoSReq(const RPacketQoS::TQoSR99_R4Requested &aFirst, const RPacketQoS::TQoSR99_R4Requested &aSecond)
- {
- if (aFirst.iReqTrafficClass != aSecond.iReqTrafficClass)
- {
- return EFalse;
- }
- if (aFirst.iMinTrafficClass != aSecond.iMinTrafficClass)
- {
- return EFalse;
- }
- if (aFirst.iReqDeliveryOrderReqd != aSecond.iReqDeliveryOrderReqd)
- {
- return EFalse;
- }
- if (aFirst.iMinDeliveryOrderReqd != aSecond.iMinDeliveryOrderReqd)
- {
- return EFalse;
- }
- if (aFirst.iReqDeliverErroneousSDU != aSecond.iReqDeliverErroneousSDU)
- {
- return EFalse;
- }
- if (aFirst.iMinDeliverErroneousSDU != aSecond.iMinDeliverErroneousSDU)
- {
- return EFalse;
- }
- if (aFirst.iReqMaxSDUSize != aSecond.iReqMaxSDUSize)
- {
- return EFalse;
- }
- if (aFirst.iMinAcceptableMaxSDUSize != aSecond.iMinAcceptableMaxSDUSize)
- {
- return EFalse;
- }
- if (!CompareBitRate(aFirst.iReqMaxRate, aSecond.iReqMaxRate))
- {
- return EFalse;
- }
- if (!CompareBitRate(aFirst.iMinAcceptableMaxRate, aSecond.iMinAcceptableMaxRate))
- {
- return EFalse;
- }
- if (aFirst.iReqBER != aSecond.iReqBER)
- {
- return EFalse;
- }
- if (aFirst.iMaxBER != aSecond.iMaxBER)
- {
- return EFalse;
- }
- if (aFirst.iReqSDUErrorRatio != aSecond.iReqSDUErrorRatio)
- {
- return EFalse;
- }
- if (aFirst.iMaxSDUErrorRatio != aSecond.iMaxSDUErrorRatio)
- {
- return EFalse;
- }
- if (aFirst.iReqTrafficHandlingPriority != aSecond.iReqTrafficHandlingPriority)
- {
- return EFalse;
- }
- if (aFirst.iMinTrafficHandlingPriority != aSecond.iMinTrafficHandlingPriority)
- {
- return EFalse;
- }
- if (aFirst.iReqTransferDelay != aSecond.iReqTransferDelay)
- {
- return EFalse;
- }
- if (aFirst.iMaxTransferDelay != aSecond.iMaxTransferDelay)
- {
- return EFalse;
- }
- if (aFirst.iReqGuaranteedRate.iDownlinkRate != aSecond.iReqGuaranteedRate.iDownlinkRate)
- {
- return EFalse;
- }
- if (aFirst.iReqGuaranteedRate.iUplinkRate != aSecond.iReqGuaranteedRate.iUplinkRate)
- {
- return EFalse;
- }
- if (aFirst.iMinGuaranteedRate.iDownlinkRate != aSecond.iMinGuaranteedRate.iDownlinkRate)
- {
- return EFalse;
- }
- if (aFirst.iMinGuaranteedRate.iUplinkRate != aSecond.iMinGuaranteedRate.iUplinkRate)
- {
- return EFalse;
- }
- return ETrue;
- }
-
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
-TBool CompareUMTSQoSReq(const RPacketQoS::TQoSR5Requested &aFirst, const RPacketQoS::TQoSR5Requested &aSecond)
- {
- TBool result = CompareUMTSQoSReq(static_cast<const RPacketQoS::TQoSR99_R4Requested&>(aFirst),
- static_cast<const RPacketQoS::TQoSR99_R4Requested&>(aSecond));
-
- if (!result)
- {
- return EFalse;
- }
-
- if (aFirst.iSignallingIndication != aSecond.iSignallingIndication)
- {
- return EFalse;
- }
-
- if (aFirst.iSourceStatisticsDescriptor != aSecond.iSourceStatisticsDescriptor)
- {
- return EFalse;
- }
-
- return ETrue;
- }
-#endif
-
-
-/**
- @return ETrue if the TContextConfig parameters match, EFalse if they don't
- */
-TBool CompareUMTSQoSReq(const TContextConfig& aFirst, const TContextConfig& aSecond)
- {
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- RPacketQoS::TQoSR5Requested firstUMTSQoSRequest, secondUMTSQoSRequest;
- aFirst.GetUMTSQoSReq(firstUMTSQoSRequest);
- aSecond.GetUMTSQoSReq(secondUMTSQoSRequest);
-
-#else
- RPacketQoS::TQoSR99_R4Requested firstUMTSQoSRequest, secondUMTSQoSRequest;
- aFirst.GetUMTSQoSReq(firstUMTSQoSRequest);
- aSecond.GetUMTSQoSReq(secondUMTSQoSRequest);
-#endif
-
- return CompareUMTSQoSReq(firstUMTSQoSRequest, secondUMTSQoSRequest);
- }
-
-
-
-
-/**
- @return ETrue if the IP address parameters match, EFalse if they don't
- */
-TBool CompareIPAddress(const TUint8* aFirst, const TUint8* aSecond)
- {
- for (TUint i = 0; i < RPacketContext::KIPAddressSize; i++)
- {
- if (aFirst[i] != aSecond[i])
- {
- return EFalse;
- }
- }
- return ETrue;
- }
-
-/**
- @return ETrue if the RPacketContext::TPacketFilterV2 parameters match, EFalse if they don't
- */
-TBool ComparePacketFilterV2(const RPacketContext::TPacketFilterV2 &aFirst, const RPacketContext::TPacketFilterV2 &aSecond)
- {
- if (aFirst.iId != aSecond.iId)
- {
- return EFalse;
- }
- if (aFirst.iEvaluationPrecedenceIndex != aSecond.iEvaluationPrecedenceIndex)
- {
- return EFalse;
- }
- if (!CompareIPAddress((TUint8*)aFirst.iSrcAddr, (TUint8*)aSecond.iSrcAddr))
- {
- return EFalse;
- }
- if (!CompareIPAddress((TUint8*)aFirst.iSrcAddrSubnetMask, (TUint8*)aSecond.iSrcAddrSubnetMask))
- {
- return EFalse;
- }
- if (aFirst.iProtocolNumberOrNextHeader != aSecond.iProtocolNumberOrNextHeader)
- {
- return EFalse;
- }
- if (aFirst.iSrcPortMin != aSecond.iSrcPortMin)
- {
- return EFalse;
- }
- if (aFirst.iSrcPortMax != aSecond.iSrcPortMax)
- {
- return EFalse;
- }
- if (aFirst.iDestPortMin != aSecond.iDestPortMin)
- {
- return EFalse;
- }
- if (aFirst.iDestPortMax != aSecond.iDestPortMax)
- {
- return EFalse;
- }
- if (aFirst.iIPSecSPI != aSecond.iIPSecSPI)
- {
- return EFalse;
- }
- if (aFirst.iTOSorTrafficClass != aSecond.iTOSorTrafficClass)
- {
- return EFalse;
- }
- if (aFirst.iFlowLabel != aSecond.iFlowLabel)
- {
- return EFalse;
- }
- return ETrue;
- }
-
-/**
- @return ETrue if the TTFTInfo parameters match, EFalse if they don't
- */
-TBool CompareTFTInfo(TTFTInfo &aFirst, TTFTInfo &aSecond)
- {
- if (aFirst.FilterCount() != aSecond.FilterCount())
- {
- return EFalse;
- }
-
- for (TUint8 i = 0; i < aFirst.FilterCount(); i++)
- {
- RPacketContext::TPacketFilterV2 firstPacketFilter, secondPacketFilter;
- aFirst.GetPacketFilter(firstPacketFilter);
- aSecond.GetPacketFilter(secondPacketFilter);
- if (!ComparePacketFilterV2(firstPacketFilter, secondPacketFilter))
- {
- return EFalse;
- }
- }
- return ETrue;
- }
-
-/**
- @return ETrue if the TContextConfig parameters match, EFalse if they don't
- */
-TBool CompareTFTInfo(const TContextConfig& aFirst, const TContextConfig& aSecond)
- {
- TTFTInfo firstTFTInfo, secondTFTInfo;
- aFirst.GetTFTInfo(firstTFTInfo);
- aSecond.GetTFTInfo(secondTFTInfo);
- return CompareTFTInfo(firstTFTInfo, secondTFTInfo);
- }
-
-
-/**
- @return ETrue if the RPacketQoS::TQoSR99_R4Negotiated parameters match, EFalse if they don't
- */
-TBool CompareUMTSQoSNeg(const RPacketQoS::TQoSR99_R4Negotiated &aFirst, const RPacketQoS::TQoSR99_R4Negotiated &aSecond)
- {
- if (aFirst.iTrafficClass != aSecond.iTrafficClass)
- {
- return EFalse;
- }
- if (aFirst.iDeliveryOrderReqd != aSecond.iDeliveryOrderReqd)
- {
- return EFalse;
- }
- if (aFirst.iDeliverErroneousSDU != aSecond.iDeliverErroneousSDU)
- {
- return EFalse;
- }
- if (aFirst.iMaxSDUSize != aSecond.iMaxSDUSize)
- {
- return EFalse;
- }
- if (!CompareBitRate(aFirst.iMaxRate, aSecond.iMaxRate))
- {
- return EFalse;
- }
- if (aFirst.iBER != aSecond.iBER)
- {
- return EFalse;
- }
- if (aFirst.iSDUErrorRatio != aSecond.iSDUErrorRatio)
- {
- return EFalse;
- }
- if (aFirst.iTrafficHandlingPriority != aSecond.iTrafficHandlingPriority)
- {
- return EFalse;
- }
- if (aFirst.iTransferDelay != aSecond.iTransferDelay)
- {
- return EFalse;
- }
- if (!CompareBitRate(aFirst.iGuaranteedRate, aSecond.iGuaranteedRate))
- {
- return EFalse;
- }
- return ETrue;
- }
-
-/**
- @return ETrue if the RPacketQoS::TBitRate parameters match, EFalse if they don't
- */
-TBool CompareUMTSQoSNeg(const TContextConfig& aFirst, const TContextConfig& aSecond)
- {
- RPacketQoS::TQoSR99_R4Negotiated firstUMTSQoS, secondUMTSQoS;
- aFirst.GetUMTSQoSNeg(firstUMTSQoS);
- aSecond.GetUMTSQoSNeg(secondUMTSQoS);
- return CompareUMTSQoSNeg(firstUMTSQoS, secondUMTSQoS);
- }
-
-
-
-
-
-/**
- @return ETrue if the RPacketContext::TAuthInfo parameters match, EFalse if they don't
- */
-TBool CompareAuthInfo(const RPacketContext::TAuthInfo &aFirst, const RPacketContext::TAuthInfo &aSecond)
- {
- if (aFirst.iProtocol != aSecond.iProtocol)
- {
- return EFalse;
- }
- if (aFirst.iUsername != aSecond.iUsername)
- {
- return EFalse;
- }
- if (aFirst.iPassword != aSecond.iPassword)
- {
- return EFalse;
- }
- return ETrue;
- }
-
-/**
- @return ETrue if the RPacketContext::TDnsInfoV2 parameters match, EFalse if they don't
- */
-TBool CompareDnsInfoV2(const RPacketContext::TDnsInfoV2 &aFirst, const RPacketContext::TDnsInfoV2 &aSecond)
- {
- if (aFirst.iPrimaryDns != aSecond.iPrimaryDns)
- {
- return EFalse;
- }
- if (aFirst.iSecondaryDns != aSecond.iSecondaryDns)
- {
- return EFalse;
- }
- return ETrue;
- }
-
-/**
- @return ETrue if the RPacketContext::TProtocolConfigOptionV2 parameters match, EFalse if they don't
- */
-TBool CompareProtocolConfigOptionV2(const RPacketContext::TProtocolConfigOptionV2 &aFirst, const RPacketContext::TProtocolConfigOptionV2 &aSecond)
- {
- if (!CompareAuthInfo(aFirst.iAuthInfo, aSecond.iAuthInfo))
- {
- return EFalse;
- }
- if (aFirst.iChallenge != aSecond.iChallenge)
- {
- return EFalse;
- }
- if (aFirst.iResponse != aSecond.iResponse)
- {
- return EFalse;
- }
- if (aFirst.iId != aSecond.iId)
- {
- return EFalse;
- }
- if (!CompareDnsInfoV2(aFirst.iDnsAddresses, aSecond.iDnsAddresses))
- {
- return EFalse;
- }
- if (aFirst.iMiscBuffer != aSecond.iMiscBuffer)
- {
- return EFalse;
- }
- return ETrue;
- }
-
-/**
- @return ETrue if the RPacketContext::TContextConfigGPRS parameters match, EFalse if they don't
- */
-TBool CompareContextConfigGPRS(const RPacketContext::TContextConfigGPRS &aFirst, const RPacketContext::TContextConfigGPRS &aSecond)
- {
- if (aFirst.iPdpType != aSecond.iPdpType)
- {
- return EFalse;
- }
- if (aFirst.iAccessPointName != aSecond.iAccessPointName)
- {
- return EFalse;
- }
- if (aFirst.iPdpAddress != aSecond.iPdpAddress)
- {
- return EFalse;
- }
- if (aFirst.iPdpCompression != aSecond.iPdpCompression)
- {
- return EFalse;
- }
- if (aFirst.iAnonymousAccessReqd != aSecond.iAnonymousAccessReqd)
- {
- return EFalse;
- }
- if (aFirst.iUseEdge != aSecond.iUseEdge)
- {
- return EFalse;
- }
- if (!CompareProtocolConfigOptionV2(aFirst.iProtocolConfigOption, aSecond.iProtocolConfigOption))
- {
- return EFalse;
- }
- if (aFirst.iNWIContext != aSecond.iNWIContext)
- {
- return EFalse;
- }
- return ETrue;
- }
-
-/**
- @return ETrue if the TContextConfig parameters match, EFalse if they don't
- */
-TBool CompareContextConfigGPRS(const TContextConfig& aFirst, const TContextConfig& aSecond)
- {
- RPacketContext::TContextConfigGPRS firstUMTSConfig, secondUMTSConfig;
- aFirst.GetContextConfig(firstUMTSConfig);
- aSecond.GetContextConfig(secondUMTSConfig);
- return CompareContextConfigGPRS(firstUMTSConfig, secondUMTSConfig);
- }
-
-/**
- @return ETrue if the RPacketQoS::TBitRate parameters match, EFalse if they don't
- */
-TBool CompareAccessPointName(const RPacketContext::TGSNAddress &aFirst, const RPacketContext::TGSNAddress &aSecond)
- {
- if (aFirst.Compare(aSecond) == 0)
- {
- return ETrue;
- }
- else
- {
- return EFalse;
- }
- }
-
-/**
- @return ETrue if the TContextConfig parameters match, EFalse if they don't
- */
-TBool CompareAccessPointName(const TContextConfig& aFirst, const TContextConfig& aSecond)
- {
- RPacketContext::TGSNAddress firstAccessPointName, secondAccessPointName;
- aFirst.GetAccessPointName(firstAccessPointName);
- aSecond.GetAccessPointName(secondAccessPointName);
- return CompareAccessPointName(firstAccessPointName, secondAccessPointName);
- }
-
-/**
- @return ETrue if the RPacketContext::TProtocolAddress parameters match, EFalse if they don't
- */
-TBool ComparePdpAddress(const RPacketContext::TProtocolAddress &aFirst, const RPacketContext::TProtocolAddress &aSecond)
- {
- if (aFirst.Compare(aSecond) == 0)
- {
- return ETrue;
- }
- else
- {
- return EFalse;
- }
- }
-
-/**
- @return ETrue if the TContextConfig parameters match, EFalse if they don't
- */
-TBool ComparePdpAddress(const TContextConfig& aFirst, const TContextConfig& aSecond)
- {
- RPacketContext::TProtocolAddress firstPdpAddress, secondPdpAddress;
- aFirst.GetPdpAddress(firstPdpAddress);
- aSecond.GetPdpAddress(secondPdpAddress);
- return ComparePdpAddress(firstPdpAddress, secondPdpAddress);
- }
-
-/**
- @return ETrue if the TContextConfig parameters match, EFalse if they don't
- */
-TBool CompareContextConfig(const TContextConfig& aFirst, const TContextConfig& aSecond)
- {
- if (!CompareUMTSQoSReq(aFirst, aSecond))
- {
- return EFalse;
- }
-
- if (!CompareTFTInfo(aFirst, aSecond))
- {
- return EFalse;
- }
- if (!CompareUMTSQoSNeg(aFirst, aSecond))
- {
- return EFalse;
- }
- if (!CompareContextConfigGPRS(aFirst, aSecond))
- {
- return EFalse;
- }
-
- TUint firstPdpCompression, secondPdpCompression;
- aFirst.GetPdpCompression(firstPdpCompression);
- aSecond.GetPdpCompression(secondPdpCompression);
- if (firstPdpCompression != secondPdpCompression)
- {
- return EFalse;
- }
-
- RPacketContext::TProtocolType firstPdpType, secondPdpType;
- aFirst.GetPdpType(firstPdpType);
- aSecond.GetPdpType(secondPdpType);
- if (firstPdpType != secondPdpType)
- {
- return EFalse;
- }
-
- if (!CompareAccessPointName(aFirst, aSecond))
- {
- return EFalse;
- }
-
- if (!ComparePdpAddress(aFirst, aSecond))
- {
- return EFalse;
- }
-
- return ETrue;
- }
-
-/**
- @return ETrue if the TContextParameters parameters match, EFalse if they don't
- */
-TBool CompareContextParameters(const TContextParameters& aFirst, const TContextParameters& aSecond)
- {
- if (aFirst.iContextType != aSecond.iContextType)
- {
- return EFalse;
- }
-
- if (!CompareContextInfo(aFirst.iContextInfo, aSecond.iContextInfo))
- {
- return EFalse;
- }
-
- if (!CompareContextConfig(aFirst.iContextConfig, aSecond.iContextConfig))
- {
- return EFalse;
- }
-
- if (aFirst.iReasonCode != aSecond.iReasonCode)
- {
- return EFalse;
- }
-
- if (aFirst.iTFTOperationCode != aSecond.iTFTOperationCode)
- {
- return EFalse;
- }
-
- return ETrue;
- }
-
-/**
- @return ETrue if the RPacketContext::TDataChannelV2 parameters match, EFalse if they don't
- */
-TBool CompareDataChannel(const RPacketContext::TDataChannelV2& aFirst, const RPacketContext::TDataChannelV2& aSecond)
- {
- if (aFirst.iCsy.Compare(aSecond.iCsy) != 0)
- {
- return EFalse;
- }
- if (aFirst.iPort.Compare(aSecond.iPort) != 0)
- {
- return EFalse;
- }
- if (aFirst.iChannelId.Compare(aSecond.iChannelId) != 0)
- {
- return EFalse;
- }
- return ETrue;
- }
-
-/**
- @return ETrue if the TTFTInfo parameter matches the TFTs of the packet context aPacketContext, EFalse if they don't
- */
-TBool CompareTFTInfo(TTFTInfo& aTFTInfo, RPacketContext& aPacketContext)
- {
- RPacketContext::TPacketFilterV2 packetFilter;
- RPacketContext::TPacketFilterV2Pckg packetFilterPckg(packetFilter);
- RPacketContext::TPacketFilterV2 expectedTftInfo;
- TRequestStatus status;
- TInt count;
-
- // make sure the count matches up
- aPacketContext.EnumeratePacketFilters(status, count);
- User::WaitForRequest(status);
- if (status != KErrNone)
- {
- return EFalse;
- }
- if (count != aTFTInfo.FilterCount())
- {
- return EFalse;
- }
-
- // The filters indexed by the second parameter of RPacketContext::GetPacketFilterInfo may not be contiguous,
- // so we go through each filter assigned to context aPacketContext and try to find a match in aTFTInfo
- TInt matchingCount = 0;
- for (TUint packetContextIndex = 0; packetContextIndex < KMaxNumberOfPacketFilters; packetContextIndex++)
- {
- TBool foundMatch = EFalse;
- aPacketContext.GetPacketFilterInfo(status, packetContextIndex, packetFilterPckg);
- User::WaitForRequest(status);
- aTFTInfo.SetToFirst();
- for (TInt tftInfoIndex = 0; tftInfoIndex < aTFTInfo.FilterCount() && !foundMatch; tftInfoIndex++)
- {
- aTFTInfo.NextPacketFilter(expectedTftInfo);
- if (ComparePacketFilterV2(packetFilter, expectedTftInfo))
- {
- matchingCount++;
- if (matchingCount == aTFTInfo.FilterCount())
- {
- return ETrue;
- }
- else
- {
- foundMatch = ETrue;
- }
- }
- }
- }
- return EFalse;
- }
-
-/**
- @return ETrue if the context status of context aContext names matches that of aContextStatus, EFalse if they don't
- */
-TBool CompareContextInfo(const RPacketService& aPacketService, const TDesC& aContextName, RPacketContext::TContextStatus aContextStatus)
- {
- TRequestStatus status;
- RPacketService::TContextInfo contextInfo;
- TInt numContexts, dummy;
- aPacketService.EnumerateContexts(status, numContexts, dummy);
- User::WaitForRequest(status);
- for (TInt i = 0; i < numContexts; i++)
- {
- aPacketService.GetContextInfo(status, i, contextInfo);
- User::WaitForRequest(status);
- if (aContextName.Compare(contextInfo.iName) == 0)
- {
- if (status != KErrNone)
- {
- return EFalse;
- }
- if (contextInfo.iStatus != aContextStatus)
- {
- return EFalse;
- }
- return ETrue;
- }
- }
- return EFalse;
- }
--- a/telephonyprotocols/umtsgprsscpr/Test/te_spud/src/DefaultContextParameters.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,281 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Assigns default values to various packet context related structures
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include "DefaultContextParameters.h"
-
-_LIT(KTxtSimTsy,"SIM");
-TName KSimTsyName(KTxtSimTsy);
-TName& SimTsyName()
- {
- return KSimTsyName;
- }
-
-_LIT(apn, "ACME INTERNET PROVIDERS LTD");
-_LIT(protocolAddress, "i-MODE GATEWAY");
-_LIT(username, "USER1");
-_LIT(password, "PASSWORD1");
-_LIT(challenge, "CHALLENGE1");
-_LIT(response, "RESPONSE1");
-_LIT(primaryDNS, "PRIMARYSERVER1");
-_LIT(secondaryDNS, "SECONDARYSERVER1");
-
-void DefaultContextConfigGPRS(RPacketContext::TContextConfigGPRS& aParam)
- {
- aParam.iPdpType = static_cast<RPacketContext::TProtocolType>(1);
- aParam.iAccessPointName.Copy(apn);
- aParam.iPdpAddress.Copy(protocolAddress);
- aParam.iPdpCompression = 1;
- aParam.iAnonymousAccessReqd = static_cast<RPacketContext::TAnonymousAccess>(1);
- aParam.iUseEdge = ETrue;
- aParam.iProtocolConfigOption.iAuthInfo.iProtocol = static_cast<RPacketContext::TAuthProtocol>(1);
- aParam.iProtocolConfigOption.iAuthInfo.iUsername.Copy(username);
- aParam.iProtocolConfigOption.iAuthInfo.iPassword.Copy(password);
- aParam.iProtocolConfigOption.iChallenge.Copy(challenge);
- aParam.iProtocolConfigOption.iResponse.Copy(response);
- aParam.iProtocolConfigOption.iDnsAddresses.iPrimaryDns.Copy(primaryDNS);
- aParam.iProtocolConfigOption.iDnsAddresses.iSecondaryDns.Copy(secondaryDNS);
- aParam.iProtocolConfigOption.iId = 1;
- }
-
-void DefaultQoSR99_R4Requested(RPacketQoS::TQoSR99_R4Requested& aQosRequested)
- {
- aQosRequested.iReqTrafficClass = static_cast<RPacketQoS::TTrafficClass>(2);
- aQosRequested.iMinTrafficClass = static_cast<RPacketQoS::TTrafficClass>(2);
- aQosRequested.iReqDeliveryOrderReqd = static_cast<RPacketQoS::TDeliveryOrder>(2);
- aQosRequested.iMinDeliveryOrderReqd = static_cast<RPacketQoS::TDeliveryOrder>(2);
- aQosRequested.iReqDeliverErroneousSDU = static_cast<RPacketQoS::TErroneousSDUDelivery>(2);
- aQosRequested.iMinDeliverErroneousSDU = static_cast<RPacketQoS::TErroneousSDUDelivery>(2);
- aQosRequested.iReqMaxSDUSize = 2;
- aQosRequested.iMinAcceptableMaxSDUSize = 2;
- aQosRequested.iReqMaxRate.iUplinkRate = 2;
- aQosRequested.iReqMaxRate.iDownlinkRate = 2;
- aQosRequested.iMinGuaranteedRate.iUplinkRate = 2;
- aQosRequested.iMinGuaranteedRate.iDownlinkRate = 2;
- aQosRequested.iReqBER = static_cast<RPacketQoS::TBitErrorRatio>(2);
- aQosRequested.iMaxBER = static_cast<RPacketQoS::TBitErrorRatio>(2);
- aQosRequested.iReqSDUErrorRatio = static_cast<RPacketQoS::TSDUErrorRatio>(2);
- aQosRequested.iMaxSDUErrorRatio = static_cast<RPacketQoS::TSDUErrorRatio>(2);
- aQosRequested.iReqTrafficHandlingPriority = static_cast<RPacketQoS::TTrafficHandlingPriority>(2);
- aQosRequested.iMinTrafficHandlingPriority = static_cast<RPacketQoS::TTrafficHandlingPriority>(2);
- aQosRequested.iReqTransferDelay = 2;
- aQosRequested.iMaxTransferDelay = 2;
- aQosRequested.iReqGuaranteedRate.iUplinkRate = 2;
- aQosRequested.iReqGuaranteedRate.iDownlinkRate = 2;
- aQosRequested.iMinGuaranteedRate.iUplinkRate = 2;
- aQosRequested.iMinGuaranteedRate.iDownlinkRate = 2;
- }
-
-void SecondQoSR99_R4Requested(RPacketQoS::TQoSR99_R4Requested& aQosRequested)
- {
- aQosRequested.iReqTrafficClass = static_cast<RPacketQoS::TTrafficClass>(1);
- aQosRequested.iMinTrafficClass = static_cast<RPacketQoS::TTrafficClass>(1);
- aQosRequested.iReqDeliveryOrderReqd = static_cast<RPacketQoS::TDeliveryOrder>(1);
- aQosRequested.iMinDeliveryOrderReqd = static_cast<RPacketQoS::TDeliveryOrder>(1);
- aQosRequested.iReqDeliverErroneousSDU = static_cast<RPacketQoS::TErroneousSDUDelivery>(1);
- aQosRequested.iMinDeliverErroneousSDU = static_cast<RPacketQoS::TErroneousSDUDelivery>(1);
- aQosRequested.iReqMaxSDUSize = 1;
- aQosRequested.iMinAcceptableMaxSDUSize = 1;
- aQosRequested.iReqMaxRate.iUplinkRate = 1;
- aQosRequested.iReqMaxRate.iDownlinkRate = 1;
- aQosRequested.iMinGuaranteedRate.iUplinkRate = 1;
- aQosRequested.iMinGuaranteedRate.iDownlinkRate = 1;
- aQosRequested.iReqBER = static_cast<RPacketQoS::TBitErrorRatio>(1);
- aQosRequested.iMaxBER = static_cast<RPacketQoS::TBitErrorRatio>(1);
- aQosRequested.iReqSDUErrorRatio = static_cast<RPacketQoS::TSDUErrorRatio>(1);
- aQosRequested.iMaxSDUErrorRatio = static_cast<RPacketQoS::TSDUErrorRatio>(1);
- aQosRequested.iReqTrafficHandlingPriority = static_cast<RPacketQoS::TTrafficHandlingPriority>(1);
- aQosRequested.iMinTrafficHandlingPriority = static_cast<RPacketQoS::TTrafficHandlingPriority>(1);
- aQosRequested.iReqTransferDelay = 1;
- aQosRequested.iMaxTransferDelay = 1;
- aQosRequested.iReqGuaranteedRate.iUplinkRate = 1;
- aQosRequested.iReqGuaranteedRate.iDownlinkRate = 1;
- aQosRequested.iMinGuaranteedRate.iUplinkRate = 1;
- aQosRequested.iMinGuaranteedRate.iDownlinkRate = 1;
- }
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
-void DefaultQoSR5Requested(RPacketQoS::TQoSR5Requested& aQosRequested)
- {
- DefaultQoSR99_R4Requested (aQosRequested);
- aQosRequested.iSignallingIndication = EFalse;
- aQosRequested.iSignallingIndication = RPacketQoS::ESourceStatisticsDescriptorUnknown;
- }
-
-void SecondQoSR5Requested(RPacketQoS::TQoSR5Requested& aQosRequested)
- {
- SecondQoSR99_R4Requested (aQosRequested);
- aQosRequested.iSignallingIndication = EFalse;
- aQosRequested.iSignallingIndication = RPacketQoS::ESourceStatisticsDescriptorUnknown;
- }
-
-#endif
-
-void DefaultQoSR99_R4Negotiated(RPacketQoS::TQoSR99_R4Negotiated& aQosNegotiated)
- {
- aQosNegotiated.iTrafficClass = static_cast<RPacketQoS::TTrafficClass>(1);
- aQosNegotiated.iDeliveryOrderReqd = static_cast<RPacketQoS::TDeliveryOrder>(1);
- aQosNegotiated.iDeliverErroneousSDU = static_cast<RPacketQoS::TErroneousSDUDelivery>(1);
- aQosNegotiated.iMaxSDUSize = 1;
- aQosNegotiated.iBER = static_cast<RPacketQoS::TBitErrorRatio>(1);
- aQosNegotiated.iSDUErrorRatio = static_cast<RPacketQoS::TSDUErrorRatio>(1);
- aQosNegotiated.iTrafficHandlingPriority = static_cast<RPacketQoS::TTrafficHandlingPriority>(1);
- aQosNegotiated.iTransferDelay = 1;
- aQosNegotiated.iGuaranteedRate.iUplinkRate = 1;
- aQosNegotiated.iGuaranteedRate.iDownlinkRate = 1;
- aQosNegotiated.iMaxRate.iUplinkRate = 1;
- aQosNegotiated.iMaxRate.iDownlinkRate = 1;
- }
-
-void SecondQoSR99_R4Negotiated(RPacketQoS::TQoSR99_R4Negotiated& aQosNegotiated)
- {
- aQosNegotiated.iTrafficClass = static_cast<RPacketQoS::TTrafficClass>(2);
- aQosNegotiated.iDeliveryOrderReqd = static_cast<RPacketQoS::TDeliveryOrder>(2);
- aQosNegotiated.iDeliverErroneousSDU = static_cast<RPacketQoS::TErroneousSDUDelivery>(2);
- aQosNegotiated.iMaxSDUSize = 2;
- aQosNegotiated.iBER = static_cast<RPacketQoS::TBitErrorRatio>(2);
- aQosNegotiated.iSDUErrorRatio = static_cast<RPacketQoS::TSDUErrorRatio>(2);
- aQosNegotiated.iTrafficHandlingPriority = static_cast<RPacketQoS::TTrafficHandlingPriority>(2);
- aQosNegotiated.iTransferDelay = 2;
- aQosNegotiated.iGuaranteedRate.iUplinkRate = 2;
- aQosNegotiated.iGuaranteedRate.iDownlinkRate = 2;
- aQosNegotiated.iMaxRate.iUplinkRate = 2;
- aQosNegotiated.iMaxRate.iDownlinkRate = 2;
- }
-
-
-
-
-
-TUint8 defaultSrcAddr[RPacketContext::KIPAddressSize] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 1, 1, 1, 1};
-TUint8 defaultSrcAddrSubnetMask[RPacketContext::KIPAddressSize] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255};
-
-static void DefaultPacketFilter1(RPacketContext::TPacketFilterV2& entry)
- {
- entry.iId = 0;
- entry.iEvaluationPrecedenceIndex = 1;
-
- for (TUint i = 0; i < RPacketContext::KIPAddressSize; i++)
- {
- entry.iSrcAddr[i] = defaultSrcAddr[i];
- entry.iSrcAddrSubnetMask[i] = defaultSrcAddrSubnetMask[i];
- }
- entry.iProtocolNumberOrNextHeader = 1;
- entry.iSrcPortMin = 1;
- entry.iSrcPortMax = 1;
- entry.iDestPortMin = 1;
- entry.iDestPortMax = 1;
- entry.iIPSecSPI = 1;
- entry.iTOSorTrafficClass = 1;
- entry.iFlowLabel = 1;
- }
-
-static void DefaultPacketFilter2(RPacketContext::TPacketFilterV2& entry)
- {
- entry.iId = 1;
- entry.iEvaluationPrecedenceIndex = 2;
-
- for (TUint i = 0; i < RPacketContext::KIPAddressSize; i++)
- {
- entry.iSrcAddr[i] = defaultSrcAddr[i];
- entry.iSrcAddrSubnetMask[i] = defaultSrcAddrSubnetMask[i];
- }
- entry.iProtocolNumberOrNextHeader = 2;
- entry.iSrcPortMin = 2;
- entry.iSrcPortMax = 2;
- entry.iDestPortMin = 2;
- entry.iDestPortMax = 2;
- entry.iIPSecSPI = 2;
- entry.iTOSorTrafficClass = 2;
- entry.iFlowLabel = 2;
- }
-
-static void DefaultPacketFilter3(RPacketContext::TPacketFilterV2& entry)
- {
- entry.iId = 2;
- entry.iEvaluationPrecedenceIndex = 3;
-
- for (TUint i = 0; i < RPacketContext::KIPAddressSize; i++)
- {
- entry.iSrcAddr[i] = defaultSrcAddr[i];
- entry.iSrcAddrSubnetMask[i] = defaultSrcAddrSubnetMask[i];
- }
- entry.iProtocolNumberOrNextHeader = 3;
- entry.iSrcPortMin = 3;
- entry.iSrcPortMax = 3;
- entry.iDestPortMin = 3;
- entry.iDestPortMax = 3;
- entry.iIPSecSPI = 3;
- entry.iTOSorTrafficClass = 3;
- entry.iFlowLabel = 3;
- }
-
-void DefaultTftInfo(TTFTInfo& aTTFTInfo)
- {
- RPacketContext::TPacketFilterV2 entry1, entry2;
-
- DefaultPacketFilter1(entry1);
- DefaultPacketFilter2(entry2);
-
- aTTFTInfo.AddPacketFilter(entry1);
- aTTFTInfo.AddPacketFilter(entry2);
- }
-
-void SecondDefaultTftInfo(TTFTInfo& aTTFTInfo)
- {
- RPacketContext::TPacketFilterV2 entry;
-
- DefaultPacketFilter3(entry);
-
- aTTFTInfo.AddPacketFilter(entry);
- }
-
-void CombinedDefaultTftInfo(TTFTInfo& aTTFTInfo)
- {
- RPacketContext::TPacketFilterV2 entry1, entry2, entry3;
-
- DefaultPacketFilter1(entry1);
- DefaultPacketFilter2(entry2);
- DefaultPacketFilter3(entry3);
-
- aTTFTInfo.AddPacketFilter(entry1);
- aTTFTInfo.AddPacketFilter(entry2);
- aTTFTInfo.AddPacketFilter(entry3);
- }
-
-void DefaultContextStatus(RPacketContext::TContextStatus& aStatus)
- {
- aStatus = RPacketContext::EStatusInactive;
- }
-
-void DefaultServiceStatus(RPacketService::TStatus& aStatus)
- {
- aStatus = RPacketService::EStatusAttached;
- }
-
-_LIT(csy, "SIMTSYLOOPBACK.CSY");
-_LIT(port, "SIMTSYLOOPBACK::0");
-void DefaultDataChannel(RPacketContext::TDataChannelV2& aDataChannel)
- {
- aDataChannel.iCsy = csy;
- aDataChannel.iPort = port;
- aDataChannel.iChannelId = port;
- }
--- a/telephonyprotocols/umtsgprsscpr/Test/te_spud/src/InputRequestListener.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,239 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Implementation of CInputRequestListener
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-
-#include "CPdpFsmInterface.h"
-
-#include "SpudUnitTestServer.h"
-#include "InputRequestListener.h"
-#include <in_iface.h>
-#include "reteldriverinput.h"
-#include "ceteldriverfactory.h"
-#include "cpdpfsmfactory.h"
-#include "DefaultContextParameters.h"
-
-CInputRequestListener* CInputRequestListener::NewL(TBool aUseTestPdpInterface)
- {
- CInputRequestListener *me = new(ELeave) CInputRequestListener(aUseTestPdpInterface);
- CleanupStack::PushL(me);
- me->ConstructL();
- CleanupStack::Pop(me);
- return me;
- }
-
-CInputRequestListener::CInputRequestListener(TBool aUseTestPdpFsmInterface) : CActive(EPriorityStandard), iUseTestPdpFsmInterface(aUseTestPdpFsmInterface)
- {
- iReadyForInputRequest = KRequestPending;
- iThreadDestructed = KRequestPending;
- iThreadInitialized = KRequestPending;
-
- iEtelDriverInputResponseStatus = KRequestPending;
- iEtelDriverConfigGPRSNotificationStatus = KRequestPending;
- iEtelDriverContextStatusNotificationStatus = KRequestPending;
- iEtelDriverQosNotificationStatus = KRequestPending;
- iEtelDriverServiceNotificationStatus = KRequestPending;
-
- iFsmInputResponseStatus = KRequestPending;
- iFsmNetworkStatusStatus = KRequestPending;
- iFsmContextParameterChangeStatus = KRequestPending;
- iFsmContextSuspendedStatus = KRequestPending;
- iFsmContextResumedStatus = KRequestPending;
- iFsmObjectCreateResponse = KRequestPending;
- }
-
-void CInputRequestListener::ConstructL()
- {
- iSpudManInterface = new(ELeave) TSpudManInterfaceTest(*this);
- }
-
-CInputRequestListener::~CInputRequestListener()
- {
- Cancel();
- if (iEtelDriver)
- {
- iEtelDriver->Close();
- delete iEtelDriver;
- iEtelDriver = NULL;
- }
-
- if (iPdpFsmInterfaceTest)
- {
- iPdpFsmInterfaceTest->Close();
- delete iPdpFsmInterfaceTest;
- iPdpFsmInterfaceTest = NULL;
- }
-
- if (iPdpFsmInterface)
- {
- iPdpFsmInterface->Close();
- delete iPdpFsmInterface;
- iPdpFsmInterface = NULL;
- }
- }
-
-void CInputRequestListener::DoCancel()
- {
- iStatus = KErrCancel;
- }
-
-/**
- Wrapper for private method CActive::SetActive()
- */
-void CInputRequestListener::Activate()
- {
- iStatus = KRequestPending;
- SetActive();
- }
-
-/**
- If iStatus was completed with EEtelDriverInputRequest, REtelDriverInput::Input is called with the parameters supplied in iInputData
- If iStatus was completed with EEtelDriverCancelPdpRequest, REtelDriverInput::Cancel is called with the parameters supplied in iEtelDriverCancelRequestData
- If iStatus was completed with EFsmInputRequest, RPdpFsmInterface::Input is called with the parameters supplied in iFsmInputRequestData
- If iStatus was completed with ECleanup, or anything else, the active scheduler is stopped
- */
-void CInputRequestListener::RunL()
- {
- TRequestStatus status = iStatus;
- iStatus = KRequestPending;
-
- if (status == EEtelDriverInputRequest ||
- status == EEtelDriverCancelPdpRequest ||
- status == EFsmInputRequest ||
- status == EFsmObjectCreate)
- {
- switch (status.Int())
- {
- case EEtelDriverInputRequest:
- {
- // the main test thread requested a call to REtelDriverInput::Input
- iEtelDriver->Input(iEtelDriverInputRequestData.iPdpId, iEtelDriverInputRequestData.iOperation); // error
- break;
- }
- case EEtelDriverCancelPdpRequest:
- {
- iEtelDriver->CancelPdp(iEtelDriverCancelRequestPdpId);
- break;
- }
- case EFsmInputRequest:
- {
- iPdpFsmInterface->Input(iFsmInputRequestData.iPdpId, iFsmInputRequestData.iOperation);
- break;
- }
- case EFsmObjectCreate:
- {
- TInt err = iPdpFsmInterface->NewFsmContext(iFsmInputRequestData.iPdpId);
-
- // Reproduce completion as per 'SpudManInterfaceTest::Input()'
- // - since we're not being called asynchronously from EtelPkt
-
- iFsmInputResponseData.iPdpId = iFsmInputRequestData.iPdpId;
-
- TRequestStatus *readyStatus = &iFsmObjectCreateResponse;
- iParentThread.RequestComplete(readyStatus, err);
- break;
- }
- default:
- ASSERT(EFalse);
- }
-
- // we are finished with the iInputData or iControlData parameters, so this signals to the main test thread
- // that this data can be updated with new parameters
- TRequestStatus *readyStatus = &iReadyForInputRequest;
- iParentThread.RequestComplete(readyStatus, KErrNone);
-
- SetActive();
- }
- else
- {
- // the status was ECleanup, or we don't recognize the status, so abort the active scheduler, and the thread will be exited
- CActiveScheduler::Stop();
- }
- }
-
-/**
- Creates the unit under test - the FSM if iUseTestPdpFsmInterface is false, and the EtelDriver otherwise
- */
-void CInputRequestListener::CreateUnitUnderTestL()
- {
- if (iUseTestPdpFsmInterface)
- {
- CreateEtelDriverL();
- }
- else
- {
- CreatePdpFsmL();
- }
- }
-
-/**
- Create and initialize the SPUDTEL
- */
-void CInputRequestListener::CreateEtelDriverL()
- {
- iEtelDriver = NewEtelDriverInputL();
-
- iPdpFsmInterfaceTest = new(ELeave)CPdpFsmInterfaceTest(*this);
-
- iEtelDriver->OpenL(*iPdpFsmInterfaceTest);
- iPdpFsmInterfaceTest->OpenL(NULL, SimTsyName());
-
- for (TContextId i = 0; i < KMaxPdpContexts; i++)
- {
- iEtelDriver->CreatePdpL(i);
- }
- }
-
-/**
- Create and initialize the SPUD FSM
- */
-void CInputRequestListener::CreatePdpFsmL()
- {
- iPdpFsmInterface = new(ELeave)CPdpFsmInterface();
- iPdpFsmInterface->OpenL(iSpudManInterface, SimTsyName());
- }
-
-/**
- Delete and cleanup and resources associated with SPUDTEL and SPUDFSM
- */
-void CInputRequestListener::DeleteUnitUnderTest()
- {
- if (iEtelDriver)
- {
- iEtelDriver->Close();
- delete iEtelDriver;
- iEtelDriver = NULL;
- }
-
- if (iPdpFsmInterfaceTest)
- {
- iPdpFsmInterfaceTest->Close();
- delete iPdpFsmInterfaceTest;
- iPdpFsmInterfaceTest = NULL;
- }
-
- if (iPdpFsmInterface)
- {
- iPdpFsmInterface->Close();
- delete iPdpFsmInterface;
- iPdpFsmInterface = NULL;
- }
- }
--- a/telephonyprotocols/umtsgprsscpr/Test/te_spud/src/PdpFsmInterfaceTest.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,262 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// The implementation of the RPdpFsmInterface for SPUD TEL unit tests
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include "PdpFsmInterfaceTest.h"
-#include "InputRequestListener.h"
-#include "DefaultContextParameters.h"
-#include <etelpckt.h>
-
-
-CPdpFsmInterfaceTest::CPdpFsmInterfaceTest(CInputRequestListener& aListener) : iListener(aListener), iTftOperationCode(KAddFilters)
- {
- DefaultTftInfo(iTftInfo);
- }
-
-const TName& CPdpFsmInterfaceTest::TsyName()
- {
- return SimTsyName();
- }
-
-/**
- Signals to the test execute thread that RPdpFsmInterface::Input has been called
- */
-TInt CPdpFsmInterfaceTest::Input(TContextId aPdpId, const TInt aOperation, const TInt aParam)
- {
- // The aOperation parameters are broken up into those that are notifications and those that aren't
- // Since notifications can happen anytime, separate request status members need to be kept for each one
- // Other input requests happen serially, so only one request can be pending at any time
- TRequestStatus *status = NULL;
- switch (aOperation)
- {
- case PdpFsm::EQoSProfileChangeNetwork:
- status = &iListener.iEtelDriverQosNotificationStatus;
- break;
- case PdpFsm::EConfigGPRSChangeNetwork:
- status = &iListener.iEtelDriverConfigGPRSNotificationStatus;
- break;
- case PdpFsm::EContextStatusChangeNetwork:
- status = &iListener.iEtelDriverContextStatusNotificationStatus;
- break;
- case PdpFsm::EServiceStatusChangeNetwork:
- status = &iListener.iEtelDriverServiceNotificationStatus;
- break;
- default:
- iListener.iEtelDriverInputResponseData.iPdpId = aPdpId;
- iListener.iEtelDriverInputResponseData.iSignal = aOperation;
- status = &iListener.iEtelDriverInputResponseStatus;
- break;
- }
- iListener.iParentThread.RequestComplete(status, aParam);
-
- return KErrNone;
- }
-
-
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
-// Gets just return default values
-TInt CPdpFsmInterfaceTest::Get(TContextId /*aPdpId*/, RPacketQoS::TQoSR5Negotiated& /*aParam*/) const
- {
- ASSERT(EFalse);
- return KErrNone;
- }
-
-TInt CPdpFsmInterfaceTest::Get(TContextId /*aPdpId*/, RPacketQoS::TQoSR5Requested& aQoSR5Requested) const
- {
- DefaultQoSR99_R4Requested(aQoSR5Requested);
- aQoSR5Requested.iSignallingIndication = EFalse;
- aQoSR5Requested.iSourceStatisticsDescriptor = RPacketQoS::ESourceStatisticsDescriptorUnknown;
- return KErrNone;
- }
-
-#else
-// !SYMBIAN_NETWORKING_UMTSR5
-
-// Gets just return default values
-TInt CPdpFsmInterfaceTest::Get(TContextId /*aPdpId*/, RPacketQoS::TQoSR99_R4Negotiated& /*aParam*/) const
- {
- ASSERT(EFalse);
- return KErrNone;
- }
-
-TInt CPdpFsmInterfaceTest::Get(TContextId /*aPdpId*/, RPacketQoS::TQoSR99_R4Requested& aQoSR99_R4Requested) const
- {
- DefaultQoSR99_R4Requested(aQoSR99_R4Requested);
- return KErrNone;
- }
-
-
-#endif
-// SYMBIAN_NETWORKING_UMTSR5
-
-
-
-TInt CPdpFsmInterfaceTest::Get(TContextId /*aPdpId*/, RPacketContext::TContextConfigGPRS& aParam) const
- {
- DefaultContextConfigGPRS(aParam);
- return KErrNone;
- }
-
-TInt CPdpFsmInterfaceTest::Get(TContextId /*aPdpId*/, TTFTOperationCode& aParam) const
- {
- aParam = iTftOperationCode;
- return KErrNone;
- }
-
-TInt CPdpFsmInterfaceTest::Get(TContextId /*aPdpId*/, TTFTInfo& aTFTInfo) const
- {
- aTFTInfo = iTftInfo;
- return KErrNone;
- }
-
-TInt CPdpFsmInterfaceTest::Get(TContextId /*aPdpId*/, RPacketContext::TDataChannelV2& aDataChannelV2) const
- {
- DefaultDataChannel(aDataChannelV2);
- return KErrNone;
- }
-
-TInt CPdpFsmInterfaceTest::Get(TContextId /*aPdpId*/, RPacketContext::TContextStatus& aParam) const
- {
- aParam = RPacketContext::EStatusUnknown;
- return KErrNone;
- }
-
-void CPdpFsmInterfaceTest::Get(RPacketService::TStatus& aParam)
- {
- aParam = RPacketService::EStatusActive;
- }
-
-TInt CPdpFsmInterfaceTest::GetLastErrorCause(TContextId /*aPdpId*/, TInt& /*aLastErrorCause*/) const
- {
- /*Placeholder for unused function*/
- return KErrNone;
- }
-
-/**
- Store the parameters passed to Set to be compared by the test execute thread
- */
-TInt CPdpFsmInterfaceTest::Set(TContextId aPdpId, const RPacketContext::TContextConfigGPRS& aContextConfigGPRS)
- {
- iListener.iNotifyContextConfigData.iPdpId = aPdpId;
- iListener.iNotifyContextConfigData.iContextConfigGPRS = aContextConfigGPRS;
- return KErrNone;
- }
-
-/**
- Store the parameters passed to Set to be compared by the test execute thread
- */
-TInt CPdpFsmInterfaceTest::Set(TContextId aPdpId, const RPacketContext::TContextStatus& aParam)
- {
- iListener.iNotifyContextStatusData.iPdpId = aPdpId;
- iListener.iNotifyContextStatusData.iContextStatus = aParam;
- return KErrNone;
- }
-
-/**
- Store the parameters passed to Set to be compared by the test execute thread
- */
-void CPdpFsmInterfaceTest::Set(const RPacketService::TStatus aServiceStatus)
- {
- iListener.iPacketServiceStatus = aServiceStatus;
- }
-
-/**
- Store the parameters passed to Set to be compared by the test execute thread
- */
-TInt CPdpFsmInterfaceTest::Set(TContextId aPdpId, const RPacketContext::TDataChannelV2& aDataChannelV2)
- {
- iListener.iNotifyContextDataChannelData.iPdpId = aPdpId;
- iListener.iNotifyContextDataChannelData.iDataChannelV2 = aDataChannelV2;
- return KErrNone;
- }
-
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
-/**
- Store the parameters passed to Set to be compared by the test execute thread
- */
-TInt CPdpFsmInterfaceTest::Set(TContextId /*aPdpId*/, const RPacketQoS::TQoSR5Requested& /*aParam*/)
- {
- ASSERT(EFalse);
- return KErrNone;
- }
-
-/**
- Store the parameters passed to Set to be compared by the test execute thread
- */
-TInt CPdpFsmInterfaceTest::Set(const TContextId aPdpId, const RPacketQoS::TQoSR5Negotiated& aQoSR5Negotiated)
- {
- iListener.iNotifyQosNegotiatedData.iPdpId = aPdpId;
- iListener.iNotifyQosNegotiatedData.iNegotiated = aQoSR5Negotiated;
- return KErrNone;
- }
-
-#else
-// !SYMBIAN_NETWORKING_UMTSR5
-
-/**
- Store the parameters passed to Set to be compared by the test execute thread
- */
-TInt CPdpFsmInterfaceTest::Set(TContextId /*aPdpId*/, const RPacketQoS::TQoSR99_R4Requested& /*aParam*/)
- {
- ASSERT(EFalse);
- return KErrNone;
- }
-
-/**
- Store the parameters passed to Set to be compared by the test execute thread
- */
-TInt CPdpFsmInterfaceTest::Set(TContextId aPdpId, const RPacketQoS::TQoSR99_R4Negotiated& aQoSR99_R4Negotiated)
- {
- iListener.iNotifyQosNegotiatedData.iPdpId = aPdpId;
- iListener.iNotifyQosNegotiatedData.iNegotiated = aQoSR99_R4Negotiated;
- return KErrNone;
- }
-
-#endif
-// SYMBIAN_NETWORKING_UMTSR5
-
-
-
-
-/**
- Store the parameters passed to Set to be compared by the test execute thread
- */
-TInt CPdpFsmInterfaceTest::Set(TContextId /*aPdpId*/, const TTFTOperationCode& aParam)
- {
- iTftOperationCode = aParam;
- return KErrNone;
- }
-
-/**
- Store the parameters passed to Set to be compared by the test execute thread
- */
-TInt CPdpFsmInterfaceTest::Set(TContextId /*aPdpId*/, const TTFTInfo& aParam)
- {
- iTftInfo = aParam;
- return KErrNone;
- }
-
-void CPdpFsmInterfaceTest::SetContextTerminationErrorAndStop(TContextId /*aPdpId*/, TInt /*aErrorCode*/)
- {/*Placeholder for unused function*/}
-
-
--- a/telephonyprotocols/umtsgprsscpr/Test/te_spud/src/SpudFsmUnitTestStep.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,818 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Unit tests for SPUD FSM
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include <e32def.h>
-#include <testexecutelog.h>
-
-#include "SpudUnitTestStep.h"
-#include "meteldriverstrategy.h"
-#include "ceteldrivercontext.h"
-#include "CompareContextParameters.h"
-#include "DefaultContextParameters.h"
-
-using namespace EtelDriver;
-
-CSpudFsmUnitNormalOperation::~CSpudFsmUnitNormalOperation()
- {
- }
-
-// configure to use test step 1 from simtsy config file
-CSpudFsmUnitNormalOperation::CSpudFsmUnitNormalOperation() : CSpudFsmUnitTestStepBase(1)
- {
- // Call base class method to set up the human readable name for logging
- SetTestStepName(KSpudFsmUnitNormalOperation);
- }
-
-TVerdict CSpudFsmUnitNormalOperation::doTestStepL()
-/**
- Test normal operation
- This test step goes through all of the states in the SPUD FSM
- */
- {
- INFO_PRINTF1(_L("Starting Spud Driver Test normal operation"));
-
- TRequestStatus status;
- RPacketService::TContextInfo contextInfo;
-
- RPacketQoS::TQoSR99_R4Negotiated qos;
- TQoSR99_R4NegotiatedPckg qosPckg(qos);
- RPacketQoS::TQoSR99_R4Negotiated expectedTestQoSR99_R4Negotiated;
-
- InitPhoneAndPacketServiceL();
-
- // Start by creating all the Spud FSM objects.
- // They have to be created in the test's Active Scheduler Thread
- // (terminology from the test's design document).
- //
- FsmObjectCreate(KContextId0);
- WaitForFsmObjectCreateResponse(KContextId0);
- FsmObjectCreate(KContextId1);
- WaitForFsmObjectCreateResponse(KContextId1);
- FsmObjectCreate(KContextId2);
- WaitForFsmObjectCreateResponse(KContextId2);
-
-
- // Set up context config and QoS parameters
-
- RPacketContext::TContextConfigGPRS contextConfigGPRS;
- DefaultContextConfigGPRS(contextConfigGPRS);
- iListener->iPdpFsmInterface->Set(KContextId0, contextConfigGPRS);
- iListener->iPdpFsmInterface->Set(KContextId1, contextConfigGPRS);
- iListener->iPdpFsmInterface->Set(KContextId2, contextConfigGPRS);
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- RPacketQoS::TQoSR5Requested qosRequested;
- DefaultQoSR5Requested(qosRequested);
-#else
- RPacketQoS::TQoSR99_R4Requested qosRequested;
- DefaultQoSR99_R4Requested(qosRequested);
-#endif
-
- iListener->iPdpFsmInterface->Set(KContextId0, qosRequested);
- iListener->iPdpFsmInterface->Set(KContextId1, qosRequested);
- iListener->iPdpFsmInterface->Set(KContextId2, qosRequested);
-
-
- //
- // Test creating first primary context
- // This tests state transitions:
- // Initialised -> OpeningPhone -> CreatingPrimary -> SettingQoSPrimary -> ActivatingPrimary -> Open
- //
- INFO_PRINTF1(_L("Test creating first primary context"));
- FsmInputRequest(KContextId0, SpudMan::ECreatePrimaryPDPContext, 0);
- WaitForFsmInputResponse(KContextId0, KPrimaryContextCreated, 0);
- // Check that the context was created
- TEST(iPrimaryPacketContext.OpenExistingContext(iPacketService, KFirstPrimaryContextName) == KErrNone);
- // Check that the QoS was created for the primary context
- RPacketQoS primaryPacketQos;
- TEST(primaryPacketQos.OpenExistingQoS(iPrimaryPacketContext, KFirstQosName) == KErrNone);
-
- // Check that the QoS parameters were set
- primaryPacketQos.GetProfileParameters(status, qosPckg);
- User::WaitForRequest(status);
- SecondQoSR99_R4Negotiated(expectedTestQoSR99_R4Negotiated);
- TEST(CompareUMTSQoSNeg(expectedTestQoSR99_R4Negotiated, qos));
-
- //
- // Test creating second primary context - since the phone is already open, there is no transition to OpeningPhone state
- // This tests state transitions:
- // Initialised -> CreatingPrimary -> SettingQoSPrimary -> ActivatingPrimary -> Open
- //
- INFO_PRINTF1(_L("Test creating second primary context"));
- FsmInputRequest(KContextId1, SpudMan::ECreatePrimaryPDPContext, 0);
- WaitForFsmInputResponse(KContextId1, KPrimaryContextCreated, 0);
- RPacketContext secondPrimaryContext;
- // Test that the context was created
- TEST(secondPrimaryContext.OpenExistingContext(iPacketService, KSecondPrimaryContextName) == KErrNone);
-
-
- //
- // Test creating secondary context
- // This tests state transitions:
- // Initialised -> CreatingSecondary -> CreatedSecondary
- //
- INFO_PRINTF1(_L("Test creating secondary contexts"));
- FsmInputRequest(KContextId2, SpudMan::ECreateSecondaryPDPContext, 0);
- WaitForFsmInputResponse(KContextId2, KSecondaryContextCreated, 0);
- // Test that the context was created
- TEST(iSecondaryPacketContext.OpenExistingContext(iPacketService, KFirstSecondaryContextName) == KErrNone);
-
-
- //
- // Test setting QOS on secondary
- // This tests state transitions:
- // CreatedSecondary -> SettingQoS -> CreatedSecondary
- //
- INFO_PRINTF1(_L("Test setting QoS on secondary context"));
- FsmInputRequest(KContextId2, SpudMan::EContextQoSSet, 0);
- WaitForFsmInputResponse(KContextId2, KContextQoSSetEvent, 0);
- // Check that the QoS was created for the secondary
- RPacketQoS secondaryPacketQos;
- TEST(secondaryPacketQos.OpenExistingQoS(iSecondaryPacketContext, KFirstQosName) == KErrNone);
-
- // Check that the QoS parameters were set
- secondaryPacketQos.GetProfileParameters(status, qosPckg);
- User::WaitForRequest(status);
- SecondQoSR99_R4Negotiated(expectedTestQoSR99_R4Negotiated);
- TEST(CompareUMTSQoSNeg(expectedTestQoSR99_R4Negotiated, qos));
-
- //
- // Test setting TFT on secondary
- // This tests state transitions:
- // CreatedSecondary -> SettingTFT -> CreatedSecondary
- //
- INFO_PRINTF1(_L("Test setting TFT on secondary context"));
- TTFTOperationCode tftOperationCode = KAddFilters;
- iListener->iPdpFsmInterface->Set(KContextId2, tftOperationCode);
- TTFTInfo tftInfo;
- DefaultTftInfo(tftInfo);
- iListener->iPdpFsmInterface->Set(KContextId2, tftInfo);
- FsmInputRequest(KContextId2, SpudMan::EContextTFTModify, 0);
- WaitForFsmInputResponse(KContextId2, KContextTFTModifiedEvent, 0);
- // check that TFT was set correctly
- TEST(CompareTFTInfo(tftInfo, iSecondaryPacketContext));
-
-
- //
- // Test activating secondary
- // This tests state transitions:
- // CreatedSecondary -> ActivatingSecondary -> Open
- //
- INFO_PRINTF1(_L("Test activating secondary context"));
- FsmInputRequest(KContextId2, SpudMan::EContextActivate, 0);
- WaitForFsmInputResponse(KContextId2, KContextActivateEvent, 0);
- // Check that the context is active
- iPacketService.GetContextInfo(status, KContextId2, contextInfo);
- User::WaitForRequest(status);
- TEST(status == KErrNone && contextInfo.iStatus == RPacketContext::EStatusActive);
-
-
- INFO_PRINTF1(_L("Test Retrieving Negotiated QoSt"));
- FsmInputRequest(KContextId2, SpudMan::EGetNegQoS, 0);
- WaitForFsmInputResponse(KContextId2, KGetNegQoSEvent, 0);
-
-
- //
- // Test network suspending/resuming context
- // This tests state transitions:
- // Open -> Suspend -> Open
- //
- INFO_PRINTF1(_L("Test network suspend/resume context"));
- EtelRequest(EContextStatusChange, 0);
- WaitForFsmSuspendedNotification(KContextId0);
-
- EtelRequest(EContextStatusChange, 1);
- WaitForFsmResumedNotification(KContextId0);
-
-
- //
- // Test SpudMan suspending/resuming context
- // This tests state transitions:
- // Open -> Suspend -> Open
- //
- INFO_PRINTF1(_L("Test SpudMan suspend/resume context"));
- FsmInputRequest(KContextId0, SpudMan::ESuspend, 0);
- WaitForFsmSuspendedNotification(KContextId0);
-
- FsmInputRequest(KContextId0, SpudMan::EResume, 0);
- WaitForFsmResumedNotification(KContextId0);
-
-
- //
- // Test changing TFT
- // This tests state transitions:
- // Open -> ChangingTFT -> Open
- //
- INFO_PRINTF1(_L("Test changing TFT"));
- TTFTInfo secondTftInfo;
- SecondDefaultTftInfo(secondTftInfo);
- iListener->iPdpFsmInterface->Set(KContextId2, KAddFilters);
- iListener->iPdpFsmInterface->Set(KContextId2, secondTftInfo);
- // The second TFT should be added to the existing TFT
- FsmInputRequest(KContextId2, SpudMan::EContextTFTModify, 0);
- WaitForFsmInputResponse(KContextId2, KContextTFTModifiedEvent, 0);
- // check that TFT was changed
- TTFTInfo combinedTftInfo;
- CombinedDefaultTftInfo(combinedTftInfo);
- TEST(CompareTFTInfo(combinedTftInfo, iSecondaryPacketContext));
-
-
- //
- // Test changing QOS
- // This tests state transitions:
- // Open -> ChangingQoS -> Open
- //
- INFO_PRINTF1(_L("Test changing QoS"));
-
- SecondQoSR99_R4Requested(qosRequested);
-
- iListener->iPdpFsmInterface->Set(KContextId0, qosRequested);
- FsmInputRequest(KContextId0, SpudMan::EContextQoSSet, 0);
- WaitForFsmInputResponse(KContextId0, KContextQoSSetEvent, 0);
-
- // check that QOS was changed
- DefaultQoSR99_R4Negotiated(expectedTestQoSR99_R4Negotiated);
- primaryPacketQos.GetProfileParameters(status, qosPckg);
- User::WaitForRequest(status);
- TEST(CompareUMTSQoSNeg(expectedTestQoSR99_R4Negotiated, qos));
-
- //
- // Test modifying active
- // This tests state transitions:
- // Open -> ModifyingActive -> Open
- //
- INFO_PRINTF1(_L("Test modifying active context"));
- FsmInputRequest(KContextId0, SpudMan::EContextModifyActive, 0);
- WaitForFsmInputResponse(KContextId0, KContextModifyActiveEvent, 0);
-
-
- secondaryPacketQos.Close();
- primaryPacketQos.Close();
- iSecondaryPacketContext.Close();
- secondPrimaryContext.Close();
- iPrimaryPacketContext.Close();
-
-
- //
- // Test deleting contexts
- // This tests state transitions:
- // Open -> Closing -> Initialised
- //
- INFO_PRINTF1(_L("Test deleting contexts"));
- for (TContextId deleteIndex = 0; deleteIndex < 3; deleteIndex++)
- {
- FsmInputRequest(deleteIndex, SpudMan::EContextDelete, 0);
- WaitForFsmInputResponse(deleteIndex, KContextDeleteEvent, 0);
- }
- // Check that the contexts were deleted
- for (TInt contextInfoIndex = 0; contextInfoIndex < 3; contextInfoIndex++)
- {
- iPacketService.GetContextInfo(status, contextInfoIndex, contextInfo);
- User::WaitForRequest(status);
- TEST(status == KErrNone && contextInfo.iStatus == RPacketContext::EStatusDeleted);
- }
-
-
- //
- // Test that we can still use a context that has been deleted
- //
- INFO_PRINTF1(_L("Test re-using deleted contexts"));
- FsmInputRequest(KContextId0, SpudMan::ECreatePrimaryPDPContext, 0);
- WaitForFsmInputResponse(KContextId0, KPrimaryContextCreated, 0);
- // Test that the context was created
- TEST(iPrimaryPacketContext.OpenExistingContext(iPacketService, KThirdPrimaryContextName) == KErrNone);
-
- // Clean-up
- iPrimaryPacketContext.Close();
- FsmInputRequest(KContextId0, SpudMan::EContextDelete, 0);
- WaitForFsmInputResponse(KContextId0, KContextDeleteEvent, 0);
-
- DestroyPhoneAndPacketService();
-
- return TestStepResult();
- }
-
-CSpudFsmUnitCreatePrimaryError1::~CSpudFsmUnitCreatePrimaryError1()
- {}
-
-// configure to use test step 102 from simtsy config file
-CSpudFsmUnitCreatePrimaryError1::CSpudFsmUnitCreatePrimaryError1() : CSpudFsmUnitTestStepBase(102)
- {
- // Call base class method to set up the human readable name for logging
- SetTestStepName(KSpudFsmCreatePrimaryError1);
- }
-
-TVerdict CSpudFsmUnitCreatePrimaryError1::doTestStepL()
-/**
- Test errors creating primary context
- */
- {
- INFO_PRINTF1(_L("Starting Spud Driver Unit test error creating primary context 1"));
-
- // Start by creating all the Spud FSM objects.
- // They have to be created in the test's Active Scheduler Thread
- // (terminology from the test's design document).
- //
- FsmObjectCreate(KContextId0);
- WaitForFsmObjectCreateResponse(KContextId0);
-
- // Set up context config and QoS parameters
- RPacketContext::TContextConfigGPRS contextConfigGPRS;
- DefaultContextConfigGPRS(contextConfigGPRS);
- iListener->iPdpFsmInterface->Set(KContextId0, contextConfigGPRS);
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- RPacketQoS::TQoSR5Requested qosRequested;
- DefaultQoSR5Requested(qosRequested);
-#else
- RPacketQoS::TQoSR99_R4Requested qosRequested;
- DefaultQoSR99_R4Requested(qosRequested);
-#endif
-
- iListener->iPdpFsmInterface->Set(KContextId0, qosRequested);
-
- // RPacketContext::SetConfig is configured to fail with error KErrGeneral
- FsmInputRequest(KContextId0, SpudMan::ECreatePrimaryPDPContext, 0);
- WaitForFsmInputResponse(KContextId0, KPrimaryContextCreated, KErrGeneral);
-
- InitPhoneAndPacketServiceL();
-
- // The primary context should have been cleaned up after the failure
- TEST(iPrimaryPacketContext.OpenExistingContext(iPacketService, KFirstPrimaryContextName) == KErrNone);
- WaitForGivenContextStatus(iPrimaryPacketContext, RPacketContext::EStatusDeleted);
- iPrimaryPacketContext.Close();
-
- DestroyPhoneAndPacketService();
-
- return TestStepResult();
- }
-
-CSpudFsmUnitCreatePrimaryError2::~CSpudFsmUnitCreatePrimaryError2()
- {}
-
-// configure to use test step 103 from simtsy config file
-CSpudFsmUnitCreatePrimaryError2::CSpudFsmUnitCreatePrimaryError2() : CSpudFsmUnitTestStepBase(103)
- {
- // Call base class method to set up the human readable name for logging
- SetTestStepName(KSpudFsmCreatePrimaryError2);
- }
-
-TVerdict CSpudFsmUnitCreatePrimaryError2::doTestStepL()
-/**
- Test errors setting QOS on primary context
- */
- {
- INFO_PRINTF1(_L("Starting Spud Driver Unit test error creating primary context 2"));
-
- // Start by creating all the Spud FSM objects.
- // They have to be created in the test's Active Scheduler Thread
- // (terminology from the test's design document).
- //
- FsmObjectCreate(KContextId0);
- WaitForFsmObjectCreateResponse(KContextId0);
-
- // Set up context config and QoS parameters
- RPacketContext::TContextConfigGPRS contextConfigGPRS;
- DefaultContextConfigGPRS(contextConfigGPRS);
- iListener->iPdpFsmInterface->Set(KContextId0, contextConfigGPRS);
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- RPacketQoS::TQoSR5Requested qosRequested;
- DefaultQoSR5Requested(qosRequested);
-#else
- RPacketQoS::TQoSR99_R4Requested qosRequested;
- DefaultQoSR99_R4Requested(qosRequested);
-#endif
-
- iListener->iPdpFsmInterface->Set(KContextId0, qosRequested);
-
- // RPacketQoS::SetProfileParameters is configured to fail
- FsmInputRequest(KContextId0, SpudMan::ECreatePrimaryPDPContext, 0);
- WaitForFsmInputResponse(KContextId0, KPrimaryContextCreated, KErrGeneral);
-
- InitPhoneAndPacketServiceL();
-
- // The primary context should be cleaned up after the failure
- TEST(iPrimaryPacketContext.OpenExistingContext(iPacketService, KFirstPrimaryContextName) == KErrNone);
- WaitForGivenContextStatus(iPrimaryPacketContext, RPacketContext::EStatusDeleted);
- iPrimaryPacketContext.Close();
-
- DestroyPhoneAndPacketService();
-
- return TestStepResult();
- }
-
-CSpudFsmUnitCreatePrimaryError3::~CSpudFsmUnitCreatePrimaryError3()
- {}
-
-// configure to use test step 104 from simtsy config file
-CSpudFsmUnitCreatePrimaryError3::CSpudFsmUnitCreatePrimaryError3() : CSpudFsmUnitTestStepBase(104)
- {
- // Call base class method to set up the human readable name for logging
- SetTestStepName(KSpudFsmCreatePrimaryError3);
- }
-
-TVerdict CSpudFsmUnitCreatePrimaryError3::doTestStepL()
-/**
- Test errors activating primary context
- */
- {
- INFO_PRINTF1(_L("Starting Spud Driver Unit test error creating primary context 3"));
-
- // Start by creating all the Spud FSM objects.
- // They have to be created in the test's Active Scheduler Thread
- // (terminology from the test's design document).
- //
- FsmObjectCreate(KContextId0);
- WaitForFsmObjectCreateResponse(KContextId0);
-
- // Set up context config and QoS parameters
- RPacketContext::TContextConfigGPRS contextConfigGPRS;
- DefaultContextConfigGPRS(contextConfigGPRS);
- iListener->iPdpFsmInterface->Set(KContextId0, contextConfigGPRS);
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- RPacketQoS::TQoSR5Requested qosRequested;
- DefaultQoSR5Requested(qosRequested);
-#else
- RPacketQoS::TQoSR99_R4Requested qosRequested;
- DefaultQoSR99_R4Requested(qosRequested);
-#endif
-
- iListener->iPdpFsmInterface->Set(KContextId0, qosRequested);
-
- // Activiating the context is configured to fail with KErrGeneral
- FsmInputRequest(KContextId0, SpudMan::ECreatePrimaryPDPContext, 0);
- WaitForFsmInputResponse(KContextId0, KPrimaryContextCreated, KErrGeneral);
-
- InitPhoneAndPacketServiceL();
-
- // The primary context should have been cleaned up after the failure
- TEST(iPrimaryPacketContext.OpenExistingContext(iPacketService, KFirstPrimaryContextName) == KErrNone);
- WaitForGivenContextStatus(iPrimaryPacketContext, RPacketContext::EStatusDeleted);
- iPrimaryPacketContext.Close();
-
- DestroyPhoneAndPacketService();
-
- return TestStepResult();
- }
-
-CSpudFsmUnitSetQosAndTftError::~CSpudFsmUnitSetQosAndTftError()
- {}
-
-// configure to use test step 106 from simtsy config file
-CSpudFsmUnitSetQosAndTftError::CSpudFsmUnitSetQosAndTftError() : CSpudFsmUnitTestStepBase(106)
- {
- // Call base class method to set up the human readable name for logging
- SetTestStepName(KSpudFsmSetQosAndTftError);
- }
-
-TVerdict CSpudFsmUnitSetQosAndTftError::doTestStepL()
-/**
- Test errors setting QoS and setting TFT and activating secondary
- */
- {
- INFO_PRINTF1(_L("Starting Spud Driver Unit test error creating QOS, setting TFT and activating"));
-
- // Start by creating all the Spud FSM objects.
- // They have to be created in the test's Active Scheduler Thread
- // (terminology from the test's design document).
- //
- FsmObjectCreate(KContextId0);
- WaitForFsmObjectCreateResponse(KContextId0);
- FsmObjectCreate(KContextId1);
- WaitForFsmObjectCreateResponse(KContextId1);
-
- // Set up context config and QoS parameters
- RPacketContext::TContextConfigGPRS contextConfigGPRS;
- DefaultContextConfigGPRS(contextConfigGPRS);
- iListener->iPdpFsmInterface->Set(KContextId0, contextConfigGPRS);
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- RPacketQoS::TQoSR5Requested qosRequested;
- DefaultQoSR5Requested(qosRequested);
-#else
- RPacketQoS::TQoSR99_R4Requested qosRequested;
- DefaultQoSR99_R4Requested(qosRequested);
-#endif
-
- iListener->iPdpFsmInterface->Set(KContextId0, qosRequested);
-
- // Test creating primary
- FsmInputRequest(KContextId0, SpudMan::ECreatePrimaryPDPContext, 0);
- WaitForFsmInputResponse(KContextId0, KPrimaryContextCreated, KErrNone);
-
- // Test creating secondary
- FsmInputRequest(KContextId1, SpudMan::ECreateSecondaryPDPContext, 0);
- WaitForFsmInputResponse(KContextId1, KSecondaryContextCreated, KErrNone);
-
- // RPacketQoS::SetProfileParameters is configured to fail for the secondary context
- iListener->iPdpFsmInterface->Set(KContextId1, qosRequested);
- FsmInputRequest(KContextId1, SpudMan::EContextQoSSet, 0);
- WaitForFsmInputResponse(KContextId1, KContextQoSSetEvent, KErrGeneral);
-
- // RPacketQoS::CreateNewTFT is configured to fail with KErrGeneral for the secondary context
- TTFTOperationCode tftOperationCode = KAddFilters;
- iListener->iPdpFsmInterface->Set(KContextId1, tftOperationCode);
- TTFTInfo tftInfo;
- DefaultTftInfo(tftInfo);
- iListener->iPdpFsmInterface->Set(KContextId1, tftInfo);
- FsmInputRequest(KContextId1, SpudMan::EContextTFTModify, 0);
- WaitForFsmInputResponse(KContextId1, KContextTFTModifiedEvent, KErrGeneral);
-
- // Activating the secondary context is configured to fail with KErrGeneral
- FsmInputRequest(KContextId1, SpudMan::EContextActivate, 0);
- WaitForFsmInputResponse(KContextId1, KContextActivateEvent, KErrGeneral);
-
- // Clean-up
- FsmInputRequest(KContextId0, SpudMan::EContextDelete, 0);
- WaitForFsmInputResponse(0, KContextDeleteEvent, 0);
-
- FsmInputRequest(KContextId1, SpudMan::EContextDelete, 0);
- WaitForFsmInputResponse(KContextId1, KContextDeleteEvent, 0);
-
- return TestStepResult();
- }
-
-CSpudFsmUnitChangeQosAndTftError::~CSpudFsmUnitChangeQosAndTftError()
- {}
-
-// configure to use test step 107 from simtsy config file
-CSpudFsmUnitChangeQosAndTftError::CSpudFsmUnitChangeQosAndTftError() : CSpudFsmUnitTestStepBase(107)
- {
- // Call base class method to set up the human readable name for logging
- SetTestStepName(KSpudFsmChangeQosAndTftError);
- }
-
-TVerdict CSpudFsmUnitChangeQosAndTftError::doTestStepL()
-/**
- Test errors changing QoS and changing TFT for secondary
- */
- {
- INFO_PRINTF1(_L("Starting Spud Driver Unit test error changing QOS and TFT"));
-
- // Start by creating all the Spud FSM objects.
- // They have to be created in the test's Active Scheduler Thread
- // (terminology from the test's design document).
- //
- FsmObjectCreate(KContextId0);
- WaitForFsmObjectCreateResponse(KContextId0);
- FsmObjectCreate(KContextId1);
- WaitForFsmObjectCreateResponse(KContextId1);
-
- // Set up context config and QoS parameters
- RPacketContext::TContextConfigGPRS contextConfigGPRS;
- DefaultContextConfigGPRS(contextConfigGPRS);
- iListener->iPdpFsmInterface->Set(KContextId0, contextConfigGPRS);
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- RPacketQoS::TQoSR5Requested qosRequested;
- DefaultQoSR5Requested(qosRequested);
-#else
- RPacketQoS::TQoSR99_R4Requested qosRequested;
- DefaultQoSR99_R4Requested(qosRequested);
-#endif
-
- iListener->iPdpFsmInterface->Set(KContextId0, qosRequested);
-
- // Test creating primary
- FsmInputRequest(KContextId0, SpudMan::ECreatePrimaryPDPContext, 0);
- WaitForFsmInputResponse(KContextId0, KPrimaryContextCreated, KErrNone);
-
- // Test creating and activating secondary
- FsmInputRequest(KContextId1, SpudMan::ECreateSecondaryPDPContext, 0);
- WaitForFsmInputResponse(KContextId1, KSecondaryContextCreated, KErrNone);
- FsmInputRequest(KContextId1, SpudMan::EContextActivate, 0);
- WaitForFsmInputResponse(KContextId1, KContextActivateEvent, KErrNone);
-
- FsmInputRequest(KContextId1, SpudMan::EGetNegQoS, 0);
- WaitForFsmInputResponse(KContextId1, KGetNegQoSEvent, KErrNone);
-
-
-
- // RPacketQoS::SetProfileParameters is configured to fail for the secondary context
- FsmInputRequest(KContextId1, SpudMan::EContextQoSSet, 0);
- WaitForFsmInputResponse(KContextId1, KContextQoSSetEvent, KErrGeneral);
-
- // RPacketQoS::CreateNewTFT is configured to fail with KErrGeneral for the secondary context
- TTFTOperationCode tftOperationCode = KAddFilters;
- iListener->iPdpFsmInterface->Set(KContextId1, tftOperationCode);
- TTFTInfo tftInfo;
- DefaultTftInfo(tftInfo);
- iListener->iPdpFsmInterface->Set(KContextId1, tftInfo);
- FsmInputRequest(KContextId1, SpudMan::EContextTFTModify, 0);
- WaitForFsmInputResponse(KContextId1, KContextTFTModifiedEvent, KErrGeneral);
-
- // Because the TFT and QoS have not changed, RPacketContext::ModifyActiveContext will fail
- FsmInputRequest(KContextId1, SpudMan::EContextModifyActive, 0);
- WaitForFsmInputResponse(KContextId1, KContextModifyActiveEvent, KErrNotReady);
-
- // Clean-up
- FsmInputRequest(KContextId0, SpudMan::EContextDelete, 0);
- WaitForFsmInputResponse(KContextId0, KContextDeleteEvent, 0);
-
- FsmInputRequest(KContextId1, SpudMan::EContextDelete, 0);
- WaitForFsmInputResponse(KContextId1, KContextDeleteEvent, 0);
-
- return TestStepResult();
- }
-
-CSpudFsmUnitNotifications::~CSpudFsmUnitNotifications()
- {}
-
-// configure to use test step 1 from simtsy config file
-CSpudFsmUnitNotifications::CSpudFsmUnitNotifications() : CSpudFsmUnitTestStepBase(1)
- {
- // Call base class method to set up the human readable name for logging
- SetTestStepName(KSpudFsmTestNotifications);
- }
-
-TVerdict CSpudFsmUnitNotifications::doTestStepL()
-/**
- Test that notifications are passed from etel driver
- */
- {
- INFO_PRINTF1(_L("Starting Spud Driver Unit test notifications"));
-
- // Start by creating all the Spud FSM objects.
- // They have to be created in the test's Active Scheduler Thread
- // (terminology from the test's design document).
- //
- FsmObjectCreate(KContextId0);
- WaitForFsmObjectCreateResponse(KContextId0);
-
- TRequestStatus status;
-
- // Set up context config and QoS parameters
- RPacketContext::TContextConfigGPRS contextConfigGPRS;
- DefaultContextConfigGPRS(contextConfigGPRS);
- iListener->iPdpFsmInterface->Set(KContextId0, contextConfigGPRS);
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- RPacketQoS::TQoSR5Requested qosRequested;
- DefaultQoSR5Requested(qosRequested);
-#else
- RPacketQoS::TQoSR99_R4Requested qosRequested;
- DefaultQoSR99_R4Requested(qosRequested);
-#endif
-
- iListener->iPdpFsmInterface->Set(KContextId0, qosRequested);
-
- // Test creating primary
- INFO_PRINTF1(_L("Create primary context"));
- FsmInputRequest(KContextId0, SpudMan::ECreatePrimaryPDPContext, 0);
- WaitForFsmInputResponse(KContextId0, KPrimaryContextCreated, KErrNone);
-
- RPacketQoS::TQoSR99_R4Negotiated qosNegotiated;
-
- //
- // Test service status notification
- //
- // Creating/activating a primary context should change the network status
- INFO_PRINTF1(_L("Wait for service status change notification"));
- WaitForFsmServiceNotificationStatus();
-
-
- InitPhoneAndPacketServiceL();
- TEST(iPrimaryPacketContext.OpenExistingContext(iPacketService, KFirstPrimaryContextName) == KErrNone);
-
-
- //
- // Test context config notifications
- //
- // Calling SetConfig to change the context config and trigger a context config notification
- INFO_PRINTF1(_L("Trigger context config change notification"));
- RPacketContext::TContextConfigGPRS contextConfig;
- DefaultContextConfigGPRS(contextConfig);
- TContextConfigGPRSPckg contextConfigPckg(contextConfig);
- iPrimaryPacketContext.SetConfig(status, contextConfigPckg);
- User::WaitForRequest(status);
- // Wait for the notification
- INFO_PRINTF1(_L("Wait for context config change notification"));
- WaitForFsmContextConfigNotification(KContextId0, contextConfig);
-
-
- //
- // Test QoS notifications
- //
- // Calling SetProfileParameters to change the QoS and trigger a QoS change notification
- INFO_PRINTF1(_L("Trigger QoS change notification"));
- RPacketQoS primaryPacketQos;
- TEST(primaryPacketQos.OpenExistingQoS(iPrimaryPacketContext, KFirstQosName) == KErrNone);
-
- RPacketQoS::TQoSR99_R4Requested qosChangeRequested;
- SecondQoSR99_R4Requested(qosChangeRequested);
- TQoSR99_R4RequestedPckg qosChangeRequestedPckg(qosChangeRequested);
- primaryPacketQos.SetProfileParameters(status, qosChangeRequestedPckg);
- User::WaitForRequest(status);
- // Wait for the notification
- INFO_PRINTF1(_L("Wait for QoS change notification"));
- DefaultQoSR99_R4Negotiated(qosNegotiated);
- WaitForFsmQosChangeNotification(KContextId0, qosNegotiated);
-
- //
- // Clean-up
- //
- primaryPacketQos.Close();
- iPrimaryPacketContext.Close();
-
- FsmInputRequest(KContextId0, SpudMan::EContextDelete, 0);
- WaitForFsmInputResponse(KContextId0, KContextDeleteEvent, 0);
-
- DestroyPhoneAndPacketService();
-
- return TestStepResult();
- }
-
-CSpudFsmUnitNetworkDelete::~CSpudFsmUnitNetworkDelete()
- {}
-
-// configure to use test step 108 from simtsy config file
-CSpudFsmUnitNetworkDelete::CSpudFsmUnitNetworkDelete() : CSpudFsmUnitTestStepBase(108)
- {
- // Call base class method to set up the human readable name for logging
- SetTestStepName(KSpudFsmNetworkDelete);
- }
-
-TVerdict CSpudFsmUnitNetworkDelete::doTestStepL()
-/**
- Test context delete from network
- */
- {
- INFO_PRINTF1(_L("Starting Spud Driver Unit test delete context from network"));
-
- // Start by creating all the Spud FSM objects.
- // They have to be created in the test's Active Scheduler Thread
- // (terminology from the test's design document).
- //
- FsmObjectCreate(KContextId0);
- WaitForFsmObjectCreateResponse(KContextId0);
- FsmObjectCreate(KContextId1);
- WaitForFsmObjectCreateResponse(KContextId1);
-
- // Set up context config and QoS parameters
- RPacketContext::TContextConfigGPRS contextConfigGPRS;
- DefaultContextConfigGPRS(contextConfigGPRS);
- iListener->iPdpFsmInterface->Set(KContextId0, contextConfigGPRS);
- iListener->iPdpFsmInterface->Set(KContextId1, contextConfigGPRS);
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- RPacketQoS::TQoSR5Requested qosRequested;
- DefaultQoSR5Requested(qosRequested);
-#else
- RPacketQoS::TQoSR99_R4Requested qosRequested;
- DefaultQoSR99_R4Requested(qosRequested);
-#endif
-
- iListener->iPdpFsmInterface->Set(KContextId0, qosRequested);
- iListener->iPdpFsmInterface->Set(KContextId1, qosRequested);
-
- //
- // Test context delete while an operation is pending
- //
- INFO_PRINTF1(_L("Test network delete context with pending operation"));
- // Activating the primary context is configured to take a very long time
- FsmInputRequest(KContextId0, SpudMan::ECreatePrimaryPDPContext, 0);
- // The packet service status will become attached almost immediately, but the create
- // primary context won't finish until it is active (which will take a long time)
- WaitForFsmServiceNotificationStatus();
-
- // This delete from the network will occur while the create primary is activating
- EtelRequest(EContextStatusChange, 0);
- WaitForFsmInputResponse(KContextId0, KContextDeleteEvent, KErrNotReady);
-
-
- //
- // Test context delete while an operation is not pending
- //
- INFO_PRINTF1(_L("Test network delete context from open state"));
- // Activating this context is configured to take a short period of time
- FsmInputRequest(KContextId1, SpudMan::ECreatePrimaryPDPContext, 0);
- WaitForFsmInputResponse(KContextId1, KPrimaryContextCreated, KErrNone);
-
- EtelRequest(EContextStatusChange, 1);
- WaitForFsmInputResponse(KContextId1, KContextDeleteEvent, KErrNotReady);
-
- // context should be deleted (and resources freed), so no need to delete here
-
- return TestStepResult();
- }
--- a/telephonyprotocols/umtsgprsscpr/Test/te_spud/src/SpudManInterfaceTest.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// The implementation of the SpudManInterface for SPUD FSM unit tests
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include "InputRequestListener.h"
-#include <etelpckt.h>
-
-
-TSpudManInterfaceTest::TSpudManInterfaceTest(CInputRequestListener& aListener) : iListener(aListener)
- {}
-
-/**
- Signals to the test execute thread that MSpudManInterface::Input has been called
- */
-void TSpudManInterfaceTest::Input(TContextId aPdpId, TInt aEvent, TInt aParam)
- {
- if (aEvent == KPdpFsmShuttingDown)
- {
- // This event requires no notification - In the real SpudMan it would cause SpudMan
- // to close down (NULL) the pointer to the PdpFsmInterface provided by the UmtsGprsSCPR.
- return;
- }
-
- // The aOperation parameters are broken up into those that are notifications and those that aren't
- // Since notifications can happen anytime, separate request status members need to be kept for each one
- // Other input requests happen serially, so only one request can be pending at any time
- TRequestStatus *status = NULL;
-
- // Here, rather than in the case statement due to rvct compiler warning
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- RPacketQoS::TQoSR5Negotiated neg;
-#else
- RPacketQoS::TQoSR99_R4Negotiated neg;
-#endif
-// SYMBIAN_NETWORKING_UMTSR5
-
- switch (aEvent)
- {
- case KContextParametersChangeEvent:
- iListener.iContextParametersEventData.iPdpId = aPdpId;
- iListener.iPdpFsmInterface->Get(aPdpId, neg);
- iListener.iContextParametersEventData.iNegotiated = neg;
-
- iListener.iPdpFsmInterface->Get(aPdpId, iListener.iContextParametersEventData.iContextConfig);
- status = &iListener.iFsmContextParameterChangeStatus;
- break;
- case KNetworkStatusEvent:
- status = &iListener.iFsmNetworkStatusStatus;
- break;
- case KContextBlockedEvent:
- iListener.iContextBlockedEventPdpId = aPdpId;
- status = &iListener.iFsmContextSuspendedStatus;
- break;
- case KContextUnblockedEvent:
- iListener.iContextUnblockedEventPdpId = aPdpId;
- status = &iListener.iFsmContextResumedStatus;
- break;
- default:
- iListener.iFsmInputResponseData.iPdpId = aPdpId;
- iListener.iFsmInputResponseData.iEvent = aEvent;
- iListener.iFsmInputResponseData.iParam = aParam;
- status = &iListener.iFsmInputResponseStatus;
- break;
- }
- iListener.iParentThread.RequestComplete(status, KErrNone);
- }
-
-void TSpudManInterfaceTest::SetContextTerminationErrorAndStop(TContextId /*aContextId*/, TInt /*aErrorCode*/)
- {/*Placeholder for unused function*/}
--- a/telephonyprotocols/umtsgprsscpr/Test/te_spud/src/SpudTelUnitTestStep.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,881 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Unit tests for SPUD TEL
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include <e32def.h>
-#include <testexecutelog.h>
-
-#include "SpudUnitTestStep.h"
-#include "meteldriverstrategy.h"
-#include "ceteldrivercontext.h"
-#include "CompareContextParameters.h"
-#include "DefaultContextParameters.h"
-
-using namespace EtelDriver;
-
-CSpudTelUnitNormalOperation::~CSpudTelUnitNormalOperation()
- {}
-
-// configure to use test step 1 from simtsy config file
-CSpudTelUnitNormalOperation::CSpudTelUnitNormalOperation() : CSpudTelUnitTestStepBase(1)
- {
- // Call base class method to set up the human readable name for logging
- SetTestStepName(KSpudTelUnitNormalOperation);
- }
-
-TVerdict CSpudTelUnitNormalOperation::doTestStepL()
-/**
- Test normal operation - test normal setqos (before and after context created)
- - test normal settft (before and after context created)
- - test normal create primary context
- - test normal create secondary context
- */
- {
- INFO_PRINTF1(_L("Starting Spud Tel Test Normal Operation"));
-
- TRequestStatus status;
- RPacketService::TContextInfo contextInfo;
-
- InitPhoneAndPacketServiceL();
-
- //
- // Test creating primary context
- //
- INFO_PRINTF1(_L("Test creating primary context"));
- EtelDriverInputRequest( KContextId0, EOpenPhone);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::EPhoneOpened);
-
- EtelDriverInputRequest( KContextId0, ECreate1ryPdpContext);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::E1ryPdpContextCreated);
-
- // check that context was created - the simtsy creates the first primary context with name 'PRIMARY1'
- TEST(iPrimaryPacketContext.OpenExistingContext(iPacketService, KFirstPrimaryContextName) == KErrNone);
-
- // check that context config for GPRS was set correctly
- RPacketContext::TContextConfigGPRS *contextConfig = new(ELeave) RPacketContext::TContextConfigGPRS;
- CleanupStack::PushL(contextConfig);
- TContextConfigGPRSPckg contextConfigPckg(*contextConfig);
- iPrimaryPacketContext.GetConfig(status, contextConfigPckg);
- User::WaitForRequest(status);
- RPacketContext::TContextConfigGPRS *defaultContextConfigGPRS = new(ELeave) RPacketContext::TContextConfigGPRS;
- CleanupStack::PushL(defaultContextConfigGPRS);
- DefaultContextConfigGPRS(*defaultContextConfigGPRS);
- TEST(CompareContextConfigGPRS(*defaultContextConfigGPRS, *contextConfig));
- CleanupStack::PopAndDestroy(defaultContextConfigGPRS);
- CleanupStack::PopAndDestroy(contextConfig);
-
-
- //
- // Test creating secondary context
- //
- INFO_PRINTF1(_L("Test creating secondary context"));
- EtelDriverInputRequest( KContextId1, ECreate2ryPdpContext);
- WaitForEtelDriverInputResponse( KContextId1, PdpFsm::E2ryPdpContextCreated);
-
- // check that context was created - the simtsy creates the first secondary context with name 'SECONDARY1'
- TEST(iSecondaryPacketContext.OpenExistingContext(iPacketService, KFirstSecondaryContextName) == KErrNone);
-
-
- //
- // Test setting and changing TFT
- //
- INFO_PRINTF1(_L("Test setting and changing TFT"));
- TTFTInfo *firstTftInfo = new(ELeave) TTFTInfo;
- CleanupStack::PushL(firstTftInfo);
- TTFTInfo *secondTftInfo = new(ELeave) TTFTInfo;
- CleanupStack::PushL(secondTftInfo);
- TTFTInfo *combinedTftInfo = new(ELeave) TTFTInfo;
- CleanupStack::PushL(combinedTftInfo);
- DefaultTftInfo(*firstTftInfo);
- SecondDefaultTftInfo(*secondTftInfo);
- CombinedDefaultTftInfo(*combinedTftInfo);
-
- // Test setting TFT
- iListener->iPdpFsmInterfaceTest->Set(KContextId0, KAddFilters);
- iListener->iPdpFsmInterfaceTest->Set(KContextId0, *firstTftInfo);
- EtelDriverInputRequest(KContextId0, ESetTft);
- WaitForEtelDriverInputResponse(KContextId0, PdpFsm::ETftSet);
- // check that TFT was set
- TTFTInfo expectedTftInfo;
- TEST(CompareTFTInfo(*firstTftInfo, iPrimaryPacketContext));
-
- // Test re-setting TFT
- iListener->iPdpFsmInterfaceTest->Set(KContextId0, KAddFilters);
- iListener->iPdpFsmInterfaceTest->Set(KContextId0, *secondTftInfo);
- EtelDriverInputRequest(KContextId0, ESetTft);
- WaitForEtelDriverInputResponse(KContextId0, PdpFsm::ETftSet);
- // check that TFT was set
- TEST(CompareTFTInfo(*secondTftInfo, iPrimaryPacketContext));
-
- // Test changing TFT (using KAddFilters)
- iListener->iPdpFsmInterfaceTest->Set(KContextId0, KAddFilters);
- iListener->iPdpFsmInterfaceTest->Set(KContextId0, *firstTftInfo);
- EtelDriverInputRequest(KContextId0, EChangeTft);
- WaitForEtelDriverInputResponse(KContextId0, PdpFsm::ETftChanged);
- // check that TFT was set
- TEST(CompareTFTInfo(*combinedTftInfo, iPrimaryPacketContext));
-
- // Test setting TFT (using KRemoveFilters)
- iListener->iPdpFsmInterfaceTest->Set(KContextId0, KRemoveFilters);
- iListener->iPdpFsmInterfaceTest->Set(KContextId0, *firstTftInfo);
- EtelDriverInputRequest(KContextId0, EChangeTft);
- WaitForEtelDriverInputResponse(KContextId0, PdpFsm::ETftChanged);
- // check that TFT was set
- TEST(CompareTFTInfo(*secondTftInfo, iPrimaryPacketContext));
-
- // Test setting TFT (using KDeleteTFT)
- iListener->iPdpFsmInterfaceTest->Set(KContextId0, KDeleteTFT);
- EtelDriverInputRequest(KContextId0, EChangeTft);
- WaitForEtelDriverInputResponse(KContextId0, PdpFsm::ETftChanged);
- // check that TFT was set
- TInt count;
- iPrimaryPacketContext.EnumeratePacketFilters(status, count);
- User::WaitForRequest(status);
- TEST(status == KErrNone);
- TEST(count == 0);
- CleanupStack::PopAndDestroy(combinedTftInfo);
- CleanupStack::PopAndDestroy(secondTftInfo);
- CleanupStack::PopAndDestroy(firstTftInfo);
-
-
- //
- // Test setting QOS
- //
- INFO_PRINTF1(_L("Test setting QOS"));
- EtelDriverInputRequest( KContextId1, ESetQoS);
- RPacketQoS::TQoSR99_R4Negotiated *defaultQoSR99_R4Negotiated = new(ELeave) RPacketQoS::TQoSR99_R4Negotiated;
- CleanupStack::PushL(defaultQoSR99_R4Negotiated);
- SecondQoSR99_R4Negotiated(*defaultQoSR99_R4Negotiated);
- WaitForEtelDriverInputResponse( KContextId1, PdpFsm::EQoSSet);
- RPacketQoS packetQos;
- // check that QOS was created - the simtsy creates the first QOS with name KFirstQosName
- TEST(packetQos.OpenExistingQoS(iSecondaryPacketContext, KFirstQosName) == KErrNone);
- // qos was created ok
- RPacketQoS::TQoSR99_R4Negotiated *qos = new(ELeave) RPacketQoS::TQoSR99_R4Negotiated;
- CleanupStack::PushL(qos);
- TQoSR99_R4NegotiatedPckg qosPckg(*qos);
- packetQos.GetProfileParameters(status, qosPckg);
- User::WaitForRequest(status);
- TEST(CompareUMTSQoSNeg(*defaultQoSR99_R4Negotiated, *qos));
- CleanupStack::PopAndDestroy(qos);
- CleanupStack::PopAndDestroy(defaultQoSR99_R4Negotiated);
- packetQos.Close();
- iSecondaryPacketContext.Close();
- iPrimaryPacketContext.Close();
-
-
- //
- // Test activating context
- //
- INFO_PRINTF1(_L("Test activating context"));
- EtelDriverInputRequest( KContextId1, EActivatePdp);
- WaitForEtelDriverInputResponse( KContextId1, PdpFsm::EPdpActivated);
-
- // test that context is set to activated
- TEST(CompareContextInfo(iPacketService, KFirstSecondaryContextName, RPacketContext::EStatusActive));
- // make sure the data channel was set as well
- RPacketContext::TDataChannelV2 dataChannel;
- DefaultDataChannel(dataChannel);
- TEST(CompareDataChannel(iListener->iNotifyContextDataChannelData.iDataChannelV2, dataChannel));
-
-
- //
- // Test modifying active context
- //
- INFO_PRINTF1(_L("Test modifying activate context"));
- EtelDriverInputRequest(KContextId1, EChangeTft);
- WaitForEtelDriverInputResponse(KContextId1, PdpFsm::ETftChanged);
- EtelDriverInputRequest( KContextId1, EModifyActive);
- WaitForEtelDriverInputResponse( KContextId1, PdpFsm::EPdpContextModified);
-
-
- //
- // Test deleting secondary context
- //
- INFO_PRINTF1(_L("Test deleting secondary context"));
- EtelDriverInputRequest( KContextId1, EContextDelete);
- WaitForEtelDriverInputResponse( KContextId1, PdpFsm::EContextDeleted);
-
- // make sure it is marked as deleted
- iPacketService.GetContextInfo(status, KContextId1, contextInfo);
- User::WaitForRequest(status);
- TEST(status == KErrNone && contextInfo.iStatus == RPacketContext::EStatusDeleted);
-
-
- //
- // Test deleting primary context
- //
- INFO_PRINTF1(_L("Test deleting primary context"));
- EtelDriverInputRequest( KContextId0, EContextDelete);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::EContextDeleted);
-
- // make sure it is marked as deleted
- iPacketService.GetContextInfo(status, KContextId0, contextInfo);
- User::WaitForRequest(status);
- TEST(status == KErrNone && contextInfo.iStatus == RPacketContext::EStatusDeleted);
-
- DestroyPhoneAndPacketService();
-
- return TestStepResult();
- }
-
-CSpudTelUnitNotifications::~CSpudTelUnitNotifications()
- {}
-
-// configure to use test step 1 from simtsy config file
-CSpudTelUnitNotifications::CSpudTelUnitNotifications() : CSpudTelUnitTestStepBase(1)
- {
- // Call base class method to set up the human readable name for logging
- SetTestStepName(KSpudTelUnitNotifications);
- }
-
-TVerdict CSpudTelUnitNotifications::doTestStepL()
-/**
- Test notifications
- */
- {
- INFO_PRINTF1(_L("Starting Spud Test Notifications"));
-
- TRequestStatus status;
- RPacketQoS packetQos;
-
- InitPhoneAndPacketServiceL();
-
- //
- // setup test - create primary context and start notifications
- //
- INFO_PRINTF1(_L("setup test - create primary context and start notifications"));
- EtelDriverInputRequest( KContextId0, ECreate1ryPdpContext);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::E1ryPdpContextCreated);
-
- EtelDriverInputRequest( KContextId0, EActivatePdp);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::EPdpActivated);
-
- // check that context was created - the simtsy creates the first primary context with name 'PRIMARY1'
- TEST(iPrimaryPacketContext.OpenExistingContext(iPacketService, KFirstPrimaryContextName) == KErrNone);
-
- //
- // Test service status notification
- //
- // the timing here may or may not allow us to recieve an 'activating' request
- WaitForGivenEtelContextStatusNotification(KContextId0, RPacketContext::EStatusActive);
- WaitForNextServiceNotificationStatus( RPacketService::EStatusActive);
-
-
- //
- // Test context config notification
- //
- INFO_PRINTF1(_L("Test context config notification"));
- RPacketContext::TContextConfigGPRS contextConfig;
- DefaultContextConfigGPRS(contextConfig);
- TContextConfigGPRSPckg contextConfigPckg(contextConfig);
- iPrimaryPacketContext.SetConfig(status, contextConfigPckg);
- User::WaitForRequest(status);
-
- WaitForNextContextConfigNotification(KContextId0, contextConfig);
-
- // check that QOS was created - the simtsy creates the first QOS with name KFirstQosName
- TEST(packetQos.OpenExistingQoS(iPrimaryPacketContext, KFirstQosName) == KErrNone);
-
-
- //
- // Test QOS notification
- //
-
- INFO_PRINTF1(_L("Test QOS notification"));
- RPacketQoS::TQoSR99_R4Requested qosRequested;
- DefaultQoSR99_R4Requested(qosRequested);
- RPacketQoS::TQoSR99_R4Negotiated qosNegotiated;
- SecondQoSR99_R4Negotiated(qosNegotiated);
- TQoSR99_R4RequestedPckg qosRequestedPckg(qosRequested);
- packetQos.SetProfileParameters(status, qosRequestedPckg);
- User::WaitForRequest(status);
- WaitForNextQosNotification(KContextId0, qosNegotiated);
-
- // clean up
- packetQos.Close();
- iPrimaryPacketContext.Close();
-
- EtelDriverInputRequest( KContextId0, EContextDelete);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::EContextDeleted);
- WaitForNextServiceNotificationStatus(RPacketService::EStatusAttached);
-
- DestroyPhoneAndPacketService();
-
- return TestStepResult();
- }
-
-CSpudTelUnitCreatePrimaryError::~CSpudTelUnitCreatePrimaryError()
- {
- }
-
-// configure to use test step 3 from simtsy config file
-CSpudTelUnitCreatePrimaryError::CSpudTelUnitCreatePrimaryError() : CSpudTelUnitTestStepBase(3)
- {
- // Call base class method to set up the human readable name for logging
- SetTestStepName(KSpudTelUnitCreatePrimaryError);
- }
-
-TVerdict CSpudTelUnitCreatePrimaryError::doTestStepL()
-/**
- Errors with creating primary
- */
- {
- INFO_PRINTF1(_L("Starting Spud Test Create Primary Context Error with SetConfig"));
-
- InitPhoneAndPacketServiceL();
-
- EtelDriverInputRequest( KContextId0, EOpenPhone);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::EPhoneOpened);
-
- // simtsy is configured to fail second RPacketContext::SetConfig
- EtelDriverInputRequest( KContextId0, ECreate1ryPdpContext);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::E1ryPdpContextCreatedFailed, KErrGeneral);
-
- // clean up
- EtelDriverInputRequest( KContextId0, EContextDelete);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::EContextDeleted);
-
- DestroyPhoneAndPacketService();
-
- return TestStepResult();
- }
-
-CSpudTelUnitSetQosError::~CSpudTelUnitSetQosError()
- {}
-
-// configure to use test step 6 from simtsy config file
-CSpudTelUnitSetQosError::CSpudTelUnitSetQosError() : CSpudTelUnitTestStepBase(6)
- {
- // Call base class method to set up the human readable name for logging
- SetTestStepName(KSpudTelUnitSetQosError);
- }
-
-TVerdict CSpudTelUnitSetQosError::doTestStepL()
-/**
- Errors with setting QoS
- */
- {
- INFO_PRINTF1(_L("Starting Spud Test Set QOS Error"));
-
- InitPhoneAndPacketServiceL();
-
- // set test up
- EtelDriverInputRequest( KContextId0, EOpenPhone);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::EPhoneOpened);
-
- EtelDriverInputRequest( KContextId0, ECreate1ryPdpContext);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::E1ryPdpContextCreatedFailed, KErrGeneral);
-
- EtelDriverInputRequest( KContextId0, EContextDelete);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::EContextDeleted);
-
- DestroyPhoneAndPacketService();
-
- return TestStepResult();
- }
-
-CSpudTelUnitSetTftError::~CSpudTelUnitSetTftError()
- {
- }
-
-// configure to use test step 7 from simtsy config file
-CSpudTelUnitSetTftError::CSpudTelUnitSetTftError() : CSpudTelUnitTestStepBase(7)
- {
- // Call base class method to set up the human readable name for logging
- SetTestStepName(KSpudTelUnitSetTftError);
- }
-
-TVerdict CSpudTelUnitSetTftError::doTestStepL()
-/**
- Errors with setting TFT
- */
- {
- INFO_PRINTF1(_L("Starting Spud Test Set TFT Error"));
-
- InitPhoneAndPacketServiceL();
-
- // set test up
- EtelDriverInputRequest( KContextId0, EOpenPhone);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::EPhoneOpened);
-
- EtelDriverInputRequest( KContextId0, ECreate1ryPdpContext);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::E1ryPdpContextCreated);
-
- // test error in RPacketQoS::CreateNewTFT
- EtelDriverInputRequest( KContextId0, ESetTft);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::ETftSetFailed, KErrGeneral);
-
- // test error in RPacketQoS::AddPacketFilter
- EtelDriverInputRequest( KContextId0, ESetTft);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::ETftSetFailed, KErrGeneral);
-
- EtelDriverInputRequest( KContextId0, EContextDelete);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::EContextDeleted);
-
- DestroyPhoneAndPacketService();
-
- return TestStepResult();
- }
-
-CSpudTelUnitActivateError1::~CSpudTelUnitActivateError1()
- {
- }
-
-// configure to use test step 8 from simtsy config file
-CSpudTelUnitActivateError1::CSpudTelUnitActivateError1() : CSpudTelUnitTestStepBase(8)
- {
- // Call base class method to set up the human readable name for logging
- SetTestStepName(KSpudTelUnitActivateError1);
- }
-
-TVerdict CSpudTelUnitActivateError1::doTestStepL()
-/**
- * Errors with activating
- */
- {
- INFO_PRINTF1(_L("Starting Spud Test Activate Error 1"));
-
- InitPhoneAndPacketServiceL();
-
- // set test up
- EtelDriverInputRequest( KContextId0, EOpenPhone);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::EPhoneOpened);
-
- EtelDriverInputRequest( KContextId0, ECreate1ryPdpContext);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::E1ryPdpContextCreated);
-
- // test error in RPacketContext::Activate
- EtelDriverInputRequest( KContextId0, EActivatePdp);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::EPdpActivatedFailed, KErrGeneral);
-
- EtelDriverInputRequest( KContextId0, EContextDelete);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::EContextDeleted);
-
- DestroyPhoneAndPacketService();
-
- return TestStepResult();
- }
-
-CSpudTelUnitActivateError2::~CSpudTelUnitActivateError2()
- {
- }
-
-// configure to use test step 8 from simtsy config file
-CSpudTelUnitActivateError2::CSpudTelUnitActivateError2() : CSpudTelUnitTestStepBase(14)
- {
- // Call base class method to set up the human readable name for logging
- SetTestStepName(KSpudTelUnitActivateError2);
- }
-
-TVerdict CSpudTelUnitActivateError2::doTestStepL()
-/**
- * Errors with activating
- */
- {
- INFO_PRINTF1(_L("Starting Spud Test Activate Error 2"));
-
- InitPhoneAndPacketServiceL();
-
- // set test up
- EtelDriverInputRequest( KContextId0, EOpenPhone);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::EPhoneOpened);
-
- EtelDriverInputRequest( KContextId0, ECreate1ryPdpContext);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::E1ryPdpContextCreated);
-
- // test error in RPacketContext::InitialiseContext
- EtelDriverInputRequest( KContextId0, EActivatePdp);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::EPdpActivatedFailed, KErrGeneral);
-
- EtelDriverInputRequest( KContextId0, EContextDelete);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::EContextDeleted);
-
- DestroyPhoneAndPacketService();
-
- return TestStepResult();
- }
-
-CSpudTelUnitDeleteError1::~CSpudTelUnitDeleteError1()
- {
- }
-
-// configure to use test step 9 from simtsy config file
-CSpudTelUnitDeleteError1::CSpudTelUnitDeleteError1() : CSpudTelUnitTestStepBase(9)
- {
- // Call base class method to set up the human readable name for logging
- SetTestStepName(KSpudTelUnitDeleteError1);
- }
-
-TVerdict CSpudTelUnitDeleteError1::doTestStepL()
-/**
- Errors with deleting
- */
- {
- INFO_PRINTF1(_L("Starting Spud Test Delete Error"));
-
- InitPhoneAndPacketServiceL();
-
- // set test up phone, primary context, it's QoS parameters, and activate the context
- EtelDriverInputRequest( KContextId0, EOpenPhone);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::EPhoneOpened);
- EtelDriverInputRequest( KContextId0, ECreate1ryPdpContext);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::E1ryPdpContextCreated);
- EtelDriverInputRequest( KContextId0, ESetQoS);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::EQoSSet);
- EtelDriverInputRequest( KContextId0, EActivatePdp);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::EPdpActivated);
-
- // test error in RPacketContext::Deactivate
- EtelDriverInputRequest( KContextId0, EContextDelete);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::EContextDeletedFailed, KErrGeneral);
-
- DestroyPhoneAndPacketService();
-
- return TestStepResult();
- }
-
-CSpudTelUnitDeleteError2::~CSpudTelUnitDeleteError2()
- {
- }
-
-// configure to use test step 13 from simtsy config file
-CSpudTelUnitDeleteError2::CSpudTelUnitDeleteError2() : CSpudTelUnitTestStepBase(10)
- {
- // Call base class method to set up the human readable name for logging
- SetTestStepName(KSpudTelUnitDeleteError2);
- }
-
-TVerdict CSpudTelUnitDeleteError2::doTestStepL()
-/**
- Errors with deleting
- */
- {
- INFO_PRINTF1(_L("Starting Spud Test Delete Error 2"));
-
- InitPhoneAndPacketServiceL();
-
- // set test up
- EtelDriverInputRequest( KContextId0, EOpenPhone);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::EPhoneOpened);
-
- EtelDriverInputRequest( KContextId0, ECreate1ryPdpContext);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::E1ryPdpContextCreated);
- EtelDriverInputRequest( KContextId0, EActivatePdp);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::EPdpActivated);
-
- // test error in RPacketContext::Delete
- EtelDriverInputRequest( KContextId0, EContextDelete);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::EContextDeletedFailed, KErrGeneral);
-
- DestroyPhoneAndPacketService();
-
- return TestStepResult();
- }
-
-CSpudTelUnitMultipleContexts::~CSpudTelUnitMultipleContexts()
- {
- }
-
-// configure to use test step 10 from simtsy config file
-CSpudTelUnitMultipleContexts::CSpudTelUnitMultipleContexts() : CSpudTelUnitTestStepBase(11)
- {
- // Call base class method to set up the human readable name for logging
- SetTestStepName(KSpudTelUnitMultipleContexts);
- }
-
-TVerdict CSpudTelUnitMultipleContexts::doTestStepL()
-/**
- Test multiple primary contexts with multiple secondary contexts
- */
- {
- INFO_PRINTF1(_L("Starting Spud Test Multiple Contexts"));
-
- TRequestStatus status;
-
- InitPhoneAndPacketServiceL();
- RPacketContext primaryPacketContext2, secondaryPacketContext2;
-
- EtelDriverInputRequest( KContextId0, EOpenPhone);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::EPhoneOpened);
-
- //
- // Test creating multiple primary contexts
- //
- INFO_PRINTF1(_L("Test create first primary context"));
- EtelDriverInputRequest( KContextId0, ECreate1ryPdpContext);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::E1ryPdpContextCreated);
-
- // check that context was created - the simtsy creates the first primary context with name 'PRIMARY1'
- TEST(iPrimaryPacketContext.OpenExistingContext(iPacketService, KFirstPrimaryContextName) == KErrNone);
-
- // check that context config for GPRS was set correctly
- RPacketContext::TContextConfigGPRS *contextConfig = new(ELeave) RPacketContext::TContextConfigGPRS;
- CleanupStack::PushL(contextConfig);
- TContextConfigGPRSPckg contextConfigPckg(*contextConfig);
- iPrimaryPacketContext.GetConfig(status, contextConfigPckg);
- User::WaitForRequest(status);
- RPacketContext::TContextConfigGPRS *defaultTestContextConfigGPRS = new(ELeave) RPacketContext::TContextConfigGPRS;
- CleanupStack::PushL(defaultTestContextConfigGPRS);
- DefaultContextConfigGPRS(*defaultTestContextConfigGPRS);
- TEST(CompareContextConfigGPRS(*defaultTestContextConfigGPRS, *contextConfig));
-
- INFO_PRINTF1(_L("Test create second primary context"));
- EtelDriverInputRequest( KContextId1, ECreate1ryPdpContext);
- WaitForEtelDriverInputResponse( KContextId1, PdpFsm::E1ryPdpContextCreated);
-
- // check that context was created - the simtsy creates the first primary context with name 'PRIMARY2'
- TEST(primaryPacketContext2.OpenExistingContext(iPacketService, KSecondPrimaryContextName) == KErrNone);
-
- // check that context config for GPRS was set correctly
- primaryPacketContext2.GetConfig(status, contextConfigPckg);
- User::WaitForRequest(status);
- TEST(CompareContextConfigGPRS(*defaultTestContextConfigGPRS, *contextConfig));
- CleanupStack::PopAndDestroy(defaultTestContextConfigGPRS);
- CleanupStack::PopAndDestroy(contextConfig);
-
-
- //
- // Test creating secondary contexts on each primary context
- //
- INFO_PRINTF1(_L("Test create first secondary context"));
- EtelDriverInputRequest( KContextId2, ECreate2ryPdpContext);
- WaitForEtelDriverInputResponse( KContextId2, PdpFsm::E2ryPdpContextCreated);
-
- // check that context was created - the simtsy creates the first secondary context with name 'SECONDARY1'
- TEST(iSecondaryPacketContext.OpenExistingContext(iPacketService, KFirstSecondaryContextName) == KErrNone);
-
- INFO_PRINTF1(_L("Test create second secondary context"));
- EtelDriverInputRequest( KContextId3, ECreate2ryPdpContext);
- WaitForEtelDriverInputResponse( KContextId3, PdpFsm::E2ryPdpContextCreated);
-
- // check that context was created - the simtsy creates the first secondary context with name 'SECONDARY2'
- TEST(secondaryPacketContext2.OpenExistingContext(iPacketService, KSecondSecondaryContextName) == KErrNone);
-
-
- //
- // Test setting TFT (this time on secondary context)
- //
- INFO_PRINTF1(_L("Test setting TFT"));
- EtelDriverInputRequest( KContextId3, ESetTft);
- WaitForEtelDriverInputResponse( KContextId3, PdpFsm::ETftSet);
-
- // check that TFT was set
- TTFTInfo *expectedTftInfo = new(ELeave) TTFTInfo;
- CleanupStack::PushL(expectedTftInfo);
- DefaultTftInfo(*expectedTftInfo);
- TEST(CompareTFTInfo(*expectedTftInfo, secondaryPacketContext2));
- CleanupStack::PopAndDestroy(expectedTftInfo);
-
-
- //
- // Test setting QOS (this time on primary context)
- //
- INFO_PRINTF1(_L("Test setting QOS"));
- EtelDriverInputRequest( KContextId1, ESetQoS);
- WaitForEtelDriverInputResponse( KContextId1, PdpFsm::EQoSSet);
- RPacketQoS packetQos;
- // check that QOS was created - the simtsy creates the first QOS with name KFirstQosName
- TEST(packetQos.OpenExistingQoS(primaryPacketContext2, KFirstQosName) == KErrNone);
- // qos was created ok
- RPacketQoS::TQoSR99_R4Negotiated *qos = new(ELeave) RPacketQoS::TQoSR99_R4Negotiated;
- CleanupStack::PushL(qos);
- TQoSR99_R4NegotiatedPckg qosPckg(*qos);
- packetQos.GetProfileParameters(status, qosPckg);
- User::WaitForRequest(status);
- RPacketQoS::TQoSR99_R4Negotiated *defaultTestTQoSR99_R4Negotiated = new(ELeave) RPacketQoS::TQoSR99_R4Negotiated;
- CleanupStack::PushL(defaultTestTQoSR99_R4Negotiated);
- SecondQoSR99_R4Negotiated(*defaultTestTQoSR99_R4Negotiated);
- TEST(CompareUMTSQoSNeg(*defaultTestTQoSR99_R4Negotiated, *qos));
- packetQos.Close();
- CleanupStack::PopAndDestroy(defaultTestTQoSR99_R4Negotiated);
- CleanupStack::PopAndDestroy(qos);
- primaryPacketContext2.Close();
- secondaryPacketContext2.Close();
- iPrimaryPacketContext.Close();
- iSecondaryPacketContext.Close();
-
-
- //
- // Test activating contexts
- //
- INFO_PRINTF1(_L("Test activating contexts"));
- EtelDriverInputRequest( KContextId1, EActivatePdp);
- // The service is now attached
- WaitForEtelDriverInputResponse( KContextId1, PdpFsm::EPdpActivated);
-
- // test that context is set to activated
- TEST(CompareContextInfo(iPacketService, KSecondPrimaryContextName, RPacketContext::EStatusActive));
- RPacketContext::TDataChannelV2 dataChannel;
- DefaultDataChannel(dataChannel);
- TEST(CompareDataChannel(iListener->iNotifyContextDataChannelData.iDataChannelV2, dataChannel));
-
- EtelDriverInputRequest( KContextId2, EActivatePdp);
- WaitForEtelDriverInputResponse( KContextId2, PdpFsm::EPdpActivated);
-
- // test that context is set to activated
- TEST(CompareContextInfo(iPacketService, KFirstSecondaryContextName, RPacketContext::EStatusActive));
-
-
- //
- // Test deleting primary context before secondary contexts
- //
- INFO_PRINTF1(_L("Test deleting primary contexts before secondary contexts"));
- EtelDriverInputRequest( KContextId0, EContextDelete);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::EContextDeleted);
-
- // make sure it is marked as deleted
- TEST(CompareContextInfo(iPacketService, KFirstPrimaryContextName, RPacketContext::EStatusDeleted));
-
- EtelDriverInputRequest( KContextId1, EContextDelete);
- WaitForEtelDriverInputResponse( KContextId1, PdpFsm::EContextDeleted);
-
- // make sure it is marked as deleted
- TEST(CompareContextInfo(iPacketService, KSecondPrimaryContextName, RPacketContext::EStatusDeleted));
-
-
- //
- // Test deleting secondary contexts
- //
- INFO_PRINTF1(_L("Test deleting secondary contexts"));
- EtelDriverInputRequest( KContextId2, EContextDelete);
- WaitForEtelDriverInputResponse( KContextId2, PdpFsm::EContextDeleted);
-
- // make sure it is marked as deleted
- TEST(CompareContextInfo(iPacketService, KFirstSecondaryContextName, RPacketContext::EStatusDeleted));
-
- EtelDriverInputRequest( KContextId3, EContextDelete);
- WaitForEtelDriverInputResponse( KContextId3, PdpFsm::EContextDeleted);
-
- // make sure it is marked as deleted
- TEST(CompareContextInfo(iPacketService, KSecondSecondaryContextName, RPacketContext::EStatusDeleted));
-
- DestroyPhoneAndPacketService();
-
- return TestStepResult();
- }
-
-CSpudTelUnitCancel::~CSpudTelUnitCancel()
- {
- }
-
-// configure to use test step 12 from simtsy config file
-CSpudTelUnitCancel::CSpudTelUnitCancel() : CSpudTelUnitTestStepBase(12)
- {
- // Call base class method to set up the human readable name for logging
- SetTestStepName(KSpudTelUnitCancel);
- }
-
-TVerdict CSpudTelUnitCancel::doTestStepL()
-/**
- Test cancelling operations
- */
- {
- INFO_PRINTF1(_L("Starting Spud Test Cancel on Input Operations"));
-
- TRequestStatus timerStatus;
- RTimer timer;
- timer.CreateLocal();
-
- InitPhoneAndPacketServiceL();
-
- //
- // Test cancelling create primary request
- //
- INFO_PRINTF1(_L("Test cancelling create primary request"));
- EtelDriverInputRequest( KContextId0, ECreate1ryPdpContext);
- CancelPdpRequest(KContextId0);
- timer.After(timerStatus, 1500000);
- User::WaitForRequest(iListener->iEtelDriverInputResponseStatus, timerStatus);
- TEST(timerStatus == KErrNone && iListener->iEtelDriverInputResponseStatus == KRequestPending);
-
-
- //
- // Set up primary for upcoming tests
- //
- //
- INFO_PRINTF1(_L("Create primary"));
- EtelDriverInputRequest( KContextId1, ECreate1ryPdpContext);
- WaitForEtelDriverInputResponse( KContextId1, PdpFsm::E1ryPdpContextCreated);
-
- // since creating secondary contains no asyncronous requests, the request cannot be cancelled
- //EtelDriverInputRequest( KContextId2, ECreate2ryPdpContext);
- //CancelPdpRequest(KContextId2);
- //timer.After(timerStatus, 1500000);
- //User::WaitForRequest(iListener->iEtelDriverInputResponseStatus, timerStatus);
- //TEST(iListener->iEtelDriverInputResponseStatus == KErrNone);
-
-
- //
- // Test cancelling set TFT
- //
- INFO_PRINTF1(_L("Test cancelling set TFT"));
- EtelDriverInputRequest( KContextId1, ESetTft);
- CancelPdpRequest(KContextId1);
- timer.After(timerStatus, 1500000);
- User::WaitForRequest(iListener->iEtelDriverInputResponseStatus, timerStatus);
- TEST(timerStatus == KErrNone && iListener->iEtelDriverInputResponseStatus == KRequestPending);
-
-
- //
- // Test cancelling set QOS
- //
- //INFO_PRINTF1(_L("Test cancelling set QOS"));
- //EtelDriverInputRequest( KContextId1, ESetQoS);
- //CancelPdpRequest(KContextId1);
- //timer.After(timerStatus, 1500000);
- //User::WaitForRequest(iListener->iEtelDriverInputResponseStatus, timerStatus);
- //TEST(timerStatus == KErrNone && iListener->iEtelDriverInputResponseStatus == KRequestPending);
-
-
- //
- // Test cancelling activate PDP
- //
- INFO_PRINTF1(_L("Test cancelling create secondary request"));
- EtelDriverInputRequest( KContextId1, EActivatePdp);
- CancelPdpRequest(KContextId1);
- timer.After(timerStatus, 1500000);
- User::WaitForRequest(iListener->iEtelDriverInputResponseStatus, timerStatus);
- TEST(timerStatus == KErrNone && iListener->iEtelDriverInputResponseStatus == KRequestPending);
-
-
- //
- // Test cancelling context delete
- //
- INFO_PRINTF1(_L("Test cancelling context delete"));
- EtelDriverInputRequest( KContextId1, EContextDelete);
- CancelPdpRequest(KContextId1);
- timer.After(timerStatus, 1500000);
- User::WaitForRequest(iListener->iEtelDriverInputResponseStatus, timerStatus);
- TEST(timerStatus == KErrNone && iListener->iEtelDriverInputResponseStatus == KRequestPending);
-
- // clean up
- EtelDriverInputRequest( KContextId0, EContextDelete);
- WaitForEtelDriverInputResponse( KContextId0, PdpFsm::EContextDeleted);
- EtelDriverInputRequest( KContextId1, EContextDelete);
- WaitForEtelDriverInputResponse( KContextId1, PdpFsm::EContextDeleted);
-
- DestroyPhoneAndPacketService();
-
- timer.Close();
-
- return TestStepResult();
- }
--- a/telephonyprotocols/umtsgprsscpr/Test/te_spud/src/SpudUnitTestServer.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,203 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// for (WINS && !EKA2) versions will be xxxServer.Dll and require a thread to
-// be started in the process of the client. The client initialises the server
-// by calling the one and only ordinal.
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include "SpudUnitTestServer.h"
-#include "SpudUnitTestStep.h"
-
-_LIT(KServerName,"TE_SpudUnit");
-
-CSpudUnitTestServer* CSpudUnitTestServer::NewL()
-/**
- * @return - Instance of the test server
- * Called inside the MainL() function to create and start the
- * CTestServer derived server.
- */
- {
- // Instantiate server class here
- CSpudUnitTestServer * server = new (ELeave) CSpudUnitTestServer();
- CleanupStack::PushL(server);
- // CServer base class call
- server->StartL(KServerName);
- CleanupStack::Pop(server);
- return server;
- }
-
-// EKA2 much simpler
-// Just an E32Main and a MainL()
-LOCAL_C void MainL()
-/**
- * Much simpler, uses the new Rendezvous() call to sync with the client
- */
- {
- _LIT(KPhbkSyncCMI, "phbsync.cmi");
- TInt err = StartC32WithCMISuppressions(KPhbkSyncCMI);
- if (err != KErrNone && err != KErrAlreadyExists)
- {
- User::Leave(err);
- }
-
- CActiveScheduler* sched=NULL;
- sched=new(ELeave) CActiveScheduler;
- CActiveScheduler::Install(sched);
-
- CSpudUnitTestServer* server = NULL;
- // Create the CTestServer derived server
- TRAP(err,server = CSpudUnitTestServer::NewL());
- if(!err)
- {
- // Sync with the client and enter the active scheduler
- RProcess::Rendezvous(KErrNone);
- sched->Start();
- }
- delete server;
- delete sched;
- }
-
-
-GLDEF_C TInt E32Main()
-/**
- * @return - Standard Epoc error code on exit
- */
- {
- CTrapCleanup* cleanup = CTrapCleanup::New();
- if(cleanup == NULL)
- {
- return KErrNoMemory;
- }
- TRAPD(err,MainL());
- delete cleanup;
- return err;
- }
-
-/** export function */
-REtelDriverInput* NewEtelDriverInputL()
- {
- return new(ELeave) REtelDriverInput();
- }
-
-
-// Create a thread in the calling process
-// Emulator typhoon and earlier
-
-CTestStep* CSpudUnitTestServer::CreateTestStep(const TDesC& aStepName)
-/**
- * @return - A CTestStep derived instance
- * Implementation of CTestServer pure virtual
- */
- {
- CTestStep* testStep = NULL;
-
- TRAPD
- (err,
-
- // SPUD TEL unit tests
- if(aStepName == KSpudTelUnitNormalOperation)
- {
- testStep = new(ELeave) CSpudTelUnitNormalOperation();
- }
- if(aStepName == KSpudTelUnitNotifications)
- {
- testStep = new(ELeave) CSpudTelUnitNotifications();
- }
- if(aStepName == KSpudTelUnitCreatePrimaryError)
- {
- testStep = new(ELeave) CSpudTelUnitCreatePrimaryError();
- }
- if(aStepName == KSpudTelUnitSetQosError)
- {
- testStep = new(ELeave) CSpudTelUnitSetQosError();
- }
- if(aStepName == KSpudTelUnitSetTftError)
- {
- testStep = new(ELeave) CSpudTelUnitSetTftError();
- }
- if(aStepName == KSpudTelUnitActivateError1)
- {
- testStep = new(ELeave) CSpudTelUnitActivateError1();
- }
- if(aStepName == KSpudTelUnitActivateError2)
- {
- testStep = new(ELeave) CSpudTelUnitActivateError2();
- }
- if(aStepName == KSpudTelUnitDeleteError1)
- {
- testStep = new(ELeave) CSpudTelUnitDeleteError1();
- }
- if(aStepName == KSpudTelUnitDeleteError2)
- {
- testStep = new(ELeave) CSpudTelUnitDeleteError2();
- }
- if(aStepName == KSpudTelUnitMultipleContexts)
- {
- testStep = new(ELeave) CSpudTelUnitMultipleContexts();
- }
- if(aStepName == KSpudTelUnitCancel)
- {
- testStep = new(ELeave) CSpudTelUnitCancel();
- }
-
- // SPUD FSM unit tests
- if(aStepName == KSpudFsmUnitNormalOperation)
- {
- testStep = new(ELeave) CSpudFsmUnitNormalOperation();
- }
- if(aStepName == KSpudFsmCreatePrimaryError1)
- {
- testStep = new(ELeave) CSpudFsmUnitCreatePrimaryError1();
- }
- if(aStepName == KSpudFsmCreatePrimaryError2)
- {
- testStep = new(ELeave) CSpudFsmUnitCreatePrimaryError2();
- }
- if(aStepName == KSpudFsmCreatePrimaryError3)
- {
- testStep = new(ELeave) CSpudFsmUnitCreatePrimaryError3();
- }
- if(aStepName == KSpudFsmSetQosAndTftError)
- {
- testStep = new(ELeave) CSpudFsmUnitSetQosAndTftError();
- }
- if(aStepName == KSpudFsmChangeQosAndTftError)
- {
- testStep = new(ELeave) CSpudFsmUnitChangeQosAndTftError();
- }
- if(aStepName == KSpudFsmTestNotifications)
- {
- testStep = new(ELeave) CSpudFsmUnitNotifications();
- }
- if(aStepName == KSpudFsmNetworkDelete)
- {
- testStep = new(ELeave) CSpudFsmUnitNetworkDelete();
- }
-
- );
-
- if (err != KErrNone)
- {
- return NULL;
- }
-
- return testStep;
- }
-
--- a/telephonyprotocols/umtsgprsscpr/Test/te_spud/src/SpudUnitTestStepBase.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,496 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Test framework for SPUD TEL and SPUD FSM unit tests
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include <e32property.h>
-#include <c32comm.h>
-#include <e32def.h>
-#include <e32std.h>
-
-#include <in_iface.h>
-#include <simtsy.h>
-
-#include "SpudUnitTestStep.h"
-#include "InputRequestListener.h"
-
-using namespace EtelDriver;
-
-CSpudUnitTestStepBase::CSpudUnitTestStepBase(TInt aTestNumber, TBool aUseTestPdpFsmInterface) : iTestNumber(aTestNumber), iUseTestPdpFsmInterface(aUseTestPdpFsmInterface)
- {}
-
-/**
-Sets the section for the simtsy to use in its c:\config.txt file.
-The section that will be used is testX, where X is the parameter
-aTestNumber.
-
-@param aTestNumber Simtsy configuration section number, which will be
- set to ensure simtsy loads the correct parameters on
- when it is loaded.
-@leave The function leaves if the Sim.TSY test number property is not
- defined; e.g. make sure StartC32 has been called.
-*/
-void CSpudUnitTestStepBase::SetSimTsyTestNumberL(TInt aTestNumber)
- {
- User::LeaveIfError(RProperty::Set(KUidPSSimTsyCategory, KPSSimTsyTestNumber, aTestNumber));
- }
-
-/**
- Initializes the test framework, including creating the thread that will run the active
- scheduler containing the components under test (SPUD or SPUDTEL)
- */
-TVerdict CSpudUnitTestStepBase::doTestStepPreambleL()
- {
- SetSimTsyTestNumberL(iTestNumber);
-
- // create CTestRequestListener, to be used to contain parameters to be passed
- // between the two threads
- iListener = CInputRequestListener::NewL(iUseTestPdpFsmInterface);
-
- // creating and start the thread that will run the active scheduler containing SPUD or SPUDTEL
- TActiveSchedulerThreadParams params;
- params.iListener = iListener;
- params.iThreadId = RThread().Id();
- _LIT(activeSchedulerThreadName, "ActiveSchedulerThread_");
- TBuf<255> buf(activeSchedulerThreadName);
- buf.AppendNum(iTestNumber);
- TInt ret = iActiveSchedulerThread.Create(buf, ActiveSchedulerThread, KDefaultStackSize, NULL, ¶ms);
- TESTEL(ret == KErrNone, ret);
- iActiveSchedulerThread.Resume();
-
- // wait for the thread to initialize before sending it any requests
- User::WaitForRequest(iListener->iThreadInitialized);
-
- return TestStepResult();
- }
-
-/**
- Cleans up anything allocated in the preamble
- */
-TVerdict CSpudUnitTestStepBase::doTestStepPostambleL()
- {
- // if we complete the listener's status with an error, the RunL will stop the
- // active scheduler and the thread will clean up any resources and exit
- TRequestStatus *status = &iListener->iStatus;
- iActiveSchedulerThread.RequestComplete(status, KErrCancel);
-
- // wait until the thread has cleaned up then kill it
- // if the iThreadDestructed is never completed, this is probably the result of the UHEAP_MARKEND macro failing
- User::WaitForRequest(iListener->iThreadDestructed);
- iActiveSchedulerThread.Kill(KErrNone);
- iActiveSchedulerThread.Close();
-
- delete iListener;
- iListener = NULL;
-
- return EPass;
- }
-
-/**
- Initializes the packet service to query current parameters
-*/
-void CSpudUnitTestStepBase::InitPhoneAndPacketServiceL()
- {
- TESTL(iTelServer.Connect() == KErrNone);
- TESTL(iTelServer.LoadPhoneModule( _L("SIM") ) == KErrNone);
- TESTL(iPhone.Open ( iTelServer, _L("SimulatorPhone") ) == KErrNone);
- TESTL(iPacketService.Open(iPhone) == KErrNone);
- }
-
-void CSpudUnitTestStepBase::DestroyPhoneAndPacketService()
- {
- iPacketService.Close();
- iPhone.Close();
- iTelServer.Close();
- }
-
-// Set up to not use Test PdpFsmInterface (and use the spud fsm's RPdpFsmInterface)
-CSpudFsmUnitTestStepBase::CSpudFsmUnitTestStepBase(TInt aTestNumber) : CSpudUnitTestStepBase(aTestNumber, EFalse)
- {}
-
-// Set up to use Test PdpFsmInterface
-CSpudTelUnitTestStepBase::CSpudTelUnitTestStepBase(TInt aTestNumber) : CSpudUnitTestStepBase(aTestNumber, ETrue)
- {}
-
-/**
- Must be called after simtsy has been initialized.
- Instructs the simtsy to complete a given request/notification. The supported commands are given in TEtelRequestType.
- The parameter supplied in aNewValue instructs the simtsy what data from the config.txt to use in the completion of the request.
- The aNewValue is the index to the entry to be used to complete the request for the current test step section, ie if aNewValue
- is 0, iTestNumber is 3, and aEtelCommand is ENetworkQoSChange, the entry will complete any NotifyNetworkQoSChange calls
- with data from the first QosProfileReqR99 entry of section [test3] in the config.txt file
-*/
-void CSpudUnitTestStepBase::EtelRequest(TEtelRequestType aEtelCommand, TInt aNewValue)
- {
- INFO_PRINTF3(_L("CSpudUnitTestStepBase::EtelRequest: aEtelCommand = %d, aNewValue = %d"), aEtelCommand, aNewValue);
-
- TUint key(0);
-
- switch (aEtelCommand)
- {
- case ENetworkQoSChange:
- key = KPSSimTsyNetworkQoSChange;
- break;
- case ENetworkChangeRegStatus:
- key = KPSSimtsyPacketServiceNtwkRegStatusChange;
- break;
- case EContextStatusChange:
- key = KPSSimtsyPacketContextStatusChange;
- break;
- default:
- // log error
- return;
- }
-
- // simtsy will listen for any changes to the property, and complete the corresponding request
- TInt ret = RProperty::Set(KUidPSSimTsyCategory, key, aNewValue);
- TEST(ret == KErrNone);
- }
-
-/**
- Calling this will instruct the CTestRequestListener to call REtelDriverInput::CancelPdpNotifications on SPUDTEL
-*/
-void CSpudTelUnitTestStepBase::CancelPdpRequest(TContextId aPdpId)
- {
- INFO_PRINTF2(_L("CSpudUnitTestStepBase::EtelDriverCancelPdpRequest: aPdpId = %d"), aPdpId);
- // wait until iListener to finish with the iControlData member so that 2 requests
- // immediately after one another will still work
- User::WaitForRequest(iListener->iReadyForInputRequest);
- iListener->iReadyForInputRequest = KRequestPending;
-
- // set the parameters to pass to REtelDriverInput::Input
- iListener->iEtelDriverCancelRequestPdpId = aPdpId;
-
- // complete iListener's status, causing its RunL to call CancelPdp on SPUDTEL
- TRequestStatus *status = &iListener->iStatus;
- iActiveSchedulerThread.RequestComplete(status, CInputRequestListener::EEtelDriverCancelPdpRequest);
- }
-
-/**
- Calling this will instruct the CTestRequestListener to call REtelDriverInput::Input on SPUDTEL
-*/
-void CSpudTelUnitTestStepBase::EtelDriverInputRequest(TContextId aPdpId, TEtelInput aOperation)
- {
- INFO_PRINTF3(_L("CSpudUnitTestStepBase::EtelDriverInputRequest: aPdpId = %d, aOperation = %d"), aPdpId, aOperation);
- // wait until iListener to finish with the iControlData member so that 2 requests
- // immediately after one another will still work
- User::WaitForRequest(iListener->iReadyForInputRequest);
- iListener->iReadyForInputRequest = KRequestPending;
-
- // set the parameters to pass to REtelDriverInput::Input
- iListener->iEtelDriverInputRequestData.iPdpId = aPdpId;
- iListener->iEtelDriverInputRequestData.iOperation = aOperation;
-
- // complete iListener's status, causing its RunL to call Input on SPUDTEL
- TRequestStatus *status = &iListener->iStatus;
- iActiveSchedulerThread.RequestComplete(status, CInputRequestListener::EEtelDriverInputRequest);
- }
-
-/**
- Wait for RPdpFsmInterface::Input to be called with a non-notification event
-*/
-void CSpudTelUnitTestStepBase::WaitForEtelDriverInputResponse(TContextId aPdpId, PdpFsm::TEtelSignal aSignal, TInt aError)
- {
- INFO_PRINTF3(_L("CSpudUnitTestStepBase::WaitForEtelDriverInputResponse: aPdpId = %d, aSignal = %d"), aPdpId, aSignal);
-
- // the implementation of RPdpFsmInterface::Input that is called by the Etel driver will complete the iEtelDriverInputResponseStatus request
- User::WaitForRequest(iListener->iEtelDriverInputResponseStatus);
-
- // make sure the parameters are as expected
- TEST(iListener->iEtelDriverInputResponseStatus == aError);
- TEST(iListener->iEtelDriverInputResponseData.iPdpId == aPdpId);
- TEST(iListener->iEtelDriverInputResponseData.iSignal == aSignal);
-
- iListener->iEtelDriverInputResponseStatus = KRequestPending;
- }
-
-/**
- Wait for RPdpFsmInterface::Input to be called with aOperation EConfigGPRSChangeNetwork
-*/
-void CSpudTelUnitTestStepBase::WaitForNextContextConfigNotification(TContextId aPdpId, const RPacketContext::TContextConfigGPRS& aContextConfigGPRS)
- {
- INFO_PRINTF2(_L("CSpudUnitTestStepBase::WaitForNextContextConfigNotification: aPdpId = %d"), aPdpId);
-
- // the implementation of RPdpFsmInterface::Input that is called by the Etel driver will complete the iEtelDriverConfigGPRSNotificationStatus request
- User::WaitForRequest(iListener->iEtelDriverConfigGPRSNotificationStatus);
-
- INFO_PRINTF2(_L("CSpudUnitTestStepBase::WaitForNextContextConfigNotification: iListener->iNotifyContextConfigData.iPdpId = %d"), iListener->iNotifyContextConfigData.iPdpId);
- // make sure the parameters are as expected
- TEST(iListener->iEtelDriverConfigGPRSNotificationStatus == KErrNone);
- TEST(iListener->iNotifyContextConfigData.iPdpId == aPdpId);
- TEST(CompareContextConfigGPRS(iListener->iNotifyContextConfigData.iContextConfigGPRS, aContextConfigGPRS));
-
- iListener->iEtelDriverConfigGPRSNotificationStatus = KRequestPending;
- }
-
-/**
- Wait for RPdpFsmInterface::Input to be called with aOperation EContextStatusChangeNetwork
-*/
-void CSpudTelUnitTestStepBase::WaitForGivenEtelContextStatusNotification(TContextId aPdpId, RPacketContext::TContextStatus aContextStatus)
- {
- INFO_PRINTF3(_L("CSpudUnitTestStepBase::WaitForGivenContextStatusNotification: aPdpId = %d, aContextStatus = %d"), aPdpId, aContextStatus);
-
- do
- {
- // the implementation of RPdpFsmInterface::Input that is called by the Etel driver will complete the iEtelDriverContextStatusNotificationStatus request
- User::WaitForRequest(iListener->iEtelDriverContextStatusNotificationStatus);
-
- INFO_PRINTF3(_L("CSpudUnitTestStepBase::WaitForGivenContextStatusNotification: iPdpId = %d, iContextStatus = %d"), iListener->iNotifyContextConfigData.iPdpId, iListener->iNotifyContextStatusData.iContextStatus);
- } while (iListener->iNotifyContextStatusData.iPdpId != aPdpId || iListener->iNotifyContextStatusData.iContextStatus != aContextStatus);
-
- // make sure the parameters are as expected
- TEST(iListener->iEtelDriverContextStatusNotificationStatus == KErrNone);
- TEST(iListener->iNotifyContextStatusData.iPdpId == aPdpId);
- TEST(iListener->iNotifyContextStatusData.iContextStatus == aContextStatus);
-
- iListener->iEtelDriverContextStatusNotificationStatus = KRequestPending;
- }
-
-/**
- Wait for RPdpFsmInterface::Input to be called with aOperation EQoSProfileChangeNetwork
-*/
-void CSpudTelUnitTestStepBase::WaitForNextQosNotification(TContextId aPdpId, const RPacketQoS::TQoSR99_R4Negotiated& aQoSR99_R4Negotiated)
- {
- INFO_PRINTF2(_L("CSpudUnitTestStepBase::WaitForNextQosNotification: aPdpId = %d"), aPdpId);
-
- // the implementation of RPdpFsmInterface::Input that is called by the Etel driver will complete the iEtelDriverQosNotificationStatus request
- User::WaitForRequest(iListener->iEtelDriverQosNotificationStatus);
-
- // make sure the parameters are as expected
- TEST(iListener->iEtelDriverQosNotificationStatus == KErrNone);
- TEST(iListener->iNotifyQosNegotiatedData.iPdpId == aPdpId);
- TEST(CompareUMTSQoSNeg(iListener->iNotifyQosNegotiatedData.iNegotiated.NegotiatedQoSR99_R4(), aQoSR99_R4Negotiated));
- iListener->iEtelDriverQosNotificationStatus = KRequestPending;
- }
-
-
-/**
- Wait for RPdpFsmInterface::Input to be called with aOperation EServiceStatusChangeNetwork
-*/
-void CSpudTelUnitTestStepBase::WaitForNextServiceNotificationStatus(RPacketService::TStatus aServiceStatus)
- {
- INFO_PRINTF2(_L("CSpudUnitTestStepBase::WaitForNextServiceNotificationStatus: aServiceStatus = %d"), aServiceStatus);
-
- // the implementation of RPdpFsmInterface::Input that is called by the Etel driver will complete the iEtelDriverServiceNotificationStatus request
- User::WaitForRequest(iListener->iEtelDriverServiceNotificationStatus);
-
- INFO_PRINTF2(_L("CSpudUnitTestStepBase::WaitForNextServiceNotificationStatus: aServiceStatus = %d"), aServiceStatus);
- // make sure the parameters are as expected
- TEST(iListener->iEtelDriverServiceNotificationStatus == KErrNone);
- TEST(iListener->iPacketServiceStatus == aServiceStatus);
-
- iListener->iEtelDriverServiceNotificationStatus = KRequestPending;
- }
-
-/**
- Calling this will instruct the CTestRequestListener to call REtelDriverInput::Input on SPUDTEL
-*/
-void CSpudFsmUnitTestStepBase::FsmInputRequest(TContextId aPdpId, TInt aOperation, TInt aParam)
- {
- INFO_PRINTF4(_L("CSpudUnitTestStepBase::FsmInputRequest: aPdpId = %d, aOperation = %d, aParam = %d"), aPdpId, aOperation, aParam);
-
- // wait until iListener to finish with the iControlData member so that 2 requests
- // immediately after one another will still work
- User::WaitForRequest(iListener->iReadyForInputRequest);
- iListener->iReadyForInputRequest = KRequestPending;
-
- // set the parameters to pass to REtelDriverInput::Input
- iListener->iFsmInputRequestData.iPdpId = aPdpId;
- iListener->iFsmInputRequestData.iOperation = aOperation;
- iListener->iFsmInputRequestData.iParam = aParam;
-
- // complete iListener's status, causing its RunL to call Input on SPUDTEL
- TRequestStatus *status = &iListener->iStatus;
- iActiveSchedulerThread.RequestComplete(status, CInputRequestListener::EFsmInputRequest);
- }
-
-/**
- Wait for MSpudManInterface::Input to be called with a non-notification event
-*/
-void CSpudFsmUnitTestStepBase::WaitForFsmInputResponse(TInt aPdpId, TInt aEvent, TInt aParam)
- {
- INFO_PRINTF4(_L("CSpudUnitTestStepBase::WaitForFsmInputResponse: aPdpId = %d, aOperation = %d, aParam = %d"), aPdpId, aEvent, aParam);
-
- // the implementation of MSpudManInterface::Input that is called by the Etel driver will complete the iFsmInputResponseStatus request
- User::WaitForRequest(iListener->iFsmInputResponseStatus);
-
- // make sure the parameters are as expected
- TEST(iListener->iFsmInputResponseStatus == KErrNone);
- TEST(iListener->iFsmInputResponseData.iPdpId == aPdpId);
- TEST(iListener->iFsmInputResponseData.iEvent == aEvent);
- TEST(iListener->iFsmInputResponseData.iParam == aParam);
-
- iListener->iFsmInputResponseStatus = KRequestPending;
- }
-
-
-void CSpudFsmUnitTestStepBase::FsmObjectCreate(TContextId aPdpId)
- {
- INFO_PRINTF2(_L("CSpudUnitTestStepBase::FsmObjectCreate(aPdpId = %d)"), aPdpId);
-
- // wait until iListener to finish with the iControlData member so that 2 requests
- // immediately after one another will still work
- //
- User::WaitForRequest(iListener->iReadyForInputRequest);
- iListener->iReadyForInputRequest = KRequestPending;
-
- // Set the parameters to pass to CPdpFsmFactory
- //
- iListener->iFsmInputRequestData.iPdpId = aPdpId;
-
- // complete iListener's status, causing its RunL to call Input on SPUDTEL
- TRequestStatus *status = &iListener->iStatus;
- iActiveSchedulerThread.RequestComplete(status, CInputRequestListener::EFsmObjectCreate);
- }
-
-
-void CSpudFsmUnitTestStepBase::WaitForFsmObjectCreateResponse(TInt aPdpId)
- {
- INFO_PRINTF2(_L("CSpudUnitTestStepBase::WaitForEFsmObjectCreateRespons(aPdpId = %d)"), aPdpId);
-
- // The Test listener will complete the iFsmObjectCreateResponse request.
- //
- User::WaitForRequest(iListener->iFsmObjectCreateResponse);
-
-
- // Make sure the parameters are as expected
-
- TEST(iListener->iFsmObjectCreateResponse == KErrNone);
-
-
- TEST(iListener->iFsmInputResponseData.iPdpId == aPdpId);
-
- iListener->iFsmObjectCreateResponse = KRequestPending;
-
- }
-
-
-/**
- Wait for MSpudManInterface::Input to be called with aOperation KContextBlockedEvent
-*/
-void CSpudFsmUnitTestStepBase::WaitForFsmSuspendedNotification(TContextId aPdpId)
- {
- INFO_PRINTF2(_L("CSpudUnitTestStepBase::WaitForFsmSuspendedNotification: aPdpId = %d"), aPdpId);
-
- // the implementation of MSpudManInterface::Input that is called by the Etel driver will complete the iFsmContextSuspendedStatus request
- User::WaitForRequest(iListener->iFsmContextSuspendedStatus);
-
- // make sure the parameters are as expected
- TEST(iListener->iFsmContextSuspendedStatus == KErrNone);
- TEST(iListener->iContextBlockedEventPdpId == aPdpId);
-
- iListener->iFsmContextSuspendedStatus = KRequestPending;
- }
-
-/**
- Wait for MSpudManInterface::Input to be called with aOperation KContextUnblockedEvent
-*/
-void CSpudFsmUnitTestStepBase::WaitForFsmResumedNotification(TContextId aPdpId)
- {
- INFO_PRINTF2(_L("CSpudUnitTestStepBase::WaitForEtelDriverInputResponse: aPdpId = %d"), aPdpId);
-
- // the implementation of MSpudManInterface::Input that is called by the Etel driver will complete the iFsmContextResumedStatus request
- User::WaitForRequest(iListener->iFsmContextResumedStatus);
-
- // make sure the parameters are as expected
- TEST(iListener->iFsmContextResumedStatus == KErrNone);
- TEST(iListener->iContextUnblockedEventPdpId == aPdpId);
-
- iListener->iFsmContextResumedStatus = KRequestPending;
- }
-
-/**
- Wait for MSpudManInterface::Input to be called with aOperation KNetworkStatusEvent
-*/
-void CSpudFsmUnitTestStepBase::WaitForFsmServiceNotificationStatus()
- {
- INFO_PRINTF1(_L("CSpudUnitTestStepBase::WaitForGivenFsmServiceNotificationStatus"));
-
- // the implementation of MSpudManInterface::Input that is called by the Etel driver will complete the iFsmNetworkStatusStatus request
- User::WaitForRequest(iListener->iFsmNetworkStatusStatus);
-
- // make sure the parameters are as expected
- TEST(iListener->iFsmNetworkStatusStatus == KErrNone);
- // already checked iPdpId and iStatus from exiting condition of do while loop
-
- iListener->iFsmNetworkStatusStatus = KRequestPending;
- }
-
-/**
- Wait for MSpudManInterface::Input to be called with aOperation KContextParametersChangeEvent
-*/
-void CSpudFsmUnitTestStepBase::WaitForFsmContextConfigNotification(TContextId aPdpId, const RPacketContext::TContextConfigGPRS& aContextConfig)
- {
- INFO_PRINTF2(_L("CSpudUnitTestStepBase::WaitForFsmContextConfigNotification: aPdpId = %d"), aPdpId);
-
- // the implementation of MSpudManInterface::Input that is called by the Etel driver will complete the iFsmContextParameterChangeStatus request
- User::WaitForRequest(iListener->iFsmContextParameterChangeStatus);
-
- // make sure the parameters are as expected
- TEST(iListener->iFsmContextParameterChangeStatus == KErrNone);
- TEST(iListener->iContextParametersEventData.iPdpId == aPdpId);
- TEST(CompareContextConfigGPRS(aContextConfig, iListener->iContextParametersEventData.iContextConfig));
-
- iListener->iFsmContextParameterChangeStatus = KRequestPending;
- }
-
-/**
- Wait for MSpudManInterface::Input to be called with aOperation KContextParametersChangeEvent
-*/
-void CSpudFsmUnitTestStepBase::WaitForFsmQosChangeNotification(TContextId aPdpId, const RPacketQoS::TQoSR99_R4Negotiated& aQosParams)
- {
- INFO_PRINTF2(_L("CSpudUnitTestStepBase::WaitForFsmQosChangeNotification: aPdpId = %d"), aPdpId);
-
- // the implementation of MSpudManInterface::Input that is called by the Etel driver will complete the iFsmContextParameterChangeStatus request
- User::WaitForRequest(iListener->iFsmContextParameterChangeStatus);
-
- // make sure the parameters are as expected
- TEST(iListener->iFsmContextParameterChangeStatus == KErrNone);
- TEST(iListener->iContextParametersEventData.iPdpId == aPdpId);
- TEST(CompareUMTSQoSNeg(aQosParams, iListener->iContextParametersEventData.iNegotiated.NegotiatedQoSR99_R4()));
-
- iListener->iFsmContextParameterChangeStatus = KRequestPending;
- }
-
-
-/**
- Wait for context aPacketContext to have the given status
-*/
-void CSpudFsmUnitTestStepBase::WaitForGivenContextStatus(RPacketContext& aPacketContext, RPacketContext::TContextStatus aStatus)
- {
- INFO_PRINTF2(_L("CSpudUnitTestStepBase::WaitForGivenContextStatus: aStatus = %d"), aStatus);
-
- TRequestStatus status;
- RPacketContext::TContextStatus contextStatus = RPacketContext::EStatusUnknown;
- RPacketContext::TContextStatus contextStatus1 = RPacketContext::EStatusUnknown;
-
- aPacketContext.NotifyStatusChange(status, contextStatus);
- aPacketContext.GetStatus(contextStatus1);
- INFO_PRINTF2(_L("CSpudUnitTestStepBase::WaitForGivenContextStatus: contextStatus1 = %d"), contextStatus1);
- if (contextStatus1 != RPacketContext::EStatusDeleted)
- {
- while (contextStatus != aStatus)
- {
- User::WaitForRequest(status);
- INFO_PRINTF2(_L("CSpudUnitTestStepBase::WaitForGivenContextStatus: contextStatus = %d"), contextStatus);
- TEST(status == KErrNone);
- }
- }
- }
--- a/telephonyprotocols/umtsgprsscpr/Test/te_spud/testdata/Spud_config.txt Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,559 +0,0 @@
-[test1]
-#
-# The RPacketContext::TContextConfigGPRS parameters for this test step
-# The parameters are identical to those assigned in the method DefaultTestContextConfigGPRS
-SetContextConfigGPRS= 1, ACME INTERNET PROVIDERS LTD, i-MODE GATEWAY, 1, 1, 1, 1, USER1, PASSWORD1, CHALLENGE1, RESPONSE1, PRIMARYSERVER1, SECONDARYSERVER1, 1
-
-#
-# The context configuration items for this test step
-# All of the contexts are set-up to have no pauses or errors when activating, deactivating or deleting
-R99ContextConfig = PRIMARY1, 0, 0, 0, 0, 0, 0, 0
-R99ContextConfig = PRIMARY2, 0, 0, 0, 0, 0, 0, 0
-R99ContextConfig = PRIMARY3, 0, 0, 0, 0, 0, 0, 0
-R99ContextConfig = SECONDARY1, 0, 0, 0, 0, 0, 0, 0
-
-#
-# The TTFTInfo TFT filters for this test step
-# The following entry corresponds to values assigned by the method DefaultPacketFilter1
-TFTfilter = 0, 1, 0.0.0.0.0.0.0.0.0.0.255.255.1.1.1.1, 0.0.0.0.0.0.0.0.0.0.255.255.255.255.255.255, 1, 1, 1, 1, 1, 1, 1, 1
-# The following entry corresponds to values assigned by the method DefaultPacketFilter2
-TFTfilter = 1, 2, 0.0.0.0.0.0.0.0.0.0.255.255.1.1.1.1, 0.0.0.0.0.0.0.0.0.0.255.255.255.255.255.255, 2, 2, 2, 2, 2, 2, 2, 2
-# The following entry corresponds to values assigned by the method DefaultPacketFilter3
-TFTfilter = 2, 3, 0.0.0.0.0.0.0.0.0.0.255.255.1.1.1.1, 0.0.0.0.0.0.0.0.0.0.255.255.255.255.255.255, 3, 3, 3, 3, 3, 3, 3, 3
-
-#
-# Configure the context's status to be changed using publish and subscribe
-NotifyContextStatusChangeType = PublishSubscribe
-# NotifyContextStatusChange <iContextName>, <iDuration>, <iStatus>
-# When the value 0 is published to KPSSimtsyPacketContextStatusChange the context will be suspended (status = EStatusSuspended = 5)
-NotifyContextStatusChange = PRIMARY1, 0, 5
-# When the value 1 is published to KPSSimtsyPacketContextStatusChange the context will be resumed (status = EStatusActive = 3)
-NotifyContextStatusChange = PRIMARY1, 0, 3
-
-#
-# QoS profiles for this test step
-# The following entries are the requested profiles - they are identical and correspond to the values assigned by the method DefaultQoSR99_R4Requested for all 3 contexts
-QosProfileReqR99 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2
-QosProfileReqR99 = PRIMARY2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2
-QosProfileReqR99 = SECONDARY1, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2
-
-QosProfileReqR5 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x00, 0x00
-QosProfileReqR5 = PRIMARY2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x00, 0x00
-QosProfileReqR5 = SECONDARY1, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x00, 0x00
-
-# The following entries correspond to the values assigned by the method SecondQoSR99_R4Requested
-QosProfileReqR99 = PRIMARY1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1
-QosProfileReqR99 = PRIMARY2, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1
-QosProfileReqR99 = PRIMARY3, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1
-QosProfileReqR99 = SECONDARY1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1
-
-QosProfileReqR5 = PRIMARY1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x00, 0x00
-QosProfileReqR5 = PRIMARY2, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x00, 0x00
-QosProfileReqR5 = PRIMARY3, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x00, 0x00
-QosProfileReqR5 = SECONDARY1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x00, 0x00
-
-# The following entries are the negotiated profiles - they are identical and correspond to the values assigned by the method DefaultQoSR99_R4Negotiated for all 3 contexts
-QosProfileNegR99 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2
-QosProfileNegR99 = PRIMARY2, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2
-QosProfileNegR99 = PRIMARY3, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2
-QosProfileNegR99 = SECONDARY1, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2
-
-QosProfileNegR5= PRIMARY1, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 0x00, 0x00
-QosProfileNegR5 = PRIMARY2, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 0x00, 0x00
-QosProfileNegR5 = PRIMARY3, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 0x00, 0x00
-QosProfileNegR5 = SECONDARY1, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 0x00, 0x00
-# The following entries correspond to the values assigned by the method SecondQoSR99_R4Negotiated for all 3 contexts
-QosProfileNegR99 = PRIMARY1, 0x01, 0x01, 0x01, 0x01, 1, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1
-QosProfileNegR99 = PRIMARY2, 0x01, 0x01, 0x01, 0x01, 1, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1
-QosProfileNegR99 = SECONDARY1, 0x01, 0x01, 0x01, 0x01, 1, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1
-
-QosProfileNegR5 = PRIMARY1, 0x01, 0x01, 0x01, 0x01, 1, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 0x00, 0x00
-QosProfileNegR5 = PRIMARY2, 0x01, 0x01, 0x01, 0x01, 1, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 0x00, 0x00
-QosProfileNegR5 = SECONDARY1, 0x01, 0x01, 0x01, 0x01, 1, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 0x00, 0x00
-
-
-#
-# The InitialiseContext parameters for this test step
-# The following entries correspond to the values assigned by the method DefaultTestDataChannel
-CommSetup= SIMTSYLOOPBACK.CSY, SIMTSYLOOPBACK::0, 18, 0
-
-[test3]
-#
-# Set-up calls to SetConfig to fail for the first primary context
-# The -1 sets up SetConfig to fail every time, and the -2 causes SetConfig to fail with error KErrGeneral (-2)
-SetConfigFail = PRIMARY1, -1, -2
-
-[test6]
-#
-# The RPacketContext::TContextConfigGPRS parameters for this test step
-# The parameters are identical to those assigned in the method DefaultTestContextConfigGPRS
-SetContextConfigGPRS= 1, ACME INTERNET PROVIDERS LTD, i-MODE GATEWAY, 1, 1, 1, 1, USER1, PASSWORD1, CHALLENGE1, RESPONSE1, PRIMARYSERVER1, SECONDARYSERVER1, 1
-
-#
-# There are no QosProfileReqR99 entries. This will make a call to SetProfileParameters to fail.
-
-[test7]
-#
-# The RPacketContext::TContextConfigGPRS parameters for this test step
-# The parameters are identical to those assigned in the method DefaultTestContextConfigGPRS
-SetContextConfigGPRS= 1, ACME INTERNET PROVIDERS LTD, i-MODE GATEWAY, 1, 1, 1, 1, USER1, PASSWORD1, CHALLENGE1, RESPONSE1, PRIMARYSERVER1, SECONDARYSERVER1, 1
-
-#
-# QoS profiles for this test step
-# The following entries are the requested profiles - they are identical and correspond to the values assigned by the method DefaultQoSR99_R4Requested
-QosProfileReqR99 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2
-
-QosProfileReqR5 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x00, 0x00
-# The following entries are the negotiated profiles - they are identical and correspond to the values assigned by the method DefaultQoSR99_R4Negotiated
-QosProfileNegR99 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2
-
-QosProfileNegR5 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 0x00, 0x00
-
-#
-# Set-up calls to modify the TFT to fail for the first primary context
-# The first call to DeleteTFT will fail with error code KErrGeneral (-2) (and subsequent calls will pass)
-DeleteTftFail = PRIMARY1, 1, -2
-# The first call to CreateNewTFT will fail with error code KErrGeneral (-2) (and subsequent calls will pass)
-CreateTftConfig = PRIMARY1, 1, -2
-# The first call to AddPacketFilter will fail with error code KErrGeneral (-2) (and subsequent calls will pass)
-AddPacketFilter = PRIMARY1, 1, -2
-
-[test8]
-#
-# The context configuration items for this test step
-# Set-up the first primary context to fail activating with error code KErrGeneral (-2)
-R99ContextConfig = PRIMARY1, 0, -2, 0, 0, 0, 0, 0
-
-#
-# The RPacketContext::TContextConfigGPRS parameters for this test step
-# The parameters are identical to those assigned in the method DefaultTestContextConfigGPRS
-SetContextConfigGPRS= 1, ACME INTERNET PROVIDERS LTD, i-MODE GATEWAY, 1, 1, 1, 1, USER1, PASSWORD1, CHALLENGE1, RESPONSE1, PRIMARYSERVER1, SECONDARYSERVER1, 1
-
-#
-# QoS profiles for this test step
-# The following entries are the requested profiles - they are identical and correspond to the values assigned by the method DefaultQoSR99_R4Requested
-QosProfileReqR99 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2
-
-QosProfileReqR5 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x00, 0x00
-
-
-# The following entries are the negotiated profiles - they are identical and correspond to the values assigned by the method DefaultQoSR99_R4Negotiated
-QosProfileNegR99 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2
-
-QosProfileNegR5 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 0x00, 0x00
-
-[test14]
-#
-# The context configuration items for this test step
-# Set-up the first primary context to fail activating with error code KErrGeneral (-2)
-R99ContextConfig = PRIMARY1, 0, 0, 0, 0, 0, 0, 0
-
-#
-# The RPacketContext::TContextConfigGPRS parameters for this test step
-# The parameters are identical to those assigned in the method DefaultTestContextConfigGPRS
-SetContextConfigGPRS= 1, ACME INTERNET PROVIDERS LTD, i-MODE GATEWAY, 1, 1, 1, 1, USER1, PASSWORD1, CHALLENGE1, RESPONSE1, PRIMARYSERVER1, SECONDARYSERVER1, 1
-
-#
-# QoS profiles for this test step
-# The following entries are the requested profiles - they are identical and correspond to the values assigned by the method DefaultQoSR99_R4Requested
-QosProfileReqR99 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2
-
-QosProfileReqR5 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x00, 0x00
-
-# The following entries are the negotiated profiles - they are identical and correspond to the values assigned by the method DefaultQoSR99_R4Negotiated
-QosProfileNegR99 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2
-
-QosProfileNegR5 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 0x00, 0x00
-
-#
-# The InitialiseContext parameters for this test step
-# The first 4 elements correspond to the values assigned by the method DefaultTestDataChannel
-# The last two set up the first call to InitialiseContext for the first primary context to fail with error code KErrGeneral (-2)
-CommSetup= SIMTSYLOOPBACK.CSY, SIMTSYLOOPBACK::0, 18, 0, PRIMARY1, 0, 1, -2
-
-[test9]
-#
-# The context configuration items for this test step
-# Set-up the first primary context to fail de-activating with error code KErrGeneral (-2)
-R99ContextConfig = PRIMARY1, 0, 0, 0, -2, 0, 0, 0
-
-#
-# The RPacketContext::TContextConfigGPRS parameters for this test step
-# The parameters are identical to those assigned in the method DefaultTestContextConfigGPRS
-SetContextConfigGPRS= 1, ACME INTERNET PROVIDERS LTD, i-MODE GATEWAY, 1, 1, 1, 1, USER1, PASSWORD1, CHALLENGE1, RESPONSE1, PRIMARYSERVER1, SECONDARYSERVER1, 1
-
-# The following entry is the requested profiles - they are identical and correspond to the values assigned by the method DefaultQoSR99_R4Requested
-QosProfileReqR99 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2
-
-QosProfileReqR5 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x00, 0x00
-# The following entry is the negotiated profiles - they are identical and correspond to the values assigned by the method DefaultQoSR99_R4Negotiated
-QosProfileNegR99 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2
-QosProfileNegR5 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 0x00, 0x00
-[test10]
-#
-# The context configuration items for this test step
-# Set-up the first primary context to fail deleting with error code KErrGeneral (-2)
-R99ContextConfig = PRIMARY1, 0, 0, 0, 0, 0, -2, 0
-
-#
-# The RPacketContext::TContextConfigGPRS parameters for this test step
-# The parameters are identical to those assigned in the method DefaultTestContextConfigGPRS
-SetContextConfigGPRS= 1, ACME INTERNET PROVIDERS LTD, i-MODE GATEWAY, 1, 1, 1, 1, USER1, PASSWORD1, CHALLENGE1, RESPONSE1, PRIMARYSERVER1, SECONDARYSERVER1, 1
-
-# The following entry is the requested profiles - they are identical and correspond to the values assigned by the method DefaultQoSR99_R4Requested
-QosProfileReqR99 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2
-
-QosProfileReqR5 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x00, 0x00
-# The following entry is the negotiated profiles - they are identical and correspond to the values assigned by the method DefaultQoSR99_R4Negotiated
-QosProfileNegR99 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2
-QosProfileNegR5 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 0x00, 0x00
-[test11]
-#
-# The context configuration items for this test step
-# All of the contexts are set-up to have no pauses or errors when activating, deactivating or deleting
-R99ContextConfig = PRIMARY1, 0, 0, 0, 0, 0, 0, 0
-R99ContextConfig = PRIMARY2, 0, 0, 0, 0, 0, 0, 0
-R99ContextConfig = SECONDARY1, 0, 0, 0, 0, 0, 0, 0
-R99ContextConfig = SECONDARY2, 0, 0, 0, 0, 0, 0, 0
-
-#
-# The TTFTInfo TFT filters for this test step
-# The following entry corresponds to values assigned by the method DefaultPacketFilter1
-TFTfilter = 0, 1, 0.0.0.0.0.0.0.0.0.0.255.255.1.1.1.1, 0.0.0.0.0.0.0.0.0.0.255.255.255.255.255.255, 1, 1, 1, 1, 1, 1, 1, 1
-# The following entry corresponds to values assigned by the method DefaultPacketFilter2
-TFTfilter = 1, 2, 0.0.0.0.0.0.0.0.0.0.255.255.1.1.1.1, 0.0.0.0.0.0.0.0.0.0.255.255.255.255.255.255, 2, 2, 2, 2, 2, 2, 2, 2
-
-#
-# QoS profiles for this test step
-# The following entries are the requested profiles - they are identical and correspond to the values assigned by the method DefaultQoSR99_R4Requested for all 3 contexts
-QosProfileReqR99 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2
-QosProfileReqR99 = SECONDARY1, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2
-QosProfileReqR99 = PRIMARY2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2
-QosProfileReqR99 = SECONDARY2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2
-
-QosProfileReqR5 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x00, 0x00
-QosProfileReqR5 = SECONDARY1, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x00, 0x00
-QosProfileReqR5 = PRIMARY2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x00, 0x00
-QosProfileReqR5 = SECONDARY2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x00, 0x00
-# The following entries correspond to the values assigned by the method SecondQoSR99_R4Requested
-QosProfileReqR99 = PRIMARY1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1
-QosProfileReqR99 = SECONDARY1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1
-QosProfileReqR99 = PRIMARY2, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1
-QosProfileReqR99 = SECONDARY2, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1
-
-
-QosProfileReqR5 = PRIMARY1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x00, 0x00
-QosProfileReqR5= SECONDARY1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x00, 0x00
-QosProfileReqR5 = PRIMARY2, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x00, 0x00
-QosProfileReqR5 = SECONDARY2, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x00, 0x00
-
-# The following entries are the negotiated profiles - they are identical and correspond to the values assigned by the method DefaultQoSR99_R4Negotiated for all 3 contexts
-QosProfileNegR99 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2
-QosProfileNegR99 = SECONDARY1, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2
-QosProfileNegR99 = PRIMARY2, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2
-QosProfileNegR99 = SECONDARY2, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2
-
-
-QosProfileNegR5 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 0x00, 0x00
-QosProfileNegR5 = SECONDARY1, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 0x00, 0x00
-QosProfileNegR5 = PRIMARY2, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 0x00, 0x00
-QosProfileNegR5 = SECONDARY2, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 0x00, 0x00
-
-# The following entries correspond to the values assigned by the method SecondQoSR99_R4Negotiated for all 3 contexts
-QosProfileNegR99 = PRIMARY1, 0x01, 0x01, 0x01, 0x01, 1, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1
-QosProfileNegR99 = SECONDARY1, 0x01, 0x01, 0x01, 0x01, 1, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1
-QosProfileNegR99 = PRIMARY2, 0x01, 0x01, 0x01, 0x01, 1, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1
-QosProfileNegR99 = SECONDARY2, 0x01, 0x01, 0x01, 0x01, 1, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1
-
-QosProfileNegR5 = PRIMARY1, 0x01, 0x01, 0x01, 0x01, 1, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 0x00, 0x00
-QosProfileNegR5 = SECONDARY1, 0x01, 0x01, 0x01, 0x01, 1, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 0x00, 0x00
-QosProfileNegR5 = PRIMARY2, 0x01, 0x01, 0x01, 0x01, 1, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 0x00, 0x00
-QosProfileNegR5 = SECONDARY2, 0x01, 0x01, 0x01, 0x01, 1, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 0x00, 0x00
-
-#
-# The InitialiseContext parameters for this test step
-# The following entries correspond to the values assigned by the method DefaultTestDataChannel
-CommSetup= SIMTSYLOOPBACK.CSY, SIMTSYLOOPBACK::0, 18, 0
-
-#
-# The RPacketContext::TContextConfigGPRS parameters for this test step
-# The parameters are identical to those assigned in the method DefaultTestContextConfigGPRS
-SetContextConfigGPRS= 1, ACME INTERNET PROVIDERS LTD, i-MODE GATEWAY, 1, 1, 1, 1, USER1, PASSWORD1, CHALLENGE1, RESPONSE1, PRIMARYSERVER1, SECONDARYSERVER1, 1
-
-[test12]
-
-#
-# Set up the second primary to pause during activate and delete so there is a chance to cancel the request. Also, do not connect to NT Ras.
-R99ContextConfig = PRIMARY1, 0, 0, 0, 0, 0, 0, 0
-R99ContextConfig = PRIMARY2, 10, 0, 0, 0, 10, 0, 0
-R99ContextConfig = SECONDARY1, 0, 0, 0, 0, 0, 0, 0
-
-#
-# SetConfig delay is set to 1 so there is a chance to cancel setting QOS
-SetConfigDelay=1
-
-#
-# The RPacketContext::TContextConfigGPRS parameters for this test step
-# The parameters are identical to those assigned in the method DefaultTestContextConfigGPRS
-SetContextConfigGPRS= 1, ACME INTERNET PROVIDERS LTD, i-MODE GATEWAY, 1, 1, 1, 1, USER1, PASSWORD1, CHALLENGE1, RESPONSE1, PRIMARYSERVER1, SECONDARYSERVER1, 1
-
-#
-# QoS profiles for this test step
-# The following entries are the requested profiles - they are identical and correspond to the values assigned by the method DefaultQoSR99_R4Requested
-QosProfileReqR99 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2
-QosProfileReqR99 = PRIMARY2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2
-
-
-QosProfileReqR5 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x00, 0x00
-QosProfileReqR5 = PRIMARY2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x00, 0x00
-
-# The following entries are the negotiated profiles - they are identical and correspond to the values assigned by the method DefaultQoSR99_R4Negotiated
-QosProfileNegR99 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2
-QosProfileNegR99 = PRIMARY2, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2
-
-
-QosProfileNegR5 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 0x00, 0x00
-QosProfileNegR5 = PRIMARY2, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 0x00, 0x00
-
-#
-# The TTFTInfo TFT filters for this test step
-# The following entry corresponds to values assigned by the method DefaultPacketFilter1
-TFTfilter = 0, 1, 0.0.0.0.0.0.0.0.0.0.255.255.1.1.1.1, 0.0.0.0.0.0.0.0.0.0.255.255.255.255.255.255, 1, 1, 1, 1, 1, 1, 1, 1
-# The following entry corresponds to values assigned by the method DefaultPacketFilter2
-TFTfilter = 1, 2, 0.0.0.0.0.0.0.0.0.0.255.255.1.1.1.1, 0.0.0.0.0.0.0.0.0.0.255.255.255.255.255.255, 2, 2, 2, 2, 2, 2, 2, 2
-
-#
-# The InitialiseContext parameters for this test step
-# The first 4 elements (on all 3 entries) correspond to the values assigned by the method DefaultTestDataChannel
-CommSetup= SIMTSYLOOPBACK.CSY, SIMTSYLOOPBACK::0, 18, 0, PRIMARY1
-# The last element of the next 2 entries mean any calls to InitialiseContext will have a delay of 1 second so there is a chance to cancel creating contexts
-CommSetup= SIMTSYLOOPBACK.CSY, SIMTSYLOOPBACK::0, 18, 0, PRIMARY2, 0, 0, 0, 1
-CommSetup= SIMTSYLOOPBACK.CSY, SIMTSYLOOPBACK::0, 18, 0, SECONDARY1, 0, 0, 0, 1
-
-#
-# The CreateNewTFT entries for this test step
-# The last entry causes a call to CreateNewTFT to have a delay of 1 second so there is a chance to cancel setting TFT
-CreateTftConfig = PRIMARY1, 0, 0, 1
-
-[test102]
-#
-# Set-up calls to SetConfig to fail for the first primary context
-# The -1 sets up SetConfig to fail every time, and the -2 causes SetConfig to fail with error KErrGeneral (-2)
-SetConfigFail = PRIMARY1, -1, -2
-
-[test103]
-#
-# The RPacketContext::TContextConfigGPRS parameters for this test step
-# The parameters are identical to those assigned in the method DefaultTestContextConfigGPRS
-SetContextConfigGPRS= 1, ACME INTERNET PROVIDERS LTD, i-MODE GATEWAY, 1, 1, 1, 1, USER1, PASSWORD1, CHALLENGE1, RESPONSE1, PRIMARYSERVER1, SECONDARYSERVER1, 1
-
-#
-# There are no QosProfileReqR99 entries. This will make a call to SetProfileParameters to fail.
-
-[test104]
-#
-# The context configuration items for this test step
-# Set-up the first primary context to fail activating with error code KErrGeneral (-2)
-R99ContextConfig = PRIMARY1, 0, -2, 0, 0, 0, 0, 0
-
-#
-# The RPacketContext::TContextConfigGPRS parameters for this test step
-# The parameters are identical to those assigned in the method DefaultTestContextConfigGPRS
-SetContextConfigGPRS= 1, ACME INTERNET PROVIDERS LTD, i-MODE GATEWAY, 1, 1, 1, 1, USER1, PASSWORD1, CHALLENGE1, RESPONSE1, PRIMARYSERVER1, SECONDARYSERVER1, 1
-
-[test105]
-#
-# QoS profiles for this test step
-# The following entries are the requested profiles - they correspond to the values assigned by the method DefaultQoSR99_R4Requested
-QosProfileReqR99 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2
-QosProfileReqR99 = PRIMARY1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1
-
-QosProfileReqR5 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x00, 0x00
-QosProfileReqR5 = PRIMARY1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x00, 0x00
-
-
-# The following entries correspond to the values assigned by the method SecondQoSR99_R4Requested
-QosProfileNegR99 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2
-QosProfileNegR99 = PRIMARY1, 0x01, 0x01, 0x01, 0x01, 1, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1
-
-QosProfileNegR5= PRIMARY1, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 0x00, 0x00
-QosProfileNegR5 = PRIMARY1, 0x01, 0x01, 0x01, 0x01, 1, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 0x00, 0x00
-
-#
-# The context configuration items for this test step
-# All of the contexts are set-up to have no pauses or errors when activating, deactivating or deleting
-R99ContextConfig = PRIMARY1, 0, 0, 0, 0, 0, 0, 0
-
-#
-# The RPacketContext::TContextConfigGPRS parameters for this test step
-# The parameters are identical to those assigned in the method DefaultTestContextConfigGPRS
-SetContextConfigGPRS= 1, ACME INTERNET PROVIDERS LTD, i-MODE GATEWAY, 1, 1, 1, 1, USER1, PASSWORD1, CHALLENGE1, RESPONSE1, PRIMARYSERVER1, SECONDARYSERVER1, 1
-
-#
-# The InitialiseContext parameters for this test step
-# The first 4 elements (on both entries) correspond to the values assigned by the method DefaultTestDataChannel
-CommSetup= SIMTSYLOOPBACK.CSY, SIMTSYLOOPBACK::0, 18, 0, PRIMARY1
-# The last two elements set up the first call to InitialiseContext on the first secondary context to fail with error code KErrGeneral (-2)
-CommSetup= SIMTSYLOOPBACK.CSY, SIMTSYLOOPBACK::0, 18, 0, SECONDARY1, 0, 1, -2
-
-[test106]
-SetProfileFail = SECONDARY1, -1, -2
-
-#
-# Set-up calls to modify the TFT to fail for the first primary context
-# The first call to DeleteTFT will fail with error code KErrGeneral (-2) (and subsequent calls will pass)
-DeleteTftFail = SECONDARY1, 1, -2
-# The first call to CreateNewTFT will fail with error code KErrGeneral (-2) (and subsequent calls will pass)
-CreateTftFail = SECONDARY1, 1, -2
-# The first call to AddPacketFilter will fail with error code KErrGeneral (-2) (and subsequent calls will pass)
-AddPacketFilter = SECONDARY1, 1, -2
-
-#
-# The context configuration items for this test step
-# Set-up the first primary context to proceed normally
-R99ContextConfig = PRIMARY1, 0, 0, 0, 0, 0, 0, 0
-# Set-up the first secondary context to fail activating with error code KErrGeneral (-2)
-R99ContextConfig = SECONDARY1, 0, -2, 0, 0, 0, 0, 0
-
-#
-# QoS profiles for this test step
-# The following entries are the requested profiles - they are identical and correspond to the values assigned by the method DefaultQoSR99_R4Requested for both contexts
-QosProfileReqR99 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2
-QosProfileReqR99 = SECONDARY1, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2
-
-QosProfileReqR5 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x00, 0x00
-QosProfileReqR5 = SECONDARY1, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x00, 0x00
-
-# The following entries correspond to the values assigned by the method SecondQoSR99_R4Requested
-QosProfileReqR99 = PRIMARY1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1
-QosProfileReqR99 = SECONDARY1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1
-
-QosProfileReqR5 = PRIMARY1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x00, 0x00
-QosProfileReqR5 = SECONDARY1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x00, 0x00
-
-# The following entries are the negotiated profiles - they are identical and correspond to the values assigned by the method DefaultQoSR99_R4Negotiated for both contexts
-QosProfileNegR99 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2
-QosProfileNegR99 = SECONDARY1, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2
-
-QosProfileNegR5 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 0x00, 0x00
-QosProfileNegR5 = SECONDARY1, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 0x00, 0x00
-
-# The following entries correspond to the values assigned by the method SecondQoSR99_R4Negotiated for all 3 contexts
-QosProfileNegR99 = PRIMARY1, 0x01, 0x01, 0x01, 0x01, 1, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1
-QosProfileNegR99 = SECONDARY1, 0x01, 0x01, 0x01, 0x01, 1, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1
-
-QosProfileNegR5 = PRIMARY1, 0x01, 0x01, 0x01, 0x01, 1, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 0x00, 0x00
-QosProfileNegR5 = SECONDARY1, 0x01, 0x01, 0x01, 0x01, 1, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 0x00, 0x00
-
-
-
-#
-# The RPacketContext::TContextConfigGPRS parameters for this test step
-# The parameters are identical to those assigned in the method DefaultTestContextConfigGPRS
-SetContextConfigGPRS= 1, ACME INTERNET PROVIDERS LTD, i-MODE GATEWAY, 1, 1, 1, 1, USER1, PASSWORD1, CHALLENGE1, RESPONSE1, PRIMARYSERVER1, SECONDARYSERVER1, 1
-
-[test107]
-SetProfileFail = SECONDARY1, -1, -2
-
-DeleteTftFail = SECONDARY1, 1, -2
-CreateTftFail = SECONDARY1, 1, -2
-AddPacketFilter = SECONDARY1, 1, -2
-
-#
-# The context configuration items for this test step
-# All of the contexts are set-up to have no pauses or errors when activating, deactivating or deleting
-R99ContextConfig = PRIMARY1, 0, 0, 0, 0, 0, 0, 0
-R99ContextConfig = SECONDARY1, 0, 0, 0, 0, 0, 0, 0
-
-#
-# The InitialiseContext parameters for this test step
-# The following entries correspond to the values assigned by the method DefaultTestDataChannel
-CommSetup= SIMTSYLOOPBACK.CSY, SIMTSYLOOPBACK::0, 18, 0
-
-#
-# QoS profiles for this test step
-# The following entries are the requested profiles - they are identical and correspond to the values assigned by the method DefaultQoSR99_R4Requested for both contexts
-QosProfileReqR99 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2
-QosProfileReqR99 = SECONDARY1, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2
-
-QosProfileReqR5 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x00, 0x00
-QosProfileReqR5 = SECONDARY1, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x00, 0x00
-
-# The following entries correspond to the values assigned by the method SecondQoSR99_R4Requested
-QosProfileReqR99 = PRIMARY1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1
-QosProfileReqR99 = SECONDARY1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1
-
-
-QosProfileReqR5 = PRIMARY1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x00, 0x00
-QosProfileReqR5 = SECONDARY1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x00, 0x00
-
-# The following entries are the negotiated profiles - they are identical and correspond to the values assigned by the method DefaultQoSR99_R4Negotiated for both contexts
-QosProfileNegR99 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2
-QosProfileNegR99 = SECONDARY1, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2
-
-QosProfileNegR5 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 0x00, 0x00
-QosProfileNegR5 = SECONDARY1, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 0x00, 0x00
-
-# The following entries correspond to the values assigned by the method SecondQoSR99_R4Negotiated for all 3 contexts
-QosProfileNegR99 = PRIMARY1, 0x01, 0x01, 0x01, 0x01, 1, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1
-QosProfileNegR99 = SECONDARY1, 0x01, 0x01, 0x01, 0x01, 1, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1
-
-QosProfileNegR5 = PRIMARY1, 0x01, 0x01, 0x01, 0x01, 1, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 0x00, 0x00
-QosProfileNegR5 = SECONDARY1, 0x01, 0x01, 0x01, 0x01, 1, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 0x00, 0x00
-
-#
-# The RPacketContext::TContextConfigGPRS parameters for this test step
-# The parameters are identical to those assigned in the method DefaultTestContextConfigGPRS
-SetContextConfigGPRS= 1, ACME INTERNET PROVIDERS LTD, i-MODE GATEWAY, 1, 1, 1, 1, USER1, PASSWORD1, CHALLENGE1, RESPONSE1, PRIMARYSERVER1, SECONDARYSERVER1, 1
-
-[test108]
-#
-# Configure the context's status to be changed using publish and subscribe
-NotifyContextStatusChangeType = PublishSubscribe
-# NotifyContextStatusChange <iContextName>, <iDuration>, <iStatus>
-# When the value 0 is published to KPSSimtsyPacketContextStatusChange the first primary context will be deleted (status = EStatusDeleted = 6)
-NotifyContextStatusChange = PRIMARY1, 0, 6
-# When the value 1 is published to KPSSimtsyPacketContextStatusChange the second primary context will be deleted (status = EStatusDeleted = 6)
-NotifyContextStatusChange = PRIMARY2, 0, 6
-
-#
-# The RPacketContext::TContextConfigGPRS parameters for this test step
-# The parameters are identical to those assigned in the method DefaultTestContextConfigGPRS
-SetContextConfigGPRS= 1, ACME INTERNET PROVIDERS LTD, i-MODE GATEWAY, 1, 1, 1, 1, USER1, PASSWORD1, CHALLENGE1, RESPONSE1, PRIMARYSERVER1, SECONDARYSERVER1, 1
-
-#
-# The context configuration items for this test step
-# Set-up the first primary context to pause for a long period when activating, so that there is a pause where the simtsy can delete the context
-R99ContextConfig = PRIMARY1, 999, 0, 0, 0, 0, 0, 0
-# Set-up the second primary context to have no pauses or errors when activating, deactivating or deleting
-R99ContextConfig = PRIMARY2, 0, 0, 0, 0, 0, 0, 0
-
-#
-# QoS profiles for this test step
-# The following entries are the requested profiles - they are identical and correspond to the values assigned by the method DefaultQoSR99_R4Requested for all 3 contexts
-QosProfileReqR99 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2
-QosProfileReqR99 = PRIMARY2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2
-
-QosProfileReqR5 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x00, 0x00
-QosProfileReqR5 = PRIMARY2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 2, 0x00, 0x00
-
-# The following entries correspond to the values assigned by the method SecondQoSR99_R4Requested
-QosProfileReqR99 = PRIMARY1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1
-QosProfileReqR99 = PRIMARY2, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1
-
-QosProfileReqR5 = PRIMARY1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x00, 0x00
-QosProfileReqR5 = PRIMARY2, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 1, 0x00, 0x00
-
-# The following entries are the negotiated profiles - they are identical and correspond to the values assigned by the method DefaultQoSR99_R4Negotiated for all 3 contexts
-QosProfileNegR99 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2
-QosProfileNegR99 = PRIMARY2, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2
-
-QosProfileNegR5 = PRIMARY1, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 0x00, 0x00
-QosProfileNegR5 = PRIMARY2, 0x02, 0x02, 0x02, 0x02, 2, 0x02, 0x02, 0x02, 2, 2, 2, 2, 2, 0x00, 0x00
-
-# The following entries correspond to the values assigned by the method SecondQoSR99_R4Negotiated for all 3 contexts
-QosProfileNegR99 = PRIMARY1, 0x01, 0x01, 0x01, 0x01, 1, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1
-QosProfileNegR99 = PRIMARY2, 0x01, 0x01, 0x01, 0x01, 1, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1
-
-QosProfileNegR5= PRIMARY1, 0x01, 0x01, 0x01, 0x01, 1, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 0x00, 0x00
-QosProfileNegR5 = PRIMARY2, 0x01, 0x01, 0x01, 0x01, 1, 0x01, 0x01, 0x01, 1, 1, 1, 1, 1, 0x00, 0x00
--- a/telephonyprotocols/umtsgprsscpr/group/UmtsGprsSCPR.iby Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef __UMTSGPRSSCPR_IBY__
-#define __UMTSGPRSSCPR_IBY__
-
-REM Umts/Gprs Subconnection Provider
-
-#ifdef _DEBUG
-ECOM_PLUGIN_UDEB(UmtsGprsSCPR.dll,1020D45E.rss)
-#else
-ECOM_PLUGIN(UmtsGprsSCPR.dll,1020D45E.rss)
-#endif
-
-#endif
--- a/telephonyprotocols/umtsgprsscpr/group/UmtsGprsSCPR.mmp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// UmtsGprsSCPR.MMP Umts/Gprs Subconnection Provider ECOM plugin
-//
-//
-
-/**
- @file
-*/
-
-
-TARGET umtsgprsscpr.dll
-TARGETTYPE PLUGIN
-
-UID 0x10009D8D 0x1020D45E
-VENDORID 0x70000001
-
-MACRO _INFO_LOG
-
-
-SOURCEPATH ../src
-SOURCE UmtsGprs_defaultSubconnProv.cpp
-SOURCE UmtsGprs_subconnProv.cpp
-SOURCE UmtsGprs_subconnProvFactory.cpp
-SOURCE PdpFsmRequest.cpp
-SOURCE RSpudManInterface.cpp
-
-START RESOURCE 1020D45E.rss
-TARGET umtsgprsscpr.rsc
-END
-
-SOURCEPATH ../spudfsm/src
-SOURCE PDPFSM.cpp
-SOURCE cpdpfsm.cpp
-SOURCE cpdpfsmfactory.cpp
-SOURCE tpdpstate.cpp
-SOURCE tpdpstatesuspended.cpp
-SOURCE tpdpstatechangingqos.cpp
-SOURCE tpdpstatechangingtft.cpp
-SOURCE tpdpstateopen.cpp
-SOURCE tpdpstatesettingqos.cpp
-SOURCE tpdpstateinitialised.cpp
-SOURCE tpdpstatecreatingprimary.cpp
-SOURCE tpdpstateopeningphone.cpp
-SOURCE tpdpstatecreatingSecondary.cpp
-SOURCE tpdpstateactivatingsecondary.cpp
-SOURCE tpdpstatecreatedSecondary.cpp
-SOURCE tpdpstateactivatingprimary.cpp
-SOURCE tpdpstateclosing.cpp
-SOURCE tpdpstatesettingtft.cpp
-SOURCE tpdpstategettingnegqos.cpp
-SOURCE tpdpstatemodifingactive.cpp
-SOURCE tpdpstatestopping.cpp
-
-
-SOURCEPATH ../spudtel/src
-SOURCE ceteldrivercontext.cpp
-SOURCE ceteldriverfactory.cpp
-SOURCE cservicechangenotifier.cpp
-SOURCE reteldriverinput.cpp
-SOURCE eteldriverstrategies.cpp
-SOURCE cspudcontextelem.cpp
-SOURCE ceteldrivernotifier.cpp
-SOURCE cpdpstatuschangenotifier.cpp
-SOURCE cqoschangenotifier.cpp
-SOURCE cpdpconfigchangenotifier.cpp
-
-USERINCLUDE ../inc
-USERINCLUDE ../spudfsm/inc
-USERINCLUDE ../spudtel/inc
-
-SYSTEMINCLUDE /epoc32/include
-SYSTEMINCLUDE /epoc32/include/ecom
-SYSTEMINCLUDE /epoc32/include/comms-infras
-SYSTEMINCLUDE /epoc32/include/networking
-
-LIBRARY euser.lib esock.lib esocksvr.lib eintsock.lib insock.lib
-LIBRARY netmeta.lib etelpckt.lib etel.lib umtsif.lib
-#include "comms-infras/commsdebugutility.mmh"
-
-CAPABILITY CommDD PowerMgmt ReadDeviceData WriteDeviceData TrustedUI ProtServ NetworkControl NetworkServices LocalServices ReadUserData WriteUserData
-
-
-UNPAGED
--- a/telephonyprotocols/umtsgprsscpr/group/bld.inf Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,144 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#ifndef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
-
-PRJ_EXPORTS
-#ifdef SYMBIAN_OLD_EXPORT_LOCATION
-../inc/MSpudManInterface.h /epoc32/include/networking/mspudmaninterface.h
-#endif
-#ifdef SYMBIAN_OLD_EXPORT_LOCATION
-../inc/MPdpFsmInterface.h /epoc32/include/networking/mpdpfsminterface.h
-#endif
-#ifdef SYMBIAN_OLD_EXPORT_LOCATION
-../inc/UmtsGprs_subconnProvFactory.h /epoc32/include/networking/umtsgprs_subconnprovfactory.h
-#endif
-../group/UmtsGprsSCPR.iby /epoc32/rom/include/umtsgprsscpr.iby
-
-
-PRJ_TESTEXPORTS
-
-
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/configs/te_UmtsGprsScpr_CapTest.xml z:/testdata/configs/te_umtsgprsscpr_captest.xml
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/configs/te_UmtsGprsScpr_NoDefaults.xml z:/testdata/configs/te_umtsgprsscpr_nodefaults.xml
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/configs/TE_UmtsGprsScprLoopbackCSY.ini z:/testdata/configs/te_umtsgprsscprloopbackcsy.ini
-
-
-// configuration 1 commdb settings //
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/configs/te_UmtsGprsScpr.xml z:/testdata/configs/te_umtsgprsscpr.xml
-
-
-// configuration 2 commdb settings //
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/configs/te_UmtsGprsScpr_InvalidDefaults.xml z:/testdata/configs/te_umtsgprsscpr_invaliddefaults.xml
-
-
-// configuration 3 commdb settings //
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/configs/te_UmtsGprsScprNoSpud.xml z:/testdata/configs/te_umtsgprsscprnospud.xml
-
-
-// main test scripts //
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/scripts/te_UmtsGprsScprConfig1.script z:/testdata/scripts/te_umtsgprsscprconfig1.script
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/scripts/te_UmtsGprsScprConfig2.script z:/testdata/scripts/te_umtsgprsscprconfig2.script
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/scripts/te_UmtsGprsScprConfig3.script z:/testdata/scripts/te_umtsgprsscprconfig3.script
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/scripts/te_UmtsGprsScprConfig2QoSRemoved.script z:/testdata/scripts/te_umtsgprsscprconfig2qosremoved.script
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/scripts/te_UmtsGprsScprConfig3QoSRemoved.script z:/testdata/scripts/te_umtsgprsscprconfig3qosremoved.script
-
-
-// main captest script //
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/scripts/te_Cap_UmtsGprsScpr.script z:/testdata/scripts/te_cap_umtsgprsscpr.script
-
-
-// simtsy configs //
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/configs/te_simtsy.ini z:/testdata/configs/te_simtsy.ini
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/configs/te_umtsgprsscpr_config.txt z:/testdata/configs/te_umtsgprsscpr_config.txt
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/configs/te_umtsgprsscpr_Config2.txt z:/testdata/configs/te_umtsgprsscpr_config2.txt
-
-
-// Test case scripts and configs
-//------------------------------
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/scripts/te_UmtsGprsScprConfig1Case1.script z:/testdata/scripts/te_umtsgprsscprconfig1case1.script
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/configs/Config1Case1.ini z:/testdata/configs/umtsgprsscpr/config1case1.ini
-
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/scripts/te_UmtsGprsSCPRconfig1case2.script z:/testdata/scripts/te_umtsgprsscprconfig1case2.script
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/configs/Config1Case2.ini z:/testdata/configs/umtsgprsscpr/config1case2.ini
-
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/scripts/te_UmtsGprsScprconfig1case3.script z:/testdata/scripts/te_umtsgprsscprconfig1case3.script
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/configs/Config1Case3.ini z:/testdata/configs/umtsgprsscpr/config1case3.ini
-
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/scripts/te_UmtsGprsScprConfig1Case4.script z:/testdata/scripts/te_umtsgprsscprconfig1case4.script
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/configs/Config1Case4.ini z:/testdata/configs/umtsgprsscpr/config1case4.ini
-
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/scripts/te_UmtsGprsScprConfig1Case5.script z:/testdata/scripts/te_umtsgprsscprconfig1case5.script
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/configs/Config1Case5.ini z:/testdata/configs/umtsgprsscpr/config1case5.ini
-
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/scripts/te_UmtsGprsScprconfig1case6.script z:/testdata/scripts/te_umtsgprsscprconfig1case6.script
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/configs/Config1Case6.ini z:/testdata/configs/umtsgprsscpr/config1case6.ini
-
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/scripts/te_UmtsGprsScprconfig1case7.script z:/testdata/scripts/te_umtsgprsscprconfig1case7.script
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/configs/Config1Case7.ini z:/testdata/configs/umtsgprsscpr/config1case7.ini
-
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/scripts/te_UmtsGprsScprConfig1Case8.script z:/testdata/scripts/te_umtsgprsscprconfig1case8.script
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/configs/Config1Case8.ini z:/testdata/configs/umtsgprsscpr/config1case8.ini
-
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/scripts/te_UmtsGprsScprConfig1Case9.script z:/testdata/scripts/te_umtsgprsscprconfig1case9.script
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/configs/Config1Case9.ini z:/testdata/configs/umtsgprsscpr/config1case9.ini
-
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/scripts/te_UmtsGprsScprConfig1Case10.script z:/testdata/scripts/te_umtsgprsscprconfig1case10.script
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/configs/Config1Case10.ini z:/testdata/configs/umtsgprsscpr/config1case10.ini
-
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/scripts/te_UmtsGprsScprConfig2Case1.script z:/testdata/scripts/te_umtsgprsscprconfig2case1.script
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/configs/Config2Case1.ini z:/testdata/configs/umtsgprsscpr/config2case1.ini
-
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/scripts/te_UmtsGprsScprConfig2Case9.script z:/testdata/scripts/te_umtsgprsscprconfig2case9.script
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/configs/Config2Case9.ini z:/testdata/configs/umtsgprsscpr/config2case9.ini
-
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/scripts/te_UmtsGprsScprConfig2Case10.script z:/testdata/scripts/te_umtsgprsscprconfig2case10.script
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/configs/Config2Case10.ini z:/testdata/configs/umtsgprsscpr/config2case10.ini
-
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/scripts/te_UmtsGprsScprconfig3case1.script z:/testdata/scripts/te_umtsgprsscprconfig3case1.script
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/configs/Config3Case1.ini z:/testdata/configs/umtsgprsscpr/config3case1.ini
-
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/scripts/te_Cap_UmtsGprsScprConfig1Case1.script z:/testdata/scripts/te_cap_umtsgprsscprconfig1case1.script
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/configs/Cap1Case1.ini z:/testdata/configs/umtsgprsscpr/cap1case1.ini
-
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/scripts/te_Cap_UmtsGprsScprConfig1case2.script z:/testdata/scripts/te_cap_umtsgprsscprconfig1case2.script
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/configs/Cap1Case2.ini z:/testdata/configs/umtsgprsscpr/cap1case2.ini
-
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/scripts/te_Cap_UmtsGprsScprConfig1Case4.script z:/testdata/scripts/te_cap_umtsgprsscprconfig1case4.script
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/configs/Cap1Case4.ini z:/testdata/configs/umtsgprsscpr/cap1case4.ini
-
-// IBY file
-../../../../unref/orphan/comgen/networking/umts/test/Te_UmtsGprsSCPR/group/te_UmtsGprsScpr.iby /epoc32/rom/include/te_umtsgprsscpr.iby
-
-
-
-// Spud Unit Tests //
-../Test/te_spud/scripts/TE_SpudUnitTest.script z:/testdata/scripts/te_spudunittest.script
-../Test/te_spud/testdata/Spud_config.txt z:/testdata/configs/spud_config.txt
-
-../Test/te_spud/group/TE_SpudUnit.iby /epoc32/rom/include/te_spudunit.iby
-
-
-PRJ_MMPFILES
-UmtsGprsSCPR.mmp
-
-
-PRJ_TESTMMPFILES
-../Test/te_spud/group/TE_SpudUnit.mmp
-
-
-PRJ_TESTMMPFILES
-
-#endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
--- a/telephonyprotocols/umtsgprsscpr/group/networking_UmtsGprsSCPR.mrp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-component networking_umtsgprsscpr
-source \sf\os\cellularsrv\telephonyprotocols\umtsgprsscpr
-binary \sf\os\cellularsrv\telephonyprotocols\umtsgprsscpr\group all
-exports \sf\os\cellularsrv\telephonyprotocols\umtsgprsscpr\group
-notes_source \component_defs\release.src
-
-
-ipr E
-ipr T \sf\os\cellularsrv\telephonyprotocols\umtsgprsscpr\Test
-
--- a/telephonyprotocols/umtsgprsscpr/group/networking_umtsgprsscpr.history.xml Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<relnotes name="Connection Provider Plugin">
- <purpose>
- </purpose>
-</relnotes>
--- a/telephonyprotocols/umtsgprsscpr/inc/MPdpFsmInterface.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,163 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// The interface to the PDP Context Finite State Machine.
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-
-#ifndef MPDPFSMINTERFACE_H
-#define MPDPFSMINTERFACE_H
-
-
-#include <etelmm.h>
-#include <etelqos.h>
-#include <etelpckt.h>
-
-#include <networking/umtsnifcontrolif.h>
-#include <networking/mspudmaninterface.h>
-
-/** Maximum number of PDP contexts supported by SPUD
- This is derived from the number of bits available for NSAPIs
- Each PDP context corresponds with a NSAPI (and each NSAPI at most maps to one primary or secondary PDP Context)
- There are 4 bits allocated for NSAPIs with values 0 - 4 being reserved, leaving 11 values for PDP contexts
- @see GSM24.008
-*/
-const TContextId KMaxPdpContexts = 11;
-
-/** Internal pseudo-context ID meaning all contexts */
-const TContextId KAllContexts = -1;
-
-/** ID of the primary PDP context
-Primary context is the first context created, and it can be
-created only once during Spud lifetime.
-There is a subltly here. There is always a default context.
-This just happens to be the primary until it is deleted, at
-which point one of the secondries will become the default.
-This can happen in a network handover situation.
-This is documented in the design spec. */
-const TContextId KPrimaryContextId = 0;
-
-
-namespace SpudMan
-{
- enum SpudManGuQoSSignal
- {
- EContextStart = 0x80,
- EContextCreate,
- EContextDelete,
- EContextActivate,
- ERegisterEventHandler,
- EContextSetEvents,
- EContextQoSSet,
- EContextModifyActive,
- EContextTFTModify,
- ENifSetDefaultQoS,
- EStartupPrimaryContextCreation,
-
- // sentinal
- ESpudManGuQoSSignalSentinal
- };
-
- enum SpudManSignal
- {
- ESetDefaultQoS = ESpudManGuQoSSignalSentinal,
- ECreatePrimaryPDPContext,
- ECreateSecondaryPDPContext,
- ESuspend,
- EResume,
- E1ryPdpActivate,
- ECancelContextCreate,
-
- EGetNegQoS,
-
- // sentinal
- ESpudManSignalSentinal
- };
-
-}
-
-class MPdpFsmInterface
-/**
- * Definition of PDP Context Finite State Machine interface.
- * UmtsGprsSCPR comes with an implementation of this interface.
- * The interface is to be used by SpudMan.
- *
- * @internalComponent
- */
- {
-public:
- virtual void OpenL(MSpudManInterface* aSpudManInterface, TName& aName) = 0;
- virtual void Close() = 0;
-
- virtual TInt Input (TContextId aPdpId, const TInt aOperation, const TInt aParam=KErrNone) = 0;
-
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- // This is to set the status of IM CN signalling parameter
-
- virtual TInt Set(TContextId aPdpId, const RPacketQoS::TQoSR5Requested& aParam) = 0;
- virtual TInt Set(TContextId aPdpId, const RPacketQoS::TQoSR5Negotiated& aParam) = 0;
- virtual TInt Get(TContextId aPdpId, RPacketQoS::TQoSR5Requested& aParam) const = 0 ;
- virtual TInt Get(TContextId aPdpId, RPacketQoS::TQoSR5Negotiated& aParam) const = 0;
-
-#else
-// !SYMBIAN_NETWORKING_UMTSR5
-
- virtual TInt Set(TContextId aPdpId, const RPacketQoS::TQoSR99_R4Requested& aParam) = 0;
- virtual TInt Set(TContextId aPdpId, const RPacketQoS::TQoSR99_R4Negotiated& aParam) = 0;
- virtual TInt Get(TContextId aPdpId, RPacketQoS::TQoSR99_R4Requested& aParam) const = 0;
- virtual TInt Get(TContextId aPdpId, RPacketQoS::TQoSR99_R4Negotiated& aParam) const = 0;
-#endif
-// SYMBIAN_NETWORKING_UMTSR5
-
-
-
- virtual TInt Set(TContextId aPdpId, const TTFTInfo& aParam) = 0;
- virtual TInt Set(TContextId aPdpId, const TTFTOperationCode& aParam) = 0;
- virtual TInt Set(TContextId aPdpId, const RPacketContext::TDataChannelV2& aParam) = 0;
- virtual TInt Set(TContextId aPdpId, const RPacketContext::TContextConfigGPRS& aParam) = 0;
- virtual TInt Set(TContextId aPdpId, const RPacketContext::TContextStatus& aParam) = 0;
-
- virtual TInt Get(TContextId aPdpId, TTFTInfo& aParam) const = 0;
- virtual TInt Get(TContextId aPdpId, TTFTOperationCode& aParam) const = 0;
- virtual TInt Get(TContextId aPdpId, RPacketContext::TDataChannelV2& aParam) const = 0;
- virtual TInt Get(TContextId aPdpId, RPacketContext::TContextConfigGPRS& aParam) const = 0;
- virtual TInt Get(TContextId aPdpId, RPacketContext::TContextStatus& aParam) const = 0;
-
- virtual TInt GetLastErrorCause(TContextId aPdpId, TInt& aLastErrorCause) const = 0;
-
- virtual void Set(const RPacketService::TStatus aParam) = 0; // applies to all contexts
- virtual void Get(RPacketService::TStatus& aParam) = 0; // applies to all contexts
-
- // additional accessors
- virtual const TName& TsyName(void) = 0;
-
- virtual void SetContextTerminationErrorAndStop(TContextId aPdpId, TInt aErrorCode) = 0;
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- virtual void SetIMCNSignalling(TBool aImCnSignalling) = 0;
-#endif //SYMBIAN_NETWORKING_UMTSR5
-protected:
-private:
-
-};
-
-
-#endif
-// MPDPFSMINTERFACE_H
--- a/telephonyprotocols/umtsgprsscpr/inc/MSpudManInterface.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// The call-back interface of MPdpFsmInterface used by UmtsGprsSCPR to flag
-// operation results to SpudMan.
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#ifndef MSPUDMANINTERFACE_H
-#define MSPUDMANINTERFACE_H
-
-#include <networking/umtsnifcontrolif.h>
-#include <in_iface.h>
-
-/**
-Identifier used in a Control call for initialising the RPdpFsmInterface (in SpudMan) with a
-pointer to the real C-class (in the UmtsGprsSCPR).
-*/
-const TInt KInitialisePdpFsm = 0x80;
-
-/**
-Identifier used in a SpudInput call to signal the SpudMan that the UmtsGprsSCPR is shutting
-down and that the real CPdpFsmInterface object will be deleted.
-*/
-const TUint KPdpFsmShuttingDown = 0xff;
-
-/** Name of SPUD */
-_LIT(KSpudName, "spud");
-
-/**
-Interface class for SpudMan, to be used by SpudFsm.
-*/
-class MSpudManInterface
-{
-public:
- virtual void Input(TContextId aContextId, TInt aEvent, TInt aParam) = 0;
-
- virtual void SetContextTerminationErrorAndStop(TContextId aContextId, TInt aErrorCode) = 0;
-
-};
-
-#endif
-// MSPUDMANINTERFACE_H
-
--- a/telephonyprotocols/umtsgprsscpr/inc/PdpFsmRequest.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// PDP Context control requests.
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#ifndef CPDPFSMREQUEST_H
-#define CPDPFSMREQUEST_H
-
-#include "UmtsGprs_subconnProv.h"
-
-/** The class commits previous modifications to an active PDP context.
-
-@internalTechnology
-@released Since 9.3
-*/
-class CModifyActivePDPCtx : public CPdpFsmRequestBase
-{
-public:
- virtual TInt Start();
- virtual TBool PdpFsmEvent(TContextId aContextId, TInt aEvent, TInt aParam);
-
- CModifyActivePDPCtx(CUmtsGprsSubConnProvd& aProvider, MPdpFsmRequestOwner& aOwner);
- virtual ~CModifyActivePDPCtx();
-};
-
-
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
-/** The class modifies R5 QoS on an active PDP context.
-
-@internalTechnology
-@released Since 9.3
-*/
-class CModifyR5QoS : public CPdpFsmRequestBase, public MPdpFsmRequestOwner
-{
-public:
- virtual void Done( TInt aResult, CPdpFsmRequestBase& aThis );
- virtual TInt Start();
- virtual TBool PdpFsmEvent(TContextId aContextId, TInt aEvent, TInt aParam);
- virtual ~CModifyR5QoS();
- static CModifyR5QoS* NewL(CUmtsGprsSubConnProvd& aProvider, MPdpFsmRequestOwner& aOwner, RPacketQoS::TQoSR5Requested& aParams);
-
-protected:
- CModifyR5QoS(CUmtsGprsSubConnProvd& aProvider, MPdpFsmRequestOwner& aOwner, RPacketQoS::TQoSR5Requested& aParams);
-
- void ConstructL();
-
-private:
- void GrantedSetupL();
- void RejectedSetupL(TInt aResult);
-private:
- CModifyActivePDPCtx* iModifyActive;
- RPacketQoS::TQoSR5Requested i5;
-};
-
-
-#else
-// !SYMBIAN_NETWORKING_UMTSR5
-
-/**
-The class modifies R99/R4 QoS on an active PDP context.
-
-@internalTechnology
-@released Since 9.3
-*/
-class CModifyR4QoS : public CPdpFsmRequestBase, public MPdpFsmRequestOwner
-{
-public:
- virtual void Done( TInt aResult, CPdpFsmRequestBase& aThis );
- virtual TInt Start();
- virtual TBool PdpFsmEvent(TContextId aContextId, TInt aEvent, TInt aParam);
- virtual ~CModifyR4QoS();
-
-
- static CModifyR4QoS* NewL(CUmtsGprsSubConnProvd& aProvider, MPdpFsmRequestOwner& aOwner, RPacketQoS::TQoSR99_R4Requested aParams);
-
-protected:
- CModifyR4QoS(CUmtsGprsSubConnProvd& aProvider, MPdpFsmRequestOwner& aOwner, RPacketQoS::TQoSR99_R4Requested aParams);
-
- void ConstructL();
-
-private:
- void GrantedSetupL();
- void RejectedSetupL(TInt aResult);
-private:
- CModifyActivePDPCtx* iModifyActive;
- RPacketQoS::TQoSR99_R4Requested i99;
-
-};
-
-
-#endif
-// SYMBIAN_NETWORKING_UMTSR5
-
-#endif
-// CPDPFSMREQUEST_H
--- a/telephonyprotocols/umtsgprsscpr/inc/RSpudManInterface.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// The MSpudManInterface handle class definition.
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-
-
-#ifndef RSPUDMANINTERFACE_H
-#define RSPUDMANINTERFACE_H
-
-#include <networking/mspudmaninterface.h>
-#include <comms-infras/commsdebugutility.h>
-
-
-/**
-Client side implementation of MSpudManInterface.
-This is a very simplistic implementation that just holds a refernce to
-the server side and forwards all the calls to it. This implementation
-can be changed in the future to facilitate for IPC.
-*/
-class RSpudManInterface : public MSpudManInterface
-{
-public:
- RSpudManInterface();
- void Init(MSpudManInterface* aSpudManImpl);
- void Close ();
- virtual void Input(TContextId aContextId, TInt aEvent, TInt aParam);
-
- virtual void SetContextTerminationErrorAndStop(TContextId aContextId, TInt aErrorCode);
-
- inline ~RSpudManInterface ()
- {
- __FLOG_CLOSE;
- }
-
-
-private:
- MSpudManInterface* iSpudManImpl;
-
-public:
- __FLOG_DECLARATION_MEMBER;
-};
-
-#endif
-// RSPUDMANINTERFACE_H
--- a/telephonyprotocols/umtsgprsscpr/inc/UmtsGprs_defaultSubconnProv.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// UmtsGprs_subconnProv.h
-// Umts/Gprs Default SubConnection Provider class definition.
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-
-#ifndef UMTSGPRS_DEFAULTSUBCONNPROV_H
-#define UMTSGPRS_DEFAULTSUBCONNPROV_H
-
-
-#include "UmtsGprs_subconnProv.h"
-
-
-/**
-Specialised subconnection provider for handling default UMTS contexts.
-
-@internalTechnology
-@released Since 9.3
-*/
-class CUmtsGprsDefaultSubConnProvd : public CUmtsGprsSubConnProvd
- {
- friend class CUmtsGprsSubConnProvdFactory; //for the protected constructor.
-public:
-
- /** Modifies iContextId of 'this' to aContextId. This method should be called
- * in the handover scenario, where the current default is dropped and a new
- * one is elected.
- * @param aContextId the id of the new default PDP context.
- */
- void NewDefaultElected(TContextId aContextId);
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
-
- /** This parameter adds the IMCN information to the Default
- * SubConnection Parameter Bundle
- */
- TInt AddIMCNInformationToParameterBundleL(TBool aImCnInfo);
-
-#endif //SYMBIAN_NETWORKING_UMTSR5
-
- virtual TBool ShouldIDeleteNow();
-
-
-protected:
-
- //-=========================================================
- // CSubConnectionProviderBase methods
- //-=========================================================
- virtual void DoParametersAboutToBeSetL(CSubConParameterBundle& aParameterBundle);
- virtual TInt DoControl(TUint aOptionLevel, TUint aOptionName, TDes8& aOption);
-
- //-=========================================================
- // C'tor & D'tor methods
- //-=========================================================
- CUmtsGprsDefaultSubConnProvd(CSubConnectionProviderFactoryBase& aFactory,
- CConnectionProviderBase& aConnProvider);
-
- static CUmtsGprsDefaultSubConnProvd* NewL(CSubConnectionProviderFactoryBase& aFactory,
- CConnectionProviderBase& aConnProvider);
-
- void ConstructL();
-
- // Don't allow clients to invoke the destructor.
- // (Only the CCommsFactoryBase should do this)
- virtual ~CUmtsGprsDefaultSubConnProvd();
-
-
-
- //-=========================================================
- // Custom methods
- //-=========================================================
- /**
- @return the default CUmtsGprsSubConnProvd for 'this'
- */
- virtual CUmtsGprsSubConnProvd& GetDefaultSubConnection();
-
-
- /**
- Returns the PdpFsmInterface instance, which can be used to talk to SpudFsm
-
- @return the local instance (pertaining to this connection) of CPdpFsmInterface.
- */
- virtual CPdpFsmInterface& GetPdpFsmInterface();
-
- /**
- Reads default QoS parameters from the database.
-
- @param aParams - The QoS parameter structure to be filled in by this method.
- */
- void GetQoSDefaultsL(RPacketQoS::TQoSR99_R4Requested* aParams);
-
- //-=========================================================
- // Members
- //-=========================================================
- CPdpFsmInterface* iPdpFsm;
-
- };
-
-
-#include "UmtsGprs_defaultSubconnProv.inl"
-#endif
-// UMTSGPRS_DEFAULTSUBCONNPROV_H
--- a/telephonyprotocols/umtsgprsscpr/inc/UmtsGprs_defaultSubconnProv.inl Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Inline methods for Umts/Gprs Default SubConnection Provider.
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-
-inline void CUmtsGprsDefaultSubConnProvd::NewDefaultElected(TContextId aContextId)
- {
- iContextId = aContextId;
- }
-
--- a/telephonyprotocols/umtsgprsscpr/inc/UmtsGprs_subconnProv.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,361 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Umts/Gprs SubConnection Provider class definition.
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-
-#ifndef UMTSGPRS_SUBCONNPROV_H
-#define UMTSGPRS_SUBCONNPROV_H
-
-
-#include <ss_subconnprov.h>
-#include <comms-infras/commsdebugutility.h>
-
-#include <cs_subconparams.h>
-#include <cs_subconevents.h>
-
-#include "PDPFSM.h"
-#include <networking/qos3gpp_subconparams.h>
-
-
-#ifdef __FLOG_ACTIVE
-// Logging tags
-_LIT8(KUmtsGprsLogTag1,"SubConn");
-_LIT8(KUmtsGprsLogTag2,"UmtsGprs");
-#endif
-
-class CPdpFsmRequestBase;
-
-void SubconEventCleanupFunction(TAny* aEvent);
-void SubconParamSetCleanupFunction(TAny* aEvent);
-
-
-/** The class represents an onwer/issuer of a CPdpFsmRequestBase
-
-@internalTechnology
-@released Since 9.3
-*/
-class MPdpFsmRequestOwner
-{
- public:
- /** Called by the owned CPdpFsmRequestBase to flag the completion of the
- * request back to 'this'
- *
- @param aResult - the request result indication.
- @param aParam - the request completed (in case 'this' owns more requests).
- */
- virtual void Done( TInt aResult, CPdpFsmRequestBase& aThis ) = 0;
-};
-
-
-
-
-
-class CUmtsGprsSubConnProvd : public CSubConnectionProviderBase, public MConnectionDataClient, public MPdpFsmRequestOwner
-/** The class represents UMTS/GPRS-proprietary subconnection provider.
- It is designed to operate in the near proximity to Etel and
- convert downcalls to Etel's language. This class represents both
- TSubConnTypes: { EAttachToDefault, ECreateNew }
-
-@internalTechnology
-@released Since 9.3
-*/
- {
-protected:
- enum TQosParameterRelease
- {
- KParameterRelInvalid = 0,
- KParameterRelGeneric = 1,
- KParameterRel4Rel99 = 4,
- KParameterRel5 = 5,
- };
-
-
-public:
- //-=========================================================
- // Custom methods
- //-=========================================================
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
-
- /**
- Scans given parameter bundle for supported parameter sets
- The first one found gets converted to RPacketQoS::TQoSR5Requested.
- The supported parameter sets are (in order of priority):
- 1) KSubConQosR5ParamsType
- 2) KSubConQosR99ParamsType
- 3) Generic QoS
-
- @param aIn CSubConParameterBundle to be converted.
- @param aOut RPacketQoS::TQoSR5Requested to be populated from aIn
- @exception KErrNotSupported - if CUmtsGprsSubConnProvd does not support conversion from what's
- in the supplied parameter bundle.
- */
- void MapQosParamBundleToEtelL(const CSubConParameterBundle& aIn,
- RPacketQoS::TQoSR5Requested* aOut);
-
-#else
-// !SYMBIAN_NETWORKING_UMTSR5
-
- /** Scans given parameter bundle for supported parameter sets
- The first one found gets converted to RPacketQoS::TQoSR99_R4Requested.
- The supported parameter sets are (in order of priority):
- 1) KSubConQosR99ParamsType
- 2) Generic QoS
-
- @param aIn CSubConParameterBundle to be converted.
- @param aOut RPacketQoS::TQoSR99_R4Requested to be populated from aIn
- @exception KErrNotSupported - if CUmtsGprsSubConnProvd does not support conversion from what's
- in the supplied parameter bundle.
- */
- void MapQosParamBundleToEtelL(const CSubConParameterBundle& aIn,
- RPacketQoS::TQoSR99_R4Requested* aOut);
-
-#endif
-// SYMBIAN_NETWORKING_UMTSR5
-
- /**
- Maps QoS parameters received from the network via Etel into a CSubConGenEventParamsGranted class
- for client event notification.
-
- @param aNetworkQoS - A pointer to an Etel TPacketDataConfigBase class containing the
- QoS to be mapped into the event.
- @param aGranted - A reference to the CSubConGenEventParamsGranted object that should receive the mapped
- QoS parameters.
- */
- void MapQosEtelToGrantedParamsL (TPacketDataConfigBase* aNetworkQoS,
- CSubConGenEventParamsGranted& aGranted);
-
- /** Returns the default CUmtsGprsSubConnProvd for 'this'
- * IMPORTANT: This method is left pure virtual because its implementation,
- although trivial, is not needed until CUmtsGprsSubConnProvd fully spports PDP
- context management.
-
- @return the default CUmtsGprsSubConnProvd for 'this'
- */
- virtual CUmtsGprsSubConnProvd& GetDefaultSubConnection() = 0;
-
- /** Called by SpudFsm to inform about events and responses regarding
- * the PDP context 'this' represents. The event format complies to UmtsIf interface.
- * CUmtsGprsSubConnProvd forwards the event to the active/pending request
- * (iCurrentPdpFsmReq) or ignores the event if no request exists.
- *
- @param aEvent the event type
- @param aParam additional data
- */
- virtual TBool PdpFsmEvent(TContextId aContextId, TInt aEvent, TInt aParam);
-
- /** Returns the PdpFsmInterface instance, which can be used to talk to SpudFsm
- *
- @return the local instance (pertaining to this connection) of CPdpFsmInterface.
- */
- virtual CPdpFsmInterface& GetPdpFsmInterface();
-
-
- /** Returns context id of the PDP context 'this' represents.
- *
- @return context id of the PDP context 'this' represents.
- */
- TContextId GetContextId() const;
-
- /** Sends request to the control clients. This method is the overload of
- * the CSubConnectionProviderBase protected counterpart. It's to be used
- * by CPdpFsmRequestBase objects.
- *
- @param aEvent - the notification to be sent.
- */
- TInt NotifyClientEvent(const CSubConNotificationEvent& aEvent);
-
-
- //-=========================================================
- // MPdpFsmRequestOwner methods
- //-=========================================================
- void Done(TInt aResult, CPdpFsmRequestBase& aThis);
-
- //-=========================================================
- // MConnectionDataClient methods
- //-=========================================================
- virtual void Notify(TNotify aNotifyType, CConnectionProviderBase* aConnProvider, TInt aError, const CConNotificationEvent* aConNotificationEvent);
- virtual void AttachToNext(CSubConnectionProviderBase* aSubConnProvider);
- virtual void ConnectionGoingDown(CConnectionProviderBase& aConnProvider);
- virtual void ConnectionError(TInt aStage, TInt aError);
-
- //-=========================================================
- // CSubConnectionProviderBase methods
- //-=========================================================
- virtual void DoDataClientJoiningL(MSubConnectionDataClient& aDataClient);
- virtual void DoDataClientLeaving(MSubConnectionDataClient& aDataClient);
- virtual void DoControlClientJoiningL(MSubConnectionControlClient& aControlClient);
- virtual void DoControlClientLeaving(MSubConnectionControlClient& aControlClient);
- virtual void DoSourceAddressUpdate(MSubConnectionDataClient& aDataClient, const TSockAddr& aSource);
- virtual void DoDestinationAddressUpdate(MSubConnectionDataClient& aDataClient, const TSockAddr& aDestination);
- virtual void DoDataClientRouted(MSubConnectionDataClient& aDataClient, const TSockAddr& aSource, const TSockAddr& aDestination, const TDesC8& aConnectionInfo);
- virtual void DoParametersAboutToBeSetL(CSubConParameterBundle& aParameterBundle);
- virtual TInt DoControl(TUint aOptionLevel, TUint aOptionName, TDes8& aOption);
- virtual CConnDataTransfer& DoDataTransferL();
- virtual MConnectionDataClient* DoSelfConnectionDataClient();
- virtual void DoStartL();
- virtual void DoStop();
- virtual CSubConnectionProviderBase* DoNextLayer();
-
-protected:
-
- //-=========================================================
- // Custom methods
- //-=========================================================
- CUmtsGprsSubConnProvd(CSubConnectionProviderFactoryBase& aFactory,
- CConnectionProviderBase& aConnProvider);
-
- // Don't allow clients to invoke the destructor.
- // (Only the CCommsFactoryBase should do this)
- virtual ~CUmtsGprsSubConnProvd();
-
- static void MapQosR99ExtensionSetToEtel(const CSubConQosR99ParamSet& aInRequested,
- const CSubConQosR99ParamSet* aInAcceptable,
- RPacketQoS::TQoSR99_R4Requested* aOut);
-
- static void MapQosGenericSetToEtel(const CSubConQosGenericParamSet& aInRequested,
- const CSubConQosGenericParamSet* aInAcceptable,
- RPacketQoS::TQoSR99_R4Requested* aOut);
-
-
- static void MapQosEtelToGenericSetL (RPacketQoS::TQoSR99_R4Negotiated* aNetworkQoS,
- CSubConGenEventParamsGranted& aGranted);
-
- static void MapQosEtelToR99SetL (RPacketQoS::TQoSR99_R4Negotiated* aNetworkQoS,
- CSubConGenEventParamsGranted& aGranted);
-
- void NotifySubConDownL(TInt aError);
- void NotifyParamsChangedL(TInt aError);
-
- inline void ResetQosRelease();
- inline TQosParameterRelease RequestedQosRelease();
-
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- static void MapQosR5ExtensionSetToEtel(const CSubConQosR5ParamSet& aInRequested,
- const CSubConQosR5ParamSet* aInAcceptable,
- RPacketQoS::TQoSR5Requested* aOut);
-
- static void MapQosR99ExtensionSetToEtel(const CSubConQosR99ParamSet& aInRequested,
- const CSubConQosR99ParamSet* aInAcceptable, RPacketQoS::TQoSR5Requested* aOut);
-
- static void MapQosEtelToR5SetL (RPacketQoS::TQoSR5Negotiated* aNetworkQoS,
- CSubConGenEventParamsGranted& aGranted);
-#endif
-// SYMBIAN_NETWORKING_UMTSR5
-
- /**
- Given a set of generic parameters, the method derives the R99 value for the traffic class.
-
- @param aIn requested CSubConQosGenericParamSet to be converted
- @return the value of RPacketQoS::TTrafficClass
- */
- static RPacketQoS::TTrafficClass DeriveTrafficClass(const CSubConQosGenericParamSet& aIn );
-
- /**
- Given a set of generic parameters, the method derives the R99 value for the traffic priority.
-
- @param aIn requested CSubConQosGenericParamSet to be converted
- @return the value of RPacketQoS::TTrafficHandlingPriority
- */
- static RPacketQoS::TTrafficHandlingPriority DeriveTrafficPriority(const CSubConQosGenericParamSet& aIn );
-
- /*
- The PDP context id 'this' represents. This is semantically equal to the SpudFSM PDP
- Context identification scheme.
- */
- TContextId iContextId;
-
- /*
- Holds the current request towards PDPFSM
- */
- CPdpFsmRequestBase* iCurrentPdpFsmReq;
-
-
-private:
- TQosParameterRelease iParameterRelease;
-
-
-public:
- __FLOG_DECLARATION_MEMBER;
- };
-
-
-
-
-
-/**
-The base class for a PDP Context control asynchronous requests.
-
-@internalTechnology
-@released Since 9.3
-*/
-class CPdpFsmRequestBase
-{
-public:
-
- /**
- C'tor
-
- @param aProvider - the sub connection provider 'this' is directly or indirectly owned by.
- * Also represents a specific PDP context.
- @param aOwner - the immediate owner of 'this' (could be same as aProvider or could be
- * request (when nested).
- */
- CPdpFsmRequestBase( CUmtsGprsSubConnProvd& aProvider, MPdpFsmRequestOwner& aOwner);
-
- virtual ~CPdpFsmRequestBase();
-
- /**
- The method should issue the request
-
- @return the immediate request result.
- */
- virtual TInt Start() = 0;
-
-
- /**
- The callback method called by the direct owner of 'this' to forward events/results
- caused by issuing 'this'. 'This' can interpret the events and decide whether to
- flag the completion back to its owner.
-
- @param aContextId The context Id that the event occured on
- @param aEvent The identifier of the event that occured
- @param aParam Data relavent to the event. Usually a system-wide error code
- @return ETrue if the event was of interested and handled, EFalse if wasn't
- handled and should be passed on to SpudMan
- */
- virtual TBool PdpFsmEvent(TContextId aContextId, TInt aEvent, TInt aParam) = 0;
-
-protected:
- CUmtsGprsSubConnProvd& iProvider;
- MPdpFsmRequestOwner& iOwner;
- TContextId iContextId;
-
-public:
- __FLOG_DECLARATION_MEMBER;
-};
-
-
-
-#include "UmtsGprs_subconnProv.inl"
-#endif
-// UMTSGPRS_SUBCONNPROV_H
--- a/telephonyprotocols/umtsgprsscpr/inc/UmtsGprs_subconnProv.inl Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Inline methods of the Umts/Gprs SubConnection Provider
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-
-
-inline CUmtsGprsSubConnProvd::CUmtsGprsSubConnProvd(
- CSubConnectionProviderFactoryBase& aFactory,
- CConnectionProviderBase& aConnProvider)
-:CSubConnectionProviderBase(aFactory, aConnProvider),
- iContextId(KAllContexts), /*Initialising to an illegal value*/
- iCurrentPdpFsmReq(NULL)
-/**
-Constructs a UMTS SubConnection Provider
-
-@param aFactory CSubConnectionProviderFactoryBase that should own the reference to 'this'
-@param aConnProvider a connection that 'this' subconnection belongs to
-*/
- {
- __FLOG_OPEN(KUmtsGprsLogTag1, KUmtsGprsLogTag2);
- __FLOG_2(_L("CUmtsGprsSubConnProvd [this=%08x]:\tCUmtsGprsSubConnProvd() [MConnectionDataClient=%08x]"),this,(MConnectionDataClient*)this);
- }
-
-inline void CUmtsGprsSubConnProvd::Done(TInt /*aResult*/, CPdpFsmRequestBase& aThis)
- {
- ASSERT(&aThis == iCurrentPdpFsmReq);
- (void)aThis;
- delete iCurrentPdpFsmReq;
- iCurrentPdpFsmReq = NULL;
- }
-
-inline TContextId CUmtsGprsSubConnProvd::GetContextId() const
- {
- return iContextId;
- }
-
-inline TInt CUmtsGprsSubConnProvd::NotifyClientEvent(const CSubConNotificationEvent& aEvent)
- {
- return CSubConnectionProviderBase::NotifyClientEvent(aEvent);
- }
-
-
-inline CUmtsGprsSubConnProvd::TQosParameterRelease CUmtsGprsSubConnProvd::RequestedQosRelease()
- {
- return iParameterRelease;
- }
-
-inline void CUmtsGprsSubConnProvd::ResetQosRelease ()
- {
- iParameterRelease = CUmtsGprsSubConnProvd::KParameterRelInvalid;
- }
-
-
-inline CPdpFsmRequestBase::~CPdpFsmRequestBase ()
- {
- __FLOG_CLOSE;
- }
--- a/telephonyprotocols/umtsgprsscpr/inc/UmtsGprs_subconnProvFactory.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Umts/Gprs SubConnection Provider Facory header file
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-
-#ifndef UMTSGPRS_SUBCONNPROVFACTORY_H
-#define UMTSGPRS_SUBCONNPROVFACTORY_H
-
-#include <ss_subconnprov.h>
-#include <comms-infras/nifif.h>
-#include <networking/mspudmaninterface.h>
-
-// The ECOM DLL Uid and Factory Uid for the UmtsGprsSCPR
-
-const TUint KUmtsGprsSubConnectionProviderFactoryId = 0x1020D45F;
-
-class CUmtsGprsSubConnProvdFactory : public CSubConnectionProviderFactoryBase
-/**
-
-@internalTechnology
-@released Since 9.3
-*/
- {
-public:
- static CUmtsGprsSubConnProvdFactory* NewL(TAny* aConstructionParameters);
-
-protected:
- CUmtsGprsSubConnProvdFactory(TUint aFactoryId, CSubConnectionFactoryContainer& aParentContainer);
- virtual ~CUmtsGprsSubConnProvdFactory();
-
- // methods to be overriden for CSubConnectionProviderFactory
- virtual CSubConnectionProviderBase* DoCreateProviderL(CConnectionProviderBase& aConnProvider, RSubConnection::TSubConnType aType);
-
- };
-
-
-#endif
-// UMTSGPRS_SUBCONNPROVFACTORY_H
--- a/telephonyprotocols/umtsgprsscpr/spudfsm/inc/PDPFSM.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Interface to the PDP Context Finite State Machine
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#ifndef PDPFSM_H
-#define PDPFSM_H
-
-
-#include <networking/mpdpfsminterface.h>
-#include "RSpudManInterface.h"
-
-class CPdpFsmFactory;
-class CUmtsGprsDefaultSubConnProvd;
-
-
-class CPdpFsmInterface : public MPdpFsmInterface
-/**
- * UmtsGprsSCPR implemenation for the MPdpFsmInterface
- *
- * @internalComponent
- */
- {
- public:
- //-=========================================================
- // custom methods
- //-=========================================================
- CPdpFsmInterface(CUmtsGprsDefaultSubConnProvd& aOwner);
- virtual ~CPdpFsmInterface();
-
- void SpudInput (TContextId aPdpId, TInt aNotification, TInt aParam);
-
- //-=========================================================
- // MPdpFsmInterface methods
- //-=========================================================
- virtual void OpenL(MSpudManInterface * aSpudManInterface, TName& aName);
- virtual void Close();
-
- virtual TInt Input (TContextId aPdpId, const TInt aOperation, const TInt aParam=KErrNone);
-
- virtual TInt Set(TContextId aPdpId, const TTFTInfo& aParam);
- virtual TInt Set(TContextId aPdpId, const TTFTOperationCode& aParam);
- virtual TInt Set(TContextId aPdpId, const RPacketContext::TDataChannelV2& aParam);
- virtual TInt Set(TContextId aPdpId, const RPacketContext::TContextConfigGPRS& aParam);
- virtual TInt Set(TContextId aPdpId, const RPacketContext::TContextStatus& aParam);
-
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
-
- // This is to set the status of IM CN signalling parameter
- virtual void SetIMCNSignalling(TBool aImCnSignalling);
-
- virtual TInt Set(TContextId aPdpId, const RPacketQoS::TQoSR5Requested& aParam);
- virtual TInt Set(TContextId aPdpId, const RPacketQoS::TQoSR5Negotiated& aParam);
- virtual TInt Get(TContextId aPdpId, RPacketQoS::TQoSR5Requested& aParam) const;
- virtual TInt Get(TContextId aPdpId, RPacketQoS::TQoSR5Negotiated& aParam) const;
-
-#else
-// !SYMBIAN_NETWORKING_UMTSR5
-
- virtual TInt Get(TContextId aPdpId, RPacketQoS::TQoSR99_R4Requested& aParam) const;
- virtual TInt Get(TContextId aPdpId, RPacketQoS::TQoSR99_R4Negotiated& aParam) const;
- virtual TInt Set(TContextId aPdpId, const RPacketQoS::TQoSR99_R4Requested& aParam);
- virtual TInt Set(TContextId aPdpId, const RPacketQoS::TQoSR99_R4Negotiated& aParam);
-
-#endif
-// SYMBIAN_NETWORKING_UMTSR5
-
-
- virtual TInt Get(TContextId aPdpId, TTFTInfo& aParam) const;
- virtual TInt Get(TContextId aPdpId, TTFTOperationCode& aParam) const;
- virtual TInt Get(TContextId aPdpId, RPacketContext::TDataChannelV2& aParam) const;
- virtual TInt Get(TContextId aPdpId, RPacketContext::TContextConfigGPRS& aParam) const;
- virtual TInt Get(TContextId aPdpId, RPacketContext::TContextStatus& aParam) const;
-
- virtual TInt GetLastErrorCause(TContextId aPdpId, TInt& aLastErrorCause) const;
-
- virtual void Set(const RPacketService::TStatus aParam); // applies to all contexts
- virtual void Get(RPacketService::TStatus& aParam);// applies to all contexts
-
- virtual const TName& TsyName(void);
-
- void SetContextTerminationErrorAndStop(TContextId aPdpId, TInt aErrorCode);
-
- protected:
- private:
- // DO NOT provide implementations to these methods: Copying this object should be disabled
- CPdpFsmInterface(CPdpFsmInterface&);
- CPdpFsmInterface& operator= (CPdpFsmInterface& aInput);
-
- public:
- protected:
- private:
- // FSM Factory - churns out FSMs
- CPdpFsmFactory* iPdpFsmFactory;
-
- RPacketService::TStatus iNetworkStatus;
-
- CUmtsGprsDefaultSubConnProvd& iDefaultSubConnProvd;
- RSpudManInterface iSpudManInterface;
-
-};
-
-#endif
-// PDPFSM_H
--- a/telephonyprotocols/umtsgprsscpr/spudfsm/inc/pdpfsmnmspace.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,309 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Common header for pdp FSM
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#ifndef PDPFSMNMSPACE_H
-#define PDPFSMNMSPACE_H
-
-#include <etelqos.h>
-
-namespace PdpFsm
-{
-
-/** completion and notification signals */
-enum TEtelSignal
- {
- EPhoneOpened,
- EPhoneOpenedFailed,
-
- EQoSSet,
- EQoSSetFailed,
- ETftSet,
- ETftSetFailed,
- ETftChanged,
- ETftChangedFailed,
-
- E1ryPdpContextCreated,
- E1ryPdpContextCreatedFailed,
- E2ryPdpContextCreated,
- E2ryPdpContextCreatedFailed,
-
- EPdpNegQoSRetrieved,
- EPdpNegQoSRetrievedFailed,
- EPdpContextModified,
- EPdpContextModifiedFailed,
- EPdpActivated,
- EPdpActivatedFailed,
- EContextDeleted,
- EContextDeletedFailed,
- // add new signals here
-
- // network signals
- EQoSProfileChangeNetwork,
- EConfigGPRSChangeNetwork,
- EContextStatusChangeNetwork,
- EServiceStatusChangeNetwork,
- EPacketStatusChangeNetwork,
- // add new signals here
-
- ESentinelSignal
- };
-} // namespace PdpFsm
-
-
-
-
-/**
-A buffer to potentially hold one of the following:
-Unfortuntely can't use a union for these since they have default ctors.
-
-RPacketQoS::TQoSR99_R4Negotiated
-RPacketQoS::TQoSR5Negotiated
-
-@internalComponent
-*/
-struct TNegotiatedProfileBuffer
- {
-private:
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- RPacketQoS::TQoSR5Negotiated iNegotiatedBuffer;
-#else
- RPacketQoS::TQoSR99_R4Negotiated iNegotiatedBuffer;
-#endif
-
-public:
- inline TInt ExtensionId();
-
- inline const RPacketQoS::TQoSR99_R4Negotiated& NegotiatedQoSR99_R4();
- inline TNegotiatedProfileBuffer& operator=(const RPacketQoS::TQoSR99_R4Negotiated& aParam);
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- inline const RPacketQoS::TQoSR5Negotiated& NegotiatedQoSR5();
- inline TNegotiatedProfileBuffer& operator=(const RPacketQoS::TQoSR5Negotiated& aParam);
-#endif
- };
-
-
-struct TRequestedProfileBuffer
- {
-private:
- // Use R5 since its the largest
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- RPacketQoS::TQoSR5Requested iRequestedBuffer;
-#else
- RPacketQoS::TQoSR99_R4Requested iRequestedBuffer;
-#endif
-
-public:
- inline TInt ExtensionId();
-
- inline const RPacketQoS::TQoSR99_R4Requested& RequestedQoSR99_R4();
- inline TRequestedProfileBuffer& operator=(const RPacketQoS::TQoSR99_R4Requested& aParam);
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- inline const RPacketQoS::TQoSR5Requested& RequestedQoSR5();
- inline TRequestedProfileBuffer& operator=(const RPacketQoS::TQoSR5Requested& aParam);
-#endif
- };
-
-
-inline TInt TNegotiatedProfileBuffer::ExtensionId()
- {
- return (reinterpret_cast<TPacketDataConfigBase&>(iNegotiatedBuffer)).ExtensionId();
- }
-
-
-inline const RPacketQoS::TQoSR99_R4Negotiated& TNegotiatedProfileBuffer::NegotiatedQoSR99_R4()
- {
- return reinterpret_cast<RPacketQoS::TQoSR99_R4Negotiated&>(iNegotiatedBuffer);
- }
-
-
-inline TNegotiatedProfileBuffer& TNegotiatedProfileBuffer::operator=(const RPacketQoS::TQoSR99_R4Negotiated& aParam)
- {
- // Use this tmp value, since its ExtensionId is set when it is constructed.
- // Can't trust the ExtensionId of struct passed in.
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- // If we support R5 then store as R5
- RPacketQoS::TQoSR5Negotiated tmp;
- tmp.iSignallingIndication = EFalse;
- tmp.iSourceStatisticsDescriptor = RPacketQoS::ESourceStatisticsDescriptorUnknown;
-
-#else
- RPacketQoS::TQoSR99_R4Negotiated tmp;
-#endif
-
- tmp.iBER = aParam.iBER;
- tmp.iDeliverErroneousSDU = aParam.iDeliverErroneousSDU;
- tmp.iDeliveryOrderReqd = aParam.iDeliveryOrderReqd;
- tmp.iGuaranteedRate = aParam.iGuaranteedRate;
- tmp.iMaxRate = aParam.iMaxRate;
- tmp.iMaxSDUSize = aParam.iMaxSDUSize;
- tmp.iSDUErrorRatio = aParam.iSDUErrorRatio;
- tmp.iTrafficClass = aParam.iTrafficClass;
- tmp.iTrafficHandlingPriority = aParam.iTrafficHandlingPriority;
- tmp.iTransferDelay = aParam.iTransferDelay;
-
- iNegotiatedBuffer = tmp;
-
- return *this;
- }
-
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
-inline const RPacketQoS::TQoSR5Negotiated& TNegotiatedProfileBuffer::NegotiatedQoSR5()
- {
- return iNegotiatedBuffer;
- }
-
-
-inline TNegotiatedProfileBuffer& TNegotiatedProfileBuffer::operator=(const RPacketQoS::TQoSR5Negotiated& aParam)
- {
- // Use this tmp value, since its ExtensionId is set when it is constructed.
- // Can't trust the ExtensionId of struct passed in.
- RPacketQoS::TQoSR5Negotiated tmp;
-
- tmp.iBER = aParam.iBER;
- tmp.iDeliverErroneousSDU = aParam.iDeliverErroneousSDU;
- tmp.iDeliveryOrderReqd = aParam.iDeliveryOrderReqd;
- tmp.iGuaranteedRate = aParam.iGuaranteedRate;
- tmp.iMaxRate = aParam.iMaxRate;
- tmp.iMaxSDUSize = aParam.iMaxSDUSize;
- tmp.iSDUErrorRatio = aParam.iSDUErrorRatio;
- tmp.iTrafficClass = aParam.iTrafficClass;
- tmp.iTrafficHandlingPriority = aParam.iTrafficHandlingPriority;
- tmp.iTransferDelay = aParam.iTransferDelay;
- tmp.iSignallingIndication = aParam.iSignallingIndication;
- tmp.iSourceStatisticsDescriptor = aParam.iSourceStatisticsDescriptor;
-
- iNegotiatedBuffer = tmp;
-
- return *this;
- }
-#endif
-
-
-
-
-inline TInt TRequestedProfileBuffer::ExtensionId()
- {
- return (reinterpret_cast<TPacketDataConfigBase&>(iRequestedBuffer)).ExtensionId();
- }
-
-
-inline const RPacketQoS::TQoSR99_R4Requested& TRequestedProfileBuffer::RequestedQoSR99_R4()
- {
- return reinterpret_cast<RPacketQoS::TQoSR99_R4Requested&>(iRequestedBuffer);
- }
-
-
-inline TRequestedProfileBuffer& TRequestedProfileBuffer::operator=(const RPacketQoS::TQoSR99_R4Requested& aParam)
- {
- // Use this tmp value, since its ExtensionId is set when it is constructed.
- // Can't trust the ExtensionId of struct passed in.
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- // If we support R5 then store as R5
- RPacketQoS::TQoSR5Requested tmp;
- tmp.iSignallingIndication = EFalse;
- tmp.iSourceStatisticsDescriptor = RPacketQoS::ESourceStatisticsDescriptorUnknown;
-
-#else
- // If we don't support R5 then store as R4/R99
- RPacketQoS::TQoSR99_R4Requested tmp;
-#endif
-
- tmp.iReqTrafficClass = aParam.iReqTrafficClass;
- tmp.iMinTrafficClass = aParam.iMinTrafficClass;
- tmp.iReqDeliveryOrderReqd = aParam.iReqDeliveryOrderReqd;
- tmp.iMinDeliveryOrderReqd = aParam.iMinDeliveryOrderReqd;
- tmp.iReqDeliverErroneousSDU = aParam.iReqDeliverErroneousSDU;
- tmp.iMinDeliverErroneousSDU = aParam.iMinDeliverErroneousSDU;
- tmp.iReqMaxSDUSize = aParam.iReqMaxSDUSize;
- tmp.iMinAcceptableMaxSDUSize = aParam.iMinAcceptableMaxSDUSize;
- tmp.iReqMaxRate = aParam.iReqMaxRate;
- tmp.iMinAcceptableMaxRate = aParam.iMinAcceptableMaxRate;
- tmp.iReqBER = aParam.iReqBER;
- tmp.iMaxBER = aParam.iMaxBER;
- tmp.iReqSDUErrorRatio = aParam.iReqSDUErrorRatio;
- tmp.iMaxSDUErrorRatio = aParam.iMaxSDUErrorRatio;
- tmp.iReqTrafficHandlingPriority = aParam.iReqTrafficHandlingPriority;
- tmp.iMinTrafficHandlingPriority = aParam.iMinTrafficHandlingPriority;
- tmp.iReqTransferDelay = aParam.iReqTransferDelay;
- tmp.iMaxTransferDelay = aParam.iMaxTransferDelay;
- tmp.iReqGuaranteedRate = aParam.iReqGuaranteedRate;
- tmp.iMinGuaranteedRate = aParam.iMinGuaranteedRate;
-
- iRequestedBuffer = tmp;
-
- return *this;
- }
-
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
-inline const RPacketQoS::TQoSR5Requested& TRequestedProfileBuffer::RequestedQoSR5()
- {
- return iRequestedBuffer;
- }
-
-
-inline TRequestedProfileBuffer& TRequestedProfileBuffer::operator=(const RPacketQoS::TQoSR5Requested& aParam)
- {
- // Use this tmp value, since its ExtensionId is set when it is constructed.
- // Can't trust the ExtensionId of struct passed in.
- RPacketQoS::TQoSR5Requested tmp;
-
- tmp.iReqTrafficClass = aParam.iReqTrafficClass;
- tmp.iMinTrafficClass = aParam.iMinTrafficClass;
- tmp.iReqDeliveryOrderReqd = aParam.iReqDeliveryOrderReqd;
- tmp.iMinDeliveryOrderReqd = aParam.iMinDeliveryOrderReqd;
- tmp.iReqDeliverErroneousSDU = aParam.iReqDeliverErroneousSDU;
- tmp.iMinDeliverErroneousSDU = aParam.iMinDeliverErroneousSDU;
- tmp.iReqMaxSDUSize = aParam.iReqMaxSDUSize;
- tmp.iMinAcceptableMaxSDUSize = aParam.iMinAcceptableMaxSDUSize;
- tmp.iReqMaxRate = aParam.iReqMaxRate;
- tmp.iMinAcceptableMaxRate = aParam.iMinAcceptableMaxRate;
- tmp.iReqBER = aParam.iReqBER;
- tmp.iMaxBER = aParam.iMaxBER;
- tmp.iReqSDUErrorRatio = aParam.iReqSDUErrorRatio;
- tmp.iMaxSDUErrorRatio = aParam.iMaxSDUErrorRatio;
- tmp.iReqTrafficHandlingPriority = aParam.iReqTrafficHandlingPriority;
- tmp.iMinTrafficHandlingPriority = aParam.iMinTrafficHandlingPriority;
- tmp.iReqTransferDelay = aParam.iReqTransferDelay;
- tmp.iMaxTransferDelay = aParam.iMaxTransferDelay;
- tmp.iReqGuaranteedRate = aParam.iReqGuaranteedRate;
- tmp.iMinGuaranteedRate = aParam.iMinGuaranteedRate;
- tmp.iSignallingIndication = aParam.iSignallingIndication;
- tmp.iSourceStatisticsDescriptor = aParam.iSourceStatisticsDescriptor;
-
- iRequestedBuffer = tmp;
-
- return *this;
- }
-#endif
-
-
-typedef TPckg<TNegotiatedProfileBuffer> TNegotiatedProfileBufferPckg;
-typedef TPckg<TRequestedProfileBuffer> TRequestedProfileBufferPckg;
-
-
-#endif
-// PDPFSMNMSPACE_H
--- a/telephonyprotocols/umtsgprsscpr/spudfsm/src/PDPFSM.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,814 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Implementation file for the PDP Context Finite State Machine
-//
-//
-
-/**
- @file
-*/
-
-
-#include "PDPFSM.h"
-#include "cpdpfsmfactory.h"
-#include "spudfsmdebuglogger.h"
-#include "UmtsGprs_defaultSubconnProv.h"
-
-
-//-=========================================================
-// Custom methods
-//-=========================================================
-CPdpFsmInterface::CPdpFsmInterface(CUmtsGprsDefaultSubConnProvd& aOwner)
-:iPdpFsmFactory(NULL),
- iNetworkStatus(RPacketService::EStatusUnattached),
- iDefaultSubConnProvd(aOwner)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::()");
- }
-
-CPdpFsmInterface::~CPdpFsmInterface()
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::()");
-
- CPdpFsmInterface::Close();
- delete iPdpFsmFactory;
- }
-
-
-void CPdpFsmInterface::SpudInput(TContextId aPdpId, TInt aNotification, TInt aParam)
- {
- switch (aNotification)
- {
- //------------------------------
- // responses - these are explicitly responses to previously issued requests.
- // These should only reach the entity that sent the request.
- //------------------------------
- case KContextTFTModifiedEvent:
- {
- TTFTOperationCode opCode;
- Get(aPdpId, opCode);
- if (opCode == KDeleteTFT && aParam == KErrNone)
- {
- //captured response to a successful delete TFT request. We now
- //have a new default.
- #ifdef _DEBUG
- TTFTInfo ttfinfo;
- Get(aPdpId, ttfinfo);
- ASSERT(ttfinfo.FilterCount() == 0);
- #endif //_DEBUG
-
- iDefaultSubConnProvd.NewDefaultElected(aPdpId);
- }
-
- iSpudManInterface.Input(aPdpId, aNotification, aParam);
- }
- break;
-
- case KSecondaryContextCreated:
- case KContextQoSSetEvent:
- case KContextActivateEvent:
- case KContextModifyActiveEvent:
- {
- if (aPdpId == iDefaultSubConnProvd.GetContextId())
- {
- TBool handled = iDefaultSubConnProvd.PdpFsmEvent(aPdpId, aNotification, aParam);
- if (!handled)
- {
- // Chances are the default context is in fact a promoted secondary context
- // We must be careful to make sure that GuQoS gets the notification it expects
- // otherwise it can cause problems. On the other hand if it gets notifications
- // or events its not expecting it will Panic.
- iSpudManInterface.Input(aPdpId, aNotification, aParam);
- }
- }
- else
- {
- iSpudManInterface.Input(aPdpId, aNotification, aParam);
- }
- }
- break;
-
- //------------------------------
- // events - Received either as responses to previously sent requests
- // or as indications of network initiated actions.
- //------------------------------
- case KContextDeleteEvent:
- case KNetworkStatusEvent:
- case KContextParametersChangeEvent:
- case KContextBlockedEvent:
- case KContextUnblockedEvent:
- case KPrimaryContextCreated:
- case KGetNegQoSEvent:
- {
- if ( aPdpId == iDefaultSubConnProvd.GetContextId() || aPdpId == KAllContexts)
- {
- iDefaultSubConnProvd.PdpFsmEvent(iDefaultSubConnProvd.GetContextId(), aNotification, aParam);
- }
- iSpudManInterface.Input(aPdpId, aNotification, aParam);
- }
- break;
- }
- }
-
-
-
-
-//-=========================================================
-// MPdpFsmInterface methods
-//-=========================================================
-/** request to open the FSM
-
-@param aSpudManInterface reference to SpudMan interface
-*/
-void CPdpFsmInterface::OpenL(MSpudManInterface * aSpudManInterface, TName& aTsyName)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::OpenL()");
-
- if (aSpudManInterface == NULL)
- {
- User::Leave(KErrBadHandle);
- }
-
- iSpudManInterface.Init(aSpudManInterface);
-
- iPdpFsmFactory = CPdpFsmFactory::NewL();
-
- iPdpFsmFactory->InitL(aTsyName, this);
- }
-
-/** closes the FSM and frees underlying resources
-*/
-void CPdpFsmInterface::Close()
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Close()");
-
- iSpudManInterface.Close ();
-
- if (iPdpFsmFactory)
- {
- iPdpFsmFactory->Close();
- }
- }
-
-
-/**
- Performs and input action/notification for context ID aPdpId
- If aPdpId is KAllContexts, the notification is sent to every context, unless it is of type EServiceStatusChangeNetwork
-
-@param aPdpId the PDP context ID, 0 to KMaxPdpContexts
-@param aOperation the operation id to perform
-@param aParam extra id for ETelDriver errors
-@return error code for the synchronus patrt of the operation
-*/
-TInt CPdpFsmInterface::Input(TContextId aPdpId, const TInt aOperation, const TInt aParam)
- {
- TInt ret = KErrNone;
-
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Input(aParam)");
-
- ASSERT(iPdpFsmFactory);
-
-
- // Control structure is in order of the most frequent operation first (hopefully)
- //
- if (iPdpFsmFactory->ContextIsValid(aPdpId))
- {
- // We have a valid PDP FSM Context, so go ahead with the operation...
- //
- ret = (iPdpFsmFactory->GetFsmContext(aPdpId))->Input(aOperation, aParam);
- if (aOperation == PdpFsm::EContextStatusChangeNetwork && aParam != KErrNone)
- {
- SPUDFSMVERBOSE_LOG1(_L("iSpudManInterface.SetContextTerminationErrorAndStop %d"),aParam);
- iSpudManInterface.SetContextTerminationErrorAndStop(aPdpId, aParam);
- }
-
- // Recovering memory by deleting the Fsm Context
- //
- // Tricky, definitely don't try with 'SpudMan::EContextDelete' it's far too early.
- // You can get a bit further deleting on 'PdpFsm::EContextDeleted' (and 'PdpFsm::EContextDeletedFailed')
- // from TContextDeleteStrategy::NotifyFsm(), but you then find that GuQoS is calling into Spud in order to
- // transfer data from the deleted context to another...
- //
- // Additionally, the spud unit test is expecting to be able to "reuse" deleted contexts...
- }
- else if (aPdpId == KAllContexts)
- {
- TInt err = KErrNone;
-
- // this has to be here to avoid sending it from every context
- //
- if (aOperation == PdpFsm::EServiceStatusChangeNetwork)
- {
- iPdpFsmFactory->SpudInput(KAllContexts, KNetworkStatusEvent, KErrNone);
- }
- else
- {
- for (TContextId i = 0; (i < KMaxPdpContexts) && iPdpFsmFactory->HaveFsmContext(i); i++)
- {
- // Process any current PDP contexts.
-
- err = (iPdpFsmFactory->GetFsmContext(i))->Input(aOperation, aParam);
-
- // See above about trials and tribulations of trying to recover the memory taken by these
- // CPdpFsm objects.
-
- if (err != KErrNone)
- {
- // We return the last error found, ignoring any earlier ones
- //
- ret = err;
- }
- }
- }
- }
- else
- {
- ret = KErrBadHandle;
- }
-
- return ret;
- }
-
-
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
-
-void CPdpFsmInterface::SetIMCNSignalling(TBool aImCnSignalling)
-/**
-Sets the IM CN signalling Parameters
-
-@param aImCnSignalling The status of the IMCN signalling Flag
-*/
- {
- TRAP_IGNORE(iDefaultSubConnProvd.AddIMCNInformationToParameterBundleL(aImCnSignalling));
- }
-
-
-/**
-Set context parameters
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts - 1
-@param aParam - RPacketQoS::TQoSR5Requested data to set
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Set(TContextId aPdpId, const RPacketQoS::TQoSR5Requested& aParam)
-{
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketQoS::TQoSR5Requested)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
- iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
- return KErrNone;
-}
-
-
-/**
-Set context parameters
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts - 1
-@param aParam - RPacketQoS::TQoSR5Negotiated data to set
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Set(TContextId aPdpId, const RPacketQoS::TQoSR5Negotiated& aParam)
-{
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketQoS::TQoSR5Negotiated)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
- iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
- return KErrNone;
-}
-
-
-#else
-// !SYMBIAN_NETWORKING_UMTSR5
-
-/**
-Set context parameters
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketQoS::TQoSR99_R4Requested data to set
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Set(TContextId aPdpId, const RPacketQoS::TQoSR99_R4Requested& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketQoS::TQoSR99_R4Requested)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
-
- iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
- return KErrNone;
- }
-
-
-/**
-Set context parameters
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketQoS::TQoSR99_R4Negotiated data to set
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Set(TContextId aPdpId, const RPacketQoS::TQoSR99_R4Negotiated& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketQoS::TQoSR99_R4Negotiated)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
-
- iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
- return KErrNone;
- }
-
-#endif
-// SYMBIAN_NETWORKING_UMTSR5
-
-
-
-
-/** Set context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - TFTInfo data to set
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Set(TContextId aPdpId, const TTFTInfo& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(TFTInfo)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
- iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
- return KErrNone;
- }
-
-/** Set context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - TFTOperationCode to set to go with the data
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Set(TContextId aPdpId, const TTFTOperationCode& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(TTFTOperationCode)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
- iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
- return KErrNone;
- }
-
-/** Set context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketContext::TDataChannelV2 data to set
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Set(TContextId aPdpId, const RPacketContext::TDataChannelV2& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketContext::TDataChannelV2)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
- iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
- return KErrNone;
- }
-
-/** Set context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketContext::TContextStatus data to set
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Set(TContextId aPdpId, const RPacketContext::TContextStatus& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketContext::TContextStatus)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
- iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
- return KErrNone;
- }
-
-/** Set context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketContext::TContextConfigGPRS& data to set
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Set(TContextId aPdpId, const RPacketContext::TContextConfigGPRS& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketContext::TContextConfigGPRS)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
- iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
- return KErrNone;
- }
-
-/** Set network status
-
-@param aParam - RPacketService::TStatus data to set
-*/
-void CPdpFsmInterface::Set(const RPacketService::TStatus aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketService::TStatus)");
-
- ASSERT(iPdpFsmFactory);
-
- iNetworkStatus = aParam;
- }
-
-/** Set ETel termination error and stop context
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aErrorCode - the Etel error code detected on this context
-*/
-void CPdpFsmInterface::SetContextTerminationErrorAndStop(TContextId aPdpId, TInt aErrorCode)
-{
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::SetContextTerminationErrorAndStop(TContextId aPdpId, TInt aErrorCode)");
-
- iSpudManInterface.SetContextTerminationErrorAndStop(aPdpId, aErrorCode);
-
-}
-
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
-/**
-Get context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketQoS::TQoSR5Requested data to get
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Get(TContextId aPdpId, RPacketQoS::TQoSR5Requested& aParam) const
-{
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketQos::TQoSR5Requested)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
- iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
- return KErrNone;
-}
-
-
-/**
-Get context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketQoS::TQoSR5Negotiated data to get
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Get(TContextId aPdpId, RPacketQoS::TQoSR5Negotiated& aParam) const
-{
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketQoS::TQoSR5Negotiated)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
- iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
- return KErrNone;
-}
-
-#else
-// !SYMBIAN_NETWORKING_UMTSR5
-
-/**
-Get context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketQoS::TQoSR99_R4Requested data to get
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Get(TContextId aPdpId, RPacketQoS::TQoSR99_R4Requested& aParam) const
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketQos::TQoSRequestedR99_R4)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
- iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
- return KErrNone;
- }
-
-
-/**
-Get context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketQoS::TQoSR99_R4Negotiated data to get
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Get(TContextId aPdpId, RPacketQoS::TQoSR99_R4Negotiated& aParam) const
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketQoS::TQoSR99_R4Negotiated)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
- iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
- return KErrNone;
- }
-
-#endif
-// SYMBIAN_NETWORKING_UMTSR5
-
-
-
-/** Get context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - TTFTInfo data to get
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Get(TContextId aPdpId, TTFTInfo& aParam) const
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(TFTInfo)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
- iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
- return KErrNone;
- }
-
-/** Get context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - TTFTOperationCode for the TFT data
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Get(TContextId aPdpId, TTFTOperationCode& aParam) const
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(TFTInfo)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
- iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
- return KErrNone;
- }
-
-
-
-/** Get context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketContext::TDataChannelV2 data to set
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Get(TContextId aPdpId, RPacketContext::TDataChannelV2& aParam) const
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketContext::TDataChannelV2)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
- iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
- return KErrNone;
- }
-
-/** Get context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketContext::TContextConfigGPRS data to set
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Get(TContextId aPdpId, RPacketContext::TContextConfigGPRS& aParam) const
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketContext::TContextConfigGPRS)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
- iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
- return KErrNone;
- }
-
-/** Get context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketContext::TContextStatus data to get
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Get(TContextId aPdpId, RPacketContext::TContextStatus& aParam) const
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketContext::TContextStatus)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
- iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
- return KErrNone;
- }
-
-/** Get context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketContext::TContextConfigGPRS data to set
-@return - KErrBadHandle or KErrNone
-*/
-void CPdpFsmInterface::Get(RPacketService::TStatus& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketService::TStatus)");
-
- ASSERT(iPdpFsmFactory);
-
- aParam = iNetworkStatus;
- }
-
-
-TInt CPdpFsmInterface::GetLastErrorCause(TContextId aPdpId, TInt& aLastErrorCause) const
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::GetLastErrorCause(RPacketContext::GetLastErrorCause)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
-
- TInt ret;
- if (!iPdpFsmFactory->HaveFsmContext(aPdpId))
- {
- if ((ret = iPdpFsmFactory->NewFsmContext(aPdpId)) != KErrNone)
- {
- return ret;
- }
- }
-
- iPdpFsmFactory->GetFsmContext(aPdpId)->GetLastErrorCause(aLastErrorCause);
-
- return KErrNone;
- }
-
-/** Get the TsyName
-
-@return - TsyName in a TName
-*/
-const TName& CPdpFsmInterface::TsyName(void)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::TsyName");
-
- ASSERT(iPdpFsmFactory);
-
- return iPdpFsmFactory->TsyName();
-}
-
-
--- a/telephonyprotocols/umtsgprsscpr/spudfsm/src/PDPSCPRFSM.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,534 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Implementation file for the PDP Context Finite State Machine
-//
-//
-
-/**
- @file
-*/
-
-
-#include "PDPFSM.h"
-#include "cpdpfsmfactory.h"
-#include "spudfsmdebuglogger.h"
-#include "PDPDeftSCPR.h"
-
-
-//-=========================================================
-// Custom methods
-//-=========================================================
-CPdpFsmInterface::CPdpFsmInterface(CPDPDefaultSubConnectionProvider& aOwner)
-:iPdpFsmFactory(NULL),
- iNetworkStatus(RPacketService::EStatusUnattached),
- iDefaultSubConnProvd(aOwner)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::()");
- }
-
-CPdpFsmInterface::~CPdpFsmInterface()
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::()");
-
- CPdpFsmInterface::Close();
- delete iPdpFsmFactory;
- }
-
-TContextId CPdpFsmInterface::NewFsmContextL(MPdpFsmEventHandler& aPdpFsmEventHandler)
- {
- return iPdpFsmFactory->NewFsmContextL(aPdpFsmEventHandler);
- }
-
-
-/** request to open the FSM
-
-@param aSpudManInterface reference to SpudMan interface
-*/
-void CPdpFsmInterface::OpenL(TName& aTsyName)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::OpenL()");
-
- iPdpFsmFactory = CPdpFsmFactory::NewL();
- iPdpFsmFactory->InitL(aTsyName, this);
- }
-
-/** closes the FSM and frees underlying resources
-*/
-void CPdpFsmInterface::Close()
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Close()");
-
- if (iPdpFsmFactory)
- {
- iPdpFsmFactory->Close();
- }
- }
-
-
-/**
- Performs and input action/notification for context ID aPdpId
- If aPdpId is KAllContexts, the notification is sent to every context, unless it is of type EServiceStatusChangeNetwork
-
-@param aPdpId the PDP context ID, 0 to KMaxPdpContexts
-@param aOperation the operation id to perform
-@param aParam extra id for ETelDriver errors
-@return error code for the synchronus patrt of the operation
-*/
-TInt CPdpFsmInterface::Input(TContextId aPdpId, const TInt aOperation, const TInt aParam)
- {
- TInt ret = KErrNone;
-
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Input(aParam)");
-
- ASSERT(iPdpFsmFactory);
-
-
- // Control structure is in order of the most frequent operation first (hopefully)
- //
- if (iPdpFsmFactory->ContextIsValid(aPdpId))
- {
- // We have a valid PDP FSM Context, so go ahead with the operation...
- //
- ret = (iPdpFsmFactory->GetFsmContext(aPdpId))->Input(aOperation, aParam);
-
- // Recovering memory by deleting the Fsm Context
- //
- // Tricky, definitely don't try with 'SpudMan::EContextDelete' it's far too early.
- // You can get a bit further deleting on 'PdpFsm::EContextDeleted' (and 'PdpFsm::EContextDeletedFailed')
- // from TContextDeleteStrategy::NotifyFsm(), but you then find that GuQoS is calling into Spud in order to
- // transfer data from the deleted context to another...
- //
- // Additionally, the spud unit test is expecting to be able to "reuse" deleted contexts...
- }
- else if (aPdpId == KAllContexts)
- {
- TInt err = KErrNone;
-
- // this has to be here to avoid sending it from every context
- //
- if (aOperation == PdpFsm::EServiceStatusChangeNetwork)
- {
- iDefaultSubConnProvd.PdpFsmAllContextEvent(KNetworkStatusEvent, KErrNone);
- }
- else
- {
- for (TContextId i = 0; (i < KMaxPdpContexts) && iPdpFsmFactory->HaveFsmContext(i); i++)
- {
- // Process any current PDP contexts.
-
- err = (iPdpFsmFactory->GetFsmContext(i))->Input(aOperation, aParam);
-
- // See above about trials and tribulations of trying to recover the memory taken by these
- // CPdpFsm objects.
-
- if (err != KErrNone)
- {
- // We return the last error found, ignoring any earlier ones
- //
- ret = err;
- }
- }
- }
- }
- else
- {
- ret = KErrBadHandle;
- }
-
- return ret;
- }
-
-
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
-
-/**
-Set context parameters
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts - 1
-@param aParam - RPacketQoS::TQoSR5Requested data to set
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Set(TContextId aPdpId, const RPacketQoS::TQoSR5Requested& aParam)
-{
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketQoS::TQoSR5Requested)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
- ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
- iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
- return KErrNone;
-}
-
-
-/**
-Set context parameters
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts - 1
-@param aParam - RPacketQoS::TQoSR5Negotiated data to set
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Set(TContextId aPdpId, const RPacketQoS::TQoSR5Negotiated& aParam)
-{
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketQoS::TQoSR5Negotiated)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
- ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
- iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
- return KErrNone;
-}
-
-
-#else
-// !SYMBIAN_NETWORKING_UMTSR5
-
-/**
-Set context parameters
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketQoS::TQoSR99_R4Requested data to set
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Set(TContextId aPdpId, const RPacketQoS::TQoSR99_R4Requested& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketQoS::TQoSR99_R4Requested)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
- ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
- iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
- return KErrNone;
- }
-
-
-/**
-Set context parameters
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketQoS::TQoSR99_R4Negotiated data to set
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Set(TContextId aPdpId, const RPacketQoS::TQoSR99_R4Negotiated& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketQoS::TQoSR99_R4Negotiated)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
- ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
- iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
- return KErrNone;
- }
-
-#endif
-// SYMBIAN_NETWORKING_UMTSR5
-
-
-
-
-/** Set context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - TFTInfo data to set
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Set(TContextId aPdpId, const TTFTInfo& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(TFTInfo)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
- ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
- iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
- return KErrNone;
- }
-
-/** Set context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - TFTOperationCode to set to go with the data
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Set(TContextId aPdpId, const TTFTOperationCode& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(TTFTOperationCode)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
- ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
- iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
- return KErrNone;
- }
-
-/** Set context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketContext::TDataChannelV2 data to set
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Set(TContextId aPdpId, const RPacketContext::TDataChannelV2& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketContext::TDataChannelV2)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
- ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
- iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
- return KErrNone;
- }
-
-/** Set context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketContext::TContextStatus data to set
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Set(TContextId aPdpId, const RPacketContext::TContextStatus& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketContext::TContextStatus)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
- ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
- iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
- return KErrNone;
- }
-
-/** Set context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketContext::TContextConfigGPRS& data to set
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Set(TContextId aPdpId, const RPacketContext::TContextConfigGPRS& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketContext::TContextConfigGPRS)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
- ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
- iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
- return KErrNone;
- }
-
-/** Set network status
-
-@param aParam - RPacketService::TStatus data to set
-*/
-void CPdpFsmInterface::Set(const RPacketService::TStatus aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketService::TStatus)");
-
- ASSERT(iPdpFsmFactory);
-
- iNetworkStatus = aParam;
- }
-
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
-/**
-Get context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketQoS::TQoSR5Requested data to get
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Get(TContextId aPdpId, RPacketQoS::TQoSR5Requested& aParam) const
-{
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketQos::TQoSR5Requested)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
- ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
- iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
- return KErrNone;
-}
-
-
-/**
-Get context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketQoS::TQoSR5Negotiated data to get
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Get(TContextId aPdpId, RPacketQoS::TQoSR5Negotiated& aParam) const
-{
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketQoS::TQoSR5Negotiated)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
- ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
- iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
- return KErrNone;
-}
-
-#else
-// !SYMBIAN_NETWORKING_UMTSR5
-
-/**
-Get context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketQoS::TQoSR99_R4Requested data to get
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Get(TContextId aPdpId, RPacketQoS::TQoSR99_R4Requested& aParam) const
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketQos::TQoSRequestedR99_R4)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
- ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
- iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
- return KErrNone;
- }
-
-
-/**
-Get context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketQoS::TQoSR99_R4Negotiated data to get
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Get(TContextId aPdpId, RPacketQoS::TQoSR99_R4Negotiated& aParam) const
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketQoS::TQoSR99_R4Negotiated)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
- ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
- iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
- return KErrNone;
- }
-
-#endif
-// SYMBIAN_NETWORKING_UMTSR5
-
-
-
-/** Get context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - TTFTInfo data to get
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Get(TContextId aPdpId, TTFTInfo& aParam) const
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(TFTInfo)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
- ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
- iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
- return KErrNone;
- }
-
-/** Get context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - TTFTOperationCode for the TFT data
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Get(TContextId aPdpId, TTFTOperationCode& aParam) const
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(TFTInfo)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
- ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
- iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
- return KErrNone;
- }
-
-
-
-/** Get context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketContext::TDataChannelV2 data to set
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Get(TContextId aPdpId, RPacketContext::TDataChannelV2& aParam) const
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketContext::TDataChannelV2)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
- ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
- iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
- return KErrNone;
- }
-
-/** Get context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketContext::TContextConfigGPRS data to set
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Get(TContextId aPdpId, RPacketContext::TContextConfigGPRS& aParam) const
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketContext::TContextConfigGPRS)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
- ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
- iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
- return KErrNone;
- }
-
-/** Get context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketContext::TContextStatus data to get
-@return - KErrBadHandle or KErrNone
-*/
-TInt CPdpFsmInterface::Get(TContextId aPdpId, RPacketContext::TContextStatus& aParam) const
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketContext::TContextStatus)");
-
- ASSERT(iPdpFsmFactory);
- ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
- ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
- iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
- return KErrNone;
- }
-
-/** Get context parameters
-
-@param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
-@param aParam - RPacketContext::TContextConfigGPRS data to set
-@return - KErrBadHandle or KErrNone
-*/
-void CPdpFsmInterface::Get(RPacketService::TStatus& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketService::TStatus)");
-
- ASSERT(iPdpFsmFactory);
-
- aParam = iNetworkStatus;
- }
-
-
-/** Get the TsyName
-
-@return - TsyName in a TName
-*/
-const TName& CPdpFsmInterface::TsyName(void)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::TsyName");
-
- ASSERT(iPdpFsmFactory);
-
- return iPdpFsmFactory->TsyName();
-}
-
-
--- a/telephonyprotocols/umtsgprsscpr/spudfsm/src/cpdpfsm.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,431 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// PDP FSM implementation
-// @internalTechnology
-//
-//
-
-
-#include "tpdpstates.h"
-#include "cpdpfsm.h"
-#include "cpdpfsmfactory.h"
-#include "spudfsmdebuglogger.h"
-#include "eteldrivernmspace.h"
-
-void CPdpFsm::ConstructL()
- {
- // Create EtelDriver for this ID - does nothing on ETel
- iEtelDriverInput->CreatePdpL(iPdpId);
-
- // we need a state
- iState = &iPdpFsmFactory->iStateInitialised;
- }
-
-CPdpFsm* CPdpFsm::NewL(TContextId aPdpId, CPdpFsmFactory * aPdpFsmFactory, REtelDriverInput * aEtelDriverInput)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::NewL()");
- CPdpFsm* self = new (ELeave)CPdpFsm(aPdpId, aPdpFsmFactory, aEtelDriverInput);
- CleanupStack::PushL(self);
- self->ConstructL();
- CleanupStack::Pop(self);
- return self;
- }
-
-CPdpFsm::CPdpFsm(TContextId aPdpId, CPdpFsmFactory * aPdpFsmFactory, REtelDriverInput * aEtelDriverInput) :
- iPdpFsmFactory(aPdpFsmFactory),
- iEtelDriverInput(aEtelDriverInput),
- iPdpId(aPdpId)
-// NOTE: Both pointers are valid when called - see CPdpFsmFactory and CPdpFsmInterface.
-// No other caller is expected.
- {
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
- }
-
-CPdpFsm::~CPdpFsm()
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::~CPdpFsm()");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
- }
-
-
-TInt CPdpFsm::Input (const TInt aOperation, const TInt aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::Input()");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
-
-#ifdef _DEBUG // NOT DEBUGRELEASE
- SPUDFSMVERBOSE_LOG1(_L("State : %S"), &iState->iName);
-#endif
-
- SPUDFSM_LOG3(_L("Pdp ID %d, State '%S', Operation '%S'"),iPdpId, &iState->iName, iState->LogOperation(*this, aOperation));
-
- return iState->Input (*this, aOperation, aParam);
- }
-
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
-void CPdpFsm::Get(RPacketQoS::TQoSR5Requested& aParam)
-{
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::Get(QoSR5Req)");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
-
- ASSERT(iQosRequested.ExtensionId() == TPacketDataConfigBase::KConfigRel5);
- aParam = iQosRequested.RequestedQoSR5();
-}
-
-void CPdpFsm::Get(RPacketQoS::TQoSR5Negotiated& aParam)
-{
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::Get(QoSR5Neg)");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
-
- ASSERT(iQosNegotiated.ExtensionId() == TPacketDataConfigBase::KConfigRel5);
- aParam = iQosNegotiated.NegotiatedQoSR5();
-}
-
-#else
-// !SYMBIAN_NETWORKING_UMTSR5
-
-void CPdpFsm::Get(RPacketQoS::TQoSR99_R4Requested& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::Get(QosReq)");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
-
- aParam = iQosRequested.RequestedQoSR99_R4();
- }
-
-void CPdpFsm::Get(RPacketQoS::TQoSR99_R4Negotiated& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::Get(QoSNeg)");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
-
- aParam = iQosNegotiated.NegotiatedQoSR99_R4();
- }
-
-#endif
-// SYMBIAN_NETWORKING_UMTSR5
-
-
-void CPdpFsm::Get(TTFTInfo& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::Get(TFTInfo)");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
-
- aParam = iTFT;
- }
-
-void CPdpFsm::Get(TTFTOperationCode& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::Get(TFTOperationCode)");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
-
- aParam = iTFTOperationCode;
- }
-
-void CPdpFsm::Get(RPacketContext::TDataChannelV2& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::Get(RPacketContext::TDataChannelV2)");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
-
- aParam = iDataChannelV2;
- }
-
-void CPdpFsm::Get(RPacketContext::TContextConfigGPRS& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::Get(RPacketContext::TContextConfigGPRS)");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
-
- aParam = iGPRS;
- }
-
-void CPdpFsm::Get(RPacketContext::TContextStatus& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::Get(RPacketContext::TContextStatus)");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
-
- aParam = iContextStatus;
- }
-
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
-void CPdpFsm::Set(const RPacketQoS::TQoSR5Requested& aParam)
-{
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::Set(QoSR5Req)");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
-
- iQosRequested = aParam;
-}
-
-void CPdpFsm::Set(const RPacketQoS::TQoSR5Negotiated& aParam)
-{
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::Set(QoSR5Neg)");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
-
- iQosNegotiated = aParam;
-}
-
-#else
-// !SYMBIAN_NETWORKING_UMTSR5
-
-
-void CPdpFsm::Set(const RPacketQoS::TQoSR99_R4Requested& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::Set(QoSReq)");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
-
- iQosRequested = aParam;
-
- }
-
-
-void CPdpFsm::Set(const RPacketQoS::TQoSR99_R4Negotiated& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::Set(QoSNeg)");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
-
- iQosNegotiated = aParam;
- }
-
-
-#endif
-// SYMBIAN_NETWORKING_UMTSR5
-
-
-void CPdpFsm::Set(const TTFTInfo& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::Set(TFT)");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
-
- iTFT = aParam;
- }
-
-void CPdpFsm::Set(const TTFTOperationCode& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::Set(TFTOperationCode)");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
-
- iTFTOperationCode = aParam;
- }
-
-void CPdpFsm::Set(const RPacketContext::TDataChannelV2& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::Set(RPacketContext::TDataChannelV2)");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
-
- iDataChannelV2 = aParam;
- }
-
-void CPdpFsm::Set(const RPacketContext::TContextStatus& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::Set(RPacketContext::TContextStatus)");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
-
- iContextStatus = aParam;
- }
-
-void CPdpFsm::Set(const RPacketContext::TContextConfigGPRS& aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::Set(RPacketContext::TContextConfigGPRS)");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
-
- iGPRS = aParam;
- }
-
-void CPdpFsm::EtelInput (EtelDriver::TEtelInput aOperation)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::EtelInput");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
-
- iEtelDriverInput->Input (iPdpId, aOperation);
- }
-
-void CPdpFsm::EtelCancel (void)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::EtelCancel");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
-
- iEtelDriverInput->CancelPdp (iPdpId);
- }
-
-void CPdpFsm::GetLastErrorCause (TInt& aLastErrorCause)
-{
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::GetLastErrorCause");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
-
- iEtelDriverInput->GetLastErrorCause (iPdpId, aLastErrorCause);
-}
-
-void CPdpFsm::SpudInput (TInt aNotification, TInt aParam)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::SpudInput");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
-
- iPdpFsmFactory->SpudInput (iPdpId, aNotification, aParam);
- }
-
-// state change members
-
-void CPdpFsm::ChangeStateToInitialised(void)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToInitialised");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
- SPUDFSM_LOG(_L("New State : Initialised"));
-
- iState = &iPdpFsmFactory->iStateInitialised;
- }
-
-void CPdpFsm::ChangeStateToOpeningPhone(void)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToOpeningPhone");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
- SPUDFSM_LOG(_L("New State : OpeningPhone"));
-
- iState = &iPdpFsmFactory->iStateOpeningPhone;
- }
-
-void CPdpFsm::ChangeStateToCreatingPrimary(void)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToCreatingPrimary");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
- SPUDFSM_LOG(_L("New State : CreatingPrimary"));
-
- iState = &iPdpFsmFactory->iStateCreatingPrimary;
- }
-
-void CPdpFsm::ChangeStateToActivatingPrimary(void)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToActivatingPrimary");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
- SPUDFSM_LOG(_L("New State : ActivatingPrimary"));
-
- iState = &iPdpFsmFactory->iStateActivatingPrimary;
- }
-
-void CPdpFsm::ChangeStateToCreatingSecondary(void)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToCreatingSecondary");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
- SPUDFSM_LOG(_L("New State : CreatingSecondary"));
-
- iState = &iPdpFsmFactory->iStateCreatingSecondary;
- }
-
-void CPdpFsm::ChangeStateToCreatedSecondary(void)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToCreatedSecondary");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
- SPUDFSM_LOG(_L("New State : CreatedSecondary"));
-
- iState = &iPdpFsmFactory->iStateCreatedSecondary;
- }
-
-void CPdpFsm::ChangeStateToSettingTFT(void)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToSettingTFT");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
- SPUDFSM_LOG(_L("New State : SettingTFT"));
-
- iState = &iPdpFsmFactory->iStateSettingTFT;
- }
-
-void CPdpFsm::ChangeStateToSettingQoS(void)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToSettingQoS");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
- SPUDFSM_LOG(_L("New State : SettingQoS"));
-
- iState = &iPdpFsmFactory->iStateSettingQoS;
- }
-
-void CPdpFsm::ChangeStateToActivatingSecondary(void)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToActivatingSecondary");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
- SPUDFSM_LOG(_L("New State : ActivatingSecondary"));
-
- iState = &iPdpFsmFactory->iStateActivatingSecondary;
- }
-
-void CPdpFsm::ChangeStateToOpen(void)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToOpen");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
- SPUDFSM_LOG(_L("New State : Open"));
-
- iState = &iPdpFsmFactory->iStateOpen;
- }
-
-void CPdpFsm::ChangeStateToChangingQoS(void)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToChangingQoS");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
- SPUDFSM_LOG(_L("New State : ChangingQoS"));
-
- iState = &iPdpFsmFactory->iStateChangingQoS;
- }
-
-void CPdpFsm::ChangeStateToChangingTFT(void)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToChangingTFT");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
- SPUDFSM_LOG(_L("New State : ChangingTFT"));
-
- iState = &iPdpFsmFactory->iStateChangingTFT;
- }
-
-void CPdpFsm::ChangeStateToGettingNegQoS(void)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToGettingNegQoS");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
- SPUDFSM_LOG(_L("New State : GettingNegQoS"));
-
- iState = &iPdpFsmFactory->iStateGettingNegQoS;
- }
-
-
-
-void CPdpFsm::ChangeStateToModifingActive(void)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToModifingActive");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
- SPUDFSM_LOG(_L("New State : ModifingActive"));
-
- iState = &iPdpFsmFactory->iStateModifyingActive;
- }
-
-void CPdpFsm::ChangeStateToSuspended(void)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToSuspended");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
- SPUDFSM_LOG(_L("New State : Suspended"));
-
- iState = &iPdpFsmFactory->iStateSuspended;
- }
-
-void CPdpFsm::ChangeStateToClosing(void)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToClosing");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
- SPUDFSM_LOG(_L("New State : Closing"));
-
- iState = &iPdpFsmFactory->iStateClosing;
- }
-
-void CPdpFsm::ChangeStateToStopping(void)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToStopping");
- SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId);
- SPUDFSM_LOG(_L("New State : Stopping"));
-
- iState = &iPdpFsmFactory->iStateStopping;
- }
--- a/telephonyprotocols/umtsgprsscpr/spudfsm/src/cpdpfsm.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,171 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// PDP FSM header
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#ifndef CPDPFSM_H
-#define CPDPFSM_H
-
-#include <e32base.h>
-#include <etelmm.h>
-#include <etelqos.h>
-#include <networking/umtsnifcontrolif.h>
-#include "reteldriverinput.h"
-#include "pdpfsmnmspace.h"
-
-#include "tpdpstates.h"
-
-class CPdpFsmFactory;
-class RPacketQoS;
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
-class TQoSR5Requested;
-class TQoSR5Negotiated;
-#else
-class TQoSR99_R4Requested;
-class TQoSR99_R4Negotiated;
-
-#endif
-// SYMBIAN_NETWORKING_UMTSR5
-class TFTInfo;
-class TFTOperationCode;
-
-class CPdpFsm : public CBase
-{
- friend class TPdpState;
- friend class TPdpStateInitialised;
- friend class TPdpStateOpeningPhone;
- friend class TPdpStateCreatingPrimary;
- friend class TPdpStateActivatingPrimary;
- friend class TPdpStateCreatingSecondary;
- friend class TPdpStateCreatedSecondary;
- friend class TPdpStateSettingQoS;
- friend class TPdpStateSettingTFT;
- friend class TPdpStateActivatingSecondary;
- friend class TPdpStateOpen;
- friend class TPdpStateChangingQoS;
- friend class TPdpStateChangingTFT;
- friend class TPdpStateGettingNegQoS;
- friend class TPdpStateModifyingActive;
- friend class TPdpStateSuspended;
- friend class TPdpStateClosing;
- friend class TPdpStateStopping;
-
-public:
- static CPdpFsm* NewL(TContextId aPdpId, CPdpFsmFactory * aPdpFsmFactory, REtelDriverInput * aEtelDriverInput);
- void ConstructL();
- ~CPdpFsm();
-
- TInt Input (const TInt aOperation, const TInt aParam);
-
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- void Get(RPacketQoS::TQoSR5Requested& aParam);
- void Get(RPacketQoS::TQoSR5Negotiated& aParam);
- void Set(const RPacketQoS::TQoSR5Requested& aParam);
- void Set(const RPacketQoS::TQoSR5Negotiated& aParam);
-
-#else
- void Get(RPacketQoS::TQoSR99_R4Requested& aParam);
- void Get(RPacketQoS::TQoSR99_R4Negotiated& aParam);
- void Set(const RPacketQoS::TQoSR99_R4Requested& aParam);
- void Set(const RPacketQoS::TQoSR99_R4Negotiated& aParam);
-#endif
-// SYMBIAN_NETWORKING_UMTSR5
-
- void Get(TTFTInfo& aParam);
- void Get(TTFTOperationCode& aParam);
- void Get(RPacketContext::TDataChannelV2& aParam);
- void Get(RPacketContext::TContextConfigGPRS& aParam);
- void Get(RPacketContext::TContextStatus& aParam);
-
- void GetLastErrorCause(TInt& aLastErrorCause);
-
- void Set(const TTFTInfo& aParam);
- void Set(const TTFTOperationCode& aParam);
- void Set(const RPacketContext::TDataChannelV2& aParam);
- void Set(const RPacketContext::TContextConfigGPRS& aParam);
-
- void Set(const RPacketContext::TContextStatus& aParam);
-
- void EtelInput (EtelDriver::TEtelInput aOperation);
- void EtelCancel (void);
- void SpudInput (TInt aNotification, TInt aParam);
-
-protected:
- CPdpFsm(TContextId aPdpId, CPdpFsmFactory * aPdpFsmFactory, REtelDriverInput * aEtelDriverInput);
-
-private:
- void ChangeStateToInitialised(void);
- void ChangeStateToOpeningPhone(void);
- void ChangeStateToCreatingPrimary(void);
- void ChangeStateToActivatingPrimary(void);
- void ChangeStateToCreatingSecondary(void);
- void ChangeStateToCreatedSecondary(void);
- void ChangeStateToSettingQoS(void);
- void ChangeStateToSettingTFT(void);
- void ChangeStateToActivatingSecondary(void);
- void ChangeStateToOpen(void);
- void ChangeStateToChangingQoS(void);
- void ChangeStateToChangingTFT(void);
- void ChangeStateToGettingNegQoS(void);
- void ChangeStateToModifingActive(void);
- void ChangeStateToSuspended(void);
- void ChangeStateToClosing(void);
- void ChangeStateToStopping(void);
-
-
-public:
-protected:
-private:
-
- // local data cache for this context
- TRequestedProfileBuffer iQosRequested;
- TNegotiatedProfileBuffer iQosNegotiated;
-
- RPacketContext::TDataChannelV2 iDataChannelV2;
- RPacketContext::TContextStatus iContextStatus;
- TTFTInfo iTFT;
- TTFTOperationCode iTFTOperationCode;
- RPacketContext::TContextConfigGPRS iGPRS;
-
- CPdpFsmFactory * iPdpFsmFactory; // need stuff from factory
- REtelDriverInput * iEtelDriverInput;
-
- TPdpState * iState; // current state
-
- TContextId iPdpId; // our instance PDP context id - fixed when allocateed
-
- enum TContextType
- {
- ENone,
- EPrimary,
- ESecondary
- } iContextType;
-
-
-};
-
-
-
-#endif // CPDPFSM_H
-
-
-
--- a/telephonyprotocols/umtsgprsscpr/spudfsm/src/cpdpfsmfactory.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,152 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// PDP FSM factory implementation
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include "cpdpfsmfactory.h"
-#include "spudfsmdebuglogger.h"
-
-// NewL
-CPdpFsmFactory* CPdpFsmFactory::NewL ()
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmFactory::NewL()");
-
- return new (ELeave) CPdpFsmFactory ();
- }
-
-#if defined(__VC32__)
-#if (_MSC_VER >= 1200)
-#pragma warning(disable:4355)
-#endif
-#endif
-//Cpdpfsmfactory.cpp(22...) : warning C4355: 'this' : used in base member initializer list
-// these warnings are benign unless the designed usage of SpudFsm changes such that SpudFsm is used
-// as a base class to something else, in which case this code will have to change IFF the this pointer
-// passed is used in the states c'tor. Currently, the pointer is just stored.
-// In V9, e32def.h turns this warning off.
-
-CPdpFsmFactory::CPdpFsmFactory()
-: iStateInitialised (this),
- iStateOpeningPhone (this),
- iStateCreatingPrimary (this),
- iStateActivatingPrimary (this),
- iStateCreatingSecondary (this),
- iStateCreatedSecondary (this),
- iStateSettingQoS (this),
- iStateSettingTFT (this),
- iStateActivatingSecondary (this),
- iStateOpen (this),
- iStateChangingQoS (this),
- iStateChangingTFT (this),
- iStateGettingNegQoS (this),
- iStateModifyingActive (this),
- iStateSuspended (this),
- iStateClosing (this),
- iStateStopping (this)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmFactory::CPdpFsmFactory()");
- }
-
-
-CPdpFsmFactory::~CPdpFsmFactory()
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmFactory::~CPdpFsmFactory()");
-
- delete iEtelDriverInput;
-
- iContexts.DeleteAll();
- iContexts.Reset();
- }
-
-
-void CPdpFsmFactory::InitL(TName& aTsyName, CPdpFsmInterface * aPdpFsmInterface)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmFactory::InitL()");
-
- iPdpFsmInterface = aPdpFsmInterface;
-
- iTsyName = aTsyName;
-
- // lets kick off the ETelDriver first then we only alloc FSMs if it works
- //
- iEtelDriverInput = new (ELeave) REtelDriverInput;
-
- iEtelDriverInput->OpenL (*iPdpFsmInterface);
-
- // Only create PDP contexts if specifically requested.
- }
-
-
-void CPdpFsmFactory::Close (void)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmFactory::Close()");
- iEtelDriverInput->Close();
- }
-
-
-/**
-@return may return NULL if there is no PDP context with that Id
-*/
-CPdpFsm* CPdpFsmFactory::GetFsmContext (TContextId aPdpId)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmFactory::GetContext()");
-
- return iContexts[aPdpId];
- }
-
-
-const TName& CPdpFsmFactory::TsyName(void)
- {
- return iTsyName;
- }
-
-
-TInt CPdpFsmFactory::NewFsmContext(TContextId aPdpId)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmFactory::NewFsmContext()");
- ASSERT(ContextIdIsValid(aPdpId));
-
- TInt ret = KErrNone;
-
- if (!HaveFsmContext(aPdpId))
- {
- // Only ever called by non-leaving functions. We're going to have to trap at some point in the calling hierarchy...
- //
- TRAP(ret,
- CPdpFsm* p = CPdpFsm::NewL(aPdpId, this, iEtelDriverInput);
- iContexts[aPdpId] = p;
- );
- }
-
- return ret;
- }
-
-
-TInt CPdpFsmFactory::DeleteFsmContext(TContextId aPdpId)
- {
- SPUDFSMVERBOSE_FNLOG("CPdpFsmFactory::DeleteFsmContext()");
- ASSERT(ContextIsValid(aPdpId));
-
- delete iContexts[aPdpId];
- iContexts[aPdpId] = NULL;
-
- return KErrNone;
- }
-
--- a/telephonyprotocols/umtsgprsscpr/spudfsm/src/cpdpfsmfactory.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,125 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// PDP FSM factory header
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#ifndef CPDPFSMFACTORY_H
-#define CPDPFSMFACTORY_H
-
-#include <networking/umtsnifcontrolif.h>
-
-#include "PDPFSM.h"
-#include "reteldriverinput.h"
-#include "cpdpfsm.h"
-#include "tpdpstates.h"
-
-/** factory (and owner) of FSM objects */
-class CPdpFsmFactory : public CBase
-{
- friend class CPdpFsm;
- friend class TPdpState;
- friend class TPdpStateInitialised; // Needs iEtelOpened
- friend class TPdpStateOpeningPhone; // Needs iEtelOpened
-public:
- static CPdpFsmFactory * NewL();
-
- virtual ~CPdpFsmFactory();
- void InitL(TName& aTsyName, CPdpFsmInterface * aPdpFsmInterface);
-
- TInt NewFsmContext(TContextId aPdpId);
- TInt DeleteFsmContext(TContextId aPdpId);
-
- CPdpFsm* GetFsmContext(TContextId aPdpId);
-
- inline TBool HaveFsmContext(TContextId aPdpId) const;
- inline TBool ContextIdIsValid(TContextId aPdpId) const;
- inline TBool ContextIsValid(TContextId aPdpId) const;
-
- void Close (void);
-
- void SpudInput (TContextId aPdpId, TInt aNotification, TInt aParam);
-
- void SetContextTerminationErrorAndStop(TContextId aPdpId, TInt aErrorCode);
-
- TInt GetLastErrorCause(TContextId aPdpId, TInt& aLastErrorCause);
-
- const TName& TsyName(void);
-
-protected:
-private:
- CPdpFsmFactory();
-
-public:
-protected:
-private:
- TFixedArray<CPdpFsm*, KMaxPdpContexts> iContexts;
-
- // the states
- TPdpStateInitialised iStateInitialised;
- TPdpStateOpeningPhone iStateOpeningPhone;
- TPdpStateCreatingPrimary iStateCreatingPrimary;
- TPdpStateActivatingPrimary iStateActivatingPrimary;
- TPdpStateCreatingSecondary iStateCreatingSecondary;
- TPdpStateCreatedSecondary iStateCreatedSecondary;
- TPdpStateSettingQoS iStateSettingQoS;
- TPdpStateSettingTFT iStateSettingTFT;
- TPdpStateActivatingSecondary iStateActivatingSecondary;
- TPdpStateOpen iStateOpen;
- TPdpStateChangingQoS iStateChangingQoS;
- TPdpStateChangingTFT iStateChangingTFT;
- TPdpStateGettingNegQoS iStateGettingNegQoS;
- TPdpStateModifyingActive iStateModifyingActive;
- TPdpStateSuspended iStateSuspended;
- TPdpStateClosing iStateClosing;
- TPdpStateStopping iStateStopping;
-
- CPdpFsmInterface * iPdpFsmInterface;
- REtelDriverInput * iEtelDriverInput;
-
- TBool iEtelOpened;
-
- TName iTsyName;
-};
-
-
-inline void CPdpFsmFactory::SpudInput (TContextId aPdpId, TInt aNotification, TInt aParam)
- {
- iPdpFsmInterface->SpudInput (aPdpId, aNotification, aParam);
- }
-
-
-inline TBool CPdpFsmFactory::HaveFsmContext(TContextId aPdpId) const
- {
- return (iContexts[aPdpId] != NULL);
- }
-
-
-inline TBool CPdpFsmFactory::ContextIdIsValid(TContextId aPdpId) const
- {
- return (aPdpId >= 0 && aPdpId < KMaxPdpContexts);
- }
-
-
-inline TBool CPdpFsmFactory::ContextIsValid(TContextId aPdpId) const
- {
- return (ContextIdIsValid(aPdpId) && HaveFsmContext(aPdpId));
- }
-
-#endif // CPDPFSMFACTORY_H
--- a/telephonyprotocols/umtsgprsscpr/spudfsm/src/spudfsmdebuglogger.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// SpudFsm Data and Event Logger header
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#ifndef SPUDFSMDEBUGLOGGER_H
-#define SPUDFSMDEBUGLOGGER_H
-
-#include "comms-infras/commsdebugutility.h"
-
-#ifdef __FLOG_ACTIVE
-
-#include <e32base.h>
-
-_LIT8(KSpudFsmLogFileVerbose,"SPUDFSMVERB.TXT");
-_LIT8(KSpudFsmLogFile,"SPUDFSM.TXT");
-_LIT8(KSpudFsmLogFolder,"SPUD");
-
-// Static Output Logging Macros
-#define SPUDFSMVERBOSE_LOG(text) __FLOG_STATIC0(KSpudFsmLogFolder,KSpudFsmLogFileVerbose,text)
-#define SPUDFSMVERBOSE_LOG1(text,a) __FLOG_STATIC1(KSpudFsmLogFolder,KSpudFsmLogFileVerbose,text, a)
-#define SPUDFSMVERBOSE_LOG2(text,a, b) __FLOG_STATIC2(KSpudFsmLogFolder,KSpudFsmLogFileVerbose,text,a,b)
-#define SPUDFSMVERBOSE_LOG3(text,a, b, c) __FLOG_STATIC3(KSpudFsmLogFolder,KSpudFsmLogFileVerbose,text,a,b,c)
-#define SPUDFSM_LOG(text) __FLOG_STATIC0(KSpudFsmLogFolder,KSpudFsmLogFile,text)
-#define SPUDFSM_LOG1(text,a) __FLOG_STATIC1(KSpudFsmLogFolder,KSpudFsmLogFile,text, a)
-#define SPUDFSM_LOG2(text,a, b) __FLOG_STATIC2(KSpudFsmLogFolder,KSpudFsmLogFile,text,a,b)
-#define SPUDFSM_LOG3(text,a, b, c) __FLOG_STATIC3(KSpudFsmLogFolder,KSpudFsmLogFile,text,a,b,c)
-
-
-_LIT(KSpudFsmMsgIn, ">>%S");
-_LIT(KSpudFsmMsgOut,"<<%S");
-
-class TSpudFsmLogVerboseFn
-{
- protected:
- TBuf<100> iName;
-
- public:
- TSpudFsmLogVerboseFn(const TDesC& aName) { iName = aName; SPUDFSMVERBOSE_LOG1(KSpudFsmMsgIn, &iName);};
- ~TSpudFsmLogVerboseFn() { SPUDFSMVERBOSE_LOG1(KSpudFsmMsgOut, &iName);};
-};
-
-#define SPUDFSMVERBOSE_FNLOG(name) TSpudFsmLogVerboseFn spudFsmVerboseFnLog(_L(name))
-
-// error logging
-#if defined(_ERROR_LOG)
-#define SPUDFSM_ERROR_LOG(errtext, err) { __FLOG_STATIC0(KSpudFsmLogFolder,KSpudFsmLogFile, _L("ERROR: ")); \
- __FLOG_STATIC1(KSpudFsmLogFolder,KSpudFsmLogFile, errtext, err); }
-#else // defined(_ERROR_LOG)
-#define SPUDFSM_ERROR_LOG(errtext, err)
-#endif // defined(_ERROR_LOG)
-
-#else // __FLOG_ACTIVE
-
-#define SPUDFSM_LOG(t)
-#define SPUDFSM_LOG1(t,a)
-#define SPUDFSM_LOG2(t,a,b)
-#define SPUDFSM_LOG3(t,a,b,c)
-#define SPUDFSMVERBOSE_LOG(t)
-#define SPUDFSMVERBOSE_LOG1(t,a)
-#define SPUDFSMVERBOSE_LOG2(t,a,b)
-#define SPUDFSMVERBOSE_LOG3(t,a,b,c)
-#define SPUDFSMVERBOSE_FNLOG(name)
-#define SPUDFSM_ERROR_LOG(errtext, err)
-
-#endif // __FLOG_ACTIVE
-
-
-#endif
-// SPUDFSMDEBUGLOGGER_H
--- a/telephonyprotocols/umtsgprsscpr/spudfsm/src/tpdpstate.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,269 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Base class to the various states required in Spud FSM. Each real state is derived from
-// this base class. The bass class is never instanciated but it's base functionality is
-// used for default handling in the most part.
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include <networking/umtsnifcontrolif.h>
-#include "cpdpfsmfactory.h"
-#include "tpdpstate.h"
-#include "spudfsmdebuglogger.h"
-#include "pdpfsmnmspace.h"
-#include "reteldriverinput.h"
-#include "PDPFSM.h"
-
-// Literals for TPdpState::LogOperation
-
-_LIT(KPdpFsm_EPhoneOpened, "PdpFsm::EPhoneOpened");
-_LIT(KPdpFsm_EPhoneOpenedFailed, "PdpFsm::EPhoneOpenedFailed");
-_LIT(KPdpFsm_EQoSSet, "PdpFsm::EQoSSet");
-_LIT(KPdpFsm_EQoSSetFailed, "PdpFsm::EQoSSetFailed");
-_LIT(KPdpFsm_ETftSet, "PdpFsm::ETftSet");
-_LIT(KPdpFsm_ETftSetFailed, "PdpFsm::ETftSetFailed");
-_LIT(KPdpFsm_ETftChanged, "PdpFsm::ETftChanged");
-_LIT(KPdpFsm_ETftChangedFailed, "PdpFsm::ETftChangedFailed");
-_LIT(KPdpFsm_E1ryPdpContextCreated, "PdpFsm::E1ryPdpContextCreated");
-_LIT(KPdpFsm_E1ryPdpContextCreatedFailed, "PdpFsm::E1ryPdpContextCreatedFailed");
-_LIT(KPdpFsm_E2ryPdpContextCreated, "PdpFsm::E2ryPdpContextCreated");
-_LIT(KPdpFsm_E2ryPdpContextCreatedFailed, "PdpFsm::E2ryPdpContextCreatedFailed");
-_LIT(KPdpFsm_EPdpActivated, "PdpFsm::EPdpActivated");
-_LIT(KPdpFsm_EPdpActivatedFailed, "PdpFsm::EPdpActivatedFailed");
-_LIT(KPdpFsm_EContextDeleted, "PdpFsm::EContextDeleted");
-_LIT(KPdpFsm_EContextDeletedFailed, "PdpFsm::EContextDeletedFailed");
-_LIT(KPdpFsm_EQoSProfileChangeNetwork, "PdpFsm::EQoSProfileChangeNetwork");
-_LIT(KPdpFsm_EConfigGPRSChangeNetwork, "PdpFsm::EConfigGPRSChangeNetwork");
-_LIT(KPdpFsm_EPacketStatusChangeNetwork, "PdpFsm::EPacketStatusChangeNetwork");
-_LIT(KPdpFsm_EPdpContextModified, "PdpFsm::EPdpContextModified");
-_LIT(KPdpFsm_EPdpContextModifiedFailed, "PdpFsm::EPdpContextModifiedFailed");
-_LIT(KRPacketContext_EStatusUnknown, "RPacketContext::EStatusUnknown");
-_LIT(KRPacketContext_EStatusInactive, "RPacketContext::EStatusInactive");
-_LIT(KRPacketContext_EStatusActivating, "RPacketContext::EStatusActivating");
-_LIT(KRPacketContext_EStatusActive, "RPacketContext::EStatusActive");
-_LIT(KRPacketContext_EStatusDeactivating, "RPacketContext::EStatusDeactivating");
-_LIT(KRPacketContext_EStatusSuspended, "RPacketContext::EStatusSuspended");
-_LIT(KRPacketContext_EStatusDeleted, "RPacketContext::EStatusDeleted");
-_LIT(KEContextStatusChangeNetwork_Unknown, "EContextStatusChangeNetwork_Unknown");
-_LIT(KRPacketService_EStatusUnattached, "RPacketService::EStatusUnattached");
-_LIT(KRPacketService_EStatusAttached, "RPacketService::EStatusAttached");
-_LIT(KRPacketService_EStatusActive, "RPacketService::EStatusActive");
-_LIT(KRPacketService_EStatusSuspended, "RPacketService::EStatusSuspended");
-_LIT(KEServiceStatusChangeNetwork_Unknown, "EServiceStatusChangeNetwork_Unknown");
-_LIT(KSpudMan_EContextCreate, "SpudMan::EContextCreate");
-_LIT(KSpudMan_EContextDelete, "SpudMan::EContextDelete");
-_LIT(KSpudMan_EContextActivate, "SpudMan::EContextActivate");
-_LIT(KSpudMan_ERegisterEventHandler, "SpudMan::ERegisterEventHandler");
-_LIT(KSpudMan_EContextSetEvents, "SpudMan::EContextSetEvents");
-_LIT(KSpudMan_EContextQoSSet, "SpudMan::EContextQoSSet");
-_LIT(KSpudMan_EContextModifyActive, "SpudMan::EContextModifyActive");
-_LIT(KSpudMan_EContextTFTModify, "SpudMan::EContextTFTModify");
-_LIT(KSpudMan_ENifSetDefaultQoS, "SpudMan::ENifSetDefaultQoS");
-_LIT(KSpudMan_EStartupPrimaryContextCreation, "SpudMan::EStartupPrimaryContextCreation");
-_LIT(KSpudMan_ESetDefaultQoS, "SpudMan::ESetDefaultQoS");
-_LIT(KSpudMan_ECreatePrimaryPDPContext, "SpudMan::ECreatePrimaryPDPContext");
-_LIT(KSpudMan_ECreateSecondaryPDPContext, "SpudMan::ECreateSecondaryPDPContext");
-_LIT(KSpudMan_ESuspend, "SpudMan::ESuspend");
-_LIT(KSpudMan_EResume, "SpudMan::EResume");
-_LIT(KSpudMan_E1ryPdpActivate, "SpudMan::E1ryPdpActivate");
-_LIT(KSpudMan_ECancelContextCreate, "SpudMan::ECancelContextCreate");
-_LIT(KSpudMan_EGetNegQoS, "SpudMan::EGetNegQoS");
-_LIT(KUnknown, "Unknown");
-
-
-TPdpState::TPdpState()
-#ifdef _DEBUG
- : iName()
-#endif
-{
- SPUDFSMVERBOSE_FNLOG("TPdpState::TPdpState()");
-}
-
-TInt TPdpState::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt /*aErrorCode*/)
-{
- SPUDFSMVERBOSE_FNLOG("TPdpState::Input()");
- SPUDFSMVERBOSE_LOG1(_L("aOperation : %d"), aOperation);
-
- if (aOperation == PdpFsm::EContextDeleted || aOperation == SpudMan::EContextDelete ||
- (aOperation == PdpFsm::EContextStatusChangeNetwork && aFsm.iContextStatus == RPacketContext::EStatusDeleted))
- {
- aFsm.ChangeStateToClosing();
- EtelDriverCancel (aFsm);
- EtelDriverInput(aFsm, EtelDriver::EContextDelete);
- return KErrNone;
- }
-
- SPUDFSMVERBOSE_LOG1(_L("!!! Unhandled Operation (%S)!!!"), LogOperation (aFsm, aOperation));
- return KErrGeneral;
-}
-
-void TPdpState::EtelDriverInput (CPdpFsm& aFsm, EtelDriver::TEtelInput aOperation)
-{
- SPUDFSMVERBOSE_LOG1(_L("EtelDriverInput : %d"), aOperation);
- aFsm.EtelInput (aOperation);
-}
-
-void TPdpState::EtelDriverCancel (CPdpFsm& aFsm)
-{
- SPUDFSMVERBOSE_LOG(_L("EtelDriverCancel"));
- aFsm.EtelCancel();
-}
-
-void TPdpState::SpudManNotify (CPdpFsm& aFsm, TInt aNotification, TInt aParam)
-{
- SPUDFSMVERBOSE_LOG1(_L("SpudManNotify : %d"), aNotification);
- aFsm.SpudInput (aNotification, aParam);
-}
-
-const TDesC * TPdpState::LogOperation (CPdpFsm& aFsm, TInt aOperation)
-{
- switch (aOperation)
- {
- // ETel notifications
- case PdpFsm::EPhoneOpened:
- return &KPdpFsm_EPhoneOpened;
- case PdpFsm::EPhoneOpenedFailed:
- return &KPdpFsm_EPhoneOpenedFailed;
- case PdpFsm::EQoSSet:
- return &KPdpFsm_EQoSSet;
- case SpudMan::EGetNegQoS:
- return &KSpudMan_EGetNegQoS;
- case PdpFsm::EQoSSetFailed:
- return &KPdpFsm_EQoSSetFailed;
- case PdpFsm::ETftSet:
- return &KPdpFsm_ETftSet;
- case PdpFsm::ETftSetFailed:
- return &KPdpFsm_ETftSetFailed;
- case PdpFsm::ETftChanged:
- return &KPdpFsm_ETftChanged;
- case PdpFsm::ETftChangedFailed:
- return &KPdpFsm_ETftChangedFailed;
- case PdpFsm::E1ryPdpContextCreated:
- return &KPdpFsm_E1ryPdpContextCreated;
- case PdpFsm::E1ryPdpContextCreatedFailed:
- return &KPdpFsm_E1ryPdpContextCreatedFailed;
- case PdpFsm::E2ryPdpContextCreated:
- return &KPdpFsm_E2ryPdpContextCreated;
- case PdpFsm::E2ryPdpContextCreatedFailed:
- return &KPdpFsm_E2ryPdpContextCreatedFailed;
- case PdpFsm::EPdpActivated:
- return &KPdpFsm_EPdpActivated;
- case PdpFsm::EPdpActivatedFailed:
- return &KPdpFsm_EPdpActivatedFailed;
- case PdpFsm::EContextDeleted:
- return &KPdpFsm_EContextDeleted;
- case PdpFsm::EContextDeletedFailed:
- return &KPdpFsm_EContextDeletedFailed;
- case PdpFsm::EPdpContextModified:
- return &KPdpFsm_EPdpContextModified;
- case PdpFsm::EPdpContextModifiedFailed:
- return &KPdpFsm_EPdpContextModifiedFailed;
-
-//
-// // network signals
- case PdpFsm::EQoSProfileChangeNetwork:
- //RPacketQoS::TQoSR99_R4Negotiated
- return &KPdpFsm_EQoSProfileChangeNetwork;
- case PdpFsm::EConfigGPRSChangeNetwork:
- //RPacketContext::TContextConfigGPRS
- return &KPdpFsm_EConfigGPRSChangeNetwork;
- case PdpFsm::EContextStatusChangeNetwork:
- switch (aFsm.iContextStatus)
- {
- case RPacketContext::EStatusUnknown:
- return &KRPacketContext_EStatusUnknown;
- case RPacketContext::EStatusInactive:
- return &KRPacketContext_EStatusInactive;
- case RPacketContext::EStatusActivating:
- return &KRPacketContext_EStatusActivating;
- case RPacketContext::EStatusActive:
- return &KRPacketContext_EStatusActive;
- case RPacketContext::EStatusDeactivating:
- return &KRPacketContext_EStatusDeactivating;
- case RPacketContext::EStatusSuspended:
- return &KRPacketContext_EStatusSuspended;
- case RPacketContext::EStatusDeleted:
- return &KRPacketContext_EStatusDeleted;
- }
- return &KEContextStatusChangeNetwork_Unknown;
- case PdpFsm::EServiceStatusChangeNetwork:
- {
- RPacketService::TStatus ns;
-
- aFsm.iPdpFsmFactory->iPdpFsmInterface->Get(ns);
-
- switch (ns)
- {
- case RPacketService::EStatusUnattached:
- return &KRPacketService_EStatusUnattached;
- case RPacketService::EStatusAttached:
- return &KRPacketService_EStatusAttached;
- case RPacketService::EStatusActive:
- return &KRPacketService_EStatusActive;
- case RPacketService::EStatusSuspended:
- return &KRPacketService_EStatusSuspended;
- }
- }
- return &KEServiceStatusChangeNetwork_Unknown;
- case PdpFsm::EPacketStatusChangeNetwork: // not used in eteldriver
- return &KPdpFsm_EPacketStatusChangeNetwork;
-
- // spudman signals
- case SpudMan::EContextCreate:
- return &KSpudMan_EContextCreate;
- case SpudMan::EContextDelete:
- return &KSpudMan_EContextDelete;
- case SpudMan::EContextActivate:
- return &KSpudMan_EContextActivate;
- case SpudMan::ERegisterEventHandler:
- return &KSpudMan_ERegisterEventHandler;
- case SpudMan::EContextSetEvents:
- return &KSpudMan_EContextSetEvents;
- case SpudMan::EContextQoSSet:
- return &KSpudMan_EContextQoSSet;
- case SpudMan::EContextModifyActive:
- return &KSpudMan_EContextModifyActive;
- case SpudMan::EContextTFTModify:
- return &KSpudMan_EContextTFTModify;
- case SpudMan::ENifSetDefaultQoS:
- return &KSpudMan_ENifSetDefaultQoS;
- case SpudMan::EStartupPrimaryContextCreation:
- return &KSpudMan_EStartupPrimaryContextCreation;
-
- case SpudMan::ESetDefaultQoS:
- return &KSpudMan_ESetDefaultQoS;
- case SpudMan::ECreatePrimaryPDPContext:
- return &KSpudMan_ECreatePrimaryPDPContext;
- case SpudMan::ECreateSecondaryPDPContext:
- return &KSpudMan_ECreateSecondaryPDPContext;
- case SpudMan::ESuspend:
- return &KSpudMan_ESuspend;
- case SpudMan::EResume:
- return &KSpudMan_EResume;
- case SpudMan::E1ryPdpActivate:
- return &KSpudMan_E1ryPdpActivate;
- case SpudMan::ECancelContextCreate:
- return &KSpudMan_ECancelContextCreate;
-
- default:
- return &KUnknown;
- }
-
-
-}
--- a/telephonyprotocols/umtsgprsscpr/spudfsm/src/tpdpstate.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Base class to the various states required in Spud FSM. Each real state is derived from
-// this base class. The bass class is never instanciated but it's base functionality is
-// used for default handling in the most part.
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#ifndef TPDPSTATE_H
-#define TPDPSTATE_H
-
-#include <networking/umtsnifcontrolif.h>
-#include "eteldrivernmspace.h"
-#include "reteldriverinput.h"
-#include "pdpfsmnmspace.h"
-
-
-class CPdpFsm;
-//class REtelDriverInput;
-class CPdpFsmFactory;
-
-// parent class
-class TPdpState
-{
-public:
- TPdpState();
-
- // used as a default error handler
- virtual TInt Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aParam);
-
- const TDesC * LogOperation (CPdpFsm& aFsm, TInt aOperation);
-
-protected:
- // access helpers for use in the derived class
- void EtelDriverInput (CPdpFsm& aFsm, EtelDriver::TEtelInput aOperation);
- void EtelDriverCancel (CPdpFsm& aFsm);
- void SpudManNotify (CPdpFsm& aFsm, TInt aNotification, TInt aParam);
-
-public:
-#ifdef _DEBUG
- TBuf<100> iName;
-#endif
-
-protected:
- CPdpFsmFactory * iPdpFsmFactory;
-
-private:
-
-};
-
-
-#endif // TPDPSTATE_H
--- a/telephonyprotocols/umtsgprsscpr/spudfsm/src/tpdpstateactivatingprimary.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Activating primary state
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include <networking/umtsnifcontrolif.h>
-#include "tpdpstates.h"
-#include "spudfsmdebuglogger.h"
-#include "pdpfsmnmspace.h"
-#include "cpdpfsm.h"
-#include "PDPFSM.h"
-
-TInt TPdpStateActivatingPrimary::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
-{
- SPUDFSMVERBOSE_FNLOG("TPdpStateActivatingPrimary::Input()");
- SPUDFSMVERBOSE_LOG2(_L("aOperation : %S(%d)"), LogOperation(aFsm, aOperation), aOperation);
-
- switch (aOperation)
- {
- case PdpFsm::EPdpActivated:
- // GuQoS assumes the primary context becomes active when created, so the context status
- // must be updated before sending the event
- aFsm.Set(RPacketContext::EStatusActive);
- aFsm.ChangeStateToOpen();
- SpudManNotify (aFsm, KPrimaryContextCreated, KErrNone);
- return KErrNone;
- case PdpFsm::EPdpActivatedFailed:
- SPUDFSMVERBOSE_LOG(_L("*** FAILURE ***"));
- aFsm.ChangeStateToClosing();
-
- SpudManNotify (aFsm, KPrimaryContextCreated, aErrorCode);
- EtelDriverInput(aFsm, EtelDriver::EContextDelete);
- return KErrNone;
- case SpudMan::ECancelContextCreate:
- aFsm.ChangeStateToStopping();
- EtelDriverCancel(aFsm);
- EtelDriverInput(aFsm, EtelDriver::EContextDelete);
- return KErrNone;
- // no default
- }
-
- // default error handling
- return TPdpState::Input(aFsm, aOperation, aErrorCode);
-}
-
-
--- a/telephonyprotocols/umtsgprsscpr/spudfsm/src/tpdpstateactivatingsecondary.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Activating secondary context state
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include <networking/umtsnifcontrolif.h>
-#include "tpdpstates.h"
-#include "spudfsmdebuglogger.h"
-#include "pdpfsmnmspace.h"
-#include "cpdpfsm.h"
-
-TInt TPdpStateActivatingSecondary::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
-{
- SPUDFSMVERBOSE_FNLOG("TPdpStateActivatingSecondary::Input()");
- SPUDFSMVERBOSE_LOG2(_L("aOperation : %S(%d)"), LogOperation(aFsm, aOperation), aOperation);
-
- switch (aOperation)
- {
- case PdpFsm::EPdpActivated:
- // When a secondary context is activated, the context status must be updated before sending the activated event
- // Normally this change in status is updated by a notify context status change event
- aFsm.Set(RPacketContext::EStatusActive);
- aFsm.ChangeStateToGettingNegQoS(); // Context was activated, but we don't necessarily have negotiated QoS yet;
- // a TSY might wait for a successfull activation to report it to Etel.
- SpudManNotify (aFsm, KContextActivateEvent, KErrNone);
- return KErrNone;
- case PdpFsm::EPdpActivatedFailed:
- SPUDFSMVERBOSE_LOG(_L("*** FAILURE ***"));
- aFsm.ChangeStateToCreatedSecondary();
- SpudManNotify (aFsm, KContextActivateEvent, aErrorCode);
- return KErrNone;
- // no default
- }
-
- // default error handling
- return TPdpState::Input(aFsm, aOperation, aErrorCode);
-}
-
-
--- a/telephonyprotocols/umtsgprsscpr/spudfsm/src/tpdpstatechangingqos.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// ChangingQoS state
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include <networking/umtsnifcontrolif.h>
-#include "tpdpstates.h"
-#include "spudfsmdebuglogger.h"
-#include "pdpfsmnmspace.h"
-#include "cpdpfsm.h"
-
-TInt TPdpStateChangingQoS::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
-{
- SPUDFSMVERBOSE_FNLOG("TPdpStateChangingQoS::Input()");
- SPUDFSMVERBOSE_LOG2(_L("aOperation : %S(%d)"), LogOperation(aFsm, aOperation), aOperation);
-
- switch (aOperation)
- {
- case PdpFsm::EQoSSet:
- aFsm.ChangeStateToOpen();
- SpudManNotify (aFsm, KContextQoSSetEvent, KErrNone);
- return KErrNone;
- case PdpFsm::EQoSSetFailed:
- aFsm.ChangeStateToOpen();
- SpudManNotify (aFsm, KContextQoSSetEvent, aErrorCode);
- return KErrNone;
-
- // no default
- }
-
- // default error handling
- return TPdpState::Input(aFsm, aOperation, aErrorCode);
-}
-
-
--- a/telephonyprotocols/umtsgprsscpr/spudfsm/src/tpdpstatechangingtft.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Changing TFT state
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include <networking/umtsnifcontrolif.h>
-#include "tpdpstates.h"
-#include "spudfsmdebuglogger.h"
-#include "pdpfsmnmspace.h"
-#include "cpdpfsm.h"
-
-TInt TPdpStateChangingTFT::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
-{
- SPUDFSMVERBOSE_FNLOG("TPdpStateChangingTFT::Input()");
- SPUDFSMVERBOSE_LOG2(_L("aOperation : %S(%d)"), LogOperation(aFsm, aOperation), aOperation);
-
- switch (aOperation)
- {
- case PdpFsm::ETftChanged:
- aFsm.ChangeStateToOpen();
- SpudManNotify (aFsm, KContextTFTModifiedEvent, KErrNone);
- return KErrNone;
- case PdpFsm::ETftChangedFailed:
- aFsm.ChangeStateToOpen();
- SpudManNotify (aFsm, KContextTFTModifiedEvent, aErrorCode);
- return KErrNone;
-
- // no default
- }
-
- // default error handling
- return TPdpState::Input(aFsm, aOperation, aErrorCode);
-}
-
--- a/telephonyprotocols/umtsgprsscpr/spudfsm/src/tpdpstateclosing.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Closing state
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include <networking/umtsnifcontrolif.h>
-#include "tpdpstates.h"
-#include "spudfsmdebuglogger.h"
-#include "pdpfsmnmspace.h"
-#include "PDPFSM.h"
-#include "cpdpfsm.h"
-
-TInt TPdpStateClosing::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
-{
- SPUDFSMVERBOSE_FNLOG("TPdpStateClosing::Input()");
- SPUDFSMVERBOSE_LOG2(_L("aOperation : %S(%d)"), LogOperation(aFsm, aOperation), aOperation);
-
- switch (aOperation)
- {
- case PdpFsm::EContextDeleted:
- aFsm.ChangeStateToInitialised();
- SpudManNotify (aFsm, KContextDeleteEvent, KErrNone);
- return KErrNone;
- case PdpFsm::EContextDeletedFailed:
- // There isn't any corrective action that can be taken here.
- // It is assumed when this context is used again, there will be a failure
- // or a failure elsewhere down the line that will correct the situation, ultimately
- // involving the user. FSM and ETelDriver are not in a position to take any corrective action.
- SPUDFSMVERBOSE_LOG(_L("**** DELETE FAILURE ****"));
- aFsm.ChangeStateToInitialised();
- SpudManNotify (aFsm, KContextDeleteEvent, aErrorCode);
- return KErrNone;
- case SpudMan::EContextDelete:
- // already doing this and don't want default action
- return KErrInUse;
- }
-
- // default error handling
- return TPdpState::Input(aFsm, aOperation, aErrorCode);
-}
-
-
--- a/telephonyprotocols/umtsgprsscpr/spudfsm/src/tpdpstatecreatedSecondary.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// State after secondary has been created, but not activated
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include <networking/umtsnifcontrolif.h>
-#include "tpdpstates.h"
-#include "spudfsmdebuglogger.h"
-#include "pdpfsmnmspace.h"
-#include "pdpfsmnmspace.h"
-#include "PDPFSM.h"
-#include "cpdpfsm.h"
-
-TInt TPdpStateCreatedSecondary::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
-{
- SPUDFSMVERBOSE_FNLOG("TPdpStateCreatedSecondary::Input()");
- SPUDFSMVERBOSE_LOG2(_L("aOperation : %S(%d)"), LogOperation(aFsm, aOperation), aOperation);
-
- switch (aOperation)
- {
- case SpudMan::EContextActivate:
- aFsm.ChangeStateToActivatingSecondary();
- EtelDriverInput(aFsm, EtelDriver::EActivatePdp);
- return KErrNone;
- case SpudMan::EContextQoSSet:
- aFsm.ChangeStateToSettingQoS();
- EtelDriverInput(aFsm, EtelDriver::ESetQoS);
- return KErrNone;
- case SpudMan::EContextTFTModify:
- aFsm.ChangeStateToSettingTFT();
- EtelDriverInput(aFsm, EtelDriver::ESetTft);
- return KErrNone;
- }
-
- // default error handling
- return TPdpState::Input(aFsm, aOperation, aErrorCode);
-}
-
-
--- a/telephonyprotocols/umtsgprsscpr/spudfsm/src/tpdpstatecreatingSecondary.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Creating secondary context state
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include <networking/umtsnifcontrolif.h>
-#include "tpdpstates.h"
-#include "spudfsmdebuglogger.h"
-#include "pdpfsmnmspace.h"
-#include "PDPFSM.h"
-#include "cpdpfsm.h"
-
-TInt TPdpStateCreatingSecondary::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
-{
- SPUDFSMVERBOSE_FNLOG("TPdpStateCreatingSecondary::Input()");
- SPUDFSMVERBOSE_LOG2(_L("aOperation : %S(%d)"), LogOperation(aFsm, aOperation), aOperation);
-
- switch (aOperation)
- {
- case PdpFsm::E2ryPdpContextCreated:
- aFsm.ChangeStateToCreatedSecondary();
- SpudManNotify(aFsm, KSecondaryContextCreated, KErrNone);
- return KErrNone;
- case PdpFsm::E2ryPdpContextCreatedFailed:
- iErrorCode = aErrorCode;
- EtelDriverInput(aFsm, EtelDriver::EContextDelete);
- return KErrNone;
-
- case PdpFsm::EContextDeletedFailed:
- SPUDFSMVERBOSE_LOG(_L("**** DELETE FAILURE ****"));
- // fall through
- case PdpFsm::EContextDeleted:
- aFsm.ChangeStateToInitialised();
- SpudManNotify(aFsm, KSecondaryContextCreated, iErrorCode);
- iErrorCode = KErrNone;
- return KErrNone;
- }
-
- // default error handling
- return TPdpState::Input(aFsm, aOperation, aErrorCode);
-}
-
--- a/telephonyprotocols/umtsgprsscpr/spudfsm/src/tpdpstatecreatingprimary.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Creating primary context state
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include <networking/umtsnifcontrolif.h>
-#include "tpdpstates.h"
-#include "spudfsmdebuglogger.h"
-#include "pdpfsmnmspace.h"
-#include "cpdpfsm.h"
-#include "PDPFSM.h"
-
-TInt TPdpStateCreatingPrimary::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
-{
- SPUDFSMVERBOSE_FNLOG("TPdpStateCreatingPrimary::Input()");
- SPUDFSMVERBOSE_LOG2(_L("aOperation : %S(%d)"), LogOperation(aFsm, aOperation), aOperation);
-
- switch (aOperation)
- {
- case PdpFsm::E1ryPdpContextCreated:
- aFsm.ChangeStateToActivatingPrimary();
- EtelDriverInput(aFsm, EtelDriver::EActivatePdp);
- return KErrNone;
- case PdpFsm::E1ryPdpContextCreatedFailed:
- aFsm.ChangeStateToInitialised();
- SpudManNotify (aFsm, KPrimaryContextCreated, aErrorCode); // or is it KContextActivateEvent?
- EtelDriverInput(aFsm, EtelDriver::EContextDelete);
- return KErrNone;
- case SpudMan::ECancelContextCreate:
- aFsm.ChangeStateToStopping();
- EtelDriverCancel(aFsm);
- EtelDriverInput(aFsm, EtelDriver::EContextDelete);
- return KErrNone;
- }
-
- // default error handling
- return TPdpState::Input(aFsm, aOperation, aErrorCode);
-}
-
-
--- a/telephonyprotocols/umtsgprsscpr/spudfsm/src/tpdpstategettingnegqos.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Retrieving Negotiated QoS state
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include <networking/umtsnifcontrolif.h>
-#include "tpdpstates.h"
-#include "spudfsmdebuglogger.h"
-#include "pdpfsmnmspace.h"
-#include "MPdpFsmInterface.h"
-#include "cpdpfsm.h"
-
-TInt TPdpStateGettingNegQoS::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
- {
- SPUDFSMVERBOSE_FNLOG("TPdpStateGettingNegQoS::Input()");
- SPUDFSMVERBOSE_LOG2(_L("aOperation : %S(%d)"), LogOperation(aFsm, aOperation), aOperation);
-
- switch (aOperation)
- {
- case SpudMan::EGetNegQoS:
- EtelDriverInput(aFsm, EtelDriver::ENegQoSGet);
- return KErrNone;
-
- case PdpFsm::EPdpNegQoSRetrieved:
- SPUDFSMVERBOSE_LOG(_L("*** SUCCESS ***"));
- aFsm.ChangeStateToOpen();
- SpudManNotify(aFsm, KGetNegQoSEvent, KErrNone);
- return KErrNone;
-
- case PdpFsm::EPdpNegQoSRetrievedFailed:
- SPUDFSMVERBOSE_LOG(_L("*** FAILURE ***"));
- // As far as everybody is concerned, the context was activated:
- // This makes it eligible for certain events.
- // We have to move to Open state, so that that we can handle any operations
- // on the activated PDP context correctly.
- aFsm.ChangeStateToOpen();
- SpudManNotify(aFsm, KGetNegQoSEvent, aErrorCode);
- return KErrNone;
- }
-
- // default error handling
- return TPdpState::Input(aFsm, aOperation, aErrorCode);
- }
-
-
-
--- a/telephonyprotocols/umtsgprsscpr/spudfsm/src/tpdpstateinitialised.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Initialised state
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include <networking/umtsnifcontrolif.h>
-#include "tpdpstates.h"
-#include "spudfsmdebuglogger.h"
-#include "pdpfsmnmspace.h"
-#include "cpdpfsm.h"
-#include "cpdpfsmfactory.h"
-#include "eteldrivernmspace.h"
-
-TInt TPdpStateInitialised::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
-{
- SPUDFSMVERBOSE_FNLOG("TPdpStateInitialised::Input()");
- SPUDFSMVERBOSE_LOG2(_L("aOperation : %S(%d)"), LogOperation(aFsm, aOperation), aOperation);
-
- switch (aOperation)
- {
- case SpudMan::ECreatePrimaryPDPContext:
- aFsm.iContextType = CPdpFsm::EPrimary;
-
- // have to ensure EOpenPhone is called the first time a primary context is created
- if (iPdpFsmFactory->iEtelOpened == EFalse)
- {
- aFsm.ChangeStateToOpeningPhone();
- EtelDriverInput(aFsm, EtelDriver::EOpenPhone);
- }
- else // just create the primary
- {
- aFsm.ChangeStateToCreatingPrimary();
- EtelDriverInput (aFsm, EtelDriver::ECreate1ryPdpContext);
- }
-
- return KErrNone;
- case SpudMan::ECreateSecondaryPDPContext:
- aFsm.ChangeStateToCreatingSecondary();
-
- aFsm.iContextType = CPdpFsm::ESecondary;
-
- EtelDriverInput (aFsm, EtelDriver::ECreate2ryPdpContext);
-
- return KErrNone;
-
- // these stop the default actions which aren't of value in the Initialised state, although we
- // do not expect to see these here.
- case PdpFsm::EContextDeleted:
- return KErrNone;
- case PdpFsm::EContextStatusChangeNetwork:
- if (aFsm.iContextStatus == RPacketContext::EStatusDeleted)
- {
- return KErrNone;
- }
- break;
- }
-
- // default error handling
- return TPdpState::Input(aFsm, aOperation, aErrorCode);
-
-}
-
-
--- a/telephonyprotocols/umtsgprsscpr/spudfsm/src/tpdpstatemodifingactive.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// tpdpstatemodifyingactive.cpp
-// Modifying active context state
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include <networking/umtsnifcontrolif.h>
-#include "tpdpstates.h"
-#include "spudfsmdebuglogger.h"
-#include "pdpfsmnmspace.h"
-#include "cpdpfsm.h"
-
-TInt TPdpStateModifyingActive::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
-{
- SPUDFSMVERBOSE_FNLOG("TPdpStateModifyingActive::Input()");
- SPUDFSMVERBOSE_LOG2(_L("aOperation : %S(%d)"), LogOperation(aFsm, aOperation), aOperation);
-
- switch (aOperation)
- {
- case PdpFsm::EPdpContextModified:
- aFsm.ChangeStateToOpen();
- SpudManNotify(aFsm, KContextModifyActiveEvent, KErrNone);
- return KErrNone;
- case PdpFsm::EPdpContextModifiedFailed:
- aFsm.ChangeStateToOpen();
- SpudManNotify(aFsm, KContextModifyActiveEvent, aErrorCode);
- return KErrNone;
- }
-
- // default error handling
- return TPdpState::Input(aFsm, aOperation, aErrorCode);
-}
-
-
--- a/telephonyprotocols/umtsgprsscpr/spudfsm/src/tpdpstateopen.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Open state
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include <etelpckt.h>
-#include <networking/umtsnifcontrolif.h>
-#include "tpdpstates.h"
-#include "spudfsmdebuglogger.h"
-#include "pdpfsmnmspace.h"
-#include "PDPFSM.h"
-#include "cpdpfsm.h"
-
-TInt TPdpStateOpen::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
-{
- SPUDFSMVERBOSE_FNLOG("TPdpStateOpen::Input()");
- SPUDFSMVERBOSE_LOG2(_L("aOperation : %S(%d)"), LogOperation(aFsm, aOperation), aOperation);
-
- switch (aOperation)
- {
- case PdpFsm::EQoSProfileChangeNetwork:
-// //RPacketQoS::TQoSR99_R4Negotiated
- SpudManNotify (aFsm, KContextParametersChangeEvent, KErrNone);
- return KErrNone;
- case PdpFsm::EConfigGPRSChangeNetwork:
-// //RPacketContext::TContextConfigGPRS
- SpudManNotify (aFsm, KContextParametersChangeEvent, KErrNone);
- return KErrNone;
- case PdpFsm::EContextStatusChangeNetwork:
- if (aFsm.iContextStatus == RPacketContext::EStatusSuspended)
- {
- aFsm.ChangeStateToSuspended();
- SpudManNotify(aFsm, KContextBlockedEvent, KErrNone);
- }
- else if (aFsm.iContextStatus == RPacketContext::EStatusDeleted)
- {
- aFsm.ChangeStateToClosing();
- EtelDriverInput(aFsm, EtelDriver::EContextDelete);
- }
- else
- {
- // no change in state - the upper layer must change the state if it needs to
- SpudManNotify (aFsm, KContextParametersChangeEvent, aErrorCode);
- }
- return KErrNone;
- case SpudMan::EContextDelete:
- aFsm.ChangeStateToClosing();
- EtelDriverInput(aFsm, EtelDriver::EContextDelete);
- return KErrNone;
- case SpudMan::EContextQoSSet:
- aFsm.ChangeStateToChangingQoS();
- EtelDriverInput(aFsm, EtelDriver::ESetQoS);
- return KErrNone;
- case SpudMan::EContextModifyActive:
- aFsm.ChangeStateToModifingActive();
- EtelDriverInput(aFsm, EtelDriver::EModifyActive);
- return KErrNone;
- case SpudMan::EContextTFTModify:
- aFsm.ChangeStateToChangingTFT();
- EtelDriverInput(aFsm, EtelDriver::EChangeTft);
- return KErrNone;
- case SpudMan::ESuspend: // think this is superfluous - DAN will see at review :)
- aFsm.ChangeStateToSuspended();
- SpudManNotify(aFsm, KContextBlockedEvent, KErrNone);
- return KErrNone;
- }
-
- // default error handling
- return TPdpState::Input(aFsm, aOperation, aErrorCode);
-}
-
-
--- a/telephonyprotocols/umtsgprsscpr/spudfsm/src/tpdpstateopeningphone.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Opening phone state
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include <networking/umtsnifcontrolif.h>
-#include "tpdpstates.h"
-#include "spudfsmdebuglogger.h"
-#include "pdpfsmnmspace.h"
-#include "cpdpfsmfactory.h"
-#include "cpdpfsm.h"
-#include "PDPFSM.h"
-
-TInt TPdpStateOpeningPhone::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
-{
- SPUDFSMVERBOSE_FNLOG("TPdpStateOpeningPhone::Input()");
- SPUDFSMVERBOSE_LOG2(_L("aOperation : %S(%d)"), LogOperation(aFsm, aOperation), aOperation);
-
- switch (aOperation)
- {
- // ETel notifications
- case PdpFsm::EPhoneOpened:
- aFsm.ChangeStateToCreatingPrimary();
- iPdpFsmFactory->iEtelOpened = ETrue;
- EtelDriverInput(aFsm, EtelDriver::ECreate1ryPdpContext);
- return KErrNone;
- case PdpFsm::EPhoneOpenedFailed:
- aFsm.ChangeStateToInitialised();
- iPdpFsmFactory->iEtelOpened = EFalse;
- SpudManNotify (aFsm, KPrimaryContextCreated, aErrorCode);
- return KErrNone;
- case SpudMan::ECancelContextCreate:
- aFsm.ChangeStateToStopping();
- EtelDriverCancel(aFsm);
- EtelDriverInput(aFsm, EtelDriver::EContextDelete);
- return KErrNone;
- }
-
- // default error handling
- return TPdpState::Input(aFsm, aOperation, aErrorCode);
-}
-
-
--- a/telephonyprotocols/umtsgprsscpr/spudfsm/src/tpdpstates.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// PDP FSM states header
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#ifndef TPDPSTATES_H
-#define TPDPSTATES_H
-
-#include "tpdpstate.h"
-#include "spudfsmdebuglogger.h"
-
-class CPdpFsm;
-
-#if _DEBUG
-#define DEFINE_TPDPSTATE_CLASS(state) _LIT(KName##state, #state); \
-NONSHARABLE_CLASS(TPdpState##state) : public TPdpState \
-{ \
-public: \
- TPdpState##state (CPdpFsmFactory * aPdpFsmFactory) \
- { \
- SPUDFSMVERBOSE_FNLOG("TPdpState" L ## #state L"::TPdpState" L ## #state L"()"); \
- iName = KName##state; \
- iPdpFsmFactory = aPdpFsmFactory; \
- } \
- TInt Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aParam); \
-private: \
- TInt iErrorCode; \
-};
-#else
-#define DEFINE_TPDPSTATE_CLASS(state) NONSHARABLE_CLASS(TPdpState##state) : public TPdpState \
-{ \
-public: \
- TPdpState##state (CPdpFsmFactory * aPdpFsmFactory) \
- { \
- SPUDFSMVERBOSE_FNLOG("TPdpState" L ## #state L"::TPdpState" L ## #state L"()"); \
- iPdpFsmFactory = aPdpFsmFactory; \
- } \
- TInt Input (CPdpFsm& aFsm, TInt aOperation, TInt aErrorCode); \
-private: \
- TInt iErrorCode; \
-};
-#endif
-
-DEFINE_TPDPSTATE_CLASS(Initialised)
-DEFINE_TPDPSTATE_CLASS(OpeningPhone)
-DEFINE_TPDPSTATE_CLASS(CreatingPrimary)
-DEFINE_TPDPSTATE_CLASS(ActivatingPrimary)
-DEFINE_TPDPSTATE_CLASS(CreatingSecondary)
-DEFINE_TPDPSTATE_CLASS(CreatedSecondary)
-DEFINE_TPDPSTATE_CLASS(SettingQoS)
-DEFINE_TPDPSTATE_CLASS(SettingTFT)
-DEFINE_TPDPSTATE_CLASS(ActivatingSecondary)
-DEFINE_TPDPSTATE_CLASS(Open)
-DEFINE_TPDPSTATE_CLASS(ChangingQoS)
-DEFINE_TPDPSTATE_CLASS(ChangingTFT)
-DEFINE_TPDPSTATE_CLASS(ModifyingActive)
-DEFINE_TPDPSTATE_CLASS(Suspended)
-DEFINE_TPDPSTATE_CLASS(Closing)
-DEFINE_TPDPSTATE_CLASS(Stopping)
-DEFINE_TPDPSTATE_CLASS(GettingNegQoS)
-
-#endif // TPDPSTATES_H
--- a/telephonyprotocols/umtsgprsscpr/spudfsm/src/tpdpstatesettingqos.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Setting QoS state
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include <networking/umtsnifcontrolif.h>
-#include "tpdpstates.h"
-#include "spudfsmdebuglogger.h"
-#include "pdpfsmnmspace.h"
-#include "cpdpfsm.h"
-
-TInt TPdpStateSettingQoS::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
-{
- SPUDFSMVERBOSE_FNLOG("TPdpStateSettingQoS::Input()");
- SPUDFSMVERBOSE_LOG2(_L("aOperation : %S(%d)"), LogOperation(aFsm, aOperation), aOperation);
-
- switch (aOperation)
- {
- case PdpFsm::EQoSSet:
- aFsm.ChangeStateToCreatedSecondary();
- SpudManNotify(aFsm, KContextQoSSetEvent, KErrNone);
- return KErrNone;
- case PdpFsm::EQoSSetFailed:
- aFsm.ChangeStateToCreatedSecondary();
- SpudManNotify(aFsm, KContextQoSSetEvent, aErrorCode);
- return KErrNone;
- }
-
- // default error handling
- return TPdpState::Input(aFsm, aOperation, aErrorCode);
-}
-
-
--- a/telephonyprotocols/umtsgprsscpr/spudfsm/src/tpdpstatesettingqosprimary.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Setting QoS on primary context state
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include <networking\UmtsNifControlIf.h>
-#include "tpdpstates.h"
-#include "spudfsmdebuglogger.h"
-#include "pdpfsmnmspace.h"
-#include "cpdpfsm.h"
-
-TInt TPdpStateSettingQoSPrimary::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
-{
- SPUDFSMVERBOSE_FNLOG("TPdpStateSettingQoSPrimary::Input()");
- SPUDFSMVERBOSE_LOG2(_L("aOperation : %S(%d)"), LogOperation(aFsm, aOperation), aOperation);
-
- switch (aOperation)
- {
- case PdpFsm::EQoSSet:
- aFsm.ChangeStateToActivatingPrimary();
- EtelDriverInput(aFsm, EtelDriver::EActivatePdp);
- return KErrNone;
- case PdpFsm::EQoSSetFailed:
- aFsm.ChangeStateToClosing();
- SpudManNotify (aFsm, KPrimaryContextCreated, aErrorCode); // or is it KContextActivateEvent?
- EtelDriverInput(aFsm, EtelDriver::EContextDelete);
- return KErrNone;
- }
-
- // default error handling
- return TPdpState::Input(aFsm, aOperation, aErrorCode);
-}
-
-
--- a/telephonyprotocols/umtsgprsscpr/spudfsm/src/tpdpstatesettingtft.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Setting TFT state
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include <networking/umtsnifcontrolif.h>
-#include "tpdpstates.h"
-#include "spudfsmdebuglogger.h"
-#include "pdpfsmnmspace.h"
-#include "cpdpfsm.h"
-
-TInt TPdpStateSettingTFT::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
-{
- SPUDFSMVERBOSE_FNLOG("TPdpStateSettingTFT::Input()");
- SPUDFSMVERBOSE_LOG2(_L("aOperation : %S(%d)"), LogOperation(aFsm, aOperation), aOperation);
-
- switch (aOperation)
- {
- case PdpFsm::ETftSet:
- aFsm.ChangeStateToCreatedSecondary();
- SpudManNotify(aFsm, KContextTFTModifiedEvent, KErrNone);
- return KErrNone;
- case PdpFsm::ETftSetFailed:
- aFsm.ChangeStateToCreatedSecondary();
- SpudManNotify(aFsm, KContextTFTModifiedEvent, aErrorCode);
- return KErrNone;
- }
-
- // default error handling
- return TPdpState::Input(aFsm, aOperation, aErrorCode);
-}
-
-
--- a/telephonyprotocols/umtsgprsscpr/spudfsm/src/tpdpstatestopping.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Stopping state
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include <networking/umtsnifcontrolif.h>
-#include "tpdpstates.h"
-#include "spudfsmdebuglogger.h"
-#include "pdpfsmnmspace.h"
-#include "PDPFSM.h"
-#include "cpdpfsm.h"
-
-TInt TPdpStateStopping::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
-{
- SPUDFSMVERBOSE_FNLOG("TPdpStateStopping::Input()");
- SPUDFSMVERBOSE_LOG2(_L("aOperation : %S(%d)"), LogOperation(aFsm, aOperation), aOperation);
-
- switch (aOperation)
- {
- case PdpFsm::EContextDeleted:
- aFsm.ChangeStateToInitialised();
- SpudManNotify (aFsm, KPrimaryContextCreated, KErrGeneral);
- return KErrNone;
- case PdpFsm::EContextDeletedFailed:
- // There isn't any corrective action that can be taken here.
- SPUDFSMVERBOSE_LOG(_L("**** DELETE FAILURE ****"));
- SPUDFSM_LOG(_L("*** DELETE FAILURE ***"));
- aFsm.ChangeStateToInitialised();
- EtelDriverCancel (aFsm);
- SpudManNotify (aFsm, KPrimaryContextCreated, KErrNone);
- return KErrNone;
- case SpudMan::EContextDelete:
- // already doing this and don't want default action
- return KErrInUse;
- }
-
- // default error handling
- return TPdpState::Input(aFsm, aOperation, aErrorCode);
-}
-
-
--- a/telephonyprotocols/umtsgprsscpr/spudfsm/src/tpdpstatesuspended.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Suspended state
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include <networking/umtsnifcontrolif.h>
-#include "tpdpstates.h"
-#include "spudfsmdebuglogger.h"
-#include "pdpfsmnmspace.h"
-#include "PDPFSM.h"
-#include "cpdpfsm.h"
-
-TInt TPdpStateSuspended::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
-{
- SPUDFSMVERBOSE_FNLOG("TPdpStateSuspended::Input()");
- SPUDFSMVERBOSE_LOG2(_L("aOperation : %S(%d)"), LogOperation(aFsm, aOperation), aOperation);
-
- switch (aOperation)
- {
- case SpudMan::EResume:
- aFsm.ChangeStateToOpen();
- SpudManNotify(aFsm, KContextUnblockedEvent, KErrNone);
- return KErrNone;
- case PdpFsm::EContextStatusChangeNetwork:
- if (aFsm.iContextStatus == RPacketContext::EStatusActive)
- {
- aFsm.ChangeStateToOpen();
- SpudManNotify(aFsm, KContextUnblockedEvent, KErrNone);
- //SpudManNotify (aFsm, KNetworkStatusEvent, KErrNone);
- return KErrNone;
- }
- break;
- }
-
- // default error handling
- return TPdpState::Input(aFsm, aOperation, aErrorCode);
-}
-
-
--- a/telephonyprotocols/umtsgprsscpr/spudtel/inc/ceteldrivercontext.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,380 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Header for etel driver context class
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#ifndef CETELDRIVERCONTEXT_H
-#define CETELDRIVERCONTEXT_H
-
-#include <e32base.h>
-#include <etelmm.h>
-#include <etelqos.h>
-#include <networking/umtsnifcontrolif.h>
-
-#include "eteldrivernmspace.h"
-#include "PDPFSM.h"
-#include "meteldriverstrategy.h"
-#include "pdpfsmnmspace.h"
-
-
-class CEtelDriverFactory;
-
-//using namespace EtelDriver;
-/**
- A data storage for pdp context
-
- @internalComponent
-*/
-class CEtelDriverContext : public CActive
- {
-public:
- CEtelDriverContext (TContextId aId, CEtelDriverFactory& aFactory);
- virtual ~CEtelDriverContext();
-
- TInt Input (EtelDriver::TEtelInput aOperation);
-
- void StartNotifications() const;
- void StopNotifications() const;
-
- void PdpStatusChangeNotifierCancel();
- void QoSChangeNotifierCancel();
- void PdpConfigChangeNotifierCancel();
-
- // CActive methods
-
- /** accessors, basic */
- inline TContextId Id() const;
- inline TName& Name();
- inline TRequestStatus& CompletionStatus();
- MEtelDriverStrategy::TSequenceStep StrategyStep() const;
- inline void SetStrategyStep (MEtelDriverStrategy::TSequenceStep aStep);
-
-
- /** accessors, eTel objects */
- inline RPacketQoS& PacketQoS();
- inline RPacketContext& PacketContext();
- RPhone& Phone() const;
- RPacketService& PacketService() const;
- CPdpFsmInterface& PdpFsmInterface() const;
- const TName& ExistingContextName() const;
-
- /** context data accessors */
-
- inline TRequestedProfileBuffer& QosRequested();
- inline TNegotiatedProfileBuffer& QosNegotiated();
-
- inline RPacketContext::TContextConfigGPRS& ContextConfigGPRS();
-
- inline TRequestedProfileBufferPckg& QosRequestedPckg();
- inline TNegotiatedProfileBufferPckg& QosNegotiatedPckg();
- inline EtelDriver::TContextConfigGPRSPckg& ContextConfigGPRSPckg();
- inline RPacketContext::TDataChannelV2& DataChannelV2();
- inline RPacketContext::TDataChannelV2Pckg& DataChannelV2Pckg();
- inline TTFTInfo& TftInfo();
- inline RPacketContext::TPacketFilterV2& FilterV2();
- inline RPacketContext::TPacketFilterV2Pckg& FilterV2Pckg();
- inline TUint8 TftRequested() const;
- inline TInt FirstFilterV2();
- inline TInt NextFilterV2();
- inline TTFTOperationCode& TftOperationCode();
-
-#ifdef _DEBUG
- void DumpReqProfileParameters ();
- void DumpNegProfileParameters ();
-#endif
-
-protected:
- MEtelDriverStrategy& Strategy(EtelDriver::TEtelDriverStrategy aId) const;
-
- // CActive methods
- virtual void RunL();
- virtual void DoCancel();
-
-protected:
- /** ID */
- TContextId iId;
- /** tsy name of a context */
- TName iName;
- /** request status */
- TRequestStatus iCompletionStatus;
- /** active strategy step */
- MEtelDriverStrategy::TSequenceStep iStrategyStep;
- /** id of active strategy */
- EtelDriver::TEtelDriverStrategy iStrategyId;
-
- /** packet QoS */
- RPacketQoS iPacketQoS;
- /** packet context */
- RPacketContext iPacketContext;
-
- // factory data:
- /** etel driver factory */
- CEtelDriverFactory& iFactory;
-
- // data from pdp fsm
- // all members below contain valid data for limited time only,
- // i.e. for the duration of a strategy OR a duration of a single call to etel
- /** Requested QoS */
- TRequestedProfileBuffer iQosRequested;
- TRequestedProfileBufferPckg iQosRequestedPckg;
-
- /** Negotiated QoS */
- TNegotiatedProfileBuffer iQosNegotiated;
- TNegotiatedProfileBufferPckg iQosNegotiatedPckg;
-
-
- /** context config */
- RPacketContext::TContextConfigGPRS iContextConfigGPRS;
- /** packaged context config */
- EtelDriver::TContextConfigGPRSPckg iContextConfigGPRSPckg;
- /** tft info */
- TTFTInfo iTftInfo;
- /** data channel V2 */
- RPacketContext::TDataChannelV2 iDataChannelV2;
- /** packaged data channel V2 */
- RPacketContext::TDataChannelV2Pckg iDataChannelV2Pckg;
-
-private:
- // TFT data
- /** local var for tft count */
- TUint8 iTftRequested;
- /** local V2 filter */
- RPacketContext::TPacketFilterV2 iFilterV2;
- /** local packaged V2 filter */
- EtelDriver::TPacketFilterV2Pckg iFilterV2Pckg;
- /** TFT Operation Code */
- TTFTOperationCode iTftOperationCode;
- };
-
-
-// inlines
-/** accessor
-
-@return id of first V2 filter
-*/
-inline TInt CEtelDriverContext::FirstFilterV2()
- {
- iTftInfo.SetToFirst();
- iTftRequested = 0;
- return iTftInfo.NextPacketFilter(iFilterV2);
- }
-
-/** accessor
-
-@return id of next V2 filter
-*/
-inline TInt CEtelDriverContext::NextFilterV2()
- {
- TInt err = iTftInfo.NextPacketFilter(iFilterV2);
- if (err == KErrNone)
- {
- ++iTftRequested;
- }
- return err;
- }
-
-/** accessor
-
-@return context id
-*/
-inline TContextId CEtelDriverContext::Id() const
- {
- return iId;
- }
-
-/** accessor
-
-@return reference to name of pdp context
-*/
-inline TName& CEtelDriverContext::Name()
- {
- return iName;
- }
-
-/** accessor
-
-@return reference to request status
-*/
-inline TRequestStatus& CEtelDriverContext::CompletionStatus()
- {
- return iCompletionStatus;
- }
-
-/** accessor
-
-@return strategy sequence step
-*/
-inline MEtelDriverStrategy::TSequenceStep CEtelDriverContext::StrategyStep() const
- {
- return iStrategyStep;
- }
-
-/** sets strategy sequence step
-
-@param aStep - strategy sequence step
-*/
-inline void CEtelDriverContext::SetStrategyStep(MEtelDriverStrategy::TSequenceStep aStep)
- {
- iStrategyStep = aStep;
- }
-
-/** accessor
-
-@return reference to etel packet QoS
-*/
-inline RPacketQoS& CEtelDriverContext::PacketQoS()
- {
- return iPacketQoS;
- }
-
-/** accessor
-
-@return reference to etel packet context
-*/
-inline RPacketContext& CEtelDriverContext::PacketContext()
- {
- return iPacketContext;
- }
-
-
-// context data accessors
-/**
-accessor
-@return reference to QoSR5Requested
-*/
-
-inline TRequestedProfileBuffer& CEtelDriverContext::QosRequested()
- {
- return iQosRequested;
- }
-
-
-inline TNegotiatedProfileBuffer& CEtelDriverContext::QosNegotiated()
- {
- return iQosNegotiated;
- }
-
-
-
-
-
-
-/** accessor
-
-@return reference to TRequestedProfileBufferPckg
-*/
-inline TRequestedProfileBufferPckg& CEtelDriverContext::QosRequestedPckg()
- {
- return iQosRequestedPckg;
- }
-
-/**
-accessor
-@return reference to TNegotiatedProfileBufferPckg
-*/
-inline TNegotiatedProfileBufferPckg& CEtelDriverContext::QosNegotiatedPckg()
- {
- return iQosNegotiatedPckg;
- }
-
-
-/**
-accessor
-@return reference to ContextConfigGPRS
-*/
-inline RPacketContext::TContextConfigGPRS& CEtelDriverContext::ContextConfigGPRS()
- {
- return iContextConfigGPRS;
- }
-
-/** accessor
-
-@return reference to ContextConfigGPRSPckg
-*/
-inline EtelDriver::TContextConfigGPRSPckg& CEtelDriverContext::ContextConfigGPRSPckg()
- {
- return iContextConfigGPRSPckg;
- }
-
-/** accessor
-
-@return reference to packet context' DataChannelV2
-*/
-inline RPacketContext::TDataChannelV2& CEtelDriverContext::DataChannelV2()
- {
- return iDataChannelV2;
- }
-
-/** accessor
-
-@return reference to packet context' DataChannelV2Pckg
-*/
-inline RPacketContext::TDataChannelV2Pckg& CEtelDriverContext::DataChannelV2Pckg()
- {
- return iDataChannelV2Pckg;
- }
-
-/** accessor
-
-@return reference to TFT info
-*/
-inline TTFTInfo& CEtelDriverContext::TftInfo()
- {
- return iTftInfo;
- }
-
-/** accessor
-
-@return reference to packet context' PacketFilterV2
-*/
-inline RPacketContext::TPacketFilterV2& CEtelDriverContext::FilterV2()
- {
- return iFilterV2;
- }
-
-/** accessor
-
-@return reference to packet context' PacketFilterV2Pckg
-*/
-inline RPacketContext::TPacketFilterV2Pckg& CEtelDriverContext::FilterV2Pckg()
- {
- return iFilterV2Pckg;
- }
-
-/** accessor
-
-@return requested TFT
-*/
-inline TUint8 CEtelDriverContext::TftRequested() const
- {
- return iTftRequested;
- }
-
-/** accessor
-
-@return reference to TFT operation code
-*/
-inline TTFTOperationCode& CEtelDriverContext::TftOperationCode()
- {
- return iTftOperationCode;
- }
-
-
-#endif // CETELDRIVERCONTEXT_H
--- a/telephonyprotocols/umtsgprsscpr/spudtel/inc/ceteldriverfactory.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,182 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// etel driver factory
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#ifndef CETELDRIVERFACTORY_H
-#define CETELDRIVERFACTORY_H
-
-#include <e32base.h>
-#include <etelmm.h>
-#include <etelpckt.h>
-
-#include "PDPFSM.h"
-#include "cservicechangenotifier.h"
-#include "eteldriverstrategies.h"
-#include "eteldrivernmspace.h"
-
-
-class CSpudContextElem;
-class CEtelDriverContext;
-
-/** factory (and owner) of spud etel driver objects */
-class CEtelDriverFactory : public CBase
- {
-public:
- static CEtelDriverFactory* NewL (CPdpFsmInterface& aPdpFsmInterface);
-
- virtual ~CEtelDriverFactory();
-
- virtual void InitL();
- virtual void CreatePdpL (TContextId aPdpId);
- virtual void FreePdp(TContextId aPdpId);
-
- virtual void StartPdpNotifications (TContextId aPdpId);
- virtual void CancelPdpNotifications (TContextId aPdpId);
- virtual void CancelAllPdpNotifications();
-
- void PdpStatusChangeNotifierCancel(TContextId aPdpId);
- void QoSChangeNotifierCancel(TContextId aPdpId);
- void PdpConfigChangeNotifierCancel(TContextId aPdpId);
-
- void GetLastErrorCause(TContextId aPdpId, TInt& aLastErrorCause);
-
- /** accessors */
- TBool HasContext(TContextId aId) const;
- CEtelDriverContext& Context(TContextId aId);
- inline TInt ContextCount() const;
- inline RPacketService& PacketService();
- inline RPhone& Phone();
- inline MEtelDriverStrategy& Strategy(EtelDriver::TEtelDriverStrategy aId) const;
- inline CPdpFsmInterface& PdpFsmInterface() const;
-
-
- /** map etel input to strategy id */
- inline EtelDriver::TEtelDriverStrategy StrategyId(EtelDriver::TEtelInput aInput) const;
-
-private:
- CEtelDriverFactory (CPdpFsmInterface& aPdpFsmInterface);
- void ConstructL();
-
-private:
- // data common among all pdp contexts
- /** reference to clients CPdpFsmInterface */
- CPdpFsmInterface& iPdpFsmInterface;
- /** tel server */
- RTelServer iTelServer;
- /** phone */
- RPhone iPhone;
- /** packet service */
- RPacketService iPacketService;
- /** service change notify */
- CServiceChangeNotifier iServiceChangeNotifier;
-
- /** global array of Etel Driver Stratergies */
- TFixedArray<MEtelDriverStrategy*, EtelDriver::ESentinelStrategy> iStrategies;
- /** map of input to strategy id */
- // Dev. note: we might have more Strategies then Inputs
- TFixedArray<EtelDriver::TEtelDriverStrategy, EtelDriver::ESentinelInput> iInputToStrategyMap;
-
-
- /** array of pdp contexts and notifiers
- Dev. note: primary and secondary contexts could be in arbitrary slots
- */
- TFixedArray<CSpudContextElem*, KMaxPdpContexts> iContexts;
-
- /** open strategy */
- TOpenStrategy iOpenStrategy;
- /** set QoS strategy */
- TSetQoSStrategy iSetQoSStrategy;
- /** set TFT strategy */
- TSetTftStrategy iSetTftStrategy;
- /** change TFT strategy */
- TChangeTftStrategy iChangeTftStrategy;
- /** create primary pdp context strategy */
- TCreate1ryPdpContextStrategy iCreate1ryPdpContextStrategy;
- /** create secondary pdp context strategy */
- TCreate2ryPdpContextStrategy iCreate2ryPdpContextStrategy;
- /** activate pdp context strategy */
- TActivatePdpStrategy iActivatePdpStrategy;
- /** retrieve negotiated qos strategy */
- TGetNegQoSStrategy iGetNegQoSStrategy;
- /** modify active pdp context strategy */
- TModifyActiveStrategy iModifyActivePdpStrategy;
- /** delete pdp context strategy */
- TContextDeleteStrategy iContextDeleteStrategy;
- };
-
-
-// inlines
-/** returns count of pdp contexts
-
-@return count of pdp contexts
-*/
-inline TInt CEtelDriverFactory::ContextCount() const
- {
- return iContexts.Count();
- }
-
-/** accessor
-
-@return reference to etel RPacketService
-*/
-inline RPacketService& CEtelDriverFactory::PacketService()
- {
- return iPacketService;
- }
-
-/** accessor
-
-@return reference to etel RPhone
-*/
-inline RPhone& CEtelDriverFactory::Phone()
- {
- return iPhone;
- }
-
-/** accessor
-
-@return reference to etel driver strategy
-*/
-inline MEtelDriverStrategy& CEtelDriverFactory::Strategy(EtelDriver::TEtelDriverStrategy aId) const
- {
- return *iStrategies[aId];
- }
-
-/** accessor
-
-@return reference to pdp fsm interface
-*/
-inline CPdpFsmInterface& CEtelDriverFactory::PdpFsmInterface() const
- {
- return iPdpFsmInterface;
- }
-
-/** map etel input to strategy id
-
-@param aInput - etel input id
-@return id of etel driver strategy
-*/
-inline EtelDriver::TEtelDriverStrategy CEtelDriverFactory::StrategyId(EtelDriver::TEtelInput aInput) const
- {
- return iInputToStrategyMap[aInput];
- }
-
-#endif // CETELDRIVERFACTORY_H
--- a/telephonyprotocols/umtsgprsscpr/spudtel/inc/ceteldrivernotifier.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// service change notify
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#ifndef CETELDRIVERNOTIFIER_H
-#define CETELDRIVERNOTIFIER_H
-
-#include <e32base.h>
-
-class CPdpFsmInterface;
-
-
-/** base notifier class */
-class CEtelDriverNotifier : public CActive
- {
-public:
- CEtelDriverNotifier(CPdpFsmInterface& aPdpFsmInterface);
-
- /** starts notifications */
- virtual void Start() = 0;
-
-protected:
- /** notifies SPUD FSM about network events */
- virtual void Notify(const TRequestStatus& aStatus) = 0;
-
- // CActive methods
- virtual void RunL();
-
-protected:
- /** Pdp Fsm Interface for FSM notification */
- CPdpFsmInterface& iPdpFsmInterface;
- };
-
-#endif // CETELDRIVERNOTIFIER_H
--- a/telephonyprotocols/umtsgprsscpr/spudtel/inc/cpdpconfigchangenotifier.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// PDP config change notifier
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#ifndef CPDPCONFIGCHAGENOTIFIER_H
-#define CPDPCONFIGCHAGENOTIFIER_H
-
-#include <e32base.h>
-#include <etelpckt.h>
-#include <networking/umtsnifcontrolif.h>
-
-#include "eteldrivernmspace.h"
-#include "ceteldrivernotifier.h"
-
-/** notifier for packet context config */
-class CPdpConfigChangeNotifier : public CEtelDriverNotifier
- {
-public:
- CPdpConfigChangeNotifier(TContextId aId, RPacketContext& aPacketContext,
- CPdpFsmInterface& aPdpFsmInterface);
- virtual ~CPdpConfigChangeNotifier();
-
- virtual void Start();
-
-protected:
- virtual void Notify(const TRequestStatus& aStatus);
- virtual void DoCancel();
-
-private:
- /** context id */
- TContextId iId;
- /** underlying packet context */
- RPacketContext& iPacketContext;
-
- /** packet context config */
- RPacketContext::TContextConfigGPRS iConfigGPRS;
- /** packaged packet context config */
- EtelDriver::TContextConfigGPRSPckg iConfigGPRSPckg;
- };
-
-#endif // CPDPCONFIGCHAGENOTIFIER_H
--- a/telephonyprotocols/umtsgprsscpr/spudtel/inc/cpdpstatuschangenotifier.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// PDP status change notifier
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#ifndef CPDPSTATUSCHAGENOTIFIER_H
-#define CPDPSTATUSCHAGENOTIFIER_H
-
-#include <e32base.h>
-#include <etelpckt.h>
-
-#include <networking/umtsnifcontrolif.h>
-#include "ceteldrivernotifier.h"
-
-/** notifier for status of packet context */
-class CPdpStatusChangeNotifier : public CEtelDriverNotifier
- {
-public:
- CPdpStatusChangeNotifier(TContextId aId, RPacketContext& aPacketContext,
- CPdpFsmInterface& aPdpFsmInterface);
- virtual ~CPdpStatusChangeNotifier();
-
- virtual void Start();
-
-protected:
- virtual void Notify(const TRequestStatus& aStatus);
- virtual void DoCancel();
-
-private:
- /** context id */
- TContextId iId;
- /** underlying packet context */
- RPacketContext& iPacketContext;
-
- /** status of a packet context */
- RPacketContext::TContextStatus iContextStatus;
- };
-
-#endif // CPDPSTATUSCHAGENOTIFIER_H
--- a/telephonyprotocols/umtsgprsscpr/spudtel/inc/cqoschangenotifier.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// QoS profile change notifier
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#ifndef CQOSCHAGENOTIFIER_H
-#define CQOSCHAGENOTIFIER_H
-
-#include <e32base.h>
-
-#include "ceteldrivernotifier.h"
-#include "ceteldrivercontext.h" // definition of TQoSR99_R4NegotiatedPckg
-#include "pdpfsmnmspace.h"
-
-
-class RPacketQoS;
-
-/** QoS profile change notifier */
-class CQoSChangeNotifier : public CEtelDriverNotifier
- {
-public:
- CQoSChangeNotifier (TContextId aId, RPacketQoS& aPacketQoS,
- CPdpFsmInterface& aPdpFsmInterface);
- virtual ~CQoSChangeNotifier();
-
- virtual void Start();
-
-protected:
- virtual void Notify(const TRequestStatus& aStatus);
- virtual void DoCancel();
-
-private:
- /** associated context id */
- TContextId iId;
- /** ref to packet QoS */
- RPacketQoS& iPacketQoS;
-
- TNegotiatedProfileBuffer iProfileBuffer;
- TNegotiatedProfileBufferPckg iProfilePckg;
- };
-
-#endif
-// CQOSCHAGENOTIFIER_H
--- a/telephonyprotocols/umtsgprsscpr/spudtel/inc/cservicechangenotifier.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// service change notify
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#ifndef CSERVICECHAGENOTIFIER_H
-#define CSERVICECHAGENOTIFIER_H
-
-#include <e32base.h>
-#include <etelpckt.h>
-
-#include "ceteldrivernotifier.h"
-
-/** notifier for status of packet service */
-class CServiceChangeNotifier : public CEtelDriverNotifier
- {
-public:
- CServiceChangeNotifier(RPacketService& aPacketService,
- CPdpFsmInterface& aPdpFsmInterface);
- ~CServiceChangeNotifier();
-
- virtual void Start();
-
-protected:
- virtual void Notify(const TRequestStatus& aStatus);
- virtual void DoCancel();
-
-private:
- /** underlying packet service */
- RPacketService& iPacketService;
-
- /** status of a packet service */
- RPacketService::TStatus iServiceStatus;
- };
-
-#endif // CSERVICECHAGENOTIFY_H
--- a/telephonyprotocols/umtsgprsscpr/spudtel/inc/cspudcontextelem.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// spud context element
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#ifndef CSPUDCONTEXTELEM_H
-#define CSPUDCONTEXTELEM_H
-
-#include "ceteldrivercontext.h"
-#include "cpdpstatuschangenotifier.h"
-#include "cqoschangenotifier.h"
-#include "cpdpconfigchangenotifier.h"
-
-class CEtelDriverFactory;
-
-/** structure to keep context object and associated notifiers */
-class CSpudContextElem : CBase
- {
-public:
- static CSpudContextElem* NewL(TContextId aId, CEtelDriverFactory& aFactory, CPdpFsmInterface& aPdpFsmInterface);
- virtual ~CSpudContextElem();
-
- void Start();
- void Cancel();
-
- void GetLastErrorCause(TInt& aLastErrorCause);
-
- void PdpStatusChangeNotifierCancel();
- void QoSChangeNotifierCancel();
- void PdpConfigChangeNotifierCancel();
-
- /** etel driver context */
- CEtelDriverContext* iContext;
- /** pdp status change notifier */
- CPdpStatusChangeNotifier* iPdpStatusChangeNotifier;
- /** QoS profile change notifier */
- CQoSChangeNotifier* iQoSChangeNotifier;
- /** pdp config change notifier */
- CPdpConfigChangeNotifier* iPdpConfigChangeNotifier;
-
-private:
- void ConstructL(TContextId aId, CEtelDriverFactory& aFactory, CPdpFsmInterface& aPdpFsmInterface);
- };
-
-#endif // CSPUDCONTEXTELEM_H
--- a/telephonyprotocols/umtsgprsscpr/spudtel/inc/eteldrivernmspace.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// etel driver namespace
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#ifndef ETELDRIVERNMSPACE_H
-#define ETELDRIVERNMSPACE_H
-
-namespace EtelDriver
-{
-
-/** input operations, which are handled by etel driver input */
-enum TEtelInput
- {
- EOpenPhone,
-
- ESetQoS,
- ESetTft,
- EChangeTft,
- ECreate1ryPdpContext,
- ECreate2ryPdpContext,
-
- EActivatePdp,
- ENegQoSGet,
- EModifyActive,
- EContextDelete,
-
- ESentinelInput
- };
-
-/** input operations, which are handled by etel driver input */
-enum TEtelDriverStrategy
- {
- EOpenPhoneStrategy = 0,
-
- ESetQoSStrategy,
- ESetTftStrategy,
- EChangeTftStrategy,
-
- ECreate1ryPdpContextStrategy,
- ECreate2ryPdpContextStrategy,
-
- EActivatePdpStrategy,
- EGetNegQoSStrategy,
- EModifyActiveStrategy,
- EContextDeleteStrategy,
-
- ESentinelStrategy
- };
-
- typedef TPckg<RPacketQoS::TQoSR99_R4Requested> TQoSR99_R4RequestedPckg;
- typedef TPckg<RPacketQoS::TQoSR99_R4Negotiated> TQoSR99_R4NegotiatedPckg;
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- typedef TPckg<RPacketQoS::TQoSR5Requested> TQoSR5RequestedPckg;
- typedef TPckg<RPacketQoS::TQoSR5Negotiated> TQoSR5NegotiatedPckg;
-#endif
-// SYMBIAN_NETWORKING_UMTSR5
-
- typedef TPckg<RPacketContext::TContextConfigGPRS> TContextConfigGPRSPckg;
- typedef TPckg<RPacketContext::TPacketFilterV2> TPacketFilterV2Pckg;
-
-
-_LIT(KTxtSpudTel, "SPUDTEL");
-
-} // namespace EtelDriver
-
-
-#endif // ETELDRIVERNMSPACE_H
--- a/telephonyprotocols/umtsgprsscpr/spudtel/inc/eteldriverstrategies.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,143 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Header for all etel driver strategies classes.
-// Each class corresponds to an entry in TEtelInput
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#ifndef ETELDRIVERSTRATEGIES_H
-#define ETELDRIVERSTRATEGIES_H
-
-#include "meteldriverstrategy.h"
-
-
-/**
-Strategy to prepare etel for subsequent manipulations with pdp contexts.
-*/
-NONSHARABLE_CLASS(TOpenStrategy) : public MEtelDriverStrategy
- {
-public:
- virtual void Next (CEtelDriverContext& aContext, TRequestStatus* aStatus);
- virtual void NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus );
- virtual void CancelAsyncRequest(CEtelDriverContext& aContext);
-
- };
-
-/**
-Strategy to delete pdp context.
-*/
-NONSHARABLE_CLASS(TContextDeleteStrategy) : public MEtelDriverStrategy
- {
-public:
- virtual void Next (CEtelDriverContext& aContext, TRequestStatus* aStatus);
- virtual void NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus );
- virtual void CancelAsyncRequest(CEtelDriverContext& aContext);
-
- };
-
-/**
-Strategy to set QoS for pdp context.
-*/
-NONSHARABLE_CLASS(TSetQoSStrategy) : public MEtelDriverStrategy
- {
-public:
- virtual void Next (CEtelDriverContext& aContext, TRequestStatus* aStatus);
- virtual void NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus );
- virtual void CancelAsyncRequest(CEtelDriverContext& aContext);
- };
-
-/**
-Strategy to set tft for pdp context.
-*/
-NONSHARABLE_CLASS(TSetTftStrategy) : public MEtelDriverStrategy
- {
-public:
- virtual void Next (CEtelDriverContext& aContext, TRequestStatus* aStatus);
- virtual void NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus );
- virtual void CancelAsyncRequest(CEtelDriverContext& aContext);
- };
-
-/**
-Strategy to change tft for pdp context.
-*/
-NONSHARABLE_CLASS(TChangeTftStrategy) : public MEtelDriverStrategy
- {
-public:
- virtual void Next (CEtelDriverContext& aContext, TRequestStatus* aStatus);
- virtual void NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus );
- virtual void CancelAsyncRequest(CEtelDriverContext& aContext);
- };
-
-/**
-Strategy to create primary pdp context.
-*/
-NONSHARABLE_CLASS(TCreate1ryPdpContextStrategy) : public MEtelDriverStrategy
- {
-public:
- virtual void Next (CEtelDriverContext& aContext, TRequestStatus* aStatus);
- virtual void NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus );
- virtual void CancelAsyncRequest(CEtelDriverContext& aContext);
- };
-
-/**
-Strategy to create secondary pdp context.
-*/
-NONSHARABLE_CLASS(TCreate2ryPdpContextStrategy) : public MEtelDriverStrategy
- {
-public:
- virtual void Next (CEtelDriverContext& aContext, TRequestStatus* aStatus);
- virtual void NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus );
- virtual void CancelAsyncRequest(CEtelDriverContext& aContext);
- };
-
-/**
-Strategy to activate pdp context, primary or secondary.
-*/
-NONSHARABLE_CLASS(TActivatePdpStrategy) : public MEtelDriverStrategy
- {
-public:
- virtual void Next (CEtelDriverContext& aContext, TRequestStatus* aStatus);
- virtual void NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus );
- virtual void CancelAsyncRequest(CEtelDriverContext& aContext);
- };
-
-/**
-Strategy to retrieve negotiated qos from TSY for secondary pdp context
-*/
-NONSHARABLE_CLASS(TGetNegQoSStrategy) : public MEtelDriverStrategy
- {
-public:
- virtual void Next (CEtelDriverContext& aContext, TRequestStatus* aStatus);
- virtual void NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus );
- virtual void CancelAsyncRequest(CEtelDriverContext& aContext);
- };
-
-
-/**
-Strategy to modify an active PDP context, primary or secondary.
-*/
-NONSHARABLE_CLASS(TModifyActiveStrategy) : public MEtelDriverStrategy
- {
-public:
- virtual void Next (CEtelDriverContext& aContext, TRequestStatus* aStatus);
- virtual void NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus );
- virtual void CancelAsyncRequest(CEtelDriverContext& aContext);
- };
-
-#endif // ETELDRIVERSTRATEGIES_H
--- a/telephonyprotocols/umtsgprsscpr/spudtel/inc/meteldriverstrategy.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Header for etel driver strategy class
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#ifndef METELDRIVERSTRATEGY_H
-#define METELDRIVERSTRATEGY_H
-
-// forward declarations
-class CEtelDriverContext;
-
-/** base class for spud etel driver strategy */
-class MEtelDriverStrategy
- {
-public:
- /** union of all elementary steps to be performed during execution of strategies */
- enum TSequenceStep
- {
- EStartStep,
- EInitPhoneStep,
-
- EOpenNewQoSStep,
- EGetConfigStep,
- ESetConfigStep,
- EInitialiseContextStep,
-
- ESetProfileParamsStep,
- EGetProfileParamsStep,
-
- ECreateNewTFTStep,
- EAddFirstTftStep,
- EDeleteTftStep,
- ERemoveFirstTftStep,
- ERemoveTftStep,
- EAddTftStep,
-
- EActivateStep,
- EModifyActiveStep,
- EDeactivateStep,
-
- EDeleteContextStep,
- EChangeTftFinished,
- EModifyActiveContext,
- // add execution steps here
-
- EFinishStep
- };
-
-public:
- /** Executes next asynchronous step in a strategy.
-
- @param aContext - pdp context
- @param aStatus - request status of this step
- */
- virtual void Next (CEtelDriverContext& aContext, TRequestStatus* aStatus) = 0;
-
- /**
- Notifies SPUD FSM about execution results.
-
- @param aContext - pdp context
- @param aCompletionStatus - completion request status
- */
- virtual void NotifyFsm (CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus) = 0;
-
- /** Cancels last asynchronous request to eTel
-
- @param aContext - pdp context
- */
- virtual void CancelAsyncRequest(CEtelDriverContext& aContext) = 0;
- };
-
-#endif // METELDRIVERSTRATEGY_H
--- a/telephonyprotocols/umtsgprsscpr/spudtel/inc/reteldriverinput.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Header for etel driver input class
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#ifndef RETELDRIVERINPUT_H
-#define RETELDRIVERINPUT_H
-
-#include <e32def.h>
-#include <e32std.h>
-#include <networking/umtsnifcontrolif.h> // definition of TContextId
-
-#include "eteldrivernmspace.h" // definition of EtelDriver::TEtelInput
-
-class CEtelDriverFactory;
-class CPdpFsmInterface;
-
-/**
- Definition of an input interface for SPUD eTel driver
-
-@internalComponent
-*/
-class REtelDriverInput
- {
-public:
- REtelDriverInput();
- virtual ~REtelDriverInput();
-
- virtual void OpenL (CPdpFsmInterface& aPdpFsmInterface);
- virtual void Close();
- virtual void CreatePdpL (TContextId aPdpId);
- virtual void DeletePdp (TContextId aPdpId);
- virtual void Input(TContextId aPdpId, EtelDriver::TEtelInput aOperation);
- virtual void CancelPdp (TContextId aPdpId);
- virtual void StartPdpNotifications(TContextId aPdpId);
- virtual void CancelPdpNotifications (TContextId aPdpId);
- virtual void CancelAllPdps();
- virtual void CancelAllPdpNotifications();
- virtual void GetLastErrorCause (TContextId aPdpId, TInt& aLastErrorCause);
-
-protected:
-
-private:
- // disable copy of an object
- inline REtelDriverInput(REtelDriverInput&);
- inline REtelDriverInput& operator= (REtelDriverInput& aInput);
-
-private:
- /** etel driver factory */
- CEtelDriverFactory* iDriverFactory;
- };
-
-
-// inlines
-/** copy c'tor
- not supported for this class
-*/
-inline REtelDriverInput::REtelDriverInput(REtelDriverInput&)
- {
- // not supported
- __ASSERT_ALWAYS(EFalse, User::Panic(EtelDriver::KTxtSpudTel, KErrNotSupported));
- }
-
-/** assignment operator
- not supported for this class
-*/
-inline REtelDriverInput& REtelDriverInput::operator= (REtelDriverInput& aInput)
- {
- // not supported
- __ASSERT_ALWAYS(EFalse, User::Panic(EtelDriver::KTxtSpudTel,KErrNotSupported));
- return aInput;
- }
-
-#endif
-// RETELDRIVERINPUT_H
--- a/telephonyprotocols/umtsgprsscpr/spudtel/inc/spudteldebuglogger.h Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Event Logger header
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#ifndef SPUDTELDEBUGLOGGER_H
-#define SPUDTELDEBUGLOGGER_H
-
-
-#include "comms-infras/commsdebugutility.h"
-
-#ifdef __FLOG_ACTIVE
-
-#include <e32base.h>
-#include <e32def.h>
-
-
-_LIT8(KSpudTelLogFile,"SPUDTEL.TXT");
-_LIT8(KSpudTelLogFileVerbose,"SPUDTELVERB.TXT");
-_LIT8(KSpudTelLogFolder,"SPUD");
-
-// pure informational logging
-#if defined(_INFO_LOG)
-// Static info Output Logging Macros
-#define SPUDTEL_INFO_LOG(text) __FLOG_STATIC0(KSpudTelLogFolder,KSpudTelLogFile,text)
-#define SPUDTEL_INFO_LOG1(text,a) __FLOG_STATIC1(KSpudTelLogFolder,KSpudTelLogFile,text, a)
-#define SPUDTEL_INFO_LOG2(text,a, b) __FLOG_STATIC2(KSpudTelLogFolder,KSpudTelLogFile,text,a,b)
-#define SPUDTEL_INFO_LOG3(text,a, b, c) __FLOG_STATIC3(KSpudTelLogFolder,KSpudTelLogFile,text,a,b,c)
-#define SPUDTELVERBOSE_INFO_LOG(text) __FLOG_STATIC0(KSpudTelLogFolder,KSpudTelLogFileVerbose,text)
-#define SPUDTELVERBOSE_INFO_LOG1(text,a) __FLOG_STATIC1(KSpudTelLogFolder,KSpudTelLogFileVerbose,text, a)
-#define SPUDTELVERBOSE_INFO_LOG2(text,a, b) __FLOG_STATIC2(KSpudTelLogFolder,KSpudTelLogFileVerbose,text,a,b)
-#define SPUDTELVERBOSE_INFO_LOG3(text,a, b, c) __FLOG_STATIC3(KSpudTelLogFolder,KSpudTelLogFileVerbose,text,a,b,c)
-
-
-_LIT(KSpudTelMsgIn, ">>%S");
-_LIT(KSpudTelMsgOut,"<<%S");
-
-class TSpudTelLogFn
-{
-protected:
- TName iName;
-
-public:
- TSpudTelLogFn(const TDesC& aName) { iName = aName; SPUDTELVERBOSE_INFO_LOG1(KSpudTelMsgIn, &iName);};
- ~TSpudTelLogFn() { SPUDTELVERBOSE_INFO_LOG1(KSpudTelMsgOut, &iName);};
-};
-
-#define SPUDTEL_FNLOG(name) TSpudTelLogFn spudTelLogFn(_L(name))
-
-#else // defined(_INFO_LOG)
-
-#define SPUDTEL_INFO_LOG(text)
-#define SPUDTEL_INFO_LOG1(text,a)
-#define SPUDTEL_INFO_LOG2(text,a, b)
-#define SPUDTEL_INFO_LOG3(text,a, b, c)
-#define SPUDTEL_FNLOG(name)
-#define SPUDTELVERBOSE_INFO_LOG(text)
-#define SPUDTELVERBOSE_INFO_LOG1(text,a)
-#define SPUDTELVERBOSE_INFO_LOG2(text,a, b)
-#define SPUDTELVERBOSE_INFO_LOG3(text,a, b, c)
-
-#endif // defined(_INFO_LOG)
-
-
-// error logging
-#if defined(_ERROR_LOG)
-
-#define SPUDTEL_ERROR_LOG(errtext, err) __FLOG_STATIC1(KSpudTelLogFolder,KSpudTelLogFile, errtext, err)
-#define SPUDTEL_ERROR_LOG0(errtext) __FLOG_STATIC0(KSpudTelLogFolder,KSpudTelLogFile, errtext)
-
-#else // defined(_ERROR_LOG)
-
-#define SPUDTEL_ERROR_LOG(errtext, err)
-#define SPUDTEL_ERROR_LOG0(errtext)
-
-#endif // defined(_ERROR_LOG)
-
-
-#else // __FLOG_ACTIVE
-
-#define SPUDTEL_INFO_LOG(t)
-#define SPUDTEL_INFO_LOG1(t,a)
-#define SPUDTEL_INFO_LOG2(t,a,b)
-#define SPUDTEL_INFO_LOG3(t,a,b,c)
-#define SPUDTEL_FNLOG(name)
-#define SPUDTELVERBOSE_INFO_LOG(t)
-#define SPUDTELVERBOSE_INFO_LOG1(t,a)
-#define SPUDTELVERBOSE_INFO_LOG2(t,a,b)
-#define SPUDTELVERBOSE_INFO_LOG3(t,a,b,c)
-#define SPUDTEL_ERROR_LOG(errtext, err)
-#define SPUDTEL_ERROR_LOG0(errtext)
-
-
-#endif //__FLOG_ACTIVE
-#endif
-// SPUDTELDEBUGLOGGER_H
-
--- a/telephonyprotocols/umtsgprsscpr/spudtel/src/ceteldrivercontext.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,327 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// implementation of etel driver context class
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-
-#include "ceteldrivercontext.h"
-#include "ceteldriverfactory.h"
-#include "spudteldebuglogger.h"
-
-
-using namespace EtelDriver;
-
-CEtelDriverContext::CEtelDriverContext (TContextId aId, CEtelDriverFactory& aFactory)
-: CActive(CActive::EPriorityStandard),
- iId(aId),
- iCompletionStatus(KErrNone),
- iStrategyStep(MEtelDriverStrategy::EFinishStep),
- iStrategyId(ESentinelStrategy),
- iFactory(aFactory),
- iQosRequestedPckg(iQosRequested),
- iQosNegotiatedPckg(iQosNegotiated),
- iContextConfigGPRS(),
- iContextConfigGPRSPckg(iContextConfigGPRS),
- iDataChannelV2(),
- iDataChannelV2Pckg(iDataChannelV2),
- iFilterV2(),
- iFilterV2Pckg(iFilterV2)
- {
- SPUDTEL_FNLOG("CEtelDriverContext::CEtelDriverContext");
- CActiveScheduler::Add(this);
- }
-
-
-
-CEtelDriverContext::~CEtelDriverContext()
- {
- SPUDTEL_FNLOG("CEtelDriverContext::~CEtelDriverContext()");
- Cancel(); // N.B. This cancels all outstanding operations on the context, including deletion!
-
- // Guarantees proper release of all handles.
- // If everything is closed already, this does no harm.
- iPacketQoS.Close(); // Close QoS first, a buggy TSY may not handle it the other way.
- iPacketContext.Close(); // At this point the reference count on the context is zero.
- // TSY should cleanly dispose of the context, if it had not done so already.
-
- // This is necessary only in a situtation where Spudman is destroyed while a strategy
- // on a context is outstanding: in this case deletion of SpudTel results in cancellation
- // of all outstanding operations, which is likely to result in handle leak.
- // Under other circumstances, the handles will be closed via an appropriate strategy.
- }
-
-/** initiates a new request
-
-@param aOperation - type of an etel driver request
-
-@return KErrInUse if pdp context has active strategy
-*/
-TInt CEtelDriverContext::Input (TEtelInput aOperation)
- {
- SPUDTEL_FNLOG("CEtelDriverContext::Input()");
- SPUDTELVERBOSE_INFO_LOG1( _L("Operation %d"), aOperation );
-
- if (MEtelDriverStrategy::EFinishStep != iStrategyStep)
- {
- SPUDTEL_ERROR_LOG(_L("ERROR: Pdp context is in use, return %d"), KErrInUse);
- // I'm still doing something
- ASSERT(EFalse); // shouldn't happen
- return KErrInUse;
- }
-
- iStrategyId = iFactory.StrategyId(aOperation);
- iStrategyStep = MEtelDriverStrategy::EStartStep;
- iCompletionStatus = KErrNone;
-
- SetActive();
- Strategy(iStrategyId).Next(*this, &iStatus);
-
- return KErrNone;
- }
-
-
-void CEtelDriverContext::RunL()
- {
- SPUDTEL_FNLOG("CEtelDriverContext::RunL()");
- ASSERT(iStrategyId < ESentinelStrategy);
-
- if(iStatus != KErrNone)
- {
- if(iCompletionStatus == KErrNone)
- {
- iCompletionStatus = iStatus;
- SPUDTEL_ERROR_LOG(_L("Last async request completed with error %d"), iStatus.Int());
- }
- // Don't continue with the strategy for all cases except Delete
- // N.B.: deletion of a context has to be done till the very last step
- // to ensure proper cleanup of resources.
- if(EContextDeleteStrategy != iStrategyId)
- {
- iStrategyStep = MEtelDriverStrategy::EFinishStep;
- }
- SPUDTELVERBOSE_INFO_LOG(_L("Strategy is completed"));
- }
-
- if(MEtelDriverStrategy::EFinishStep == iStrategyStep)
- {
- // we are done
- SPUDTELVERBOSE_INFO_LOG(_L("Strategy is completed"));
- Strategy(iStrategyId).NotifyFsm (*this, iCompletionStatus);
- }
- else
- {
- // continue with next step
- SetActive();
- Strategy(iStrategyId).Next(*this, &iStatus);
- }
- }
-
-/** cancels last async request */
-void CEtelDriverContext::DoCancel()
- {
- SPUDTEL_FNLOG("CEtelDriverContext::DoCancel()");
-
- if(IsActive())
- {
- // delegate to strategy
- Strategy(iStrategyId).CancelAsyncRequest(*this);
- }
- iStrategyStep = MEtelDriverStrategy::EFinishStep;
- SPUDTELVERBOSE_INFO_LOG(_L("Strategy is cancelled"));
- }
-
-/** accessor */
-const TName& CEtelDriverContext::ExistingContextName() const
- {
- SPUDTEL_FNLOG("CEtelDriverContext::ExistingContextName()");
- for (TContextId i = 0; i < static_cast<TContextId>(iFactory.ContextCount()); i++)
- {
-
- if (iFactory.HasContext(i) && iFactory.Context(i).Name().Size())
- {
- return iFactory.Context(i).Name();
- }
- }
-
- // Unacceptable situation: we didn't create a single context yet
- SPUDTEL_ERROR_LOG(_L("CEtelDriverContext::ExistingContextName - can't find existing context. return %S"), &iFactory.Context(0).Name());
- ASSERT(EFalse);
- return iFactory.Context(0).Name();
- }
-
-/** accessor
-
-@return reference to etel RPhone
-*/
-RPhone& CEtelDriverContext::Phone() const
- {
- return iFactory.Phone();
- }
-
-/** accessor
-
-@return reference to etel RPacketService
-*/
-RPacketService& CEtelDriverContext::PacketService() const
- {
- return iFactory.PacketService();
- }
-
-/** accessor
-
-@return reference to etel driver strategy
-*/
-MEtelDriverStrategy& CEtelDriverContext::Strategy(TEtelDriverStrategy aId) const
- {
- return iFactory.Strategy(aId);
- }
-
-/** accessor
-
-@return reference to pdp fsm interface
-*/
-CPdpFsmInterface& CEtelDriverContext::PdpFsmInterface() const
- {
- return iFactory.PdpFsmInterface();
- }
-
-/** start pdp notifications */
-void CEtelDriverContext::StartNotifications() const
- {
- iFactory.StartPdpNotifications(iId);
- }
-
-/** stops pdp notifications */
-void CEtelDriverContext::StopNotifications() const
- {
- iFactory.CancelPdpNotifications(iId);
- }
-
-void CEtelDriverContext::PdpStatusChangeNotifierCancel()
- {
- iFactory.PdpStatusChangeNotifierCancel(iId);
- }
-
-void CEtelDriverContext::QoSChangeNotifierCancel()
- {
- iFactory.QoSChangeNotifierCancel(iId);
- }
-
-void CEtelDriverContext::PdpConfigChangeNotifierCancel()
- {
- iFactory.PdpConfigChangeNotifierCancel(iId);
- }
-
-#ifdef _DEBUG
-void CEtelDriverContext::DumpReqProfileParameters ()
- {
- SPUDTEL_INFO_LOG1( _L("Requested Profile Parameters Dump - Context Id = %d"), Id());
- SPUDTEL_INFO_LOG( _L("==========================================================="));
- SPUDTEL_INFO_LOG1( _L("ExtensionId = %d"), iQosRequested.ExtensionId());
-
- if (iQosRequested.ExtensionId() != TPacketDataConfigBase::KConfigRel99Rel4
- && iQosRequested.ExtensionId() != TPacketDataConfigBase::KConfigRel5)
- {
- SPUDTEL_INFO_LOG( _L("Invalid/Unsupported ExtensionId"));
- return;
- }
-
- if (iQosRequested.ExtensionId() == TPacketDataConfigBase::KConfigRel99Rel4
- || iQosRequested.ExtensionId() == TPacketDataConfigBase::KConfigRel5)
- {
- SPUDTEL_INFO_LOG1( _L("[1]iReqTrafficClass = %d"), iQosRequested.RequestedQoSR99_R4().iReqTrafficClass);
- SPUDTEL_INFO_LOG1( _L("[2]iMinTrafficClass = %d"), iQosRequested.RequestedQoSR99_R4().iMinTrafficClass);
- SPUDTEL_INFO_LOG1( _L("[3]iReqDeliveryOrderReqd = %d"), iQosRequested.RequestedQoSR99_R4().iReqDeliveryOrderReqd);
- SPUDTEL_INFO_LOG1( _L("[4]iMinDeliveryOrderReqd = %d"), iQosRequested.RequestedQoSR99_R4().iMinDeliveryOrderReqd);
- SPUDTEL_INFO_LOG1( _L("[5]iReqDeliverErroneousSDU = %d"), iQosRequested.RequestedQoSR99_R4().iReqDeliverErroneousSDU);
- SPUDTEL_INFO_LOG1( _L("[6]iMinDeliverErroneousSDU = %d"), iQosRequested.RequestedQoSR99_R4().iMinDeliverErroneousSDU);
- SPUDTEL_INFO_LOG1( _L("[7]iReqMaxSDUSize = %d"), iQosRequested.RequestedQoSR99_R4().iReqMaxSDUSize);
- SPUDTEL_INFO_LOG1( _L("[8]iMinAcceptableMaxSDUSize = %d"), iQosRequested.RequestedQoSR99_R4().iMinAcceptableMaxSDUSize);
- SPUDTEL_INFO_LOG1( _L("[9]iReqMaxRate.iUplinkRate = %d"), iQosRequested.RequestedQoSR99_R4().iReqMaxRate.iUplinkRate);
- SPUDTEL_INFO_LOG1( _L("[10]iReqMaxRate.iDownlinkRate = %d"), iQosRequested.RequestedQoSR99_R4().iReqMaxRate.iDownlinkRate);
- SPUDTEL_INFO_LOG1( _L("[11]iMinAcceptableMaxRate.iUplinkRate = %d"), iQosRequested.RequestedQoSR99_R4().iMinAcceptableMaxRate.iUplinkRate);
- SPUDTEL_INFO_LOG1( _L("[12]iMinAcceptableMaxRate.iDownlinkRate = %d"), iQosRequested.RequestedQoSR99_R4().iMinAcceptableMaxRate.iDownlinkRate);
- SPUDTEL_INFO_LOG1( _L("[13]iReqBER = %d"), iQosRequested.RequestedQoSR99_R4().iReqBER);
- SPUDTEL_INFO_LOG1( _L("[14]iMaxBER = %d"), iQosRequested.RequestedQoSR99_R4().iMaxBER);
- SPUDTEL_INFO_LOG1( _L("[15]iReqSDUErrorRatio = %d"), iQosRequested.RequestedQoSR99_R4().iReqSDUErrorRatio);
- SPUDTEL_INFO_LOG1( _L("[16]iMaxSDUErrorRatio = %d"), iQosRequested.RequestedQoSR99_R4().iMaxSDUErrorRatio);
- SPUDTEL_INFO_LOG1( _L("[17]iReqTrafficHandlingPriority = %d"), iQosRequested.RequestedQoSR99_R4().iReqTrafficHandlingPriority);
- SPUDTEL_INFO_LOG1( _L("[18]iReqTrafficHandlingPriority = %d"), iQosRequested.RequestedQoSR99_R4().iMinTrafficHandlingPriority);
- SPUDTEL_INFO_LOG1( _L("[19]iReqTransferDelay = %d"), iQosRequested.RequestedQoSR99_R4().iReqTransferDelay);
- SPUDTEL_INFO_LOG1( _L("[20]iMaxTransferDelay = %d"), iQosRequested.RequestedQoSR99_R4().iMaxTransferDelay);
- SPUDTEL_INFO_LOG1( _L("[21]iReqGuaranteedRate.iUplinkRate = %d"), iQosRequested.RequestedQoSR99_R4().iReqGuaranteedRate.iUplinkRate);
- SPUDTEL_INFO_LOG1( _L("[22]iReqGuaranteedRate.iDownlinkRate = %d"), iQosRequested.RequestedQoSR99_R4().iReqGuaranteedRate.iDownlinkRate);
- SPUDTEL_INFO_LOG1( _L("[23]iMinGuaranteedRate.iUplinkRate = %d"), iQosRequested.RequestedQoSR99_R4().iMinGuaranteedRate.iUplinkRate);
- SPUDTEL_INFO_LOG1( _L("[24]iMinGuaranteedRate.iDownlinkRate = %d"), iQosRequested.RequestedQoSR99_R4().iMinGuaranteedRate.iDownlinkRate);
- }
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- if (iQosRequested.ExtensionId() == TPacketDataConfigBase::KConfigRel5)
- {
- SPUDTEL_INFO_LOG1( _L("[25]iSignallingIndication = %d"), iQosRequested.RequestedQoSR5().iSignallingIndication);
- SPUDTEL_INFO_LOG1( _L("[26]iSourceStatisticsDescriptor = %d"), iQosRequested.RequestedQoSR5().iSourceStatisticsDescriptor);
- }
-#endif
- }
-
-
-
-void CEtelDriverContext::DumpNegProfileParameters ()
- {
- SPUDTEL_INFO_LOG1( _L("Negotiated Profile Parameters Dump - Context Id = %d"), Id());
- SPUDTEL_INFO_LOG( _L("==========================================================="));
- SPUDTEL_INFO_LOG1( _L("ExtensionId = %d"), iQosNegotiated.ExtensionId());
-
- if (iQosNegotiated.ExtensionId() != TPacketDataConfigBase::KConfigRel99Rel4
- && iQosNegotiated.ExtensionId() != TPacketDataConfigBase::KConfigRel5)
- {
- SPUDTEL_INFO_LOG( _L("Invalid/Unsupported ExtensionId"));
- return;
- }
-
- if (iQosNegotiated.ExtensionId() == TPacketDataConfigBase::KConfigRel99Rel4
- || iQosNegotiated.ExtensionId() == TPacketDataConfigBase::KConfigRel5)
- {
- SPUDTEL_INFO_LOG1( _L("[2]iTrafficClass = %d"), iQosNegotiated.NegotiatedQoSR99_R4().iTrafficClass);
- SPUDTEL_INFO_LOG1( _L("[3]iDeliveryOrderReqd = %d"), iQosNegotiated.NegotiatedQoSR99_R4().iDeliveryOrderReqd);
- SPUDTEL_INFO_LOG1( _L("[4]iDeliverErroneousSDU = %d"), iQosNegotiated.NegotiatedQoSR99_R4().iDeliverErroneousSDU);
- SPUDTEL_INFO_LOG1( _L("[5]iMaxSDUSize = %d"), iQosNegotiated.NegotiatedQoSR99_R4().iMaxSDUSize);
- SPUDTEL_INFO_LOG1( _L("[6]iBER = %d"), iQosNegotiated.NegotiatedQoSR99_R4().iBER);
- SPUDTEL_INFO_LOG1( _L("[7]iSDUErrorRatio = %d"), iQosNegotiated.NegotiatedQoSR99_R4().iSDUErrorRatio);
- SPUDTEL_INFO_LOG1( _L("[8]iTrafficHandlingPriority = %d"), iQosNegotiated.NegotiatedQoSR99_R4().iTrafficHandlingPriority);
- SPUDTEL_INFO_LOG1( _L("[9]iTransferDelay = %d"), iQosNegotiated.NegotiatedQoSR99_R4().iTransferDelay);
- SPUDTEL_INFO_LOG1( _L("[10]iGuaranteedRate.iUplinkRate = %d"), iQosNegotiated.NegotiatedQoSR99_R4().iGuaranteedRate.iUplinkRate);
- SPUDTEL_INFO_LOG1( _L("[11]iGuaranteedRate.iDownlinkRate = %d"), iQosNegotiated.NegotiatedQoSR99_R4().iGuaranteedRate.iDownlinkRate);
- SPUDTEL_INFO_LOG1( _L("[12]iMaxRate.iUplinkRate = %d"), iQosNegotiated.NegotiatedQoSR99_R4().iMaxRate.iUplinkRate);
- SPUDTEL_INFO_LOG1( _L("[13]iMaxRate.iDownlinkRate = %d"), iQosNegotiated.NegotiatedQoSR99_R4().iMaxRate.iDownlinkRate);
- }
-
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- if (iQosNegotiated.ExtensionId() == TPacketDataConfigBase::KConfigRel5)
- {
- SPUDTEL_INFO_LOG1( _L("[14]iSignallingIndication = %d"), iQosNegotiated.NegotiatedQoSR5().iSignallingIndication);
- SPUDTEL_INFO_LOG1( _L("[15]iSourceStatisticsDescriptor = %d"), iQosNegotiated.NegotiatedQoSR5().iSourceStatisticsDescriptor);
- }
-#endif
- }
-
-#endif
-// _DEBUG
--- a/telephonyprotocols/umtsgprsscpr/spudtel/src/ceteldriverfactory.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,277 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// etel driver factory
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include <e32base.h>
-#include <etelmm.h>
-
-#include "cspudcontextelem.h"
-#include "ceteldriverfactory.h"
-#include "spudteldebuglogger.h"
-
-using namespace EtelDriver;
-
-/**
-@param aPdpFsmInterface - pdp fsm interface
-*/
-CEtelDriverFactory::CEtelDriverFactory (CPdpFsmInterface& aPdpFsmInterface)
-: iPdpFsmInterface(aPdpFsmInterface),
- iServiceChangeNotifier(iPacketService, iPdpFsmInterface)
- {
- SPUDTELVERBOSE_INFO_LOG(_L("CEtelDriverFactory::CEtelDriverFactory()"));
- }
-
-/**
-@param aPdpFsmInterface - pdp fsm interface
-*/
-CEtelDriverFactory* CEtelDriverFactory::NewL (CPdpFsmInterface& aPdpFsmInterface)
- {
- SPUDTEL_INFO_LOG(_L("CEtelDriverFactory::NewL()"));
-
- return new (ELeave) CEtelDriverFactory (aPdpFsmInterface);
- }
-
-CEtelDriverFactory::~CEtelDriverFactory()
- {
- SPUDTEL_FNLOG("CEtelDriverFactory::~CEtelDriverFactory()");
- SPUDTEL_INFO_LOG(_L("CEtelDriverFactory::~CEtelDriverFactory()"));
-
- // cancel all notificators
- iServiceChangeNotifier.Cancel();
-
- // cleanup array of CEtelDriverContext objs
- for (TInt i = 0; i < iContexts.Count(); i++ )
- {
- delete iContexts[i];
- }
- iContexts.Reset();
-
- // common data cleanup...
- // sync operations only
- iPacketService.Close();
- iPhone.Close();
-
- iTelServer.UnloadPhoneModule(iPdpFsmInterface.TsyName());
-
- iTelServer.Close(); // Phone module unloaded automatically
-
- iStrategies.Reset();
- }
-
-/**
-Function obtains the info on the phone object implemented in the TSY
-
-Assumes aloadedTsyName has no ".TSY" appendage
-Finds the phone information for the TSY just loaded.
-Assumes just one phone in that TSY - or that every phone in it is equally useful.
-
-@param aTelServer - tel server
-@param aLoadedTsyName - name of the loaded Tsy.
-@param aInfo - information about the phone.
-*/
-static void GetPhoneInfoL(RTelServer& aTelServer, const TDesC& aLoadedTsyName, RTelServer::TPhoneInfo& aInfo)
- {
- // dev. note: leavescan reports an error in this method.
- // But there is no visible ground for it.
- SPUDTEL_FNLOG("GetPhoneInfoL()");
- TInt count;
- User::LeaveIfError(aTelServer.EnumeratePhones(count));
- if (count<=0)
- {
- User::Leave(KErrNotFound);
- }
-
- TBool found = EFalse;
- for (TInt i=0; i < count; i++)
- {
- TBuf<KCommsDbSvrMaxFieldLength> currentTsyName;
- User::LeaveIfError(aTelServer.GetTsyName(i,currentTsyName));
-
- TInt r=currentTsyName.Locate('.');
- if (r!=KErrNotFound)
- {
- currentTsyName.SetLength(r);
- }
- if (currentTsyName.CompareF(aLoadedTsyName)==KErrNone)
- {
- User::LeaveIfError(aTelServer.GetPhoneInfo(i,aInfo));
- found = ETrue;
- break;
- }
- }
-
- if (!found)
- {
- User::Leave(KErrNotFound);
- }
-
- }
-
-/** initializes factory objects */
-void CEtelDriverFactory::InitL()
- {
- SPUDTEL_FNLOG("CEtelDriverFactory::InitL()");
- SPUDTEL_INFO_LOG(_L("Initializing Etel driver"));
-
- iStrategies[EOpenPhoneStrategy] = &iOpenStrategy;
- iStrategies[ESetQoSStrategy] = &iSetQoSStrategy;
- iStrategies[ESetTftStrategy] = &iSetTftStrategy;
- iStrategies[EChangeTftStrategy] = &iChangeTftStrategy;
-
- iStrategies[ECreate1ryPdpContextStrategy] = &iCreate1ryPdpContextStrategy;
- iStrategies[ECreate2ryPdpContextStrategy] = &iCreate2ryPdpContextStrategy;
- iStrategies[EActivatePdpStrategy] = &iActivatePdpStrategy;
- iStrategies[EGetNegQoSStrategy] = &iGetNegQoSStrategy;
- iStrategies[EModifyActiveStrategy] = &iModifyActivePdpStrategy;
- iStrategies[EContextDeleteStrategy] = &iContextDeleteStrategy;
-
- // initialization of operator to strategy id map
- iInputToStrategyMap[EOpenPhone] = EOpenPhoneStrategy;
- iInputToStrategyMap[ESetQoS] = ESetQoSStrategy;
- iInputToStrategyMap[ECreate1ryPdpContext] = ECreate1ryPdpContextStrategy;
- iInputToStrategyMap[ECreate2ryPdpContext] = ECreate2ryPdpContextStrategy;
- iInputToStrategyMap[ESetTft] = ESetTftStrategy;
- iInputToStrategyMap[EChangeTft] = EChangeTftStrategy;
- iInputToStrategyMap[EActivatePdp] = EActivatePdpStrategy;
- iInputToStrategyMap[ENegQoSGet] = EGetNegQoSStrategy;
- iInputToStrategyMap[EModifyActive] = EModifyActiveStrategy;
- iInputToStrategyMap[EContextDelete] = EContextDeleteStrategy;
-
-
- User::LeaveIfError (iTelServer.Connect());
- User::LeaveIfError(iTelServer.LoadPhoneModule(iPdpFsmInterface.TsyName()));
-
- User::LeaveIfError(iTelServer.SetExtendedErrorGranularity(RTelServer::EErrorExtended));
-
- RTelServer::TPhoneInfo phoneInfo;
- GetPhoneInfoL(iTelServer, iPdpFsmInterface.TsyName(), phoneInfo);
- User::LeaveIfError (iPhone.Open (iTelServer, phoneInfo.iName) );
- User::LeaveIfError (iPacketService.Open (iPhone) );
-
- // remaining async calls to phone are postponed to later async Input request
-
- iServiceChangeNotifier.Start();
- }
-
-/** creates pdp by id
- dev. note: pdp context will NOT be opened during this call.
-
-@param aPdpId - id of a pdp context
-*/
-void CEtelDriverFactory::CreatePdpL (TContextId aPdpId)
- {
- SPUDTEL_FNLOG("CEtelDriverFactory::CreatePdpL()");
- SPUDTELVERBOSE_INFO_LOG1(_L("pdp id : %d"), aPdpId);
- __ASSERT_ALWAYS((NULL == iContexts[aPdpId]), User::Panic(KTxtSpudTel, KErrArgument));
-
- iContexts[aPdpId] = CSpudContextElem::NewL(aPdpId, *this, iPdpFsmInterface);
- }
-
-
-/** frees pdp context by id
-
-@param aPdpId - id of a pdp context
-*/
-void CEtelDriverFactory::FreePdp(TContextId aPdpId)
- {
- SPUDTELVERBOSE_INFO_LOG1(_L("Free pdp id : %d"), aPdpId);
- // the context has to be closed before a call to FreePdp
- __ASSERT_ALWAYS(!Context(aPdpId).PacketContext().SubSessionHandle(), User::Panic(KTxtSpudTel, KErrInUse));
-
- delete iContexts[aPdpId];
- iContexts[aPdpId] = NULL;
- }
-
-
-/** starts etel notifications for pdp context
-
-@param aPdpId - id of a pdp context
-*/
-void CEtelDriverFactory::StartPdpNotifications (TContextId aPdpId)
- {
- SPUDTELVERBOSE_INFO_LOG1(_L("StartPdpNotifications for pdp id : %d"), aPdpId);
- // sanity check
- ASSERT(iContexts[aPdpId]);
-
- iContexts[aPdpId]->Start();
- }
-
-/** cancels etel notifications for aPdpId context
-
-@param aPdpId - id of a pdp context
-*/
-void CEtelDriverFactory::CancelPdpNotifications (TContextId aPdpId)
- {
- SPUDTELVERBOSE_INFO_LOG1(_L("CancelPdpNotifications for pdp id : %d"), aPdpId);
- // sanity check
- ASSERT(iContexts[aPdpId]);
-
- iContexts[aPdpId]->Cancel();
- }
-
-/** cancels notifications for all pdp contexts */
-void CEtelDriverFactory::CancelAllPdpNotifications()
- {
- SPUDTEL_INFO_LOG(_L("CancelAllPdpNotifications"));
- for(TContextId i = 0; i < static_cast<TContextId>(ContextCount()); i++)
- {
- CancelPdpNotifications (i);
- }
- }
-
-void CEtelDriverFactory::PdpStatusChangeNotifierCancel(TContextId aPdpId)
- {
- iContexts[aPdpId]->PdpStatusChangeNotifierCancel();
- }
-
-void CEtelDriverFactory::QoSChangeNotifierCancel(TContextId aPdpId)
- {
- iContexts[aPdpId]->QoSChangeNotifierCancel();
- }
-
-void CEtelDriverFactory::PdpConfigChangeNotifierCancel(TContextId aPdpId)
- {
- iContexts[aPdpId]->PdpConfigChangeNotifierCancel();
- }
-
-TBool CEtelDriverFactory::HasContext(TContextId aId) const
- {
- return (iContexts[aId] != NULL);
- }
-
-
-/** context accessor
-
-@param aPdpId - id of a pdp context
-@return etel driver context
-*/
-CEtelDriverContext& CEtelDriverFactory::Context(TContextId aId)
- {
- // sanity check
- __ASSERT_ALWAYS(iContexts[aId], User::Panic(KTxtSpudTel, KErrBadHandle));
-
- return *iContexts[aId]->iContext;
- }
-
-void CEtelDriverFactory::GetLastErrorCause(TContextId aPdpId, TInt& aLastErrorCause)
- {
- iContexts[aPdpId]->GetLastErrorCause(aLastErrorCause);
- }
--- a/telephonyprotocols/umtsgprsscpr/spudtel/src/ceteldrivernotifier.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// implementation of base spud etel driver notifier
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include <e32def.h>
-
-#include "ceteldrivernotifier.h"
-#include "PDPFSM.h"
-#include "spudteldebuglogger.h"
-
-
-/**
-@param aPdpFsmInterface - reference to pdp fsm interface
-*/
-CEtelDriverNotifier::CEtelDriverNotifier(CPdpFsmInterface& aPdpFsmInterface)
-: CActive(EPriorityStandard),
- iPdpFsmInterface(aPdpFsmInterface)
- {
- CActiveScheduler::Add(this);
- }
-
-
-void CEtelDriverNotifier::RunL()
- {
- // notify fsm in any case
- Notify(iStatus);
-
- if(iStatus == KErrNone)
- {
- // repost
- Start();
- }
- else // error
- {
- if(KErrCancel != iStatus.Int())
- {
- SPUDTEL_ERROR_LOG(_L("CEtelDriverNotifier::RunL() reported an error: %d"),
- iStatus.Int());
- }
- }
- }
-
--- a/telephonyprotocols/umtsgprsscpr/spudtel/src/cpdpconfigchangenotifier.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// PDP config change notifier
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include <e32base.h>
-#include <pcktcs.h>
-
-#include "cpdpconfigchangenotifier.h"
-#include "PDPFSM.h"
-#include "spudteldebuglogger.h"
-#include "pdpfsmnmspace.h"
-
-
-/**
-@param aId - pdp context id
-@param aPacketContext - reference to etel packet context
-@param aPdpFsmInterface - reference to pdp fsm interface
-*/
-CPdpConfigChangeNotifier::CPdpConfigChangeNotifier(TContextId aId,
- RPacketContext& aPacketContext,
- CPdpFsmInterface& aPdpFsmInterface)
-: CEtelDriverNotifier(aPdpFsmInterface),
- iId(aId),
- iPacketContext(aPacketContext),
- iConfigGPRS(),
- iConfigGPRSPckg(iConfigGPRS)
- {
- }
-
-CPdpConfigChangeNotifier::~CPdpConfigChangeNotifier()
- {
- Cancel();
- }
-
-/** initiate notification */
-void CPdpConfigChangeNotifier::Start()
- {
- if (!IsActive())
- {
- iPacketContext.NotifyConfigChanged(iStatus, iConfigGPRSPckg);
- SetActive();
- }
- }
-
-/** stops notification */
-void CPdpConfigChangeNotifier::DoCancel()
- {
- if(IsActive())
- {
- SPUDTELVERBOSE_INFO_LOG(
- _L("CPdpConfigChangeNotifier::DoCancel EPacketContextNotifyConfigChanged"));
- iPacketContext.CancelAsyncRequest(EPacketContextNotifyConfigChanged);
- }
- }
-
-/** notifies pdp fsm
-
-@param aStatus - request status
-*/
-void CPdpConfigChangeNotifier::Notify(const TRequestStatus& aStatus)
- {
- if(aStatus == KErrNone)
- {
- SPUDTELVERBOSE_INFO_LOG(_L("FSM set ConfigGPRS"));
- iPdpFsmInterface.Set(iId, iConfigGPRS);
- SPUDTELVERBOSE_INFO_LOG(_L("FSM input EConfigGPRSChangeNetwork"));
- iPdpFsmInterface.Input(iId, PdpFsm::EConfigGPRSChangeNetwork);
- }
- else
- {
- SPUDTEL_ERROR_LOG(_L("CPdpConfigChangeNotifier::Notify(), error: %d"),
- aStatus.Int());
- // Not all TSYs support RPacketContext::NotifyConfigChanged so we handle
- // KErrNotSupported silently (PDEF118981).
- ASSERT((aStatus == KErrCancel) || (aStatus == KErrNotSupported));
- }
- }
--- a/telephonyprotocols/umtsgprsscpr/spudtel/src/cpdpstatuschangenotifier.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,101 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// PDP status change notifier
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include <e32base.h>
-
-#include "cpdpstatuschangenotifier.h"
-#include "PDPFSM.h"
-#include "spudteldebuglogger.h"
-#include "pdpfsmnmspace.h"
-
-#include <pcktcs.h>
-
-
-/**
-@param aId - pdp context id
-@param aPacketContext - reference to etel packet context
-@param aPdpFsmInterface - reference to pdp fsm interface
-*/
-CPdpStatusChangeNotifier::CPdpStatusChangeNotifier(TContextId aId,
- RPacketContext& aPacketContext,
- CPdpFsmInterface& aPdpFsmInterface)
-: CEtelDriverNotifier(aPdpFsmInterface),
- iId(aId),
- iPacketContext(aPacketContext),
- iContextStatus(RPacketContext::EStatusUnknown)
- {
- }
-
-CPdpStatusChangeNotifier::~CPdpStatusChangeNotifier()
- {
- Cancel();
- }
-
-/** initiates notification */
-void CPdpStatusChangeNotifier::Start()
- {
- if (!IsActive() && (iContextStatus != RPacketContext::EStatusDeleted))
- {
- iPacketContext.NotifyStatusChange(iStatus, iContextStatus);
- SetActive();
- }
- }
-
-/** stops notification */
-void CPdpStatusChangeNotifier::DoCancel()
- {
- if(IsActive())
- {
- SPUDTELVERBOSE_INFO_LOG(
- _L("CPdpStatusChangeNotifier::DoCancel EPacketContextNotifyStatusChange"));
- iPacketContext.CancelAsyncRequest(EPacketContextNotifyStatusChange);
- }
- }
-
-/** notifies pdp fsm
-
-@param aStatus - request status
-*/
-void CPdpStatusChangeNotifier::Notify(const TRequestStatus& aStatus)
- {
- if(aStatus == KErrNone)
- {
- SPUDTELVERBOSE_INFO_LOG(_L("Notified of context status change"));
- RPacketContext::TContextStatus aOldContextStatus;
- iPdpFsmInterface.Get(iId, aOldContextStatus);
- // only notify of change if it has actually changed
- if (iContextStatus != aOldContextStatus)
- {
- SPUDTELVERBOSE_INFO_LOG(_L("FSM input EContextStatusChangeNetwork"));
- iPdpFsmInterface.Set(iId, iContextStatus);
- TInt err = KErrNone;
- iPacketContext.GetLastErrorCause(err); // Ignore error return code.
- iPdpFsmInterface.Input(iId, PdpFsm::EContextStatusChangeNetwork, err);
- }
- }
- else
- {
- SPUDTEL_ERROR_LOG(_L("CPdpStatusChangeNotifier::Notify(), error: %d"),
- aStatus.Int());
- ASSERT(aStatus == KErrCancel);
- }
- }
--- a/telephonyprotocols/umtsgprsscpr/spudtel/src/cqoschangenotifier.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// QoS change notifier implementation
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include "cqoschangenotifier.h"
-#include "spudteldebuglogger.h"
-#include <pcktcs.h>
-
-
-/** c'tor
-
-@param aId - pdp context id
-@param aPacketQoS - etel packet QoS
-@param aPdpFsmInterface - pdp fsm interface
-*/
-CQoSChangeNotifier::CQoSChangeNotifier(TContextId aId,
- RPacketQoS& aPacketQoS,
- CPdpFsmInterface& aPdpFsmInterface)
-: CEtelDriverNotifier(aPdpFsmInterface),
- iId(aId),
- iPacketQoS(aPacketQoS),
- iProfilePckg(iProfileBuffer)
-
- {
- SPUDTEL_FNLOG("CQoSChangeNotifier::CQoSChangeNotifier()");
- }
-
-CQoSChangeNotifier::~CQoSChangeNotifier()
- {
- SPUDTEL_FNLOG("CQoSChangeNotifier::~CQoSChangeNotifier()");
- Cancel();
- }
-
-/** starts notification */
-void CQoSChangeNotifier::Start()
- {
- SPUDTEL_FNLOG("CQoSChangeNotifier::Start()");
- if (!IsActive())
- {
- iPacketQoS.NotifyProfileChanged(iStatus, iProfilePckg);
- SetActive();
- SPUDTEL_FNLOG("CQoSChangeNotifier::Start(), iPacketQoS.NotifyProfileChanged()");
- }
- }
-
-/** stops notification */
-void CQoSChangeNotifier::DoCancel()
- {
- if (IsActive())
- {
- SPUDTELVERBOSE_INFO_LOG(
- _L("CQoSChangeNotifier::DoCancel EPacketQoSNotifyProfileChanged"));
- iPacketQoS.CancelAsyncRequest(EPacketQoSNotifyProfileChanged);
- }
- }
-
-/** notifies pdp fsm
-
-@param aStatus - request status
-*/
-void CQoSChangeNotifier::Notify(const TRequestStatus& aStatus)
- {
- if(aStatus == KErrNone)
- {
- SPUDTELVERBOSE_INFO_LOG(_L("FSM set QoSProfile"));
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- iPdpFsmInterface.Set(iId, iProfileBuffer.NegotiatedQoSR5());
-
-#else
-// !SYMBIAN_NETWORKING_UMTSR5
-
- iPdpFsmInterface.Set(iId, iProfileBuffer.NegotiatedQoSR99_R4());
-#endif
-// SYMBIAN_NETWORKING_UMTSR5
-
- SPUDTELVERBOSE_INFO_LOG(_L("FSM input EQoSProfileChangeNetwork"));
- iPdpFsmInterface.Input(iId, PdpFsm::EQoSProfileChangeNetwork);
- }
- else
- {
- SPUDTEL_ERROR_LOG(_L("CQoSChangeNotifier::Notify(), error: %d"), aStatus.Int());
- ASSERT(aStatus == KErrCancel);
- }
- }
-
-
-
--- a/telephonyprotocols/umtsgprsscpr/spudtel/src/cservicechangenotifier.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// implementation for service change notifier
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include <e32def.h>
-
-#include "cservicechangenotifier.h"
-#include "PDPFSM.h"
-#include "spudteldebuglogger.h"
-#include "pdpfsmnmspace.h"
-
-#include <pcktcs.h>
-
-/** c'tor
-
-@param aPacketService - reference to packet service
-@param aPdpFsmInterface - reference to pdp fsm interface
-*/
-CServiceChangeNotifier::CServiceChangeNotifier(RPacketService& aPacketService,
- CPdpFsmInterface& aPdpFsmInterface)
-: CEtelDriverNotifier(aPdpFsmInterface),
- iPacketService(aPacketService),
- iServiceStatus(RPacketService::EStatusUnattached)
- {
- }
-
-CServiceChangeNotifier::~CServiceChangeNotifier()
- {
- Cancel();
- }
-
-/** initiates notification */
-void CServiceChangeNotifier::Start()
- {
- if (!IsActive())
- {
- iPacketService.NotifyStatusChange(iStatus, iServiceStatus);
- SetActive();
- }
- }
-
-/** notifies pdp fsm
-
-@param aStatus - request status
-*/
-void CServiceChangeNotifier::Notify(const TRequestStatus& aStatus)
- {
- if(aStatus == KErrNone)
- {
- SPUDTELVERBOSE_INFO_LOG(_L("FSM set ServiceStatus"));
- iPdpFsmInterface.Set(iServiceStatus);
- SPUDTELVERBOSE_INFO_LOG(_L("FSM input EServiceStatusChangeNetwork"));
- iPdpFsmInterface.Input(KAllContexts,
- PdpFsm::EServiceStatusChangeNetwork);
- }
- else
- {
- SPUDTEL_ERROR_LOG(_L("CServiceChangeNotifier::Notify(), error: %d"),
- aStatus.Int());
- ASSERT(aStatus == KErrCancel);
- }
- }
-
-/** cancels notification */
-void CServiceChangeNotifier::DoCancel()
- {
- if(IsActive())
- {
- SPUDTELVERBOSE_INFO_LOG(
- _L("CServiceChangeNotifier::DoCancel EPacketNotifyStatusChange"));
- iPacketService.CancelAsyncRequest(EPacketNotifyStatusChange);
- }
- }
--- a/telephonyprotocols/umtsgprsscpr/spudtel/src/cspudcontextelem.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// spud context element
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include "cspudcontextelem.h"
-
-/**
-@param aId - pdp context id
-@param aFactory - reference to etel driver factory
-@param aPdpFsmInterface reference to pdp fsm interface
-@return new spud context element
-*/
-CSpudContextElem* CSpudContextElem::NewL(TContextId aId,
- CEtelDriverFactory& aFactory,
- CPdpFsmInterface& aPdpFsmInterface)
- {
- CSpudContextElem *me = new(ELeave) CSpudContextElem();
- CleanupStack::PushL(me);
- me->ConstructL(aId, aFactory, aPdpFsmInterface);
- CleanupStack::Pop(me);
- return me;
- }
-
-/**
-@param aId - pdp context id
-@param aFactory - reference to etel driver factory
-@param aPdpFsmInterface reference to pdp fsm interface
-*/
-void CSpudContextElem::ConstructL(TContextId aId,
- CEtelDriverFactory& aFactory,
- CPdpFsmInterface& aPdpFsmInterface)
- {
- iContext = new(ELeave) CEtelDriverContext(aId, aFactory);
- iPdpStatusChangeNotifier = new(ELeave) CPdpStatusChangeNotifier(aId,
- iContext->PacketContext(),
- aPdpFsmInterface);
- iQoSChangeNotifier = new(ELeave) CQoSChangeNotifier(aId,
- iContext->PacketQoS(),
- aPdpFsmInterface);
- iPdpConfigChangeNotifier = new(ELeave) CPdpConfigChangeNotifier(aId,
- iContext->PacketContext(),
- aPdpFsmInterface);
- }
-
-CSpudContextElem::~CSpudContextElem()
- {
- delete iPdpStatusChangeNotifier;
- delete iQoSChangeNotifier;
- delete iPdpConfigChangeNotifier;
- delete iContext;
- }
-
-/** starts all notifiers */
-void CSpudContextElem::Start()
- {
- iPdpStatusChangeNotifier->Start();
- iQoSChangeNotifier->Start();
- iPdpConfigChangeNotifier->Start();
- }
-
-/** cancels all notifiers */
-void CSpudContextElem::Cancel()
- {
- iPdpStatusChangeNotifier->Cancel();
- iQoSChangeNotifier->Cancel();
- iPdpConfigChangeNotifier->Cancel();
- }
-
-/** Get LastErrorCause
-
-@param aLastErrorCause - LastErrorCause to get
-*/
-void CSpudContextElem::GetLastErrorCause(TInt& aLastErrorCause)
- {
- RPacketContext &aPacketContext = iContext->PacketContext();
- aPacketContext.GetLastErrorCause(aLastErrorCause);
- }
-
-void CSpudContextElem::PdpStatusChangeNotifierCancel()
- {
- iPdpStatusChangeNotifier->Cancel();
- }
-
-void CSpudContextElem::QoSChangeNotifierCancel()
- {
- iQoSChangeNotifier->Cancel();
- }
-void CSpudContextElem::PdpConfigChangeNotifierCancel()
- {
- iPdpConfigChangeNotifier->Cancel();
- }
--- a/telephonyprotocols/umtsgprsscpr/spudtel/src/eteldriverstrategies.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1364 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// A collection of etel driver strategies
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include <e32def.h>
-
-#include "ceteldrivercontext.h"
-#include "eteldriverstrategies.h"
-#include "spudteldebuglogger.h"
-#include "pdpfsmnmspace.h"
-
-#include <pcktcs.h>
-
-
-//
-// TOpenStrategy
-//
-/** Executes next asynchronous step in a strategy.
-
-@param aContext - pdp context
-@param aStatus - request status of this step
-*/
-void TOpenStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
- {
- SPUDTEL_FNLOG("TOpenStrategy::Next()");
-
- TInt err = KErrNone;
-
- switch(aContext.StrategyStep())
- {
- case EStartStep:
- {
- aContext.Phone().Initialise (*aStatus);
- aContext.SetStrategyStep(EInitPhoneStep);
- break;
- }
-
- case EInitPhoneStep:
- {
- aContext.SetStrategyStep(EFinishStep);
- break;
- }
-
- default:
- // incorrect step
- SPUDTEL_ERROR_LOG0(_L("Incorrect step"));
- ASSERT(EFalse);
- err = KErrNotSupported;
- break;
-
- } // switch
-
- if(err || (EFinishStep == aContext.StrategyStep()))
- {
- User::RequestComplete( aStatus, err);
- }
- }
-
-
-/**
-Notifies SPUD FSM about execution results.
-
-@param aContext - pdp context
-@param aCompletionStatus - completion request status
-*/
-void TOpenStrategy::NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus)
- {
- if(aCompletionStatus == KErrNone)
- {
- SPUDTEL_INFO_LOG(_L("Notifying FSM: EPhoneOpened"));
- aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EPhoneOpened);
- }
- else
- {
- SPUDTEL_INFO_LOG(_L("Notifying FSM: EPhoneOpenedFailed"));
- aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EPhoneOpenedFailed, aCompletionStatus.Int());
- }
- }
-
-/** Cancels last asynchronous request to eTel
-
-@param aContext - pdp context
-*/
-void TOpenStrategy::CancelAsyncRequest(CEtelDriverContext& aContext)
- {
- switch(aContext.StrategyStep())
- {
- case EInitPhoneStep:
- {
- SPUDTEL_INFO_LOG(_L("Cancel Phone::InitialiseCancel"));
- aContext.Phone().InitialiseCancel();
- break;
- }
-
- default:
- // there're NO outstanding async requests
- SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case in TOpenStrategy::CancelAsyncRequest"));
- ASSERT(EFalse);
- break;
- }
- }
-
-
-//
-// TContextDeleteStrategy
-//
-/** Executes next asynchronous step in a strategy.
-
-@param aContext - pdp context
-@param aStatus - request status of this step
-*/
-void TContextDeleteStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
- {
- SPUDTEL_FNLOG("TContextDeleteStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)");
-
- TInt err = KErrNone;
-
- // steps:
- // -- cancel notifications
- // -- deactivate context
- // -- close QoS
- // -- close context
- // -- delete context
- switch(aContext.StrategyStep())
- {
- case EStartStep:
- {
- // cancel associated notifications
- // -- StatusChangeNotifier
- // -- QoSChangeNotifier
- // -- ConfigChangeNotifier
-
- if (aContext.PacketContext().SubSessionHandle())
- {
- aContext.PacketContext().Deactivate(*aStatus);
- aContext.SetStrategyStep (EDeactivateStep);
- }
- else
- {
- aContext.SetStrategyStep(EDeactivateStep);
- User::RequestComplete(aStatus, err);
- }
- break;
- }
-
- case EDeactivateStep:
- {
- if (aContext.PacketQoS().SubSessionHandle())
- {
- aContext.QoSChangeNotifierCancel();
- aContext.PacketQoS().Close();
- }
-
- if (aContext.PacketContext().SubSessionHandle())
- {
- aContext.PdpConfigChangeNotifierCancel();
- aContext.PdpStatusChangeNotifierCancel();
- aContext.PacketContext().Delete(*aStatus);
- aContext.SetStrategyStep(EDeleteContextStep);
- }
- else
- {
- // jump to next step
- aContext.SetStrategyStep(EDeleteContextStep);
- User::RequestComplete( aStatus, err);
- }
- break;
- }
-
-
- case EDeleteContextStep:
- {
- aContext.PacketContext().Close();
- // clear the name
- aContext.Name().Zero();
- aContext.SetStrategyStep (EFinishStep);
- break;
- }
-
- default:
- // incorrect step
- SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case"));
- ASSERT(EFalse);
- err = KErrNotSupported;
- break;
-
- } // switch
-
- if(err || (EFinishStep == aContext.StrategyStep()))
- {
- User::RequestComplete( aStatus, err);
- }
-
- }
-
-
-/**
-Notifies SPUD FSM about execution results.
-
-@param aContext - pdp context
-@param aCompletionStatus - completion request status
-*/
-void TContextDeleteStrategy::NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus)
- {
- aContext.PdpFsmInterface().Set(aContext.Id(), RPacketContext::EStatusDeleted);
-
- if(aCompletionStatus == KErrNone)
- {
- SPUDTEL_INFO_LOG(_L("Notifying FSM: EContextDeleted"));
- aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EContextDeleted);
- }
- else
- {
- SPUDTEL_INFO_LOG(_L("Notifying FSM: EContextDeletedFailed"));
- aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EContextDeletedFailed, aCompletionStatus.Int());
- }
- }
-
-/** Cancels last asynchronous request to eTel
-
-@param aContext - pdp context
-*/
-void TContextDeleteStrategy::CancelAsyncRequest(CEtelDriverContext& aContext)
- {
- SPUDTEL_FNLOG("TContextDeleteStrategy::CancelAsyncRequest()");
-
- // When there is no sub-session, the strategy will not call DeactivateContext, but will be in the EDeactivateStep state
- // In this case we don't want to cancel the deactivate request
- if (aContext.iStatus != KRequestPending)
- {
- return;
- }
-
- switch(aContext.StrategyStep())
- {
- case EDeactivateStep:
- {
- SPUDTEL_INFO_LOG(_L("Cancel PacketContext::EPacketContextDeactivate"));
- aContext.PacketContext().CancelAsyncRequest(EPacketContextDeactivate);
- break;
- }
-
- case EDeleteContextStep:
- {
- SPUDTEL_INFO_LOG(_L("Cancel PacketContext::EPacketContextDelete"));
- aContext.PacketContext().CancelAsyncRequest(EPacketContextDelete);
- break;
- }
-
- default:
- // there're NO outstanding async requests
- SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case"));
- ASSERT(EFalse);
- break;
- }
- }
-
-
-//
-// TCreate1ryPdpContextStrategy
-//
-/** Executes next asynchronous step in a strategy.
-
-@param aContext - pdp context
-@param aStatus - request status of this step
-*/
-void TCreate1ryPdpContextStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
- {
- SPUDTEL_FNLOG("TCreate1ryPdpContextStrategy::Next()");
-
- TInt err = KErrNone;
-
- // possible steps:
- // -- open new context
- // -- open new QoS
- // -- initialise context
- switch(aContext.StrategyStep())
- {
- case EStartStep:
- {
- err = aContext.PacketContext().OpenNewContext (aContext.PacketService(), aContext.Name());
- if (err)
- {
- SPUDTEL_ERROR_LOG(_L("PacketContextOpenNewContext returned %d"), err);
- break;
- }
-
- // get packet config from fsm
- aContext.PdpFsmInterface().Get (aContext.Id(), aContext.ContextConfigGPRS());
- // async set config
- aContext.PacketContext().SetConfig (*aStatus, aContext.ContextConfigGPRSPckg());
- // set next step
- aContext.SetStrategyStep (ESetConfigStep);
- break;
- }
-
- case ESetConfigStep:
- {
- // QoS name is not used anywhere
- TName newName;
- err = aContext.PacketQoS().OpenNewQoS (aContext.PacketContext(), newName);
- if (err)
- {
- SPUDTEL_ERROR_LOG(_L("PacketQoS OpenNewQoS returned %d"), err);
- break;
- }
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- RPacketQoS::TQoSR5Requested r5;
- aContext.PdpFsmInterface().Get (aContext.Id(), r5);
- aContext.QosRequested() = r5;
-#else
- RPacketQoS::TQoSR99_R4Requested r4;
- aContext.PdpFsmInterface().Get (aContext.Id(), r4);
- aContext.QosRequested() = r4;
-#endif
-// SYMBIAN_NETWORKING_UMTSR5
-
-
-#ifdef _DEBUG
- aContext.DumpReqProfileParameters ();
-#endif
- aContext.PacketQoS().SetProfileParameters (*aStatus, aContext.QosRequestedPckg());
- aContext.SetStrategyStep (ESetProfileParamsStep);
- break;
- }
-
- case ESetProfileParamsStep:
- {
- aContext.SetStrategyStep (EFinishStep);
- break;
- }
-
- default:
- SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case"));
- ASSERT(EFalse);
- err = KErrNotSupported;
- break;
- }
-
- if(err || (EFinishStep == aContext.StrategyStep()))
- {
- User::RequestComplete( aStatus, err);
- }
-
- }
-
-
-/**
-Notifies SPUD FSM about execution results.
-
-@param aContext - pdp context
-@param aCompletionStatus - completion request status
-*/
-void TCreate1ryPdpContextStrategy::NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus)
-{
- if(aCompletionStatus == KErrNone)
- {
- // start notifications in case of normal creation of a context
- // -- StatusChangeNotifier
- // -- QoSChangeNotifier
- // -- ConfigChangeNotifier
- aContext.StartNotifications();
-
- SPUDTEL_INFO_LOG(_L("Notifying FSM: E1ryPdpContextCreated"));
- aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::E1ryPdpContextCreated);
- }
- else
- {
- SPUDTEL_INFO_LOG(_L("Notifying FSM: E1ryPdpContextCreatedFailed"));
- aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::E1ryPdpContextCreatedFailed, aCompletionStatus.Int());
- }
-}
-
-/** Cancels last asynchronous request to eTel
-
-@param aContext - pdp context
-*/
-void TCreate1ryPdpContextStrategy::CancelAsyncRequest(CEtelDriverContext& aContext)
- {
- SPUDTEL_FNLOG("TCreate1ryPdpContextStrategy::CancelAsyncRequest()");
-
- switch(aContext.StrategyStep())
- {
- case ESetConfigStep:
- {
- SPUDTEL_INFO_LOG(_L("Cancel PacketContext::EPacketContextSetConfig"));
- aContext.PacketContext().CancelAsyncRequest(EPacketContextSetConfig);
- break;
- }
-
- case ESetProfileParamsStep:
- {
- SPUDTEL_INFO_LOG(_L("Cancel PacketContext::EPacketQoSSetProfileParams"));
- aContext.PacketQoS().CancelAsyncRequest(EPacketQoSSetProfileParams);
- break;
- }
-
- default:
- // there're NO outstanding async requests
- SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case"));
- ASSERT(EFalse);
- break;
- }
- }
-
-
-//
-// TCreate2ryPdpContextStrategy
-//
-/** Executes next asynchronous step in a strategy.
-
-@param aContext - pdp context
-@param aStatus - request status of this step
-*/
-void TCreate2ryPdpContextStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
- {
- SPUDTEL_FNLOG("TCreate2ryPdpContextStrategy::Next()");
-
- TInt err = KErrNone;
-
- // possible steps:
- // -- open new secondary context
- // -- open new QoS
- // -- initialise context
- switch(aContext.StrategyStep())
- {
- case EStartStep:
- {
- const TName& existingContextName = aContext.ExistingContextName();
- aContext.PacketContext().OpenNewSecondaryContext(aContext.PacketService(), existingContextName, aContext.Name());
-
- // QoS name is not used anywhere
- TName newName;
- err = aContext.PacketQoS().OpenNewQoS (aContext.PacketContext(), newName);
- if (err)
- {
- SPUDTEL_ERROR_LOG(_L("PacketQoS OpenNewQoS returned %d"), err);
- break;
- }
-
- aContext.SetStrategyStep (EFinishStep);
- break;
- }
-
- default:
- SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case"));
- ASSERT(EFalse);
- err = KErrNotSupported;
- break;
- }
-
- if(err || (EFinishStep == aContext.StrategyStep()))
- {
- User::RequestComplete( aStatus, err);
- }
-
- }
-
-
-/**
-Notifies SPUD FSM about execution results.
-
-@param aContext - pdp context
-@param aCompletionStatus - completion request status
-*/
-void TCreate2ryPdpContextStrategy::NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus )
-{
- if(aCompletionStatus == KErrNone)
- {
- // start notifications in case of normal creation of a context
- // -- StatusChangeNotifier
- // -- QoSChangeNotifier
- // -- ConfigChangeNotifier
- aContext.StartNotifications();
-
- SPUDTEL_INFO_LOG(_L("Notifying FSM: E2ryPdpContextCreated"));
- aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::E2ryPdpContextCreated);
- }
- else
- {
- SPUDTEL_INFO_LOG(_L("Notifying FSM: E2ryPdpContextCreatedFailed"));
- aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::E2ryPdpContextCreatedFailed, aCompletionStatus.Int());
- }
-}
-
-/** Cancels last asynchronous request to eTel
-
-@param aContext - pdp context
-*/
-void TCreate2ryPdpContextStrategy::CancelAsyncRequest(CEtelDriverContext& /*aContext*/)
- {
- SPUDTEL_FNLOG("TCreate2ryPdpContextStrategy::CancelAsyncRequest()");
- SPUDTEL_ERROR_LOG0(_L("ERROR: No outstanding requests"));
- }
-
-
-//
-// TSetQoSStrategy
-//
-/** Executes next asynchronous step in a strategy.
-
-@param aContext - pdp context
-@param aStatus - request status of this step
-*/
-void TSetQoSStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
- {
- SPUDTEL_FNLOG("TSetQoSStrategy::Next()");
-
- TInt err = KErrNone;
-
- // possible steps:
- // -- set QoS profile parameters
- switch(aContext.StrategyStep())
- {
- case EStartStep:
- {
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- RPacketQoS::TQoSR5Requested req;
-#else
- RPacketQoS::TQoSR99_R4Requested req;
-#endif
-// SYMBIAN_NETWORKING_UMTSR5
-
- aContext.PdpFsmInterface().Get (aContext.Id(), req);
- aContext.QosRequested() = req;
-
-
-#ifdef _DEBUG
- aContext.DumpReqProfileParameters ();
-#endif
- aContext.PacketQoS().SetProfileParameters (*aStatus, aContext.QosRequestedPckg());
- aContext.SetStrategyStep (ESetProfileParamsStep);
- break;
- }
-
- case ESetProfileParamsStep:
- {
- aContext.SetStrategyStep (EFinishStep);
- break;
- }
-
- default:
- {
- // unexpected
- SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case"));
- ASSERT(EFalse);
- err = KErrNotSupported;
- break;
- }
- }
-
- if(err || (EFinishStep == aContext.StrategyStep()))
- {
- User::RequestComplete( aStatus, err);
- }
-
- }
-
-
-/**
-FSM completion notification
-and setting QoSR99_R4Negotiated in spud FSM
-*/
-void TSetQoSStrategy::NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus )
- {
- if(aCompletionStatus == KErrNone)
- {
- SPUDTEL_INFO_LOG(_L("Notifying FSM: EQoSSet"));
- aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EQoSSet);
- }
- else
- {
- SPUDTEL_INFO_LOG(_L("Notifying FSM: EQoSSetFailed"));
- aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EQoSSetFailed, aCompletionStatus.Int());
- }
- }
-
-/** Cancels last asynchronous request to eTel
-
-@param aContext - pdp context
-*/
-void TSetQoSStrategy::CancelAsyncRequest(CEtelDriverContext& aContext)
- {
- switch(aContext.StrategyStep())
- {
- case ESetProfileParamsStep:
- {
- aContext.PacketQoS().CancelAsyncRequest(EPacketQoSSetProfileParams);
- SPUDTEL_INFO_LOG(_L("Cancel PacketQoS::EPacketQoSSetProfileParams"));
- break;
- }
-
- default:
- // there're NO outstanding async requests
- SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case in TSetQoSStrategy::CancelAsyncRequest"));
- ASSERT(EFalse);
- break;
- }
- }
-
-
-//
-// TSetTftStrategy
-//
-/** Executes next asynchronous step in a strategy.
-
-@param aContext - pdp context
-@param aStatus - request status of this step
-*/
-void TSetTftStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
- {
- SPUDTEL_FNLOG("TSetTftStrategy::Next()");
-
- TInt err = KErrNone;
-
- // possible steps:
- // -- add filters
- switch(aContext.StrategyStep())
- {
- case EStartStep:
- {
- aContext.PdpFsmInterface().Get (aContext.Id(), aContext.TftOperationCode());
- switch(aContext.TftOperationCode())
- {
- case KAddFilters:
- aContext.PdpFsmInterface().Get (aContext.Id(), aContext.TftInfo());
- SPUDTELVERBOSE_INFO_LOG1(_L("TftOperationCode - Add Filters"), aContext.TftInfo().FilterCount());
- // Set strategy assumes that TFT has to be created on a first place
- SPUDTELVERBOSE_INFO_LOG(_L("Creating TFT..."));
- aContext.PacketContext().CreateNewTFT(*aStatus, aContext.TftInfo().FilterCount());
- aContext.SetStrategyStep (ECreateNewTFTStep);
- break;
-
- case KRemoveFilters:
- err = KErrNotSupported;
- SPUDTEL_ERROR_LOG(_L("TftOperationCode - Remove is not supported in a Set strategy, return %d"), err);
- break;
-
- case KDeleteTFT:
- err = KErrNotSupported;
- SPUDTEL_ERROR_LOG(_L("TftOperationCode - Delete is not supported in a Set strategy, return %d"), err);
- break;
-
- default:
- // wrong case
- SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case"));
- ASSERT(EFalse);
- err = KErrNotSupported;
- break;
- }
- break;
- }
-
- case ECreateNewTFTStep:
- {
- TInt err1st = aContext.FirstFilterV2();
- if(err1st == KErrNone)
- {
- aContext.PacketContext().AddPacketFilter( *aStatus, aContext.FilterV2Pckg());
- aContext.SetStrategyStep (EAddTftStep);
- }
- else // done
- {
- // internal check
- ASSERT((aContext.TftRequested() <= aContext.TftInfo().FilterCount()));
- aContext.SetStrategyStep (EFinishStep);
- }
-
- break;
- }
-
- case EAddTftStep:
- {
- TInt errV2 = aContext.NextFilterV2();
- if(errV2 == KErrNone)
- {
- aContext.PacketContext().AddPacketFilter( *aStatus, aContext.FilterV2Pckg());
- aContext.SetStrategyStep (EAddTftStep);
- }
- else // done
- {
- // internal check
- ASSERT((aContext.TftRequested() <= aContext.TftInfo().FilterCount()));
- aContext.SetStrategyStep (EFinishStep);
- }
-
- break;
- }
-
- default:
- // unexpected
- SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case"));
- ASSERT(EFalse);
- err = KErrNotSupported;
- break;
- }
-
- if(err || (EFinishStep == aContext.StrategyStep()))
- {
- User::RequestComplete( aStatus, err);
- }
-
- }
-
-/**
-Notifies SPUD FSM about execution results.
-
-@param aContext - pdp context
-@param aCompletionStatus - completion request status
-*/
-void TSetTftStrategy::NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus )
- {
- if(aCompletionStatus == KErrNone)
- {
- SPUDTEL_INFO_LOG(_L("Notifying FSM: ETftSet"));
- aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::ETftSet);
- }
- else
- {
- SPUDTEL_INFO_LOG(_L("Notifying FSM: ETftSetFailed"));
- aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::ETftSetFailed, aCompletionStatus.Int());
- }
- }
-
-/** Cancels last asynchronous request to eTel
-
-@param aContext - pdp context
-*/
-void TSetTftStrategy::CancelAsyncRequest(CEtelDriverContext& aContext)
- {
- switch(aContext.StrategyStep())
- {
- case ECreateNewTFTStep:
- {
- aContext.PacketQoS().CancelAsyncRequest(EPacketContextCreateNewTFT);
- SPUDTEL_INFO_LOG(_L("Cancel PacketQoS::EPacketContextCreateNewTFT"));
- break;
- }
-
- case EAddTftStep:
- {
- aContext.PacketQoS().CancelAsyncRequest(EPacketContextAddPacketFilter);
- SPUDTEL_INFO_LOG(_L("Cancel PacketQoS::EPacketContextAddPacketFilter"));
- break;
- }
-
- default:
- // unexpected
- SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case in TSetTftStrategy::CancelAsyncRequest"));
- ASSERT(EFalse);
- break;
- }
- }
-
-
-//
-// TChangeTftStrategy
-//
-/** Executes next asynchronous step in a strategy.
-
-@param aContext - pdp context
-@param aStatus - request status of this step
-*/
-void TChangeTftStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
- {
- SPUDTEL_FNLOG("TChangeTftStrategy::Next()");
-
- TInt err = KErrNone;
-
- // special case.
- if(EStartStep == aContext.StrategyStep())
- {
- aContext.PdpFsmInterface().Get (aContext.Id(), aContext.TftOperationCode());
- switch(aContext.TftOperationCode())
- {
- case KAddFilters:
- aContext.PdpFsmInterface().Get (aContext.Id(), aContext.TftInfo());
- SPUDTELVERBOSE_INFO_LOG1(_L("TftOperationCode - Add Filters"), aContext.TftInfo().FilterCount());
- aContext.SetStrategyStep (EAddFirstTftStep);
- break;
-
- case KRemoveFilters:
- aContext.PdpFsmInterface().Get (aContext.Id(), aContext.TftInfo());
- SPUDTELVERBOSE_INFO_LOG1(_L("TftOperationCode - Remove %d Filters"), aContext.TftInfo().FilterCount());
- aContext.SetStrategyStep (ERemoveFirstTftStep);
- break;
-
- case KDeleteTFT:
- SPUDTELVERBOSE_INFO_LOG(_L("TftOperationCode - Delete TFT"));
- // delete old TFT
- aContext.PacketContext().DeleteTFT(*aStatus);
- aContext.SetStrategyStep (EDeleteTftStep);
- // DeleteTFT() ia an async operation => return
- return;
-
- default:
- // wrong case
- SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case"));
- ASSERT(EFalse);
- err = KErrNotSupported;
- break;
- }
- }
-
- // possible steps:
- // -- delete TFT
- // -- add filters
- // -- remove filters
- if(!err)
- {
- switch(aContext.StrategyStep())
- {
- case EDeleteTftStep:
- {
- aContext.SetStrategyStep (EChangeTftFinished);
- User::RequestComplete( aStatus, KErrNone);
- break;
- }
-
- case EAddFirstTftStep:
- {
- TInt errV2 = aContext.FirstFilterV2();
- if(errV2 == KErrNone)
- {
- aContext.PacketContext().AddPacketFilter( *aStatus, aContext.FilterV2Pckg());
- aContext.SetStrategyStep (EAddTftStep);
- }
- else // done
- {
- aContext.SetStrategyStep (EChangeTftFinished);
- User::RequestComplete( aStatus, KErrNone);
- }
-
- break;
- }
-
- case EAddTftStep:
- {
- TInt errV2 = aContext.NextFilterV2();
- if(errV2 == KErrNone)
- {
- aContext.PacketContext().AddPacketFilter( *aStatus, aContext.FilterV2Pckg());
- aContext.SetStrategyStep (EAddTftStep);
- }
- else // done
- {
- aContext.SetStrategyStep (EChangeTftFinished);
- User::RequestComplete( aStatus, KErrNone);
- }
-
- break;
- }
-
- case ERemoveFirstTftStep:
- {
- TInt errV2 = aContext.FirstFilterV2();
- if(errV2 == KErrNone)
- {
- aContext.PacketContext().RemovePacketFilter( *aStatus, aContext.FilterV2().iId);
- aContext.SetStrategyStep (ERemoveTftStep);
- }
- else // done
- {
- aContext.SetStrategyStep (EChangeTftFinished);
- User::RequestComplete( aStatus, KErrNone);
- }
-
- break;
- }
-
- case ERemoveTftStep:
- {
- TInt errV2 = aContext.NextFilterV2();
- if(errV2 == KErrNone)
- {
- aContext.PacketContext().RemovePacketFilter( *aStatus, aContext.FilterV2().iId);
- aContext.SetStrategyStep (ERemoveTftStep);
- }
- else // done
- {
- aContext.SetStrategyStep (EChangeTftFinished);
- User::RequestComplete( aStatus, KErrNone);
- }
-
- break;
- }
-
- case EChangeTftFinished:
- {
- aContext.SetStrategyStep (EFinishStep);
- }
- break;
-
-
- default:
- // unexpected
- SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case"));
- ASSERT(EFalse);
- err = KErrNotSupported;
- break;
- }
- }
-
- if(err || (EFinishStep == aContext.StrategyStep()))
- {
- User::RequestComplete( aStatus, err);
- }
-
- }
-
-
-/**
-Notifies SPUD FSM about execution results.
-
-@param aContext - pdp context
-@param aCompletionStatus - completion request status
-*/
-void TChangeTftStrategy::NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus )
- {
- if(aCompletionStatus == KErrNone)
- {
- SPUDTEL_INFO_LOG(_L("Notifying FSM: ETftChanged"));
- aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::ETftChanged);
- }
- else
- {
- SPUDTEL_INFO_LOG(_L("Notifying FSM: ETftChangedFailed"));
- aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::ETftChangedFailed, aCompletionStatus.Int());
- }
- }
-
-/** Cancels last asynchronous request to eTel
-
-@param aContext - pdp context
-*/
-void TChangeTftStrategy::CancelAsyncRequest(CEtelDriverContext& aContext)
- {
- switch(aContext.StrategyStep())
- {
- case EDeleteTftStep:
- {
- SPUDTEL_INFO_LOG(_L("Cancel PacketQoS::EPacketContextDeleteTFTCancel"));
- aContext.PacketQoS().CancelAsyncRequest(EPacketContextDeleteTFTCancel);
- break;
- }
-
- case ERemoveTftStep:
- {
- SPUDTEL_INFO_LOG(_L("Cancel PacketQoS::EPacketContextRemovePacketFilterCancel"));
- aContext.PacketQoS().CancelAsyncRequest(EPacketContextRemovePacketFilterCancel);
- break;
- }
-
- case EAddTftStep:
- {
- SPUDTEL_INFO_LOG(_L("Cancel PacketQoS::EPacketContextAddPacketFilter"));
- aContext.PacketQoS().CancelAsyncRequest(EPacketContextAddPacketFilterCancel);
- break;
- }
-
- default:
- // unexpected
- SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case in TChangeTftStrategy::CancelAsyncRequest"));
- ASSERT(EFalse);
- break;
- }
- }
-
-
-//
-// TActivatePdpStrategy
-//
-/** Executes next asynchronous step in a strategy.
-
-@param aContext - pdp context
-@param aStatus - request status of this step
-*/
-void TActivatePdpStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
- {
- SPUDTEL_FNLOG("TActivatePdpStrategy::Next()");
-
- TInt err = KErrNone;
-
- switch(aContext.StrategyStep())
- {
- case EStartStep:
- {
- aContext.PacketContext().Activate(*aStatus);
- aContext.SetStrategyStep (EActivateStep);
- break;
- }
-
- case EActivateStep:
- {
- aContext.PdpFsmInterface().Get (aContext.Id(), aContext.ContextConfigGPRS());
- aContext.PacketContext().GetConfig (*aStatus, aContext.ContextConfigGPRSPckg());
- aContext.SetStrategyStep (EGetConfigStep);
- break;
- }
-
- case EGetConfigStep:
- {
- aContext.PdpFsmInterface().Set (aContext.Id(), aContext.ContextConfigGPRS());
- aContext.PacketContext().InitialiseContext(*aStatus, aContext.DataChannelV2Pckg());
- aContext.SetStrategyStep (EInitialiseContextStep);
- break;
- }
-
- case EInitialiseContextStep:
- {
- if (KPrimaryContextId == aContext.Id())
- {
- aContext.PacketQoS().GetProfileParameters (*aStatus, aContext.QosNegotiatedPckg());
-#ifdef _DEBUG
- aContext.DumpNegProfileParameters ();
-#endif
- aContext.SetStrategyStep (EGetProfileParamsStep);
- }
- else
- {
- aContext.SetStrategyStep (EFinishStep);
- }
- break;
- }
-
- case EGetProfileParamsStep:
- {
- aContext.SetStrategyStep (EFinishStep);
- break;
- }
-
- default:
- // unexpected
- SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case"));
- ASSERT(EFalse);
- err = KErrNotSupported;
- break;
- }
-
- if(err || (EFinishStep == aContext.StrategyStep()))
- {
- User::RequestComplete( aStatus, err);
- }
-
- }
-
-
-/**
-Notifies SPUD FSM about execution results.
-
-@param aContext - pdp context
-@param aCompletionStatus - completion request status
-*/
-void TActivatePdpStrategy::NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus )
- {
- if(aCompletionStatus == KErrNone)
- {
- SPUDTELVERBOSE_INFO_LOG(_L("FSM set: DataChannelV2"));
- aContext.PdpFsmInterface().Set(aContext.Id(), aContext.DataChannelV2());
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- SPUDTELVERBOSE_INFO_LOG(_L("FSM set: QoSR5Negotiated"));
- aContext.PdpFsmInterface().Set(aContext.Id(), aContext.QosNegotiated().NegotiatedQoSR5());
-
-#else
- SPUDTELVERBOSE_INFO_LOG(_L("FSM set: QoSR99_R4Negotiated"));
- aContext.PdpFsmInterface().Set(aContext.Id(), aContext.QosNegotiated().NegotiatedQoSR99_R4());
-#endif
-// SYMBIAN_NETWORKING_UMTSR5
-
- SPUDTEL_INFO_LOG(_L("Notifying FSM: EPdpActivated"));
- aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EPdpActivated);
- }
- else
- {
- SPUDTEL_INFO_LOG(_L("Notifying FSM: EPdpActivatedFailed"));
- aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EPdpActivatedFailed, aCompletionStatus.Int());
- }
- }
-
-/** Cancels last asynchronous request to eTel
-
-@param aContext - pdp context
-*/
-void TActivatePdpStrategy::CancelAsyncRequest(CEtelDriverContext& aContext)
- {
- switch(aContext.StrategyStep())
- {
- case EActivateStep:
- {
- aContext.PacketContext().CancelAsyncRequest(EPacketContextActivate);
- SPUDTEL_INFO_LOG(_L("Cancel PacketContext::EPacketContextActivate"));
- break;
- }
-
- case EGetConfigStep:
- {
- aContext.PacketContext().CancelAsyncRequest(EGetConfigStep);
- SPUDTEL_INFO_LOG(_L("Cancel PacketContext::EGetConfigStep"));
- break;
- }
-
- case EInitialiseContextStep:
- {
- aContext.PacketContext().CancelAsyncRequest(EPacketContextInitialiseContext);
- SPUDTEL_INFO_LOG(_L("Cancel PacketContext::EPacketContextInitialiseContext"));
- break;
- }
-
- case EGetProfileParamsStep:
- {
- if(KPrimaryContextId == aContext.Id())
- {
- aContext.PacketContext().CancelAsyncRequest(EPacketQoSGetProfileParams);
- SPUDTEL_INFO_LOG(_L("Cancel PacketContext::EPacketQoSGetProfileParams"));
- break;
- }
- }
-
- default:
- // unexpected
- SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case in TActivatePdpStrategy::CancelAsyncRequest"));
- ASSERT(EFalse);
- break;
- }
- }
-
-//
-// TGetNegQoSStrategy
-//
-/** Executes next asynchronous step in a strategy.
-
-@param aContext - pdp context
-@param aStatus - request status of this step
-*/
-void TGetNegQoSStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
- {
- SPUDTEL_FNLOG("TGetNegQoSStrategy::Next()");
-
- TInt err = KErrNone;
-
- switch(aContext.StrategyStep())
- {
- case EStartStep:
- {
- aContext.PacketQoS().GetProfileParameters (*aStatus, aContext.QosNegotiatedPckg());
-#ifdef _DEBUG
- aContext.DumpNegProfileParameters ();
-#endif
- aContext.SetStrategyStep (EGetProfileParamsStep);
- break;
- }
-
- case EGetProfileParamsStep:
- {
- aContext.SetStrategyStep (EFinishStep);
- break;
- }
-
- default:
- // unexpected
- SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case"));
- ASSERT(EFalse);
- err = KErrNotSupported;
- break;
- }
-
- if(err || (EFinishStep == aContext.StrategyStep()))
- {
- User::RequestComplete( aStatus, err);
- }
-
- }
-
-
-/**
-Notifies SPUD FSM about execution results.
-
-@param aContext - pdp context
-@param aCompletionStatus - completion request status
-*/
-void TGetNegQoSStrategy::NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus )
- {
- if(aCompletionStatus == KErrNone)
- {
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- SPUDTELVERBOSE_INFO_LOG(_L("FSM set: QoSR5Negotiated"));
- aContext.PdpFsmInterface().Set(aContext.Id(), aContext.QosNegotiated().NegotiatedQoSR5());
-
-#else
-// !SYMBIAN_NETWORKING_UMTSR5
-
- SPUDTELVERBOSE_INFO_LOG(_L("FSM set: QoSR99_R4Negotiated"));
- aContext.PdpFsmInterface().Set(aContext.Id(), aContext.QosNegotiated().NegotiatedQoSR99_R4());
-#endif
-// SYMBIAN_NETWORKING_UMTSR5
-
- SPUDTEL_INFO_LOG(_L("Notifying FSM: EPdpNegQoSRetrieved"));
- aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EPdpNegQoSRetrieved);
- }
- else
- {
- SPUDTEL_INFO_LOG(_L("Notifying FSM: EPdpNegQoSRetrievedFailed"));
- aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EPdpNegQoSRetrievedFailed, aCompletionStatus.Int());
- }
- }
-
-/** Cancels last asynchronous request to eTel
-
-@param aContext - pdp context
-*/
-void TGetNegQoSStrategy::CancelAsyncRequest(CEtelDriverContext& aContext)
- {
- switch(aContext.StrategyStep())
- {
- case EGetProfileParamsStep:
- {
- aContext.PacketContext().CancelAsyncRequest(EPacketQoSGetProfileParams);
- SPUDTEL_INFO_LOG(_L("Cancel PacketContext::EPacketQoSGetProfileParams"));
- break;
- }
-
- default:
- // unexpected
- SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case in TGetNegQoSStrategy::CancelAsyncRequest"));
- ASSERT(EFalse);
- break;
- }
- }
-
-
-//
-// TModifyActiveStrategy
-//
-/** Executes next asynchronous step in a strategy.
-
-@param aContext - pdp context
-@param aStatus - request status of this step
-*/
-void TModifyActiveStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
- {
- SPUDTEL_FNLOG("TModifyActiveStrategy::Next()");
-
- TInt err = KErrNone;
-
- switch(aContext.StrategyStep())
- {
- case EStartStep:
- {
- aContext.PacketContext().ModifyActiveContext(*aStatus);
- aContext.SetStrategyStep (EModifyActiveStep);
- break;
- }
-
- case EModifyActiveStep:
- {
- aContext.PacketQoS().GetProfileParameters (*aStatus, aContext.QosNegotiatedPckg());
-#ifdef _DEBUG
- aContext.DumpNegProfileParameters ();
-#endif
- aContext.SetStrategyStep (EGetProfileParamsStep);
- break;
- }
-
- case EGetProfileParamsStep:
- {
- aContext.SetStrategyStep (EFinishStep);
- break;
- }
-
- default:
- // unexpected
- SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case"));
- ASSERT(EFalse);
- err = KErrNotSupported;
- break;
- }
-
- if(err || (EFinishStep == aContext.StrategyStep()))
- {
- User::RequestComplete( aStatus, err);
- }
-
- }
-
-
-/**
-Notifies SPUD FSM about execution results.
-
-@param aContext - pdp context
-@param aCompletionStatus - completion request status
-*/
-void TModifyActiveStrategy::NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus )
- {
- if(aCompletionStatus == KErrNone)
- {
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- SPUDTELVERBOSE_INFO_LOG(_L("FSM set: QoSR5Negotiated"));
- aContext.PdpFsmInterface().Set(aContext.Id(), aContext.QosNegotiated().NegotiatedQoSR5());
-
-#else
- SPUDTELVERBOSE_INFO_LOG(_L("FSM set: QoSR99_R4Negotiated"));
- aContext.PdpFsmInterface().Set(aContext.Id(), aContext.QosNegotiated().NegotiatedQoSR99_R4());
-#endif
-// SYMBIAN_NETWORKING_UMTSR5
-
- SPUDTEL_INFO_LOG(_L("Notifying FSM: EPdpContextModified"));
- aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EPdpContextModified);
- }
- else
- {
- SPUDTEL_INFO_LOG(_L("Notifying FSM: EPdpContextModifiedFailed"));
- aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EPdpContextModifiedFailed, aCompletionStatus.Int());
- }
- }
-
-/** Cancels last asynchronous request to eTel
-
-@param aContext - pdp context
-*/
-void TModifyActiveStrategy::CancelAsyncRequest(CEtelDriverContext& aContext)
- {
- switch(aContext.StrategyStep())
- {
- case EModifyActiveStep:
- {
- aContext.PacketContext().CancelAsyncRequest(EPacketContextModifyActiveContext);
- SPUDTEL_INFO_LOG(_L("Cancel PacketContext::EPacketContextModifyActiveContext"));
- break;
- }
-
- case EGetProfileParamsStep:
- {
- aContext.PacketContext().CancelAsyncRequest(EPacketQoSGetProfileParams);
- SPUDTEL_INFO_LOG(_L("Cancel PacketContext::EPacketQoSGetProfileParams"));
- break;
- }
-
- default:
- // unexpected
- SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case in TModifyActiveStrategy::CancelAsyncRequest"));
- ASSERT(EFalse);
- break;
- }
- }
--- a/telephonyprotocols/umtsgprsscpr/spudtel/src/reteldriverinput.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,196 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// implementation of etel driver input
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include <e32def.h>
-#include <e32std.h>
-
-#include "ceteldriverfactory.h"
-#include "ceteldrivercontext.h"
-#include "reteldriverinput.h"
-#include "spudteldebuglogger.h"
-
-using namespace EtelDriver;
-
-REtelDriverInput::REtelDriverInput()
-: iDriverFactory(NULL)
- {
- }
-
-
-REtelDriverInput::~REtelDriverInput()
- {
- SPUDTEL_FNLOG("REtelDriverInput::~REtelDriverInput()");
-
- if (iDriverFactory)
- {
- delete iDriverFactory;
- }
- }
-
-
-/** requests to open etel driver
-
-@param aPdpFsmInterface - reference to pdp FSM interface
-*/
-void REtelDriverInput::OpenL (CPdpFsmInterface& aPdpFsmInterface)
- {
- SPUDTEL_FNLOG("REtelDriverInput::OpenL()");
- ASSERT(iDriverFactory==NULL);
-
- // internal check
- iDriverFactory = CEtelDriverFactory::NewL(aPdpFsmInterface);
- if (iDriverFactory)
- {
- iDriverFactory->InitL();
- }
- }
-
-
-/** closes eTel driver and frees underlying resources
-*/
-void REtelDriverInput::Close()
- {
- SPUDTEL_FNLOG("REtelDriverInput::Close()");
-
- // cancel all outstanding requests
- if (iDriverFactory)
- {
- CancelAllPdps();
- }
-
- delete iDriverFactory;
- iDriverFactory = NULL;
- }
-
-/** requests to create new pdp context
- Note: this request will not open new primary or secondary context
- But rather allocate necessary resources to do it.
- Creation / deletion of eTel contexts should be done though Input method.
-
-@param aPdpId - id of new pdp context
-*/
-void REtelDriverInput::CreatePdpL (TContextId aPdpId)
- {
- SPUDTEL_FNLOG("REtelDriverInput::CreatePdpL()");
- SPUDTELVERBOSE_INFO_LOG1(_L("pdp id : %d"), aPdpId);
-
- ASSERT(iDriverFactory);
- iDriverFactory->CreatePdpL (aPdpId);
- }
-
-/** deletes pdp context
-
-@param aPdpId - id of a pdp context
-*/
-void REtelDriverInput::DeletePdp (TContextId aPdpId)
- {
- SPUDTEL_FNLOG("REtelDriverInput::DeletePdp()");
- SPUDTELVERBOSE_INFO_LOG1(_L("pdp id : %d"), aPdpId);
-
- ASSERT(iDriverFactory);
-
- iDriverFactory->FreePdp(aPdpId);
- }
-
-/** requests to perform aOperation for aPdpId context
-
-@param aPdpId - id of a pdp context
-@param aOperation - etel driver operation
-*/
-void REtelDriverInput::Input(TContextId aPdpId, TEtelInput aOperation)
- {
- SPUDTEL_FNLOG("REtelDriverInput::Input()");
- SPUDTEL_INFO_LOG2(_L("REtelDriverInput::Input: pdp id : %d, operation %d"), aPdpId, aOperation);
- ASSERT(iDriverFactory);
-
- iDriverFactory->Context(aPdpId).Input(aOperation);
- }
-
-/** cancels last operation for aPdpId context
-
-@param aPdpId - id of a pdp context
-*/
-void REtelDriverInput::CancelPdp (TContextId aPdpId)
- {
- SPUDTEL_FNLOG("REtelDriverInput::CancelPdp()");
- SPUDTEL_INFO_LOG1(_L("REtelDriverInput::CancelPdp: pdp id : %d"), aPdpId);
- ASSERT(iDriverFactory);
-
- iDriverFactory->Context(aPdpId).Cancel();
- }
-
-/** starts network notifications for aPdpId context
-
-@param aPdpId - id of a pdp context
-*/
-void REtelDriverInput::StartPdpNotifications(TContextId aPdpId)
- {
- SPUDTEL_FNLOG("REtelDriverInput::StartPdpNotifications()");
- ASSERT(iDriverFactory);
-
- iDriverFactory->StartPdpNotifications(aPdpId);
- }
-
-/** cancels network notifications for aPdpId context
-
-@param aPdpId - id of a pdp context
-*/
-void REtelDriverInput::CancelPdpNotifications (TContextId aPdpId)
- {
- SPUDTEL_FNLOG("REtelDriverInput::CancelPdpNotifications()");
- SPUDTEL_INFO_LOG1(_L("REtelDriverInput::CancelPdpNotifications: pdp id : %d"), aPdpId);
- ASSERT(iDriverFactory);
-
- iDriverFactory->CancelPdpNotifications (aPdpId);
- }
-
-/** cancels last operations for all created pdp contexts */
-void REtelDriverInput::CancelAllPdps ()
- {
- SPUDTEL_FNLOG("REtelDriverInput::CancelAllPdps()");
- ASSERT(iDriverFactory);
-
- for(TContextId i = 0; i < static_cast<TContextId>(iDriverFactory->ContextCount()); i++)
- {
- if (iDriverFactory->HasContext(i))
- {
- iDriverFactory->Context(i).Cancel();
- }
- }
- }
-
-/** cancels all notifications for all pdp contexts */
-void REtelDriverInput::CancelAllPdpNotifications ()
- {
- SPUDTEL_FNLOG("REtelDriverInput::CancelAllPdpNotifications()");
- ASSERT(iDriverFactory);
-
- iDriverFactory->CancelAllPdpNotifications();
- }
-
-void REtelDriverInput::GetLastErrorCause (TContextId aPdpId, TInt& aLastErrorCause)
- {
- SPUDTEL_FNLOG("REtelDriverInput::GetLastErrorCause()");
- ASSERT(iDriverFactory);
-
- iDriverFactory->GetLastErrorCause(aPdpId, aLastErrorCause);
- }
--- a/telephonyprotocols/umtsgprsscpr/src/1020D45E.rss Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Registry info for Umts/Gprs Sub-Connection Provider plug-in
-//
-//
-
-/**
- @file
-*/
-
-#include <ecom/registryinfo.rh>
-
-RESOURCE REGISTRY_INFO theInfo
-{
-dll_uid = 0x1020D45E;
-interfaces =
- {
- INTERFACE_INFO
- {
- interface_uid = 0x10204301;
- implementations =
- {
- IMPLEMENTATION_INFO
- {
- implementation_uid = 0x1020D45F;
- version_no = 1;
- display_name = "Umts/Gprs Sub-Connection Provider Factory";
- default_data = "UmtsGprsSubConnProvdFactory";
- opaque_data = "";
- }
- };
- }
- };
-}
--- a/telephonyprotocols/umtsgprsscpr/src/PdpFsmRequest.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,334 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// The implementation file for the PDP Context control requests.
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-
-#include "PdpFsmRequest.h"
-
-
-//-=========================================================
-//
-//CModifyActivePDPCtx
-//
-//-=========================================================
-CModifyActivePDPCtx::CModifyActivePDPCtx(CUmtsGprsSubConnProvd& aProvider, MPdpFsmRequestOwner& aOwner)
-:CPdpFsmRequestBase(aProvider, aOwner)
-{
-}
-
-CModifyActivePDPCtx::~CModifyActivePDPCtx()
-{
-}
-
-
-TInt CModifyActivePDPCtx::Start()
-{
- // Store the Context Id in order to check replies later
- iContextId = iProvider.GetContextId();
- return iProvider.GetPdpFsmInterface().Input(iContextId, SpudMan::EContextModifyActive);
-}
-
-/**
-@param aEvent The event Id
-@param aParam Data relavent to the event. Usually a system-wide error code
-@return ETrue if the event was consumed, EFalse if it was of no interest and should
-be passed on to SpudMan for processing.
-*/
-TBool CModifyActivePDPCtx::PdpFsmEvent(TContextId aContextId, TInt aEvent, TInt aParam)
-{
- if (aContextId == iContextId && aEvent == KContextModifyActiveEvent)
- {
- iOwner.Done(aParam, *this);
- return ETrue;
- }
-
- return EFalse;
-}
-
-
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
-//-=========================================================
-//
-//CModifyR5QoS
-//
-//-=========================================================
-CModifyR5QoS::CModifyR5QoS(CUmtsGprsSubConnProvd& aProvider, MPdpFsmRequestOwner& aOwner, RPacketQoS::TQoSR5Requested& aParams)
-:CPdpFsmRequestBase(aProvider, aOwner),
- iModifyActive(NULL),
- i5(aParams)
-{
-}
-
-CModifyR5QoS::~CModifyR5QoS()
-{
- ASSERT(iModifyActive == NULL || iContextId == 0);
- //If we assert here is is becuase Start has been called (allocated iContextId), but Done has not been called (cleans iModifyActive)
- delete iModifyActive;
-}
-
-void CModifyR5QoS::GrantedSetupL()
- {
- CSubConGenEventParamsGranted* event = CSubConGenEventParamsGranted::NewL();
- CleanupStack::PushL (TCleanupItem(SubconEventCleanupFunction, event));
- event->SetFamily (KSubConQoSFamily);
- RPacketQoS::TQoSR5Negotiated negotiatedQoS;
- iProvider.GetPdpFsmInterface().Get(iProvider.GetContextId(), negotiatedQoS);
- iProvider.MapQosEtelToGrantedParamsL(&negotiatedQoS, *event);
- iProvider.NotifyClientEvent (*event);
- CleanupStack::Pop();
- delete event;
-
- }
-
-void CModifyR5QoS::RejectedSetupL(TInt aResult)
- {
- CSubConGenEventParamsRejected* event = CSubConGenEventParamsRejected::NewL();
- CleanupStack::PushL (TCleanupItem(SubconEventCleanupFunction, event));
- event->SetFamilyId (KSubConQoSFamily);
- event->SetError (aResult);
- iProvider.NotifyClientEvent (*event);
- CleanupStack::Pop();
- delete event;
- }
-
-void CModifyR5QoS::Done( TInt aResult, CPdpFsmRequestBase& aThis )
-{
- __ASSERT_ALWAYS(iModifyActive == &aThis, User::Invariant());
-
- if ( aResult == KErrNone )
- {
- // QoS Modification complete with success.
- __FLOG_1(_L("CModifyR5QoS [this=%08x]:\tDone(): QoS Params Granted"), this);
- TRAP_IGNORE(GrantedSetupL());
- }
- else
- {
- //QoS Modification complete with failure.
- __FLOG_2(_L("CModifyR5QoS [this=%08x]:\tDone(): QoS Params Rejected [aResult=%d]"), this, aResult);
- TRAP_IGNORE(RejectedSetupL(aResult));
- }
-
-
- delete iModifyActive;
- iModifyActive = NULL;
- iOwner.Done(aResult, *this);
-}
-
-
-TInt CModifyR5QoS::Start()
-{
- // Store the Context Id in order to check replies later
- iContextId = iProvider.GetContextId();
-
- TInt result;
- result = iProvider.GetPdpFsmInterface().Set(iContextId, i5);
- if (result == KErrNone)
- {
- result = iProvider.GetPdpFsmInterface().Input(iContextId, SpudMan::EContextQoSSet);
- }
-
- return result;
-}
-
-
-TBool CModifyR5QoS::PdpFsmEvent(TContextId aContextId, TInt aEvent, TInt aParam)
-{
- if (aContextId != iContextId)
- {
- return EFalse;
- }
-
- TBool handled(EFalse);
- if (aEvent == KContextQoSSetEvent)
- {
- if (aParam == KErrNone)
- {
- iModifyActive->Start();
- }
- else
- {
- //QoS Modification complete with failure.
- __FLOG_2(_L("CModifyR5QoS [this=%08x]:\tPdpFsmEvent(): QoS Params Rejected [aParam=%d]"), this, aParam);
-
- Done(aParam, *iModifyActive);
- }
- handled = ETrue;
- }
- else
- {
- handled = iModifyActive->PdpFsmEvent(aContextId, aEvent, aParam);
- }
-
- return handled;
-}
-
-
-void CModifyR5QoS::ConstructL()
-{
- iModifyActive = new(ELeave)CModifyActivePDPCtx(iProvider, *this);
-}
-
-
-CModifyR5QoS* CModifyR5QoS::NewL(CUmtsGprsSubConnProvd& aProvider, MPdpFsmRequestOwner& aOwner, RPacketQoS::TQoSR5Requested& aParams)
-{
- CModifyR5QoS* request = new(ELeave) CModifyR5QoS(aProvider, aOwner, aParams);
- CleanupStack::PushL(request);
- request->ConstructL();
- CleanupStack::Pop(request);
- return request;
-}
-
-
-#else
-// !SYMBIAN_NETWORKING_UMTSR5
-
-//-=========================================================
-//
-//CModifyR4QoS
-//
-//-=========================================================
-CModifyR4QoS::CModifyR4QoS(CUmtsGprsSubConnProvd& aProvider, MPdpFsmRequestOwner& aOwner, RPacketQoS::TQoSR99_R4Requested aParams)
-:CPdpFsmRequestBase(aProvider, aOwner),
- iModifyActive(NULL),
- i99(aParams)
-{
-}
-
-CModifyR4QoS::~CModifyR4QoS()
-{
- ASSERT(iModifyActive == NULL || iContextId == 0);
- //If we assert here is is becuase Start has been called (allocated iContextId), but Done has not been called (cleans iModifyActive)
- delete iModifyActive;
-
-}
-
-void CModifyR4QoS::GrantedSetupL()
- {
- CSubConGenEventParamsGranted* event = CSubConGenEventParamsGranted::NewL();
- CleanupStack::PushL (TCleanupItem(SubconEventCleanupFunction, event));
- event->SetFamily (KSubConQoSFamily);
- RPacketQoS::TQoSR99_R4Negotiated negotiatedQoS;
- iProvider.GetPdpFsmInterface().Get(iProvider.GetContextId(), negotiatedQoS);
- iProvider.MapQosEtelToGrantedParamsL(&negotiatedQoS, *event);
- iProvider.NotifyClientEvent (*event);
- CleanupStack::Pop();
- delete event;
- }
-
-void CModifyR4QoS::RejectedSetupL(TInt aResult)
- {
- CSubConGenEventParamsRejected* event = CSubConGenEventParamsRejected::NewL();
- CleanupStack::PushL (TCleanupItem(SubconEventCleanupFunction, event));
- event->SetFamilyId (KSubConQoSFamily);
- event->SetError (aResult);
- iProvider.NotifyClientEvent (*event);
- CleanupStack::Pop();
- delete event;
- }
-
-void CModifyR4QoS::Done( TInt aResult, CPdpFsmRequestBase& aThis )
-{
-
- __ASSERT_ALWAYS(iModifyActive == &aThis, User::Invariant());
- if ( aResult == KErrNone )
- {
- // QoS Modification complete with success.
- __FLOG_1(_L("CModifyR4QoS [this=%08x]:\tDone(): QoS Params Granted"), this);
- TRAP_IGNORE(GrantedSetupL());
- }
- else
- {
- //QoS Modification complete with failure.
- __FLOG_2(_L("CModifyR4QoS [this=%08x]:\tDone(): QoS Params Rejected [aResult=%d]"), this, aResult);
- TRAP_IGNORE(RejectedSetupL(aResult));
- }
- delete iModifyActive;
- iModifyActive = NULL;
- iOwner.Done(aResult, *this);
-}
-
-
-TInt CModifyR4QoS::Start()
-{
- // Store the Context Id in order to check replies later
- iContextId = iProvider.GetContextId();
-
- TInt result;
- result = iProvider.GetPdpFsmInterface().Set(iContextId, i99);
- if (result == KErrNone)
- {
- result = iProvider.GetPdpFsmInterface().Input(iContextId, SpudMan::EContextQoSSet);
- }
-
- return result;
-}
-
-TBool CModifyR4QoS::PdpFsmEvent(TContextId aContextId, TInt aEvent, TInt aParam)
-{
- if (aContextId != iContextId)
- {
- return EFalse;
- }
-
- TBool handled(EFalse);
- if (aEvent == KContextQoSSetEvent)
- {
- if (aParam == KErrNone)
- {
- iModifyActive->Start();
- }
- else
- {
- //QoS Modification complete with failure.
- __FLOG_2(_L("CModifyR4QoS [this=%08x]:\tPdpFsmEvent(): QoS Params Rejected [aParam=%d]"), this, aParam);
- Done(aParam, *iModifyActive);
- }
- handled = ETrue;
- }
- else
- {
- handled = iModifyActive->PdpFsmEvent(aContextId, aEvent, aParam);
- }
-
- return handled;
-}
-
-
-void CModifyR4QoS::ConstructL()
-{
- iModifyActive = new(ELeave)CModifyActivePDPCtx(iProvider, *this);
-}
-
-CModifyR4QoS* CModifyR4QoS::NewL(CUmtsGprsSubConnProvd& aProvider, MPdpFsmRequestOwner& aOwner, RPacketQoS::TQoSR99_R4Requested aParams)
-{
- CModifyR4QoS* request = new(ELeave) CModifyR4QoS(aProvider, aOwner, aParams);
- CleanupStack::PushL(request);
- request->ConstructL();
- CleanupStack::Pop(request);
- return request;
-}
-
-
-
-#endif
-// SYMBIAN_NETWORKING_UMTSR5
-
--- a/telephonyprotocols/umtsgprsscpr/src/RSpudManInterface.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// The MSpudManInterface handle implementation.
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include "RSpudManInterface.h"
-
-
-RSpudManInterface::RSpudManInterface()
- :iSpudManImpl(NULL)
-{
-#ifdef __FLOG_ACTIVE
- // Logging tags
- _LIT8(KUmtsGprsLogTag1,"SubConn");
- _LIT8(KUmtsGprsLogTag2,"UmtsGprs");
- __FLOG_OPEN(KUmtsGprsLogTag1, KUmtsGprsLogTag2);
-#endif
-}
-
-
-void RSpudManInterface::Init(MSpudManInterface* aSpudManImpl)
-{
- __FLOG_2(_L("RSpudManInterface::Init: [this=%08x] [aSpudManImpl=%08x]"), this, aSpudManImpl);
- iSpudManImpl = aSpudManImpl;
-}
-
-
-void RSpudManInterface::Input(TContextId aContextId, TInt aEvent, TInt aParam)
-{
- if (iSpudManImpl)
- {
- //ignoring calls to an unitialised handle - apparently there is no
- //SpudMan.
- __FLOG_4(_L("RSpudManInterface::Input: Sending input. [this=%08x] [aContextId=%d] [aEvent=%d] [aParam=%d]"),
- this, aContextId, aEvent, aParam);
- iSpudManImpl->Input(aContextId, aEvent, aParam);
- }
- else
- {
- __FLOG_4(_L("RSpudManInterface::Input: Discarding input. [this=%08x] [aContextId=%d] [aEvent=%d] [aParam=%d]"),
- this, aContextId, aEvent, aParam);
- }
-}
-
-void RSpudManInterface::SetContextTerminationErrorAndStop(TContextId aContextId, TInt aErrorCode)
-{
- if (iSpudManImpl)
- {
- //ignoring calls to an unitialised handle - apparently there is no
- //SpudMan.
- __FLOG_3(_L("SetContextTerminationErrorAndStop: [this=%08x] [aContextId=%d] [aErrorCode=%d]"),
- this, aContextId, aErrorCode);
- iSpudManImpl->SetContextTerminationErrorAndStop(aContextId, aErrorCode);
- }
- else
- {
- __FLOG_3(_L("RSpudManInterface::SetContextTerminationErrorAndStop: Discarded! [this=%08x] [aContextId=%d] [aErrorCode=%d]"),
- this, aContextId, aErrorCode);
- }
-}
-
-void RSpudManInterface::Close ()
-{
- __FLOG_1(_L("RSpudManInterface::Close: [this=%08x]"), this);
-
- if (iSpudManImpl)
- {
- // Clear the member first to avoid ping-ponging Close() messages
- // between the PdpFsmInterface and SpudManInterface
- MSpudManInterface* spudManImpl = iSpudManImpl;
- iSpudManImpl = NULL;
- spudManImpl->Input (0, KPdpFsmShuttingDown, 0);
- }
-}
-
--- a/telephonyprotocols/umtsgprsscpr/src/UmtsGprs_defaultSubconnProv.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,299 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Implementation file for the Default Umts/Gprs SubConnection Provider
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-
-#include "UmtsGprs_defaultSubconnProv.h"
-#include "UmtsGprs_subconnProvFactory.h"
-#include "PdpFsmRequest.h"
-
-#include <commsdattypesv1_1.h>
-#include <ss_connsettings.h>
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
-#include <ip_subconparams.h>
-#endif
-
-CUmtsGprsDefaultSubConnProvd* CUmtsGprsDefaultSubConnProvd::NewL(CSubConnectionProviderFactoryBase& aFactory,
- CConnectionProviderBase& aConnProvider)
- {
- CUmtsGprsDefaultSubConnProvd* provider = new(ELeave)CUmtsGprsDefaultSubConnProvd(aFactory, aConnProvider);
- CleanupStack::PushL(provider);
- provider->ConstructL();
- CleanupStack::Pop(provider);
- return provider;
- }
-
-
-
-CUmtsGprsDefaultSubConnProvd::CUmtsGprsDefaultSubConnProvd(
- CSubConnectionProviderFactoryBase& aFactory,
- CConnectionProviderBase& aConnProvider)
-:CUmtsGprsSubConnProvd(aFactory, aConnProvider),
- iPdpFsm(NULL)
-/**
-Constructs a default UMTS SubConnection Provider
-
-@param aFactory CSubConnectionProviderFactoryBase that should own the reference to 'this'
-@param aConnProvider a connection that 'this' subconnection belongs to
-*/
- {
- iContextId = KPrimaryContextId;
- }
-
-
-void CUmtsGprsDefaultSubConnProvd::ConstructL()
- {
- iPdpFsm = new(ELeave) CPdpFsmInterface(*this);
- }
-
-
-CUmtsGprsDefaultSubConnProvd::~CUmtsGprsDefaultSubConnProvd()
- {
- delete iPdpFsm;
- }
-
-
-CUmtsGprsSubConnProvd& CUmtsGprsDefaultSubConnProvd::GetDefaultSubConnection()
- {
- return *this;
- }
-
-TBool CUmtsGprsDefaultSubConnProvd::ShouldIDeleteNow()
- {
- // Never allow client leaving events to destroy this default scpr
- // The CPr will call ConnectionGoingDown when it is deleted
- // and then we will delete this.
- return EFalse;
- }
-
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
-
-TInt CUmtsGprsDefaultSubConnProvd::AddIMCNInformationToParameterBundleL(TBool aImCnInfo)
-
-/**
-Will add the information related to the IMCN Signalling Flag into the SubCon Parameter Bundle
-so that it can be accessible by the IPSCPR while restricting the sockets
-
-@param aImCnInfo Grant status of the IMCN signalling flag
-*/
-
- {
- // Check and create the parameter bundle if NULL
- if (iParameterBundle == NULL)
- {
- iParameterBundle = CSubConParameterBundle::NewL();
- }
-
- // Add information Regarding the grant status to the parameter bundle with family
- CSubConParameterFamily * imcnFamily = CSubConParameterFamily::NewL(*iParameterBundle,KSubConnContextDescrParamsFamily);
- CleanupStack::PushL(imcnFamily);
- CSubConImsExtParamSet *imcnFlag = CSubConImsExtParamSet::NewL(*imcnFamily,CSubConParameterFamily::EGranted);
- CleanupStack::Pop(imcnFamily);
- // Set the Signalling Indication
- imcnFlag->SetImsSignallingIndicator(aImCnInfo);
-
- return KErrNone;
- }
-
-#endif //SYMBIAN_NETWORKING_UMTSR5
-
-
-void CUmtsGprsDefaultSubConnProvd::DoParametersAboutToBeSetL(CSubConParameterBundle& aParameterBundle)
-/** Should set parameters on the primary/default PDP context represented by 'this'
-
-@param
-*/
-{
- __FLOG_1(_L("CUmtsGprsDefaultSubConnProvd [this=%08x]:\tDoParametersAboutToBeSetL()"), this);
-
- if (iCurrentPdpFsmReq)
- {
- User::Leave(KErrInUse);
- }
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- // For PREQ 635, The information regarding the dedicated signalling indication is used to be stored in the
- // iParameterBundle of the Base class. Since after this call and lower layer calls (if any) is completed then
- // iParameterBundle will be replaced by aParameterBundle coming as formal function parameters.
-
- // To be able to save the information if somebody calls RSubConnection::SetParameters(...), which is there in
- // existing Parameter Bundle we need to copy the information about IMCN Signalling flag which is already there
- // iParameterBundle into aParameterBundle.
-
- // The catch here is that The layer above this must call the SetParameters() to get the parameter values, because
- // This particular call adds the granted status
-
- // Check for the existance of the appropriate family
- CSubConParameterFamily * imCnFamily = iParameterBundle != NULL ? iParameterBundle->FindFamily(KSubConnContextDescrParamsFamily): NULL;
- if (imCnFamily)
- {
- // we have the Family, get the status of IMCN signalling Flag
- CSubConImsExtParamSet *imCnSig = static_cast<CSubConImsExtParamSet*>
- (imCnFamily->FindExtensionSet(STypeId::CreateSTypeId(KSubConIPParamsUid,KSubConImsExtParamsType),
- CSubConParameterFamily::EGranted));
-
- // We have the variable, copy the contents
- if(imCnSig)
- {
- CSubConParameterFamily * contextFamily = CSubConParameterFamily::NewL(aParameterBundle,KSubConnContextDescrParamsFamily);
- CleanupStack::PushL(contextFamily);
- CSubConImsExtParamSet *imCnFlag = CSubConImsExtParamSet::NewL(*contextFamily,CSubConParameterFamily::EGranted);
- CleanupStack::Pop(contextFamily);
- imCnFlag->SetImsSignallingIndicator(imCnSig->GetImsSignallingIndicator());
- }
- }
-
-#endif // SYMBIAN_NETWORKING_UMTSR5
-
- ResetQosRelease();
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
-
- RPacketQoS::TQoSR5Requested requestedParams;
- MapQosParamBundleToEtelL(aParameterBundle, &requestedParams);
- CModifyR5QoS* modifyR5QoS = CModifyR5QoS::NewL(*this, *this, requestedParams);
- iCurrentPdpFsmReq = modifyR5QoS;
- modifyR5QoS->Start();
-
-#else
- RPacketQoS::TQoSR99_R4Requested requestedParams;
- MapQosParamBundleToEtelL(aParameterBundle, &requestedParams);
- CModifyR4QoS* modifyR4QoS = CModifyR4QoS::NewL(*this, *this, requestedParams);
- iCurrentPdpFsmReq = modifyR4QoS;
- modifyR4QoS->Start();
-
-#endif // SYMBIAN_NETWORKING_UMTSR5
-
-}
-
-
-void CUmtsGprsDefaultSubConnProvd::GetQoSDefaultsL(RPacketQoS::TQoSR99_R4Requested* aParams)
-{
- CConnectionSettings& settingAccess = iConnectionProvider->SettingsAccessL();
- TUint32 data;
-
- settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSReqTrafficClass),data, NULL);
- aParams->iReqTrafficClass = (RPacketQoS::TTrafficClass)data;
-
- settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSMinTrafficClass),data, NULL);
- aParams->iMinTrafficClass = (RPacketQoS::TTrafficClass)data;
-
- settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSReqDeliveryOrder),data, NULL);
- aParams->iReqDeliveryOrderReqd = (RPacketQoS::TDeliveryOrder)data;
-
- settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSMinDeliveryOrder),data, NULL);
- aParams->iMinDeliveryOrderReqd = (RPacketQoS::TDeliveryOrder)data;
-
- settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSReqDeliverErroneousSDU),data, NULL);
- aParams->iReqDeliverErroneousSDU = (RPacketQoS::TErroneousSDUDelivery)data;
-
- settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSMinDeliverErroneousSDU),data, NULL);
- aParams->iMinDeliverErroneousSDU = (RPacketQoS::TErroneousSDUDelivery)data;
-
- settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSReqMaxSDUSize),data, NULL);
- aParams->iReqMaxSDUSize = (TInt)data;
-
- settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSMinAcceptableMaxSDUSize),data, NULL);
- aParams->iMinAcceptableMaxSDUSize = (TInt)data;
-
- settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSReqMaxUplinkRate),data, NULL);
- aParams->iReqMaxRate.iUplinkRate = (TInt)data;
-
- settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSReqMinUplinkRate),data, NULL);
- aParams->iMinAcceptableMaxRate.iUplinkRate = (TInt)data;
-
- settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSReqMaxDownlinkRate),data, NULL);
- aParams->iReqMaxRate.iDownlinkRate = (TInt)data;
-
- settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSReqMinDownlinkRate),data, NULL);
- aParams->iMinAcceptableMaxRate.iDownlinkRate = (TInt)data;
-
- settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSReqBER),data, NULL);
- aParams->iReqBER = (RPacketQoS::TBitErrorRatio)data;
-
- settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSMaxBER),data, NULL);
- aParams->iMaxBER = (RPacketQoS::TBitErrorRatio)data;
-
- settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSReqSDUErrorRatio),data, NULL);
- aParams->iReqSDUErrorRatio = (RPacketQoS::TSDUErrorRatio)data;
-
- settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSMaxSDUErrorRatio),data, NULL);
- aParams->iMaxSDUErrorRatio = (RPacketQoS::TSDUErrorRatio)data;
-
- settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSReqTrafficHandlingPriority),data, NULL);
- aParams->iReqTrafficHandlingPriority = (RPacketQoS::TTrafficHandlingPriority)data;
-
- settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSMinTrafficHandlingPriority),data, NULL);
- aParams->iMinTrafficHandlingPriority = (RPacketQoS::TTrafficHandlingPriority)data;
-
- settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSReqTransferDelay),data, NULL);
- aParams->iReqTransferDelay = (TInt)data;
-
- settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSMaxTransferDelay),data, NULL);
- aParams->iMaxTransferDelay = (TInt)data;
-
- settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSReqGuaranteedUplinkRate),data, NULL);
- aParams->iReqGuaranteedRate.iUplinkRate = (TInt)data;
-
- settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSMinGuaranteedUplinkRate),data, NULL);
- aParams->iMinGuaranteedRate.iUplinkRate = (TInt)data;
-
- settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSReqGuaranteedDownlinkRate),data, NULL);
- aParams->iMinGuaranteedRate.iDownlinkRate = (TInt)data;
-
- settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSMinGuaranteedDownlinkRate),data, NULL);
- aParams->iMinGuaranteedRate.iDownlinkRate = (TInt)data;
-}
-
-
-
-
-/**
-This override of the DoControl() method is used to initialise the RPdpFsmInterface object
-in the SpudMan with a pointer to the real CPdpFsmInterface object owned by the
-subconnection provider.
-
-@param aOptionLevel
-@param aOptionName
-@param aOption
-*/
-TInt CUmtsGprsDefaultSubConnProvd::DoControl(TUint aOptionLevel, TUint aOptionName, TDes8& aOption)
- {
- __FLOG_1(_L("CUmtsGprsDefaultSubConnProvd::DoControl [%08x]"), this);
- if (aOptionLevel == KSOLInterface && aOptionName == KInitialisePdpFsm)
- {
- CNifIfBase* nif = *reinterpret_cast<CNifIfBase**>(const_cast<TUint8*>(aOption.Ptr()));
- ASSERT(nif != NULL);
- TPckg<MPdpFsmInterface*> pdpfsm(iPdpFsm);
- return nif->Control(KSOLInterface, KInitialisePdpFsm, pdpfsm);
- }
-
- return CUmtsGprsSubConnProvd::Control(aOptionLevel, aOptionName, aOption);
- }
-
-
-CPdpFsmInterface& CUmtsGprsDefaultSubConnProvd::GetPdpFsmInterface()
- {
- return *iPdpFsm;
- }
-
--- a/telephonyprotocols/umtsgprsscpr/src/UmtsGprs_subconnProv.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,764 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Implementation file for the Umts/Gprs SubConnection Provider
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-
-
-#include <cs_subconevents.h>
-#include "UmtsGprs_subconnProv.h"
-
-const TInt KQoSMappingBorderDelay = 250;
-
-#define IN_RANGE_INCLUSIVE(value, left, right) (value >= left && value <= right )
-#define MIN(left, right) (left < right ? left : right)
-
-//We need to use a cleanup item here becuase CSubConNotificationEvents are not CBase derived. This means that on cleanup, things are not cleaned up as expected
-//We therefore need a TCleanupItem to deal with it.
-void SubconEventCleanupFunction(TAny* aEvent)
- {
- CSubConNotificationEvent* ptr = static_cast<CSubConNotificationEvent*>(aEvent);
- delete ptr;
- }
-
-void SubconParamSetCleanupFunction(TAny* aEvent)
- {
- CSubConParameterSet* ptr = static_cast<CSubConParameterSet*>(aEvent);
- delete ptr;
- }
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
-void CUmtsGprsSubConnProvd::MapQosParamBundleToEtelL(const CSubConParameterBundle& aIn,
- RPacketQoS::TQoSR5Requested* aOut)
-
-#else
-// !SYMBIAN_NETWORKING_UMTSR5
-
-void CUmtsGprsSubConnProvd::MapQosParamBundleToEtelL(const CSubConParameterBundle& aIn,
- RPacketQoS::TQoSR99_R4Requested* aOut)
-#endif
-// SYMBIAN_NETWORKING_UMTSR5
- {
- ASSERT(aOut);
-
- //Note: There should probably be const and non-const versions of FindFamily.
- //There is only non-const, hence casting below.
- CSubConParameterFamily* family = const_cast<CSubConParameterBundle&>(aIn).FindFamily(KSubConQoSFamily);
- if (!family)
- {
- User::Leave(KErrArgument);
- }
-
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- // check the UMTS R5 extension first
- CSubConQosR5ParamSet* extRequestedR5 = NULL;
- CSubConQosR5ParamSet* extAcceptableR5 = NULL;
-
- extRequestedR5 = static_cast<CSubConQosR5ParamSet*>(family->FindExtensionSet(
- STypeId::CreateSTypeId(KSubCon3GPPExtParamsFactoryUid,KSubConQosR5ParamsType), CSubConParameterFamily::ERequested));
-
- extAcceptableR5 = static_cast<CSubConQosR5ParamSet*>(family->FindExtensionSet(
- STypeId::CreateSTypeId(KSubCon3GPPExtParamsFactoryUid,KSubConQosR5ParamsType), CSubConParameterFamily::EAcceptable));
-
- if (extRequestedR5)
- {
- MapQosR5ExtensionSetToEtel (*extRequestedR5, extAcceptableR5, aOut);
- iParameterRelease = KParameterRel5;
- return;
- }
-#endif
-
- // No R5 so check the UMTS R99/R4 extension next
- CSubConQosR99ParamSet* extRequestedR99 = NULL;
- CSubConQosR99ParamSet* extAcceptableR99 = NULL;
- extRequestedR99 = static_cast<CSubConQosR99ParamSet*>(family->FindExtensionSet(
- STypeId::CreateSTypeId(KSubCon3GPPExtParamsFactoryUid,KSubConQosR99ParamsType), CSubConParameterFamily::ERequested));
-
- extAcceptableR99 = static_cast<CSubConQosR99ParamSet*>(family->FindExtensionSet(
- STypeId::CreateSTypeId(KSubCon3GPPExtParamsFactoryUid,KSubConQosR99ParamsType), CSubConParameterFamily::EAcceptable));
-
- if (extRequestedR99)
- {
- MapQosR99ExtensionSetToEtel (*extRequestedR99, extAcceptableR99, aOut);
- iParameterRelease = KParameterRel4Rel99;
- return;
- }
-
-
- // Still nothing specific, try to use the generic params
- CSubConQosGenericParamSet* genericRequested =
- static_cast<CSubConQosGenericParamSet*>(family->GetGenericSet(CSubConParameterFamily::ERequested));
- CSubConQosGenericParamSet* genericAcceptable =
- static_cast<CSubConQosGenericParamSet*>(family->GetGenericSet(CSubConParameterFamily::EAcceptable));
-
- if (genericRequested)
- {
- MapQosGenericSetToEtel (*genericRequested, genericAcceptable, aOut);
- iParameterRelease = KParameterRelGeneric;
- return;
- }
-
- // Nothing left that we support
- User::Leave(KErrNotSupported);
- }
-
-
-/**
-Maps given requested and acceptable sets of R99/R4 parameters as defined CSubConQosR99ParamSet
-into the Etel format (RPacketQoS::TQoSR99_R4Requested).
-
-@param aInRequested requested CSubConQosR99ParamSet to be converted
-@param aInAcceptable optional acceptable CSubConQosR99ParamSet to be converted
-@param aOut RPacketQoS::TQoSR99_R4Requested derived class to be mapped into.
-*/
-void CUmtsGprsSubConnProvd::MapQosR99ExtensionSetToEtel(const CSubConQosR99ParamSet& aInRequested,
- const CSubConQosR99ParamSet* aInAcceptable, RPacketQoS::TQoSR99_R4Requested* aOut)
- {
- ASSERT (aOut);
-
- aOut->iReqTrafficClass = aInRequested.GetTrafficClass();
- aOut->iReqDeliveryOrderReqd = aInRequested.GetDeliveryOrder();
- aOut->iReqDeliverErroneousSDU = aInRequested.GetErroneousSDUDelivery();
- aOut->iReqBER = aInRequested.GetResidualBitErrorRatio();
- aOut->iReqSDUErrorRatio = aInRequested.GetSDUErrorRatio();
- aOut->iReqTrafficHandlingPriority = aInRequested.GetTrafficHandlingPriority();
- aOut->iReqTransferDelay = aInRequested.GetTransferDelay();
- aOut->iReqMaxSDUSize = aInRequested.GetMaxSduSize();
- aOut->iReqMaxRate.iUplinkRate = aInRequested.GetMaxBitrateUplink();
- aOut->iReqMaxRate.iDownlinkRate = aInRequested.GetMaxBitrateDownlink();
- aOut->iReqGuaranteedRate.iUplinkRate = aInRequested.GetGuaBitrateUplink();
- aOut->iReqGuaranteedRate.iDownlinkRate = aInRequested.GetGuaBitrateDownlink();
-
- if (!aInAcceptable)
- {
- // when aInAcceptable is ommitted the minimum is the requested
- aInAcceptable = &aInRequested;
- }
-
- aOut->iMinTrafficClass = aInAcceptable->GetTrafficClass();
- aOut->iMinDeliveryOrderReqd = aInAcceptable->GetDeliveryOrder();
- aOut->iMinDeliverErroneousSDU = aInAcceptable->GetErroneousSDUDelivery();
- aOut->iMaxBER = aInAcceptable->GetResidualBitErrorRatio();
- aOut->iMaxSDUErrorRatio = aInAcceptable->GetSDUErrorRatio();
- aOut->iMinTrafficHandlingPriority = aInAcceptable->GetTrafficHandlingPriority();
- aOut->iMaxTransferDelay = aInAcceptable->GetTransferDelay();
- aOut->iMinAcceptableMaxSDUSize = aInAcceptable->GetMaxSduSize();
- aOut->iMinAcceptableMaxRate.iUplinkRate = aInAcceptable->GetMaxBitrateUplink();
- aOut->iMinAcceptableMaxRate.iDownlinkRate = aInAcceptable->GetMaxBitrateDownlink();
- aOut->iMinGuaranteedRate.iUplinkRate = aInAcceptable->GetGuaBitrateUplink();
- aOut->iMinGuaranteedRate.iDownlinkRate = aInAcceptable->GetGuaBitrateDownlink();
- }
-
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
-/**
-Maps given requested and acceptable sets of R5 parameters as defined CSubConQosR5ParamSet
-into the Etel format (RPacketQoS::TQoSR5Requested).
-
-
-@param aInRequested requested CSubConQosR5ParamSet to be converted
-@param aInAcceptable optional acceptable CSubConQosR5ParamSet to be converted
-@param aOut RPacketQoS::TQoSR5Requested derived class to be mapped into.
-*/
-void CUmtsGprsSubConnProvd::MapQosR5ExtensionSetToEtel(const CSubConQosR5ParamSet& aInRequested,
- const CSubConQosR5ParamSet* aInAcceptable, RPacketQoS::TQoSR5Requested* aOut)
- {
- MapQosR99ExtensionSetToEtel(aInRequested,aInAcceptable,aOut);
- aOut->iSourceStatisticsDescriptor = aInRequested.GetSourceStatisticsDescriptor();
- aOut->iSignallingIndication = aInRequested.GetSignallingIndicator();
- }
-
-
-void CUmtsGprsSubConnProvd::MapQosR99ExtensionSetToEtel(const CSubConQosR99ParamSet& aInRequested,
- const CSubConQosR99ParamSet* aInAcceptable, RPacketQoS::TQoSR5Requested* aOut)
- {
- MapQosR99ExtensionSetToEtel(aInRequested, aInAcceptable, static_cast<RPacketQoS::TQoSR99_R4Requested*>(aOut));
- aOut->iSourceStatisticsDescriptor = RPacketQoS::ESourceStatisticsDescriptorUnknown;
- aOut->iSignallingIndication = EFalse;
- }
-
-#endif
-// SYMBIAN_NETWORKING_UMTSR5
-
-/**
-Given a set of generic parameters, the method derives the R99 value for the traffic class.
-
-
-@param aIn requested CSubConQosGenericParamSet to be converted
-@return the value of RPacketQoS::TTrafficClass
-*/
-RPacketQoS::TTrafficClass CUmtsGprsSubConnProvd::DeriveTrafficClass(const CSubConQosGenericParamSet& aIn )
- {
- //-----------------------------------
- // Traffic class
- //-----------------------------------
- if (IN_RANGE_INCLUSIVE(aIn.GetUpLinkDelay(), 0, KQoSMappingBorderDelay-1) ||
- IN_RANGE_INCLUSIVE(aIn.GetDownLinkDelay(), 0, KQoSMappingBorderDelay-1) )
- {
- return RPacketQoS::ETrafficClassConversational;
- }
- else if (aIn.GetUpLinkDelay() >= KQoSMappingBorderDelay ||
- aIn.GetDownLinkDelay() >= KQoSMappingBorderDelay )
- {
- return RPacketQoS::ETrafficClassStreaming;
- }
- else if (IN_RANGE_INCLUSIVE(aIn.GetUpLinkPriority(), 1, 3) ||
- IN_RANGE_INCLUSIVE(aIn.GetDownLinkPriority(), 1, 3))
- {
- return RPacketQoS::ETrafficClassInteractive;
- }
-
- return RPacketQoS::ETrafficClassBackground;
- }
-
-
-/**
-Given a set of generic parameters, the method derives the R99 value for the traffic priority.
-
-
-@param aIn requested CSubConQosGenericParamSet to be converted
-@return the value of RPacketQoS::TTrafficHandlingPriority
-*/
-RPacketQoS::TTrafficHandlingPriority CUmtsGprsSubConnProvd::DeriveTrafficPriority(const CSubConQosGenericParamSet& aIn )
- {
- //
- // Traffic handling priority
- //
- if (aIn.GetUpLinkPriority() == 1 || aIn.GetDownLinkPriority() == 1)
- {
- return RPacketQoS::ETrafficPriority1;
- }
- else if (aIn.GetUpLinkPriority() == 2 || aIn.GetDownLinkPriority() == 2)
- {
- return RPacketQoS::ETrafficPriority2;
- }
-
- return RPacketQoS::ETrafficPriority3;
- }
-
-
-/**
-Maps given requested and acceptable sets of generic QoS parameters as defined CSubConQosGenericParamSet
-into the Etel format (RPacketQoS::TQoSR99_R4Requested).
-
-
-@param aInRequested requested CSubConQosGenericParamSet to be converted
-@param aInAcceptable optional acceptable CSubConQosGenericParamSet to be converted
-@param aOut RPacketQoS::TQoSR99_R4Requested to be produced.
-*/
-void CUmtsGprsSubConnProvd::MapQosGenericSetToEtel(const CSubConQosGenericParamSet& aInRequested,
- const CSubConQosGenericParamSet* aInAcceptable, RPacketQoS::TQoSR99_R4Requested* aOut)
- {
- ASSERT (aOut);
-
- aOut->iReqDeliveryOrderReqd = RPacketQoS::EDeliveryOrderNotRequired;
- aOut->iReqDeliverErroneousSDU = RPacketQoS::EErroneousSDUDeliveryNotRequired;;
- aOut->iReqBER = RPacketQoS::EBERUnspecified;
- aOut->iReqSDUErrorRatio = RPacketQoS::ESDUErrorRatioUnspecified;
-
- aOut->iReqTrafficClass = DeriveTrafficClass(aInRequested);
- aOut->iReqTrafficHandlingPriority = DeriveTrafficPriority(aInRequested);
- aOut->iReqTransferDelay = MIN(aInRequested.GetUpLinkDelay(), aInRequested.GetDownLinkDelay());
- aOut->iReqMaxSDUSize = aInRequested.GetUpLinkMaximumPacketSize();
- aOut->iReqMaxRate.iUplinkRate = aInRequested.GetUplinkBandwidth();
- aOut->iReqMaxRate.iDownlinkRate = aInRequested.GetDownlinkBandwidth();
- aOut->iReqGuaranteedRate.iUplinkRate = aInRequested.GetUplinkBandwidth();
- aOut->iReqGuaranteedRate.iDownlinkRate = aInRequested.GetDownlinkBandwidth();
-
- if (!aInAcceptable)
- {
- // when aInAcceptable is ommitted the minimum is the requested
- aInAcceptable = &aInRequested;
- }
-
- aOut->iMinDeliveryOrderReqd = RPacketQoS::EDeliveryOrderNotRequired;
- aOut->iMinDeliverErroneousSDU = RPacketQoS::EErroneousSDUDeliveryNotRequired;
- aOut->iMaxBER = RPacketQoS::EBERUnspecified;
- aOut->iMaxSDUErrorRatio = RPacketQoS::ESDUErrorRatioUnspecified;
-
- aOut->iMinTrafficClass = DeriveTrafficClass(*aInAcceptable);
- aOut->iMinTrafficHandlingPriority = DeriveTrafficPriority(*aInAcceptable);
- aOut->iMaxTransferDelay = MIN(aInAcceptable->GetUpLinkDelay(), aInAcceptable->GetDownLinkDelay());
- aOut->iMinAcceptableMaxSDUSize = aInAcceptable->GetUpLinkMaximumPacketSize();
- aOut->iMinAcceptableMaxRate.iUplinkRate = aInAcceptable->GetUplinkBandwidth();
- aOut->iMinAcceptableMaxRate.iDownlinkRate = aInAcceptable->GetDownlinkBandwidth();
- aOut->iMinGuaranteedRate.iUplinkRate = aInAcceptable->GetUplinkBandwidth();
- aOut->iMinGuaranteedRate.iDownlinkRate = aInAcceptable->GetDownlinkBandwidth();
- }
-
-
-
-/**
-Maps QoS parameters received from the network via Etel into a CSubConGenEventParamsGranted class
-so that it is usable by the RSubConnection API.
-
-@param aNetworkQoS - A pointer to an Etel TPacketDataConfigBase class containing the
-QoS to be mapped into the QoS event.
-@param aGranted - A reference to the CSubConGenEventParamsGranted object that should receive the mapped
-QoS parameters.
-*/
-void CUmtsGprsSubConnProvd::MapQosEtelToGrantedParamsL (TPacketDataConfigBase* aNetworkQoS,CSubConGenEventParamsGranted& aGranted)
- {
- ASSERT (aNetworkQoS);
-
- // Always set the generic set
- MapQosEtelToGenericSetL ((static_cast<RPacketQoS::TQoSR99_R4Negotiated*>(aNetworkQoS)), aGranted);
-
-
-
- switch (iParameterRelease)
- {
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- case KParameterRel5:
- // Control client sent us an R5 qos request
- MapQosEtelToR5SetL ((static_cast<RPacketQoS::TQoSR5Negotiated*>(aNetworkQoS)), aGranted);
- break;
-#endif
-// SYMBIAN_NETWORKING_UMTSR5
-
- case KParameterRelInvalid:
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- // This will be the case if the client hasn't actually requested a level of QoS yet
- // but the network has notified us of a QoS change. We don't know what the client might
- // support so return both sets (if the define is set, else just what the code supports)
- MapQosEtelToR5SetL ((static_cast<RPacketQoS::TQoSR5Negotiated*>(aNetworkQoS)), aGranted);
-#endif
- MapQosEtelToR99SetL ((static_cast<RPacketQoS::TQoSR99_R4Negotiated*>(aNetworkQoS)), aGranted);
- break;
-
- case KParameterRel4Rel99:
- // Control client sent us an R4/R99 qos request
- MapQosEtelToR99SetL ((static_cast<RPacketQoS::TQoSR99_R4Negotiated*>(aNetworkQoS)), aGranted);
- break;
-
- case KParameterRelGeneric:
- // Generic set always returned. Done above.
- break;
- }
- }
-
-
-/**
-Maps QoS parameters received from the network via Etel into a 3GPP Release R4/R99 set and
-sets it in the given event.
-
-@param aNetworkQoS - A pointer to an Etel RPacketQoS::TQoSR99_R4Requested derived class containing
-the QoS to be mapped.
-@param aGranted - A reference to the CSubConGenEventParamsGranted object that should receive the
-extension QoS parameters.
-*/
-void CUmtsGprsSubConnProvd::MapQosEtelToR99SetL (RPacketQoS::TQoSR99_R4Negotiated* aNetworkQoS,
- CSubConGenEventParamsGranted& aGranted)
- {
- ASSERT (aNetworkQoS);
-
- CSubConQosR99ParamSet* r99Extension = CSubConQosR99ParamSet::NewL ();
- CleanupStack::PushL(TCleanupItem(SubconParamSetCleanupFunction,r99Extension));
- r99Extension->SetTrafficClass(aNetworkQoS->iTrafficClass);
- r99Extension->SetDeliveryOrder(aNetworkQoS->iDeliveryOrderReqd);
- r99Extension->SetErroneousSDUDelivery(aNetworkQoS->iDeliverErroneousSDU);
- r99Extension->SetResidualBitErrorRatio(aNetworkQoS->iBER);
- r99Extension->SetSDUErrorRatio(aNetworkQoS->iSDUErrorRatio);
- r99Extension->SetTrafficHandlingPriority(aNetworkQoS->iTrafficHandlingPriority);
- r99Extension->SetTransferDelay(aNetworkQoS->iTransferDelay);
- r99Extension->SetMaxSduSize(aNetworkQoS->iMaxSDUSize);
- r99Extension->SetMaxBitrateUplink(aNetworkQoS->iMaxRate.iUplinkRate);
- r99Extension->SetMaxBitrateDownlink(aNetworkQoS->iMaxRate.iDownlinkRate);
- r99Extension->SetGuaBitrateUplink(aNetworkQoS->iGuaranteedRate.iUplinkRate);
- r99Extension->SetGuaBitrateDownlink(aNetworkQoS->iGuaranteedRate.iDownlinkRate);
-
- aGranted.AddExtensionSetL (r99Extension);
- CleanupStack::Pop(); //r99Extension
- }
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
-/**
-Maps QoS parameters received from the network via Etel into a 3GPP Release R5 set and
-sets it in the given event.
-
-@param aNetworkQoS - A pointer to an Etel RPacketQoS::TQoSR5Requested derived class containing
-the QoS to be mapped.
-@param aGranted - A reference to the CSubConGenEventParamsGranted object that should receive the
-extension QoS parameters.
-*/
-void CUmtsGprsSubConnProvd::MapQosEtelToR5SetL (RPacketQoS::TQoSR5Negotiated* aNetworkQoS,
- CSubConGenEventParamsGranted& aGranted)
- {
- ASSERT (aNetworkQoS);
-
- CSubConQosR5ParamSet* r5Extension = CSubConQosR5ParamSet::NewL ();
- CleanupStack::PushL(TCleanupItem(SubconParamSetCleanupFunction,r5Extension));
- r5Extension->SetTrafficClass(aNetworkQoS->iTrafficClass);
- r5Extension->SetDeliveryOrder(aNetworkQoS->iDeliveryOrderReqd);
- r5Extension->SetErroneousSDUDelivery(aNetworkQoS->iDeliverErroneousSDU);
- r5Extension->SetResidualBitErrorRatio(aNetworkQoS->iBER);
- r5Extension->SetSDUErrorRatio(aNetworkQoS->iSDUErrorRatio);
- r5Extension->SetTrafficHandlingPriority(aNetworkQoS->iTrafficHandlingPriority);
- r5Extension->SetTransferDelay(aNetworkQoS->iTransferDelay);
- r5Extension->SetMaxSduSize(aNetworkQoS->iMaxSDUSize);
- r5Extension->SetMaxBitrateUplink(aNetworkQoS->iMaxRate.iUplinkRate);
- r5Extension->SetMaxBitrateDownlink(aNetworkQoS->iMaxRate.iDownlinkRate);
- r5Extension->SetGuaBitrateUplink(aNetworkQoS->iGuaranteedRate.iUplinkRate);
- r5Extension->SetGuaBitrateDownlink(aNetworkQoS->iGuaranteedRate.iDownlinkRate);
-
- r5Extension->SetSourceStatisticsDescriptor(aNetworkQoS->iSourceStatisticsDescriptor);
- r5Extension->SetSignallingIndicator(aNetworkQoS->iSignallingIndication);
-
- aGranted.AddExtensionSetL (r5Extension);
- CleanupStack::Pop(); //r5Extension
- }
-
-
-#endif
-// SYMBIAN_NETWORKING_UMTSR5
-
-
-/**
-Maps QoS parameters received from the network via Etel into a generic set and sets it in the given event.
-
-@param aNetworkQoS - A pointer to an Etel RPacketQoS::TQoSR99_R4Requested derived class containing the QoS
-to be mapped.
-@param aFamily - A reference to the CSubConGenEventParamsGranted object that should receive the
-generic QoS parameters.
-*/
-void CUmtsGprsSubConnProvd::MapQosEtelToGenericSetL (RPacketQoS::TQoSR99_R4Negotiated* aNetworkQoS,
- CSubConGenEventParamsGranted& aGranted)
- {
- ASSERT (aNetworkQoS);
-
- CSubConQosGenericParamSet* genericQoS = CSubConQosGenericParamSet::NewL ();
-
- genericQoS->SetDownlinkBandwidth (aNetworkQoS->iGuaranteedRate.iDownlinkRate);
- genericQoS->SetUplinkBandwidth (aNetworkQoS->iGuaranteedRate.iUplinkRate);
- genericQoS->SetDownLinkDelay (aNetworkQoS->iTransferDelay);
- genericQoS->SetUpLinkDelay (aNetworkQoS->iTransferDelay);
- genericQoS->SetDownLinkMaximumPacketSize (aNetworkQoS->iMaxSDUSize);
- genericQoS->SetUpLinkMaximumPacketSize (aNetworkQoS->iMaxSDUSize);
-
- switch (aNetworkQoS->iTrafficHandlingPriority)
- {
- case RPacketQoS::ETrafficPriority1:
- genericQoS->SetDownLinkPriority (RPacketQoS::ETrafficPriority1);
- genericQoS->SetUpLinkPriority (RPacketQoS::ETrafficPriority1);
- break;
-
- case RPacketQoS::ETrafficPriority2:
- genericQoS->SetDownLinkPriority (RPacketQoS::ETrafficPriority2);
- genericQoS->SetUpLinkPriority (RPacketQoS::ETrafficPriority2);
- break;
-
- case RPacketQoS::ETrafficPriority3:
- genericQoS->SetDownLinkPriority (RPacketQoS::ETrafficPriority3);
- genericQoS->SetUpLinkPriority (RPacketQoS::ETrafficPriority3);
- break;
-
- default:
- genericQoS->SetDownLinkPriority (RPacketQoS::ETrafficPriorityUnspecified);
- genericQoS->SetUpLinkPriority (RPacketQoS::ETrafficPriorityUnspecified);
- break;
- }
-
- aGranted.SetGenericSet (genericQoS);
- }
-
-
-
-CPdpFsmInterface& CUmtsGprsSubConnProvd::GetPdpFsmInterface()
- {
- return GetDefaultSubConnection().GetPdpFsmInterface();
- }
-
-
-TBool CUmtsGprsSubConnProvd::PdpFsmEvent(TContextId aContextId, TInt aEvent, TInt aParam)
- {
- if (iCurrentPdpFsmReq)
- {
- TBool handled(EFalse);
- handled = iCurrentPdpFsmReq->PdpFsmEvent(aContextId, aEvent, aParam);
- return handled;
- }
-
- // Any events that are not a result of a request that we've made must be forwarded to
- // control clients.
-
- switch(aEvent)
- {
- case KContextParametersChangeEvent:
- // For QoS Changed the event must be processed here, it doesn't occur as a response
- // to something we've requested.
- __FLOG_2(_L("CUmtsGprsSubConnProvd [this=%08x]:\tPdpFsmEvent(): QoS Params Changed [aParam=%d]"), this, aParam);
- TRAP_IGNORE(NotifyParamsChangedL(aParam));
- break;
-
- case KContextDeleteEvent:
- // For network-initiate close of PDP context.
- __FLOG_2(_L("CUmtsGprsSubConnProvd [this=%08x]:\tPdpFsmEvent(): Context Delete Event [aParam=%d]"), this, aParam);
- TRAP_IGNORE(NotifySubConDownL(aParam));
- break;
-
- case KContextBlockedEvent: // A PDP context becomes blocked
- case KContextUnblockedEvent: // A PDP context becomes unblocked
- case KNetworkStatusEvent: // For different network indications
- case KContextQoSSetEvent: // Response to KContextQoSSet
- case KContextTFTModifiedEvent: // Response to KContextTFTModify
- case KPrimaryContextCreated: // Primary context at startup created
- case KSecondaryContextCreated: // Secondary context created
- case KContextModifyActiveEvent: // Response to KModifyActive
- case KGetNegQoSEvent: // Response to KGetNegQoS. ** Used internally by NIF **
- default:
- // Do nothing.
- break;
- }
-
- // Although we have notified the change of qos to the client application we haven't handled this
- // event. We can get here because the network changed the QoS without a request from us, or
- // because a secondary context (actually owned by GuQoS) has been promoted to default.
- return EFalse;
- }
-
-void CUmtsGprsSubConnProvd::NotifySubConDownL(TInt aError)
- {
- CSubConGenEventSubConDown* event = CSubConGenEventSubConDown::NewL();
- CleanupStack::PushL(TCleanupItem(SubconEventCleanupFunction, event));
- event->SetError(aError);
- NotifyClientEvent(*event);
- CleanupStack::PopAndDestroy (); //event
- }
-
-
-void CUmtsGprsSubConnProvd::NotifyParamsChangedL(TInt aError)
- {
- CSubConGenEventParamsChanged* event = CSubConGenEventParamsChanged::NewL();
- CleanupStack::PushL(TCleanupItem(SubconEventCleanupFunction, event));
- event->SetFamily (KSubConQoSFamily);
- event->SetError (aError);
-
-#ifdef SYMBIAN_NETWORKING_UMTSR5
- RPacketQoS::TQoSR5Negotiated negotiatedQoS;
-#else
- RPacketQoS::TQoSR99_R4Negotiated negotiatedQoS;
-#endif
-
- GetPdpFsmInterface().Get(GetContextId(), negotiatedQoS);
- MapQosEtelToGrantedParamsL(&negotiatedQoS, *event);
- NotifyClientEvent (*event);
- CleanupStack::PopAndDestroy (); //event
- }
-
-
-MConnectionDataClient* CUmtsGprsSubConnProvd::DoSelfConnectionDataClient()
- {
- return this;
- }
-
-
-CPdpFsmRequestBase::CPdpFsmRequestBase(CUmtsGprsSubConnProvd& aProvider, MPdpFsmRequestOwner& aOwner)
- :iProvider(aProvider), iOwner(aOwner)
- {
- __FLOG_OPEN(KUmtsGprsLogTag1, KUmtsGprsLogTag2);
- }
-
-
-CSubConnectionProviderBase* CUmtsGprsSubConnProvd::DoNextLayer()
- {
- __FLOG_1(_L("CUmtsGprsSubConnProvd::DoNextLayer [this=%08x] - this is (by design) the last layer"), this);
- return NULL;
- }
-
-
-//-=========================================================
-//
-// Ignored overrides.
-//
-//-=========================================================
-
-
-
-/** Convert the given parameter budle to Etel language (r99) and if at the time possible, submit the request SPUDFSM.
-@param
-*/
-void CUmtsGprsSubConnProvd::DoParametersAboutToBeSetL(CSubConParameterBundle& /*aParameterBundle*/)
- {
- __FLOG_1(_L("CUmtsGprsSubConnProvd::DoParametersAboutToBeSetL [this=%08x]"), this);
-
- iParameterRelease = KParameterRelInvalid;
- //TODO: implement set qos on secondaries when UmtsGprsSCPR enables ECreateNew SubConnection Providers.
- }
-
-
-CConnDataTransfer& CUmtsGprsSubConnProvd::DoDataTransferL()
- {
- //TODO: implement when UmtsGprsSCPR enables ECreateNew SubConnection Providers.
- User::Leave(KErrNotSupported);
- return iNextLayer->DataTransferL();
- }
-
-
-
-/**
-From MConnectionDataClient
-*/
-void CUmtsGprsSubConnProvd::Notify(TNotify /*aNotifyType*/, CConnectionProviderBase* /*aConnProvider*/,
- TInt /*aError*/, const CConNotificationEvent* /*aConNotificationEvent*/)
- {
- //TODO: implement when UmtsGprsSCPR enables ECreateNew SubConnection Providers.
- }
-
-/**
-From MConnectionDataClient
-*/
-void CUmtsGprsSubConnProvd::AttachToNext(CSubConnectionProviderBase* /*aSubConnProvider*/)
- {
- //TODO: implement when UmtsGprsSCPR enables ECreateNew SubConnection Providers.
- }
-
-/**
-From MConnectionDataClient
-*/
-void CUmtsGprsSubConnProvd::ConnectionGoingDown(CConnectionProviderBase& aConnProvider)
- {
- (void)aConnProvider;
- __FLOG_2(_L("CUmtsGprsSubConnProvd [this=%08x]:\tConnectionGoingDown() [aConnProvider=%08x]"), this, &aConnProvider);
- iConnectionProvider = NULL;
- DeleteMeNow();
- }
-
-/**
-From MConnectionDataClient
-*/
-void CUmtsGprsSubConnProvd::ConnectionError(TInt /*aStage*/, TInt /*aError*/)
- {
- //TODO: implement when UmtsGprsSCPR enables ECreateNew SubConnection Providers.
- }
-
-/**
-Function called by Connection Provider when a socket is to be added to the QoS Flow ('this')
-
-@param aDataClient Data Client to add to the QoS Channel
-*/
-void CUmtsGprsSubConnProvd::DoDataClientJoiningL(MSubConnectionDataClient& aDataClient)
- {
- (void)aDataClient;
- __FLOG_3(_L("CUmtsGprsSubConnProvd [this=%08x]:\tDoDataClientJoiningL() [iDataClients.Count=%d] [aDataClient=%08x]"), this, iDataClients.Count(), &aDataClient);
- //We're not interested in knowing about MSubConnectionDataClient joining this sub-connection
- }
-
-/**
-Function called by Connection Provider when a socket is to be removed from the QoS Flow ('this')
-
-@param aDataClient Data Client to remove from this QoS Channel
-*/
-void CUmtsGprsSubConnProvd::DoDataClientLeaving(MSubConnectionDataClient& aDataClient)
- {
- (void)aDataClient;
- __FLOG_3(_L("CUmtsGprsSubConnProvd [this=%08x]:\tDoDataClientLeaving() [iDataClients.Count=%d] [aDataClient=%08x]"), this, iDataClients.Count(), &aDataClient);
- aDataClient.LeaveComplete (*this);
- }
-
-/**
-Function called by SubConnection Provider when a control client is to join to this the QoS Flow ('this')
-
-@param aControlClient Control Client to remove from this QoS Channel
-*/
-void CUmtsGprsSubConnProvd::DoControlClientJoiningL(MSubConnectionControlClient& aControlClient)
- {
- (void)aControlClient;
- __FLOG_3(_L("CUmtsGprsSubConnProvd [this=%08x]:\tDoControlClientJoiningL() [iControlClients.Count=%d] [aControlClient=%08x]"), this, iControlClients.Count(), &aControlClient);
- //We're not interested in knowing about MSubConnectionControlClient joining this sub-connection
- }
-
-/**
-Function called by SubConnection Provider when a control client is to be removed from the QoS Flow ('this')
-
-@param aControlClient Control Client to remove from this QoS Channel
-*/
-void CUmtsGprsSubConnProvd::DoControlClientLeaving(MSubConnectionControlClient& aControlClient)
- {
- (void)aControlClient;
- __FLOG_3(_L("CUmtsGprsSubConnProvd [this=%08x]:\tDoControlClientLeaving() [iControlClients.Count=%d] [aControlClient=%08x]"), this, iControlClients.Count(), &aControlClient);
- //We're not interested in knowing about MSubConnectionControlClient leaving this sub-connection
- }
-
-
-/**
-@param
-*/
-void CUmtsGprsSubConnProvd::DoSourceAddressUpdate(MSubConnectionDataClient& /*aDataClient*/, const TSockAddr& /*aSource*/)
- {
- //TODO: implement when UmtsGprsSCPR enables ECreateNew SubConnection Providers.
- }
-
-/**
-@param
-*/
-void CUmtsGprsSubConnProvd::DoDestinationAddressUpdate(MSubConnectionDataClient& /*aDataClient*/, const TSockAddr& /*aDestination*/)
- {
- //TODO: implement when UmtsGprsSCPR enables ECreateNew SubConnection Providers.
- }
-
-void CUmtsGprsSubConnProvd::DoDataClientRouted(MSubConnectionDataClient& /*aDataClient*/, const TSockAddr& /*aSource*/, const TSockAddr& /*aDestination*/, const TDesC8& /*aConnectionInfo*/)
-/**
-
-@param
-*/
- {
- //TODO: implement when UmtsGprsSCPR enables ECreateNew SubConnection Providers.
- }
-
-TInt CUmtsGprsSubConnProvd::DoControl(TUint /*aOptionLevel*/, TUint /*aOptionName*/, TDes8& /*aOption*/)
-/**
-
-@param
-*/
- {
- __FLOG_1(_L("CUmtsGprsSubConnProvd::DoControl [this=%08x]"), this);
- return KErrNotSupported;
- }
-
-void CUmtsGprsSubConnProvd::DoStartL()
-/**
-
-@param
-*/
- {
- //TODO: implement when UmtsGprsSCPR enables ECreateNew SubConnection Providers.
- }
-
-void CUmtsGprsSubConnProvd::DoStop()
-/**
-
-@param
-*/
- {
- //TODO: implement when UmtsGprsSCPR enables ECreateNew SubConnection Providers.
- }
-
-
-CUmtsGprsSubConnProvd::~CUmtsGprsSubConnProvd ()
- {
- __FLOG_1(_L("~CUmtsGprsSubConnProvd [this=%08x]"), this);
- if (iConnectionProvider)
- {
- iConnectionProvider->Leave(*this);
- }
- delete iCurrentPdpFsmReq;
- __FLOG_CLOSE;
- }
--- a/telephonyprotocols/umtsgprsscpr/src/UmtsGprs_subconnProvFactory.cpp Wed Aug 18 10:57:47 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Implementation file for the Umts/Gprs SubConnection Provider Factory
-//
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#include "UmtsGprs_subconnProvFactory.h"
-#include <networking/qos3gpp_subconparams.h>
-#include "UmtsGprs_defaultSubconnProv.h"
-#include <implementationproxy.h>
-
-/**
-Data required for instantiating ECOM Plugin
-*/
-const TImplementationProxy ImplementationTable[] =
- {
- IMPLEMENTATION_PROXY_ENTRY(KUmtsGprsSubConnectionProviderFactoryId, CUmtsGprsSubConnProvdFactory::NewL),
- };
-
-
-/**
-ECOM Implementation Factory
-*/
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
- {
- aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
-
- return ImplementationTable;
- }
-
-
-CUmtsGprsSubConnProvdFactory* CUmtsGprsSubConnProvdFactory::NewL(TAny* aConstructionParameters)
-/**
-Constructs a Umts/Gprs SubConnection Provider Factory
-
-@param aConstructionParameters construction data passed by ECOM
-
-@returns pointer to a constructed factory
-*/
- {
- CUmtsGprsSubConnProvdFactory* ptr =
- new (ELeave) CUmtsGprsSubConnProvdFactory(KUmtsGprsSubConnectionProviderFactoryId,
- *(reinterpret_cast<CSubConnectionFactoryContainer*>(aConstructionParameters)));
-
- return ptr;
- }
-
-
-
-CUmtsGprsSubConnProvdFactory::CUmtsGprsSubConnProvdFactory(TUint aFactoryId,
- CSubConnectionFactoryContainer& aParentContainer)
- : CSubConnectionProviderFactoryBase(aFactoryId, aParentContainer)
-/**
-Umts/Gprs SubConnection Provider Factory Constructor
-
-@param aFactoryId ECOM Implementation Id
-@param aParentContainer Object Owner
-*/
- {
- }
-
-
-CUmtsGprsSubConnProvdFactory::~CUmtsGprsSubConnProvdFactory()
- {
- }
-
-
-CSubConnectionProviderBase* CUmtsGprsSubConnProvdFactory::DoCreateProviderL(
- CConnectionProviderBase& aConnProvider,
- RSubConnection::TSubConnType aType)
- {
- CSubConnectionProviderBase* provider = NULL;
- if (aType == RSubConnection::EAttachToDefault)
- {
- provider = CUmtsGprsDefaultSubConnProvd::NewL(*this, aConnProvider);
- }
- else
- {
- User::Leave(KErrNotSupported);
- }
- return provider;
- }
-
--- a/telephonyserverplugins/common_tsy/commontsy/src/mmgsmwcdma/cmmcallgsmwcdmaext.cpp Wed Aug 18 10:57:47 2010 +0300
+++ b/telephonyserverplugins/common_tsy/commontsy/src/mmgsmwcdma/cmmcallgsmwcdmaext.cpp Thu Sep 02 21:42:07 2010 +0300
@@ -1812,7 +1812,30 @@
{
iMobileCallInfo.iAlternatingCall = mobileCallInfo->iAlternatingCall;
}
-
+
+ // If a Mobile Originated call, take Alpha ID and Icon ID values from iCallParams, if valid.
+ if ( iMobileCallInfo.iRemoteParty.iDirection == RMobileCall::EMobileOriginated)
+ {
+ // Set the Alpha ID, if not set.
+ if ( iMobileCallInfo.iAlphaId.Length() <= 0 &&
+ iCallParams.iAlphaId.Length() > 0 &&
+ iCallParams.iAlphaId.Length() <= RMobileCall::KAlphaIdMaxSize )
+ {
+ iMobileCallInfo.iAlphaId.Zero();
+ iMobileCallInfo.iAlphaId.Copy(iCallParams.iAlphaId );
+ iMobileCallInfo.iValid |= RMobileCall::KCallAlphaId;
+ }
+ // Set the Icon ID, if not set.
+ if ( iMobileCallInfo.iIconId.iIdentifier == 0 &&
+ iMobileCallInfo.iIconId.iQualifier == RMobileCall::EIconQualifierNotSet &&
+ iCallParams.iIconId.iIdentifier > 0 &&
+ iCallParams.iIconId.iQualifier != RMobileCall::EIconQualifierNotSet )
+ {
+ iMobileCallInfo.iIconId.iIdentifier = iCallParams.iIconId.iIdentifier;
+ iMobileCallInfo.iIconId.iQualifier = iCallParams.iIconId.iQualifier;
+ iMobileCallInfo.iValid |= RMobileCall::KCallIconId;
+ }
+ }
// TMobileCallInfoV3
if ( (KETelExtMultimodeV3 == extensionId) ||
@@ -1844,14 +1867,20 @@
iMobileCallInfo.iCallParamOrigin = mobileCallInfoV7->iCallParamOrigin;
}
- if(RMobileCall::KCallIconId & mobileCallInfo->iValid)
+ // Set the Alpha ID if call is not Mobile Originated.
+ // If MO, the Alpha ID would be set above from iCallParams
+ if(RMobileCall::KCallIconId & mobileCallInfo->iValid &&
+ iMobileCallInfo.iRemoteParty.iDirection != RMobileCall::EMobileOriginated)
{
// TIconId iIconId;
iMobileCallInfo.iIconId.iIdentifier = mobileCallInfoV7->iIconId.iIdentifier;
iMobileCallInfo.iIconId.iQualifier = mobileCallInfoV7->iIconId.iQualifier;
}
- if(RMobileCall::KCallAlphaId & mobileCallInfo->iValid)
+ // Set the Icon ID if call is not Mobile Originated.
+ // If MO, Icon ID would be set above from iCallParams
+ if(RMobileCall::KCallAlphaId & mobileCallInfo->iValid &&
+ iMobileCallInfo.iRemoteParty.iDirection != RMobileCall::EMobileOriginated)
{
// TAlphaIdBuf iAlphaId;
iMobileCallInfo.iAlphaId.Zero();
--- a/telephonyserverplugins/common_tsy/commontsy/src/mmsms/cmmsmsstoragetsy.cpp Wed Aug 18 10:57:47 2010 +0300
+++ b/telephonyserverplugins/common_tsy/commontsy/src/mmsms/cmmsmsstoragetsy.cpp Thu Sep 02 21:42:07 2010 +0300
@@ -83,9 +83,9 @@
}
iSmsListArray = NULL;
- iSmsReadAllArray->ResetAndDestroy();
if ( iSmsReadAllArray )
{
+ iSmsReadAllArray->ResetAndDestroy();
delete iSmsReadAllArray;
}
iSmsReadAllArray = NULL;
--- a/telephonyserverplugins/common_tsy/test/component/inc/cctsyfixeddiallingfu.h Wed Aug 18 10:57:47 2010 +0300
+++ b/telephonyserverplugins/common_tsy/test/component/inc/cctsyfixeddiallingfu.h Thu Sep 02 21:42:07 2010 +0300
@@ -38,6 +38,7 @@
void TestDialNoFdnCheck0001L();
void TestDialNoFdnCheck0001bL();
void TestDialNoFdnCheck0001cL();
+ void TestDialNoFdnCheck0001dL();
void TestDialNoFdnCheck0002L();
void TestDialNoFdnCheck0004L();
void TestDialNoFdnCheck0005L();
--- a/telephonyserverplugins/common_tsy/test/component/scripts/te_ctsycomponent_fixeddialling_individual.script Wed Aug 18 10:57:47 2010 +0300
+++ b/telephonyserverplugins/common_tsy/test/component/scripts/te_ctsycomponent_fixeddialling_individual.script Thu Sep 02 21:42:07 2010 +0300
@@ -41,6 +41,17 @@
RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyFixedDiallingFU.TestDialNoFdnCheck0001cL
END_TESTCASE BA-CTSY-FXD-CDNFC-0001c
+START_TESTCASE BA-CTSY-FXD-CDNFC-0001d
+//!@SYMTestCaseID BA-CTSY-FXD-CDNFC-0001d
+//!@SYMComponent telephony_ctsy
+@SYMTestCaseDesc est support in CTSY for RMobileCall::DialNoFdnCheck for voice calls with extended parameters (RMobileCall::TCallParamsV7)
+//!@SYMTestPriority High
+//!@SYMTestActions Invokes RMobileCall::DialNoFdnCheck for voice calls
+//!@SYMTestExpectedResults Pass
+//!@SYMTestType CT
+RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyFixedDiallingFU.TestDialNoFdnCheck0001dL
+END_TESTCASE BA-CTSY-FXD-CDNFC-0001d
+
START_TESTCASE BA-CTSY-FXD-CDNFC-0002
//!@SYMTestCaseID BA-CTSY-FXD-CDNFC-0002
//!@SYMComponent telephony_ctsy
--- a/telephonyserverplugins/common_tsy/test/component/src/cctsycallcontrolfu.cpp Wed Aug 18 10:57:47 2010 +0300
+++ b/telephonyserverplugins/common_tsy/test/component/src/cctsycallcontrolfu.cpp Thu Sep 02 21:42:07 2010 +0300
@@ -2071,6 +2071,11 @@
callParams0.iInterval = callParams.iInterval;
callParams0.iWaitForDialTone = callParams.iWaitForDialTone;
RCall::TCallParamsPckg pckgCallParams0(callParams0);
+ // We should expect the appropriate Alpha ID and Icon ID
+ callInfo.iValid |= (RMobileCall::KCallAlphaId | RMobileCall::KCallIconId);
+ callInfo.iAlphaId.Copy(_L("Alpha Id"));
+ callInfo.iIconId.iQualifier = RMobileCall::ESelfExplanatory;
+ callInfo.iIconId.iIdentifier = 0x0A;
expectData.Close();
TMockLtsyCallData2< RMobileCall::TMobileCallParamsV7, RMobileCall::TMobileCallInfoV8 >
--- a/telephonyserverplugins/common_tsy/test/component/src/cctsyfixeddiallingfu.cpp Wed Aug 18 10:57:47 2010 +0300
+++ b/telephonyserverplugins/common_tsy/test/component/src/cctsyfixeddiallingfu.cpp Thu Sep 02 21:42:07 2010 +0300
@@ -35,6 +35,7 @@
ADD_TEST_STEP_ISO_CPP(CCTsyFixedDiallingFU, TestDialNoFdnCheck0001L);
ADD_TEST_STEP_ISO_CPP(CCTsyFixedDiallingFU, TestDialNoFdnCheck0001bL);
ADD_TEST_STEP_ISO_CPP(CCTsyFixedDiallingFU, TestDialNoFdnCheck0001cL);
+ ADD_TEST_STEP_ISO_CPP(CCTsyFixedDiallingFU, TestDialNoFdnCheck0001dL);
ADD_TEST_STEP_ISO_CPP(CCTsyFixedDiallingFU, TestDialNoFdnCheck0002L);
ADD_TEST_STEP_ISO_CPP(CCTsyFixedDiallingFU, TestDialNoFdnCheck0004L);
ADD_TEST_STEP_ISO_CPP(CCTsyFixedDiallingFU, TestDialNoFdnCheck0005L);
@@ -539,12 +540,13 @@
TRequestStatus requestStatus;
_LIT(KSomeNumber, "123456789");
+ _LIT(KAlphaID, "Alpha ID");
RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;
TInt expecteCallId = 0;
- RMobileCall::TMobileCallParamsV1 callParams;
- RMobileCall::TMobileCallParamsV1Pckg pckgCallParams(callParams);
+ RMobileCall::TMobileCallParamsV7 callParams;
+ RMobileCall::TMobileCallParamsV7Pckg pckgCallParams(callParams);
RMobileCall::TMobileCallInfoV8 callInfo;
callParams.iSpeakerControl = RCall::EMonitorSpeakerControlOnUntilCarrier;
callParams.iSpeakerVolume = RCall::EMonitorSpeakerVolumeLow;
@@ -555,7 +557,17 @@
callParams.iCug.iCugIndex = 0xFFFF;
callParams.iCug.iSuppressPrefCug = EFalse;
callParams.iCug.iSuppressOA = EFalse;
+
callParams.iAutoRedial = EFalse;
+ callParams.iBearerMode = RMobileCall::EMulticallNewBearer;
+ callParams.iCallParamOrigin = RMobileCall::EOriginatorSIM;
+ callParams.iBCRepeatIndicator = RMobileCall::EBCAlternateMode;
+ callParams.iIconId.iQualifier = RMobileCall::ENoIconId;
+ callParams.iAlphaId = KAlphaID;
+
+
+
+
callInfo.iValid = RMobileCall::KCallDialledParty | RMobileCall::KCallAlternating;
callInfo.iService = mobileService;
callInfo.iStatus = RMobileCall::EStatusUnknown;
@@ -572,7 +584,7 @@
callInfo.iDialledParty.iTypeOfNumber =
RMobilePhone::EUnknownNumber;
- TMockLtsyCallData2< RMobileCall::TMobileCallParamsV1, RMobileCall::TMobileCallInfoV8 >
+ TMockLtsyCallData2< RMobileCall::TMobileCallParamsV7, RMobileCall::TMobileCallInfoV8 >
mockCallData(expecteCallId, mobileService, callParams, callInfo);
mockCallData.SerialiseL(expectData);
@@ -599,12 +611,156 @@
callParamsX.iWaitForDialTone = RCall::EDialToneWait;
TPckg<RCall::TCallParams> pckgCallParamsX(callParamsX);
- call.DialNoFdnCheck(requestStatus, pckgCallParamsX, KSomeNumber);
+
+ TPckg<RMobileCall::TMobileCallParamsV7> mmParamsPckgV7(callParams);
+ call.DialNoFdnCheck(requestStatus, mmParamsPckgV7, KSomeNumber);
User::WaitForRequest(requestStatus);
ASSERT_EQUALS(KErrNone, requestStatus.Int());
AssertMockLtsyStatusL();
+ RMobileCall::TMobileCallInfoV7 info;
+ RMobileCall::TMobileCallInfoV7Pckg infoPckg(info);
+
+ TInt ret = call.GetMobileCallInfo(infoPckg);
+ ASSERT_EQUALS(KErrNone, ret);
+
+ ASSERT_TRUE(info.iAlphaId.Compare(KAlphaID)==KErrNone);
+
+ CleanupStack::PopAndDestroy(5,this);
+
+ }
+
+/**
+@SYMTestCaseID BA-CTSY-FXD-CDNFC-0001d
+@SYMComponent telephony_ctsy
+@SYMTestCaseDesc Test support in CTSY for RMobileCall::DialNoFdnCheck for voice calls with extended parameters (RMobileCall::TCallParamsV7)
+@SYMTestPriority High
+@SYMTestActions Invokes RMobileCall::DialNoFdnCheck for voice calls
+@SYMTestExpectedResults Pass
+@SYMTestType CT
+*/
+void CCTsyFixedDiallingFU::TestDialNoFdnCheck0001dL()
+ {
+
+ OpenEtelServerL(EUseExtendedError);
+ CleanupStack::PushL(TCleanupItem(Cleanup,this));
+ OpenPhoneL();
+
+ RBuf8 expectData;
+ CleanupClosePushL(expectData);
+
+ RBuf8 completeData;
+ CleanupClosePushL(completeData);
+
+ TInt errorCode = KErrNone;
+
+ //-- For Voice1 -------------------------
+
+ TBuf<256> lineName(KMmTsyVoice1LineName);
+ // Open new line
+ RLine line;
+ errorCode = line.Open(iPhone, lineName);
+ ASSERT_EQUALS(KErrNone, errorCode);
+ CleanupClosePushL(line);
+ // open call
+ _LIT(KDoubleColon, "::");
+ TBuf<256> name;
+ name = KMmTsyPhoneName;
+ name.Append(KDoubleColon);
+ name.Append(lineName);
+ name.Append(KDoubleColon);
+
+ RMobileCall call;
+ errorCode = call.OpenNewCall(line, name);
+ ASSERT_EQUALS(KErrNone, errorCode);
+ CleanupClosePushL(call);
+
+ TRequestStatus requestStatus;
+ _LIT(KSomeNumber, "123456789");
+ // Alpha ID to pass through TMobileCallParamsV7
+ _LIT(KAlphaID, "Alpha ID");
+
+ RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;
+ TInt expecteCallId = 0;
+
+ RMobileCall::TMobileCallParamsV7 callParams;
+ RMobileCall::TMobileCallParamsV7Pckg pckgCallParams(callParams);
+ callParams.iSpeakerControl = RCall::EMonitorSpeakerControlOnUntilCarrier;
+ callParams.iSpeakerVolume = RCall::EMonitorSpeakerVolumeLow;
+ callParams.iInterval = 100;
+ callParams.iWaitForDialTone = RCall::EDialToneWait;
+ callParams.iIdRestrict = RMobileCall::EIdRestrictDefault;
+ callParams.iCug.iExplicitInvoke = EFalse;
+ callParams.iCug.iCugIndex = 0xFFFF;
+ callParams.iCug.iSuppressPrefCug = EFalse;
+ callParams.iCug.iSuppressOA = EFalse;
+
+ callParams.iAutoRedial = EFalse;
+ callParams.iBearerMode = RMobileCall::EMulticallNewBearer;
+ callParams.iCallParamOrigin = RMobileCall::EOriginatorSIM;
+ callParams.iBCRepeatIndicator = RMobileCall::EBCAlternateMode;
+ callParams.iIconId.iQualifier = RMobileCall::ENoIconId;
+ callParams.iIconId.iIdentifier = 123;
+ callParams.iAlphaId = KAlphaID;
+
+ // Create the basic TMobileCallInfoV3 object to pass back
+ RMobileCall::TMobileCallInfoV8 callInfo;
+ callInfo.iValid = RMobileCall::KCallDialledParty | RMobileCall::KCallAlternating;
+ callInfo.iService = mobileService;
+ callInfo.iStatus = RMobileCall::EStatusUnknown;
+ callInfo.iCallId =-1;
+ callInfo.iExitCode =0;
+ callInfo.iEmergency =0;
+ callInfo.iForwarded =0;
+ callInfo.iPrivacy = RMobilePhone::EPrivacyUnspecified;
+ callInfo.iAlternatingCall = RMobilePhone::EAlternatingModeUnspecified;
+ //callInfo.iDuration.iIntervel = 0; // this is protected value
+ callInfo.iDialledParty.iTelNumber.Copy( KSomeNumber );
+ callInfo.iDialledParty.iNumberPlan =
+ RMobilePhone::EUnknownNumberingPlan;
+ callInfo.iDialledParty.iTypeOfNumber =
+ RMobilePhone::EUnknownNumber;
+
+ TMockLtsyCallData2< RMobileCall::TMobileCallParamsV7, RMobileCall::TMobileCallInfoV8 >
+ mockCallData(expecteCallId, mobileService, callParams, callInfo);
+ mockCallData.SerialiseL(expectData);
+
+ iMockLTSY.ExpectL(EMobileCallDialNoFdnCheck, expectData);
+
+ TInt callId = 1;
+
+ completeData.Close();
+ TMockLtsyCallData1<RMobileCall::TMobileCallInfoV1> callInfoData(callId, mobileService, callInfo);
+ callInfoData.SerialiseL(completeData);
+ //Complete Mobile Call Info in order to set the call ID
+ iMockLTSY.CompleteL(EMobileCallGetMobileCallInfo, KErrNone, completeData);
+
+ TMockLtsyCallData0 mockDataComplete(callId, mobileService);
+ completeData.Close();
+ mockDataComplete.SerialiseL(completeData);
+ // Complete the Dial
+ iMockLTSY.CompleteL(EMobileCallDialNoFdnCheck, KErrNone, completeData);
+
+ TPckg<RMobileCall::TMobileCallParamsV7> mmParamsPckgV7(callParams);
+ call.DialNoFdnCheck(requestStatus, mmParamsPckgV7, KSomeNumber);
+
+ User::WaitForRequest(requestStatus);
+ ASSERT_EQUALS(KErrNone, requestStatus.Int());
+ AssertMockLtsyStatusL();
+
+ RMobileCall::TMobileCallInfoV7 info;
+ RMobileCall::TMobileCallInfoV7Pckg infoPckg(info);
+
+ TInt ret = call.GetMobileCallInfo(infoPckg);
+ ASSERT_EQUALS(KErrNone, ret);
+
+ // The check to make sure that the AlphaID persisted in CTSY and returned properly.
+ ASSERT_TRUE(info.iAlphaId.Compare(KAlphaID)==KErrNone);
+ // The check to make sure that the IconID persisted in CTSY and returned properly.
+ ASSERT_TRUE(info.iIconId.iIdentifier == 123);
+ ASSERT_EQUALS(info.iIconId.iQualifier, RMobileCall::ENoIconId);
+
CleanupStack::PopAndDestroy(5,this);
}
--- a/telephonyserverplugins/multimodetsy/Multimode/gprs/Gprs.cpp Wed Aug 18 10:57:47 2010 +0300
+++ b/telephonyserverplugins/multimodetsy/Multimode/gprs/Gprs.cpp Thu Sep 02 21:42:07 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -75,7 +75,7 @@
iATGprsClass = CATGprsClass::NewL(iIo, this, iInit, iPhoneGlobals);
iATGprsNtwkRegStatusChange= CATGprsNtwkRegStatusChange::NewL(iIo,this,iPhoneGlobals);
iATGprsNtwkRegStatus= CATGprsNtwkRegStatus::NewL(iIo, this, iInit, iPhoneGlobals,iATGprsNtwkRegStatusChange);
- iMutex.CreateGlobal(KNullDesC, EOwnerProcess);
+ User::LeaveIfError(iMutex.CreateGlobal(KNullDesC, EOwnerProcess));
}
RHandleBase* CGprs::GlobalKernelObjectHandle()
--- a/telephonyserverplugins/multimodetsy/hayes/SCHAT.CPP Wed Aug 18 10:57:47 2010 +0300
+++ b/telephonyserverplugins/multimodetsy/hayes/SCHAT.CPP Thu Sep 02 21:42:07 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1997-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -147,7 +147,6 @@
{
LOGTEXT2(_L8("SChat:\tFound match against =>%S<"), &cs->iMatch);
iNotify->ChatStringMatchL(cs);
- cs = iter; // In case user removed cs;
}
}
}
@@ -160,7 +159,6 @@
{
LOGTEXT2(_L8("SChat:\tFound match against partial line =>%S<"), &cs->iMatch);
iNotify->ChatStringMatchL(cs);
- cs = iter; // In case user removed cs;
}
}
}
--- a/telephonyserverplugins/simtsy/group/bld.inf Wed Aug 18 10:57:47 2010 +0300
+++ b/telephonyserverplugins/simtsy/group/bld.inf Thu Sep 02 21:42:07 2010 +0300
@@ -19,6 +19,10 @@
@file
*/
+
+#include "../testconfigfileparser/group/bld.inf"
+
+
PRJ_EXPORTS
../inc/SimTsy.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(simtsy.h)
@@ -106,3 +110,5 @@
../test/Te_SimSS/Te_SimSS.mmp
../test/Te_SimVoice/Te_SimVoice.mmp
../test/te_simeap/te_simeap.mmp
+
+
--- a/telephonyserverplugins/simtsy/src/CSimPacketService.cpp Wed Aug 18 10:57:47 2010 +0300
+++ b/telephonyserverplugins/simtsy/src/CSimPacketService.cpp Thu Sep 02 21:42:07 2010 +0300
@@ -122,7 +122,7 @@
iReleaseModeTimer = CSimTimer::NewL(iPhone);
iDynamicCapsTimer = CSimTimer::NewL(iPhone);
iMbmsPcktTimer = CSimTimer::NewL(iPhone);
- iMutex.CreateGlobal(KNullDesC, EOwnerProcess);
+ User::LeaveIfError(iMutex.CreateGlobal(KNullDesC, EOwnerProcess));
iNtwkRegStatusInfo = new(ELeave) CArrayFixFlat<TNtwkRegStatus>(KGranularity);
iPcktRegStatusInfo=new(ELeave) CArrayFixFlat<TPacketRegStatus>(KGranularity);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyserverplugins/simtsy/testconfigfileparser/bmarm/TESTCONFIGFILEPARSERU.DEF Thu Sep 02 21:42:07 2010 +0300
@@ -0,0 +1,37 @@
+EXPORTS
+ __eq__C11CTestConfigRC11CTestConfig @ 1 NONAME R3UNUSED ; CTestConfig::operator==(CTestConfig const &) const
+ CopyLC__C18CTestConfigSection @ 2 NONAME R3UNUSED ; CTestConfigSection::CopyLC(void) const
+ CountElements__11CTestConfigRC6TDesC8G5TChar @ 3 NONAME R3UNUSED ; CTestConfig::CountElements(TDesC8 const &, TChar)
+ DeleteItemsL__18CTestConfigSectionRC6TDesC8 @ 4 NONAME R3UNUSED ; CTestConfigSection::DeleteItemsL(TDesC8 const &)
+ GetElement__11CTestConfigRC6TDesC8G5TChariR6TPtrC8i @ 5 NONAME ; CTestConfig::GetElement(TDesC8 const &, TChar, int, TPtrC8 &, int)
+ GetElement__11CTestConfigRC6TDesC8G5TChariRi @ 6 NONAME ; CTestConfig::GetElement(TDesC8 const &, TChar, int, int &)
+ ItemCount__C18CTestConfigSectionRC6TDesC8 @ 7 NONAME R3UNUSED ; CTestConfigSection::ItemCount(TDesC8 const &) const
+ ItemValue__C11CTestConfigRC6TDesC8N21 @ 8 NONAME ; CTestConfig::ItemValue(TDesC8 const &, TDesC8 const &, TDesC8 const &) const
+ ItemValue__C11CTestConfigRC6TDesC8T1i @ 9 NONAME ; CTestConfig::ItemValue(TDesC8 const &, TDesC8 const &, int) const
+ ItemValue__C18CTestConfigSectionRC6TDesC8T1 @ 10 NONAME R3UNUSED ; CTestConfigSection::ItemValue(TDesC8 const &, TDesC8 const &) const
+ ItemValue__C18CTestConfigSectionRC6TDesC8i @ 11 NONAME R3UNUSED ; CTestConfigSection::ItemValue(TDesC8 const &, int) const
+ Item__C18CTestConfigSectionRC6TDesC8 @ 12 NONAME R3UNUSED ; CTestConfigSection::Item(TDesC8 const &) const
+ Item__C18CTestConfigSectionRC6TDesC8i @ 13 NONAME R3UNUSED ; CTestConfigSection::Item(TDesC8 const &, int) const
+ NewLC__11CTestConfigR3RFsRC7TDesC16 @ 14 NONAME R3UNUSED ; CTestConfig::NewLC(RFs &, TDesC16 const &)
+ NewLC__11CTestConfigR3RFsRC7TDesC16T2 @ 15 NONAME R3UNUSED ; CTestConfig::NewLC(RFs &, TDesC16 const &, TDesC16 const &)
+ NewLC__15CTestConfigItemR18CTestConfigSectionRC6TDesC8T2 @ 16 NONAME R3UNUSED ; CTestConfigItem::NewLC(CTestConfigSection &, TDesC8 const &, TDesC8 const &)
+ NewLC__18CTestConfigSectionRC6TDesC8 @ 17 NONAME R3UNUSED ; CTestConfigSection::NewLC(TDesC8 const &)
+ NewLC__18CTestConfigSectionRC6TDesC8R18CTestConfigSection @ 18 NONAME R3UNUSED ; CTestConfigSection::NewLC(TDesC8 const &, CTestConfigSection &)
+ ReadScriptL__11CTestConfigRC7TDesC16 @ 19 NONAME R3UNUSED ; CTestConfig::ReadScriptL(TDesC16 const &)
+ ReplaceLC__11CTestConfigRC6TDesC8N21 @ 20 NONAME R3UNUSED ; CTestConfig::ReplaceLC(TDesC8 const &, TDesC8 const &, TDesC8 const &)
+ ResolveFile__11CTestConfigR3RFsRC7TDesC16T2R6TParse @ 21 NONAME ; CTestConfig::ResolveFile(RFs &, TDesC16 const &, TDesC16 const &, TParse &)
+ Section__C11CTestConfigRC6TDesC8 @ 22 NONAME R3UNUSED ; CTestConfig::Section(TDesC8 const &) const
+ WriteFileL__11CTestConfigRC7TDesC16 @ 23 NONAME R3UNUSED ; CTestConfig::WriteFileL(TDesC16 const &)
+ "_._11CTestConfig" @ 24 NONAME R3UNUSED ; CTestConfig::~CTestConfig(void)
+ "_._15CTestConfigItem" @ 25 NONAME R3UNUSED ; CTestConfigItem::~CTestConfigItem(void)
+ "_._18CTestConfigSection" @ 26 NONAME R3UNUSED ; CTestConfigSection::~CTestConfigSection(void)
+ AddItemL__18CTestConfigSectionRC6TDesC8T1 @ 27 NONAME R3UNUSED ; CTestConfigSection::AddItemL(TDesC8 const &, TDesC8 const &)
+ TrimLeft__11CTestConfigRC6TDesC8 @ 28 NONAME R3UNUSED ; CTestConfig::TrimLeft(TDesC8 const &)
+ TrimRight__11CTestConfigRC6TDesC8 @ 29 NONAME R3UNUSED ; CTestConfig::TrimRight(TDesC8 const &)
+ Trim__11CTestConfigRC6TDesC8 @ 30 NONAME R3UNUSED ; CTestConfig::Trim(TDesC8 const &)
+ Item__18CTestConfigSectionRC6TDesC8 @ 31 NONAME R3UNUSED ; CTestConfigSection::Item(TDesC8 const &)
+ Item__18CTestConfigSectionRC6TDesC8i @ 32 NONAME R3UNUSED ; CTestConfigSection::Item(TDesC8 const &, int)
+ ItemsL__18CTestConfigSectionRt13RPointerArray1Z15CTestConfigItemRC6TDesC8 @ 33 NONAME R3UNUSED ; CTestConfigSection::ItemsL(RPointerArray<CTestConfigItem> &, TDesC8 const &)
+ Section__11CTestConfigRC6TDesC8 @ 34 NONAME R3UNUSED ; CTestConfig::Section(TDesC8 const &)
+ ItemsL__C18CTestConfigSectionRt13RPointerArray1ZC15CTestConfigItemRC6TDesC8 @ 35 NONAME R3UNUSED ; CTestConfigSection::ItemsL(RPointerArray<CTestConfigItem const> &, TDesC8 const &) const
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyserverplugins/simtsy/testconfigfileparser/bwins/TESTCONFIGFILEPARSERU.DEF Thu Sep 02 21:42:07 2010 +0300
@@ -0,0 +1,37 @@
+EXPORTS
+ ??1CTestConfig@@UAE@XZ @ 1 NONAME ; public: virtual __thiscall CTestConfig::~CTestConfig(void)
+ ??1CTestConfigItem@@UAE@XZ @ 2 NONAME ; public: virtual __thiscall CTestConfigItem::~CTestConfigItem(void)
+ ??1CTestConfigSection@@UAE@XZ @ 3 NONAME ; public: virtual __thiscall CTestConfigSection::~CTestConfigSection(void)
+ ??8CTestConfig@@QBEHABV0@@Z @ 4 NONAME ; public: int __thiscall CTestConfig::operator==(class CTestConfig const &)const
+ ?AddItemL@CTestConfigSection@@QAEAAVCTestConfigItem@@ABVTDesC8@@0@Z @ 5 NONAME ; public: class CTestConfigItem & __thiscall CTestConfigSection::AddItemL(class TDesC8 const &,class TDesC8 const &)
+ ?CopyLC@CTestConfigSection@@QBEPAV1@XZ @ 6 NONAME ; public: class CTestConfigSection * __thiscall CTestConfigSection::CopyLC(void)const
+ ?CountElements@CTestConfig@@SAHABVTDesC8@@VTChar@@@Z @ 7 NONAME ; public: static int __cdecl CTestConfig::CountElements(class TDesC8 const &,class TChar)
+ ?DeleteItemsL@CTestConfigSection@@QAEXABVTDesC8@@@Z @ 8 NONAME ; public: void __thiscall CTestConfigSection::DeleteItemsL(class TDesC8 const &)
+ ?GetElement@CTestConfig@@SAHABVTDesC8@@VTChar@@HAAH@Z @ 9 NONAME ; public: static int __cdecl CTestConfig::GetElement(class TDesC8 const &,class TChar,int,int &)
+ ?GetElement@CTestConfig@@SAHABVTDesC8@@VTChar@@HAAVTPtrC8@@H@Z @ 10 NONAME ; public: static int __cdecl CTestConfig::GetElement(class TDesC8 const &,class TChar,int,class TPtrC8 &,int)
+ ?Item@CTestConfigSection@@QBEPBVCTestConfigItem@@ABVTDesC8@@@Z @ 11 NONAME ; public: class CTestConfigItem const * __thiscall CTestConfigSection::Item(class TDesC8 const &)const
+ ?Item@CTestConfigSection@@QBEPBVCTestConfigItem@@ABVTDesC8@@H@Z @ 12 NONAME ; public: class CTestConfigItem const * __thiscall CTestConfigSection::Item(class TDesC8 const &,int)const
+ ?ItemCount@CTestConfigSection@@QBEHABVTDesC8@@@Z @ 13 NONAME ; public: int __thiscall CTestConfigSection::ItemCount(class TDesC8 const &)const
+ ?ItemValue@CTestConfig@@QBEABVTDesC8@@ABV2@00@Z @ 14 NONAME ; public: class TDesC8 const & __thiscall CTestConfig::ItemValue(class TDesC8 const &,class TDesC8 const &,class TDesC8 const &)const
+ ?ItemValue@CTestConfig@@QBEHABVTDesC8@@0H@Z @ 15 NONAME ; public: int __thiscall CTestConfig::ItemValue(class TDesC8 const &,class TDesC8 const &,int)const
+ ?ItemValue@CTestConfigSection@@QBEABVTDesC8@@ABV2@0@Z @ 16 NONAME ; public: class TDesC8 const & __thiscall CTestConfigSection::ItemValue(class TDesC8 const &,class TDesC8 const &)const
+ ?ItemValue@CTestConfigSection@@QBEHABVTDesC8@@H@Z @ 17 NONAME ; public: int __thiscall CTestConfigSection::ItemValue(class TDesC8 const &,int)const
+ ?NewLC@CTestConfig@@SAPAV1@AAVRFs@@ABVTDesC16@@1@Z @ 18 NONAME ; public: static class CTestConfig * __cdecl CTestConfig::NewLC(class RFs &,class TDesC16 const &,class TDesC16 const &)
+ ?NewLC@CTestConfig@@SAPAV1@AAVRFs@@ABVTDesC16@@@Z @ 19 NONAME ; public: static class CTestConfig * __cdecl CTestConfig::NewLC(class RFs &,class TDesC16 const &)
+ ?NewLC@CTestConfigItem@@SAPAV1@AAVCTestConfigSection@@ABVTDesC8@@1@Z @ 20 NONAME ; public: static class CTestConfigItem * __cdecl CTestConfigItem::NewLC(class CTestConfigSection &,class TDesC8 const &,class TDesC8 const &)
+ ?NewLC@CTestConfigSection@@SAPAV1@ABVTDesC8@@@Z @ 21 NONAME ; public: static class CTestConfigSection * __cdecl CTestConfigSection::NewLC(class TDesC8 const &)
+ ?NewLC@CTestConfigSection@@SAPAV1@ABVTDesC8@@AAV1@@Z @ 22 NONAME ; public: static class CTestConfigSection * __cdecl CTestConfigSection::NewLC(class TDesC8 const &,class CTestConfigSection &)
+ ?ReadScriptL@CTestConfig@@QAEXABVTDesC16@@@Z @ 23 NONAME ; public: void __thiscall CTestConfig::ReadScriptL(class TDesC16 const &)
+ ?ReplaceLC@CTestConfig@@SAPAVHBufC8@@ABVTDesC8@@00@Z @ 24 NONAME ; public: static class HBufC8 * __cdecl CTestConfig::ReplaceLC(class TDesC8 const &,class TDesC8 const &,class TDesC8 const &)
+ ?ResolveFile@CTestConfig@@SAHAAVRFs@@ABVTDesC16@@1AAVTParse@@@Z @ 25 NONAME ; public: static int __cdecl CTestConfig::ResolveFile(class RFs &,class TDesC16 const &,class TDesC16 const &,class TParse &)
+ ?Section@CTestConfig@@QBEPBVCTestConfigSection@@ABVTDesC8@@@Z @ 26 NONAME ; public: class CTestConfigSection const * __thiscall CTestConfig::Section(class TDesC8 const &)const
+ ?Trim@CTestConfig@@SA?AVTPtrC8@@ABVTDesC8@@@Z @ 27 NONAME ; public: static class TPtrC8 __cdecl CTestConfig::Trim(class TDesC8 const &)
+ ?WriteFileL@CTestConfig@@QAEXABVTDesC16@@@Z @ 28 NONAME ; public: void __thiscall CTestConfig::WriteFileL(class TDesC16 const &)
+ ?TrimLeft@CTestConfig@@SA?AVTPtrC8@@ABVTDesC8@@@Z @ 29 NONAME ; public: static class TPtrC8 __cdecl CTestConfig::TrimLeft(class TDesC8 const &)
+ ?TrimRight@CTestConfig@@SA?AVTPtrC8@@ABVTDesC8@@@Z @ 30 NONAME ; public: static class TPtrC8 __cdecl CTestConfig::TrimRight(class TDesC8 const &)
+ ?Item@CTestConfigSection@@QAEPAVCTestConfigItem@@ABVTDesC8@@@Z @ 31 NONAME ; public: class CTestConfigItem * __thiscall CTestConfigSection::Item(class TDesC8 const &)
+ ?Item@CTestConfigSection@@QAEPAVCTestConfigItem@@ABVTDesC8@@H@Z @ 32 NONAME ; public: class CTestConfigItem * __thiscall CTestConfigSection::Item(class TDesC8 const &,int)
+ ?ItemsL@CTestConfigSection@@QAEXAAV?$RPointerArray@VCTestConfigItem@@@@ABVTDesC8@@@Z @ 33 NONAME ; public: void __thiscall CTestConfigSection::ItemsL(class RPointerArray<class CTestConfigItem> &,class TDesC8 const &)
+ ?Section@CTestConfig@@QAEPAVCTestConfigSection@@ABVTDesC8@@@Z @ 34 NONAME ; public: class CTestConfigSection * __thiscall CTestConfig::Section(class TDesC8 const &)
+ ?ItemsL@CTestConfigSection@@QBEXAAV?$RPointerArray@$$CBVCTestConfigItem@@@@ABVTDesC8@@@Z @ 35 NONAME ; public: void __thiscall CTestConfigSection::ItemsL(class RPointerArray<class CTestConfigItem const > &,class TDesC8 const &)const
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyserverplugins/simtsy/testconfigfileparser/eabi/testconfigfileparserU.def Thu Sep 02 21:42:07 2010 +0300
@@ -0,0 +1,49 @@
+EXPORTS
+ _ZN11CTestConfig10GetElementERK6TDesC85TChariR6TPtrC8i @ 1 NONAME
+ _ZN11CTestConfig10GetElementERK6TDesC85TChariRi @ 2 NONAME
+ _ZN11CTestConfig10WriteFileLERK7TDesC16 @ 3 NONAME
+ _ZN11CTestConfig11ReadScriptLERK7TDesC16 @ 4 NONAME
+ _ZN11CTestConfig11ResolveFileER3RFsRK7TDesC16S4_R6TParse @ 5 NONAME
+ _ZN11CTestConfig13CountElementsERK6TDesC85TChar @ 6 NONAME
+ _ZN11CTestConfig4TrimERK6TDesC8 @ 7 NONAME
+ _ZN11CTestConfig5NewLCER3RFsRK7TDesC16 @ 8 NONAME
+ _ZN11CTestConfig5NewLCER3RFsRK7TDesC16S4_ @ 9 NONAME
+ _ZN11CTestConfig7SectionERK6TDesC8 @ 10 NONAME
+ _ZN11CTestConfig8TrimLeftERK6TDesC8 @ 11 NONAME
+ _ZN11CTestConfig9ReplaceLCERK6TDesC8S2_S2_ @ 12 NONAME
+ _ZN11CTestConfig9TrimRightERK6TDesC8 @ 13 NONAME
+ _ZN11CTestConfigD0Ev @ 14 NONAME
+ _ZN11CTestConfigD1Ev @ 15 NONAME
+ _ZN11CTestConfigD2Ev @ 16 NONAME
+ _ZN15CTestConfigItem5NewLCER18CTestConfigSectionRK6TDesC8S4_ @ 17 NONAME
+ _ZN15CTestConfigItemD0Ev @ 18 NONAME
+ _ZN15CTestConfigItemD1Ev @ 19 NONAME
+ _ZN15CTestConfigItemD2Ev @ 20 NONAME
+ _ZN18CTestConfigSection12DeleteItemsLERK6TDesC8 @ 21 NONAME
+ _ZN18CTestConfigSection4ItemERK6TDesC8 @ 22 NONAME
+ _ZN18CTestConfigSection4ItemERK6TDesC8i @ 23 NONAME
+ _ZN18CTestConfigSection5NewLCERK6TDesC8 @ 24 NONAME
+ _ZN18CTestConfigSection5NewLCERK6TDesC8RS_ @ 25 NONAME
+ _ZN18CTestConfigSection6ItemsLER13RPointerArrayI15CTestConfigItemERK6TDesC8 @ 26 NONAME
+ _ZN18CTestConfigSection8AddItemLERK6TDesC8S2_ @ 27 NONAME
+ _ZN18CTestConfigSectionD0Ev @ 28 NONAME
+ _ZN18CTestConfigSectionD1Ev @ 29 NONAME
+ _ZN18CTestConfigSectionD2Ev @ 30 NONAME
+ _ZNK11CTestConfig7SectionERK6TDesC8 @ 31 NONAME
+ _ZNK11CTestConfig9ItemValueERK6TDesC8S2_S2_ @ 32 NONAME
+ _ZNK11CTestConfig9ItemValueERK6TDesC8S2_i @ 33 NONAME
+ _ZNK11CTestConfigeqERKS_ @ 34 NONAME
+ _ZNK18CTestConfigSection4ItemERK6TDesC8 @ 35 NONAME
+ _ZNK18CTestConfigSection4ItemERK6TDesC8i @ 36 NONAME
+ _ZNK18CTestConfigSection6CopyLCEv @ 37 NONAME
+ _ZNK18CTestConfigSection6ItemsLER13RPointerArrayIK15CTestConfigItemERK6TDesC8 @ 38 NONAME
+ _ZNK18CTestConfigSection9ItemCountERK6TDesC8 @ 39 NONAME
+ _ZNK18CTestConfigSection9ItemValueERK6TDesC8S2_ @ 40 NONAME
+ _ZNK18CTestConfigSection9ItemValueERK6TDesC8i @ 41 NONAME
+ _ZTI11CTestConfig @ 42 NONAME ; #<TI>#
+ _ZTI15CTestConfigItem @ 43 NONAME ; #<TI>#
+ _ZTI18CTestConfigSection @ 44 NONAME ; #<TI>#
+ _ZTV11CTestConfig @ 45 NONAME ; #<VT>#
+ _ZTV15CTestConfigItem @ 46 NONAME ; #<VT>#
+ _ZTV18CTestConfigSection @ 47 NONAME ; #<VT>#
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyserverplugins/simtsy/testconfigfileparser/group/bld.inf Thu Sep 02 21:42:07 2010 +0300
@@ -0,0 +1,39 @@
+// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+
+PRJ_PLATFORMS
+
+DEFAULT
+
+PRJ_EXPORTS
+
+../inc/testconfigfileparser.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(testconfigfileparser.h)
+../inc/testconfigfileparser.inl SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(testconfigfileparser.inl)
+
+../group/testconfigfileparser.iby /epoc32/rom/include/testconfigfileparser.iby
+
+PRJ_MMPFILES
+
+../group/testconfigfileparser.mmp
+
+PRJ_TESTMMPFILES
+
+//../test/t_testconfigfileparser.mmp
+
+PRJ_TESTEXPORTS
+
+../test/t_testconfigfileparser.txt /epoc32/wins/c/testscripts/t_testconfigfileparser.txt
+../test/t_testconfigfileparser2.txt /epoc32/wins/c/testscripts/t_testconfigfileparser2.txt
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyserverplugins/simtsy/testconfigfileparser/group/testconfigfileparser.iby Thu Sep 02 21:42:07 2010 +0300
@@ -0,0 +1,25 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef __TEST_CONFIG_FILE_PARSER_IBY__
+#define __TEST_CONFIG_FILE_PARSER_IBY__
+
+REM For components that use the Autotest framework
+
+file=ABI_DIR\BUILD_DIR\testconfigfileparser.dll System\Libs\testconfigfileparser.dll
+
+#endif
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyserverplugins/simtsy/testconfigfileparser/group/testconfigfileparser.mmp Thu Sep 02 21:42:07 2010 +0300
@@ -0,0 +1,42 @@
+// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Top-level project file for DLL that parses config files for test harnesses
+//
+//
+
+/**
+ @file testconfigfileparser.mmp
+*/
+
+TARGET testconfigfileparser.dll
+CAPABILITY All -Tcb
+TARGETTYPE dll
+
+SOURCEPATH ../src
+SOURCE testconfigfile.cpp
+SOURCE testconfigsection.cpp
+SOURCE testconfigitem.cpp
+
+#ifdef EABI
+DEFFILE testconfigfileparser.def
+#else
+DEFFILE TESTCONFIGFILEPARSER.DEF
+#endif
+
+USERINCLUDE ../inc
+OS_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+LIBRARY euser.lib efsrv.lib
+
+VENDORID 0x70000001
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyserverplugins/simtsy/testconfigfileparser/group/tools_testconfigfileparser.history.xml Thu Sep 02 21:42:07 2010 +0300
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<relnotes name="TESTCONFIGFILEPARSER">
+ <purpose>
+ </purpose>
+</relnotes>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyserverplugins/simtsy/testconfigfileparser/group/tools_testconfigfileparser.mrp Thu Sep 02 21:42:07 2010 +0300
@@ -0,0 +1,25 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+component tools_testconfigfileparser
+source \sf\os\cellularsrv\telephonyserverplugins\simtsy\testconfigfileparser
+binary \sf\os\cellularsrv\telephonyserverplugins\simtsy\testconfigfileparser\group all
+exports \sf\os\cellularsrv\telephonyserverplugins\simtsy\testconfigfileparser\group
+notes_source \component_defs\release.src
+
+
+ipr T
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyserverplugins/simtsy/testconfigfileparser/inc/testconfigfileparser.h Thu Sep 02 21:42:07 2010 +0300
@@ -0,0 +1,260 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+/**
+ * @file testscripts.h Defines classes for reading a configuration file
+ *
+ * @note Configuration File Format:
+ *
+ * [Defaults]
+ * defaults= another_config_file.txt
+ *
+ * [SectionName]
+ * variable= value
+ * variable2= value2
+ * variable= value3
+ *
+ * [SectionName2]
+ * variable= value
+ *
+ * endscript
+ *
+ *
+ * @note Explanation:
+ *
+ * A configuration file is made up of a number of "sections", each of which can contain a number of "items" (name, value combination).
+ *
+ * "Sections" must have a name and be surrounded by square backets, e.g.:
+ *
+ * [SectionName]
+ *
+ *
+ * Each "item" consists of consists of a name, followed by an equals sign, followed by blank space, followed by the value to assign to that variable.
+ *
+ * The value can be of any length, contain whitespace and span multiple lines. The value ends when the next item or section is found. E.g:
+ *
+ * Simple Item:
+ *
+ * variable= value
+ *
+ * Two items on one line:
+ *
+ * variable= value variable2= value2
+ *
+ * Multi-line item:
+ *
+ * variable= This variable
+ * spans multiple
+ * lines
+ *
+ *
+ * @note Parsing stops at End-Of-File or if the tag "endscript" (without the quotes) appears in the file.
+ *
+ * @note A section may take some default values from another section or config file
+ *
+ * To specify default values for all sections, add a section at the start of the config file called [Defaults], e.g.:
+ *
+ * [Defaults]
+ * sc= +447785016005
+ *
+ * To read default values from another config file, add an item with name "defaults" and value is the name of the file. E.g.:
+ *
+ * defaults= another_config_file.txt
+
+ */
+
+
+#ifndef __TEST_CONFIG_FILE_PARSER_H__
+#define __TEST_CONFIG_FILE_PARSER_H__
+
+#include <e32std.h>
+#include <e32base.h>
+
+class CTestConfigSection;
+class CTestConfigItem;
+class RFs;
+class TParse;
+class RFile;
+
+_LIT(KScriptPanic, "TEST-SCRIPT");
+_LIT(KScriptPathSep,"\\");
+_LIT8(KScriptSectionStart, "[");
+_LIT8(KScriptSectionEnd, "]");
+_LIT8(KScriptCRLF, "\r\n");
+_LIT8(KScriptCRLF8, "\r\n");
+_LIT8(KScriptLF, "\n");
+_LIT8(KScriptCR, "\r");
+_LIT8(KScriptItemEnd, "=");
+_LIT8(KScriptItemEnd8, "=");
+_LIT8(KScriptSpace8, " ");
+_LIT8(KScriptDefaults, "Defaults");
+_LIT8(KScriptDefault1, "Def");
+_LIT8(KScriptDefault2, "Default");
+_LIT8(KScriptCommentStart, "#");
+const TInt KScriptLFChar = '\n';
+const TInt KScriptCRChar = '\r';
+
+class CTestConfig : public CBase
+/**
+ * @internalComponent
+ * @deprecated
+ */
+ {
+ public:
+ IMPORT_C static CTestConfig* NewLC(RFs& aFs, const TDesC& aComponent, const TDesC& aScriptFile);
+ IMPORT_C static CTestConfig* NewLC(RFs& aFs, const TDesC& aComponent);
+ IMPORT_C ~CTestConfig();
+
+ IMPORT_C const TDesC8& ItemValue(const TDesC8& aSection, const TDesC8& aItem, const TDesC8& aDefault) const;
+ IMPORT_C TInt ItemValue(const TDesC8& aSection, const TDesC8& aItem, const TInt aDefault) const;
+
+ IMPORT_C void ReadScriptL(const TDesC& aScript);
+
+ inline const RPointerArray<CTestConfigSection>& Sections() const;
+ inline RPointerArray<CTestConfigSection>& Sections();
+
+ IMPORT_C const CTestConfigSection* Section(const TDesC8& aSectionName) const; //return NULL if section not found
+ IMPORT_C CTestConfigSection* Section(const TDesC8& aSectionName); //return NULL if section not found
+ inline const CTestConfigSection& operator[](TInt aIndex) const {return *iSections[aIndex];}
+ inline CTestConfigSection& operator[](TInt aIndex) {return *iSections[aIndex];}
+
+ IMPORT_C static TInt CountElements(const TDesC8& aInput, TChar aDelimiter);
+ IMPORT_C static TInt GetElement(const TDesC8& aInput, TChar aDelimiter, TInt aIndex, TInt& aOutput);
+ IMPORT_C static TInt GetElement(const TDesC8& aInput, TChar aDelimiter, TInt aIndex, TPtrC8& aOutput, TBool aTrimOutput = ETrue);
+ IMPORT_C static TPtrC8 Trim(const TDesC8& aInput);
+ IMPORT_C static TPtrC8 TrimLeft(const TDesC8& aInput);
+ IMPORT_C static TPtrC8 TrimRight(const TDesC8& aInput);
+
+ IMPORT_C static HBufC8* ReplaceLC(const TDesC8& aOld, const TDesC8& aNew, const TDesC8& aOldString);
+ IMPORT_C static TInt ResolveFile(RFs& aFs, const TDesC& aComponent, const TDesC& aFileName, TParse& aParseOut);
+
+ IMPORT_C void WriteFileL(const TDesC& aFileName);
+ IMPORT_C TBool operator==(const CTestConfig& aFile) const;
+
+ IMPORT_C void AddSectionL(CTestConfigSection& aSection);
+
+ protected:
+
+ CTestConfig(RFs& aFs);
+ void ConstructL(const TDesC& aComponent);
+
+ TPtrC8 ParseValue(const TDesC8& aText, const TLex8& aInput, TInt aCurrentItemStart) const;
+ void ParseAndSetItemValueL(const TDesC8& aText, const TLex8& aInput, TInt aCurrentItemStart, CTestConfigItem*& arCurrentItem);
+ void CopyInDefaultsL(CTestConfigSection& aSection, const TDesC& aDefaultFile);
+
+ HBufC8* ReadFileL(const TDesC& aFile) const;
+
+ TBool IsDefaultSection(const TDesC8& aSectionName) const;
+ static TInt GetNextElement(TLex8& aInput, TChar aDelimiter, TPtrC8& aOutput);
+ TBool IsNewSection(const TDesC8& aSource, const TLex8& aInput) const;
+ TBool IsNewItem(const TDesC8& aSource, const TLex8& aLex, TPtrC8& aItem, TInt& aStartOfValue) const;
+ TBool IsNewComment(const TDesC8& aSource, const TLex8& aLex) const;
+ TBool IsAtStartOfNewLine(const TDesC8& aSource, const TLex8& aLex, TBool aIgnoreSpaces) const;
+ void SkipToNextLine(TLex8& aInput) const;
+
+
+ protected:
+
+ RFs& iFs;
+ HBufC* iComponent;
+ RPointerArray<CTestConfigSection> iSections;
+ };
+
+class CTestConfigSection : public CBase
+/**
+ * @internalComponent
+ * @deprecated
+ */
+ {
+ friend class CTestConfig;
+
+ public:
+ IMPORT_C static CTestConfigSection* NewLC(const TDesC8& aSectionName);
+ IMPORT_C static CTestConfigSection* NewLC(const TDesC8& aSectionName, CTestConfigSection& aDefaults);
+ IMPORT_C ~CTestConfigSection();
+
+ inline const TDesC8& SectionName() const;
+
+ IMPORT_C const CTestConfigItem* Item(const TDesC8& aItemTag) const; //return NULL if the item does not exist
+ IMPORT_C CTestConfigItem* Item(const TDesC8& aItemTag); //return NULL if the item does not exist
+ IMPORT_C const CTestConfigItem* Item(const TDesC8& aItemTag,TInt aIndex) const; //return NULL if the item does not exist
+ IMPORT_C CTestConfigItem* Item(const TDesC8& aItemTag,TInt aIndex); //return NULL if the item does not exist
+
+ IMPORT_C const TDesC8& ItemValue(const TDesC8& aItemTag, const TDesC8& aDefault) const;
+ IMPORT_C TInt ItemValue(const TDesC8& aItemTag, TInt aDefault) const;
+
+ IMPORT_C CTestConfigItem& AddItemL(const TDesC8& aItemTag, const TDesC8& aValue);
+ IMPORT_C void DeleteItemsL(const TDesC8& aItem);
+
+ inline const RPointerArray<CTestConfigItem>& Items() const {return iItems;}
+ inline RPointerArray<CTestConfigItem>& Items() {return iItems;}
+
+ IMPORT_C TInt ItemCount(const TDesC8& aItemTag) const;
+ IMPORT_C void ItemsL(RPointerArray<CTestConfigItem>& aArray, const TDesC8& aItemTag);
+ IMPORT_C void ItemsL(RPointerArray<const CTestConfigItem>& aArray, const TDesC8& aItemTag) const;
+
+ inline const CTestConfigItem& operator[](TInt aIndex) const {return *iItems[aIndex];}
+
+ inline void SetDefaultsL(const CTestConfigSection& aDefaults);
+ inline CTestConfigSection* Defaults() const {return iDefaults;}
+
+ IMPORT_C CTestConfigSection* CopyLC() const;
+
+ void WriteL(RFile& aFile) const;
+ TBool operator==(const CTestConfigSection& aFile) const;
+
+ private:
+ void ConstructL(const TDesC8& aSectionName);
+ CTestConfigSection();
+ RPointerArray<CTestConfigItem> iItems;
+ HBufC8* iSectionName;
+ CTestConfigSection* iDefaults;
+ };
+
+class CTestConfigItem : public CBase
+/**
+ * @internalComponent
+ * @deprecated
+ */
+ {
+ friend class CTestConfigSection;
+ friend class CTestConfig;
+
+ public:
+ IMPORT_C static CTestConfigItem* NewLC(CTestConfigSection& aParent, const TDesC8& aItem, const TDesC8& aValue);
+ inline CTestConfigItem* CopyLC() const;
+
+ IMPORT_C ~CTestConfigItem();
+ inline const TDesC8& Item() const;
+ inline const TDesC8& Value() const;
+
+ void WriteL(RFile& aFile) const;
+ TBool operator==(const CTestConfigItem& aItem) const {return Item() == aItem.Item() && Value() == aItem.Value();}
+
+ public:
+
+ CTestConfigSection& iParent;
+
+ private:
+ CTestConfigItem(CTestConfigSection& aParent);
+ void ConstructL(const TDesC8& aItem, const TDesC8& aValue);
+ HBufC8* iItem;
+ HBufC8* iValue;
+ };
+
+#include "testconfigfileparser.inl"
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyserverplugins/simtsy/testconfigfileparser/inc/testconfigfileparser.inl Thu Sep 02 21:42:07 2010 +0300
@@ -0,0 +1,64 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef TEST_SCRIPTS_INL_
+#define TEST_SCRIPTS_INL_
+
+inline const RPointerArray<CTestConfigSection>& CTestConfig::Sections() const
+ {
+ return iSections;
+ }
+
+inline RPointerArray<CTestConfigSection>& CTestConfig::Sections()
+ {
+ return iSections;
+ }
+
+inline const TDesC8& CTestConfigSection::SectionName() const
+ {
+ return *iSectionName;
+ }
+
+inline const TDesC8& CTestConfigItem::Item() const
+ {
+ return *iItem;
+ }
+
+inline void CTestConfigSection::SetDefaultsL(const CTestConfigSection& aDefaults)
+ {
+ CTestConfigSection* def = aDefaults.CopyLC();
+ CleanupStack::Pop(def);
+ delete iDefaults;
+ iDefaults = NULL;
+ iDefaults = def;
+ }
+
+
+inline const TDesC8& CTestConfigItem::Value() const
+ {
+ return *iValue;
+ }
+
+
+inline CTestConfigItem* CTestConfigItem::CopyLC() const
+ {
+ return NewLC(iParent, *iItem, *iValue);
+ }
+
+
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyserverplugins/simtsy/testconfigfileparser/src/testconfigfile.cpp Thu Sep 02 21:42:07 2010 +0300
@@ -0,0 +1,610 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include "testconfigfileparser.h"
+#include <f32file.h>
+
+
+
+#ifndef EKA2
+GLDEF_C TInt E32Dll(TDllReason/* aReason*/)
+//
+// DLL entry point
+//
+ {
+ return (KErrNone);
+ }
+#endif
+
+
+EXPORT_C CTestConfig* CTestConfig::NewLC(RFs& aFs, const TDesC& aComponent, const TDesC& aScript)
+ {
+ CTestConfig* self = NewLC(aFs, aComponent);
+ self->ReadScriptL(aScript);
+ return self;
+ }
+
+EXPORT_C CTestConfig* CTestConfig::NewLC(RFs& aFs, const TDesC& aComponent)
+ {
+ CTestConfig* self = new (ELeave) CTestConfig(aFs);
+ CleanupStack::PushL(self);
+ self->ConstructL(aComponent);
+ return self;
+ }
+
+void CTestConfig::ConstructL(const TDesC& aComponent)
+ {
+ iComponent = aComponent.AllocL();
+ }
+
+CTestConfig::CTestConfig(RFs& aFs)
+: iFs(aFs)
+ {
+ }
+
+EXPORT_C CTestConfig::~CTestConfig()
+ {
+ iSections.ResetAndDestroy();
+ iSections.Close();
+ delete iComponent;
+ }
+
+EXPORT_C const CTestConfigSection* CTestConfig::Section(const TDesC8& aSectionName) const
+ {
+ const CTestConfigSection* section = NULL;
+ const TInt count = iSections.Count();
+
+ for (TInt i = 0; i < count; i++) //order important
+ {
+ if (iSections[i]->SectionName().CompareF(aSectionName) == 0)
+ {
+ section = iSections[i];
+ break;
+ }
+ }
+
+ return section;
+ }
+
+EXPORT_C CTestConfigSection* CTestConfig::Section(const TDesC8& aSectionName)
+ {
+ CTestConfigSection* section = NULL;
+ const TInt count = iSections.Count();
+
+ for (TInt i = 0; i < count; i++) //order important
+ {
+ if (iSections[i]->SectionName().CompareF(aSectionName) == 0)
+ {
+ section = iSections[i];
+ break;
+ }
+ }
+
+ return section;
+ }
+
+EXPORT_C const TDesC8& CTestConfig::ItemValue(const TDesC8& aSection, const TDesC8& aItem, const TDesC8& aDefault) const
+ {
+ const CTestConfigSection* section = Section(aSection);
+
+ if (section != NULL)
+ return section->ItemValue(aItem, aDefault);
+
+ return aDefault;
+ }
+
+EXPORT_C TInt CTestConfig::ItemValue(const TDesC8& aSection, const TDesC8& aItem, const TInt aDefault) const
+ {
+ TInt output = aDefault;
+ const CTestConfigSection* section = Section(aSection);
+
+ if (section != NULL)
+ {
+ output = section->ItemValue(aItem, aDefault);
+ }
+
+ return output;
+ }
+
+
+
+
+HBufC8* CTestConfig::ReadFileL(const TDesC& aFile) const
+ {
+ //Returns a HBufC8 with the contents of aFile
+ RFile file;
+ const TInt err = file.Open(iFs, aFile, EFileShareAny | EFileRead);
+
+ if (err != KErrNone)
+ {
+ TParse fileOut;
+ User::LeaveIfError(ResolveFile(iFs, *iComponent, aFile, fileOut));
+ User::LeaveIfError(file.Open(iFs, fileOut.FullName(), EFileShareAny | EFileRead));
+ }
+
+ CleanupClosePushL(file);
+
+ TInt size = 0;
+ User::LeaveIfError(file.Size(size));
+
+ HBufC8* contents = HBufC8::NewLC(size + 4);
+ TPtr8 contentsPtr(contents->Des());
+ User::LeaveIfError(file.Read(0, contentsPtr));
+
+ CleanupStack::Pop(contents);
+ CleanupStack::PopAndDestroy(&file);
+ return contents;
+ }
+
+EXPORT_C TInt CTestConfig::ResolveFile(RFs& aFs, const TDesC& aComponent, const TDesC& aFileName, TParse& aParseOut)
+ {
+ TFileName* savedPath = new TFileName;
+ TFileName* fileName = new TFileName;
+ if ((savedPath == NULL) || (fileName == NULL))
+ {
+ delete savedPath;
+ delete fileName;
+ return KErrNoMemory;
+ }
+
+ fileName->Append(KScriptPathSep);
+// fileName->Append(KSmsTestFileInputBase);
+// fileName->Append(KScriptPathSep);
+ fileName->Append(aComponent);
+ fileName->Append(KScriptPathSep);
+ fileName->Append(aFileName);
+
+ // file finder will look in the session drive first, then Y->A,Z
+ // so set session drive to Y (save old and restore it afterwards)
+ aFs.SessionPath(*savedPath);
+ _LIT(KTopDrive,"Y:\\");
+ aFs.SetSessionPath(KTopDrive);
+ TFindFile file_finder(aFs);
+ TInt err = file_finder.FindByDir(*fileName,KNullDesC);
+ if(err==KErrNone)
+ aParseOut.Set(file_finder.File(),NULL,NULL);
+ aFs.SetSessionPath(*savedPath);
+ delete savedPath;
+ delete fileName;
+ return(err);
+ }
+
+EXPORT_C void CTestConfig::ReadScriptL(const TDesC& aScript)
+ {
+ iSections.ResetAndDestroy();
+
+ CTestConfigSection* section = NULL;
+ CTestConfigItem* currentItem = NULL;
+ TInt currentItemStart = 0;
+ CTestConfigSection* sectionDefaults = NULL;
+
+ HBufC8* scriptContents = ReadFileL(aScript);
+ CleanupStack::PushL(scriptContents);
+
+ TLex8 input(*scriptContents);
+
+ while (!input.Eos())
+ {
+ input.SkipSpaceAndMark();
+ input.SkipCharacters();
+
+ if ( input.TokenLength() == 0) // if valid potential token
+ {
+ //end of the script file found
+ break;
+ }
+
+ const TPtrC8 token(input.MarkedToken());
+
+ if (token.CompareF(_L8("endscript")) == 0)
+ {
+ //end of the script file found
+ break;
+ }
+ else if (IsNewSection(*scriptContents, input))
+ {
+ ParseAndSetItemValueL(*scriptContents, input, currentItemStart, currentItem);
+
+ TInt mid = 1;
+ TInt len = token.Length() - 2;
+
+ const TPtrC8 sectionName(token.Mid(mid, len));
+
+ if (sectionDefaults != NULL)
+ section = CTestConfigSection::NewLC(sectionName, *sectionDefaults);
+ else
+ section = CTestConfigSection::NewLC(sectionName);
+
+ if (sectionDefaults == NULL && IsDefaultSection(section->SectionName()))
+ sectionDefaults = section;
+
+ User::LeaveIfError(iSections.Append(section));
+ CleanupStack::Pop(section);
+ }
+ else if (section != NULL)
+ {
+ TInt valueOffset;
+ TPtrC8 newItem;
+
+ if (IsNewComment(*scriptContents, input))
+ {
+ ParseAndSetItemValueL(*scriptContents, input, currentItemStart, currentItem);
+ __ASSERT_DEBUG(currentItem == NULL, User::Invariant());
+ SkipToNextLine(input);
+ }
+ else if (IsNewItem(*scriptContents, input, newItem, valueOffset))
+ {
+ ParseAndSetItemValueL(*scriptContents, input, currentItemStart, currentItem);
+ currentItemStart = input.MarkedOffset() + valueOffset;
+ currentItem = §ion->AddItemL(newItem, KNullDesC8);
+ }
+ }
+ }
+
+ ParseAndSetItemValueL(*scriptContents, input, currentItemStart, currentItem);
+ CleanupStack::PopAndDestroy(scriptContents);
+ }
+
+TBool CTestConfig::IsNewSection(const TDesC8& aSource, const TLex8& aInput) const
+/**
+ * Checks whether the current marked token in aInput starts with a '[' and ends with a ']',
+ * and checks that this token is at the start of a line.
+ *
+ * @returns Whether this is a new section in the script file
+ */
+ {
+ const TPtrC8 token(aInput.MarkedToken());
+ const TInt offset(aInput.MarkedOffset());
+
+ TBool ret = token.Length() > 2 && token.Find(KScriptSectionStart) == 0;
+ ret = ret && token.Find(KScriptSectionEnd) != KErrNotFound;
+
+ if (ret && offset > 0)
+ {
+ const TPtrC8 lastChar(aSource.Mid(offset-1, 1));
+ ret = ret && (lastChar == KScriptLF || lastChar == KScriptCR);
+ }
+
+ return ret;
+ }
+
+void CTestConfig::SkipToNextLine(TLex8& aInput) const
+ {
+ const TChar cr('\n');
+
+ while (!aInput.Eos() && aInput.Peek() != cr)
+ {
+ aInput.Inc();
+ }
+ }
+
+TBool CTestConfig::IsNewItem(const TDesC8& aSource, const TLex8& aLex, TPtrC8& aItem, TInt& aStartOfVal) const
+ {
+ TBool ret(EFalse);
+
+ if (IsAtStartOfNewLine(aSource, aLex, ETrue))
+ {
+ const TPtrC8 itemEnd(KScriptItemEnd);
+ const TInt itemEndLen(itemEnd.Length());
+
+ TPtrC8 token(aLex.MarkedToken());
+
+ //First check to see if this token contains '='
+ const TInt find = token.Find(itemEnd);
+ if (find > 0)
+ {
+ aStartOfVal = find + itemEndLen;
+ aItem.Set(token.Left(find));
+ ret = ETrue;
+ }
+ else
+ {
+ aItem.Set(token);
+ aStartOfVal = token.Length();
+
+ const TPtrC8 remain(aLex.Remainder());
+ TLex8 lex(remain);
+ //Check that the next token starts with and '='
+ lex.SkipSpaceAndMark();
+ lex.SkipCharacters();
+ token.Set(lex.MarkedToken());
+
+ if (token.Find(itemEnd) == 0)
+ {
+ aStartOfVal += lex.MarkedOffset() + itemEndLen;
+ ret = ETrue;
+ }
+ }
+ }
+
+ return ret;
+ }
+
+TBool CTestConfig::IsNewComment(const TDesC8& aSource, const TLex8& aLex) const
+ {
+ TBool ret(EFalse);
+
+ const TPtrC8 token(aLex.MarkedToken());
+ const TPtrC8 commentStart(KScriptCommentStart);
+ const TInt commentStartLen(commentStart.Length());
+ const TInt tokenLen(token.Length());
+
+ if (commentStartLen <= tokenLen && token.Left(commentStartLen).Compare(commentStart) == 0)
+ {
+ ret = IsAtStartOfNewLine(aSource, aLex, ETrue);
+ }
+
+ return ret;
+ }
+
+TBool CTestConfig::IsAtStartOfNewLine(const TDesC8& aSource, const TLex8& aLex, TBool aIgnoreSpaces) const
+ {
+ TInt offset(aLex.MarkedOffset());
+ __ASSERT_ALWAYS(offset != 0, User::Invariant());
+
+ TChar ch = NULL;
+
+ if (aIgnoreSpaces)
+ {
+ while (offset--)
+ {
+ ch = aSource[offset];
+ if (ch == KScriptLFChar || ch == KScriptCRChar || !ch.IsSpace())
+ break;
+ }
+ }
+ else
+ ch = aSource[offset-1];
+
+ TBool ret(EFalse);
+
+ if (offset <= 0)
+ ret = ETrue;
+ else
+ ret = (ch == KScriptLFChar || ch == KScriptCRChar);
+
+ return ret;
+ }
+
+TBool CTestConfig::IsDefaultSection(const TDesC8& aSectionName) const
+ {
+ TBool retVal = (aSectionName.CompareF(KScriptDefaults) == 0);
+ retVal = retVal || (aSectionName.CompareF(KScriptDefault1) == 0);
+ return retVal;
+ }
+
+TPtrC8 CTestConfig::ParseValue(const TDesC8& aText, const TLex8& aInput, TInt aCurrentItemStart) const
+ {
+ const TInt mid = aCurrentItemStart;
+ const TInt len = aInput.MarkedOffset() - mid;
+ TPtrC8 ret(KNullDesC8);
+
+ if (len > 0)
+ ret.Set(aText.Mid(mid, len));
+
+ return ret;
+ }
+
+void CTestConfig::ParseAndSetItemValueL(const TDesC8& aText, const TLex8& aInput, TInt aCurrentItemStart, CTestConfigItem*& arCurrentItem)
+ {
+ if (arCurrentItem)
+ {
+ delete arCurrentItem->iValue;
+ arCurrentItem->iValue = NULL;
+
+ TPtrC8 val(ParseValue(aText, aInput, aCurrentItemStart));
+ arCurrentItem->iValue = ReplaceLC(KScriptCRLF, KScriptLF, val);
+ arCurrentItem->iValue->Des().Trim();
+ CleanupStack::Pop(arCurrentItem->iValue);
+
+ if (arCurrentItem->Item().CompareF(KScriptDefaults) == 0)
+ {
+ TName filename;
+ filename.Copy(arCurrentItem->Value());
+ CopyInDefaultsL(arCurrentItem->iParent, filename);
+ }
+ }
+
+ arCurrentItem = NULL;
+ }
+
+void CTestConfig::CopyInDefaultsL(CTestConfigSection& aSection, const TDesC& aDefaultFile)
+ {
+ CTestConfig* file = CTestConfig::NewLC(iFs, aDefaultFile);
+
+ TInt count = file->Sections().Count();
+
+ if (count > 0)
+ {
+ const CTestConfigSection& def = (*file)[0];
+ aSection.SetDefaultsL(def);
+ }
+
+ CleanupStack::PopAndDestroy(file);
+ }
+
+EXPORT_C TInt CTestConfig::CountElements(const TDesC8& aInput, TChar aDelimiter)
+ {
+ TInt pos = aInput.Length();
+ TInt count = 1;
+
+ while (pos--)
+ {
+ if (TChar(aInput[pos]) == aDelimiter)
+ count++;
+ }
+
+ return count;
+ }
+
+EXPORT_C TInt CTestConfig::GetElement(const TDesC8& aInput, TChar aDelimiter, TInt aIndex, TInt& aOutput)
+ {
+ aOutput = 0;
+ TPtrC8 string;
+ TInt err = GetElement(aInput, aDelimiter, aIndex, string, ETrue);
+
+ if (err == KErrNone)
+ {
+ TLex8 number(string);
+ err = number.Val(aOutput);
+ }
+
+ return err;
+ }
+
+EXPORT_C TInt CTestConfig::GetElement(const TDesC8& aInput, TChar aDelimiter, TInt aIndex, TPtrC8& aOutput, TBool aTrimOutput)
+ {
+ TLex8 input(aInput);
+ TInt err = KErrNone;
+ TPtrC8 ptr;
+
+ for (TInt i = 0; i <= aIndex && err == KErrNone; i++)
+ {
+ err = GetNextElement(input, aDelimiter, ptr);
+ }
+
+ if (err == KErrNone)
+ {
+ if (aTrimOutput)
+ aOutput.Set(Trim(ptr));
+ else
+ aOutput.Set(ptr);
+ }
+ else
+ {
+ const TInt count = CountElements(aInput, aDelimiter);
+ const TInt len = aInput.Length();
+
+ if (len != 0 && count - 1 == aIndex && TChar(aInput[len-1]) == aDelimiter)
+ {
+ aOutput.Set(KNullDesC8);
+ err = KErrNone;
+ }
+ }
+
+ return err;
+ }
+
+EXPORT_C TPtrC8 CTestConfig::Trim(const TDesC8& aInput)
+ {
+ const TPtrC8 ptr(TrimLeft(aInput));
+ return TrimRight(ptr);
+ }
+
+EXPORT_C TPtrC8 CTestConfig::TrimRight(const TDesC8& aInput)
+ {
+ const TText8* first = aInput.Ptr(); // pointer to first char
+ const TText8* last = first + aInput.Length() - 1; // pointer to last char
+ while (last >= first && TChar(*last).IsSpace()) last--; // trim the right
+ return TPtrC8(first, last + 1 - first); // return the result
+ }
+
+EXPORT_C TPtrC8 CTestConfig::TrimLeft(const TDesC8& aInput)
+ {
+ const TText8* first = aInput.Ptr(); // pointer to first char
+ const TText8* last = first + aInput.Length() - 1; // pointer to last char
+ while (first < last && TChar(*first).IsSpace()) first++; // trim the left
+ return TPtrC8(first, last + 1 - first); // return the result
+ }
+
+
+TInt CTestConfig::GetNextElement(TLex8& aInput, TChar aDelimiter, TPtrC8& aOutput)
+ {
+ if (aInput.Eos())
+ return KErrNotFound;
+
+ //Get to the start of the descriptor
+ while (!aInput.Eos() && aInput.Peek() != aDelimiter)
+ aInput.Inc();
+
+ aOutput.Set(aInput.MarkedToken());
+ if (!aInput.Eos())
+ aInput.SkipAndMark(1);
+
+ return KErrNone;
+ }
+
+/*EXPORT_C void CTestConfig::ReplaceL(const TDesC8& aOld, const TDesC8& aNew, HBufC*& rString)
+ {
+ HBufC* repl = ReplaceLC(aOld, aNew, *rString);
+ CleanupStack::Pop(repl);
+ rString = repl;
+ }*/
+
+EXPORT_C HBufC8* CTestConfig::ReplaceLC(const TDesC8& aOld, const TDesC8& aNew, const TDesC8& aOldString)
+ {
+ HBufC8* rString = aOldString.AllocLC();
+ TInt oldLen = aOld.Length();
+ TInt newLen = aNew.Length();
+
+ if (!oldLen)
+ return rString;
+
+ for (TInt pos = 0; pos < rString->Length(); pos += newLen)
+ {
+ TPtrC8 ptrC = rString->Mid(pos);
+ TInt find = ptrC.Find(aOld);
+
+ if (find == KErrNotFound)
+ return rString;
+
+ pos += find;
+
+ if (newLen > oldLen)
+ {
+ rString = rString->ReAllocL(rString->Length() + newLen - oldLen);
+ CleanupStack::Pop();
+ CleanupStack::PushL(rString);
+ }
+
+ TPtr8 ptr(rString->Des());
+ ptr.Replace(pos, oldLen, aNew);
+ }
+
+ return rString;
+ }
+
+
+EXPORT_C void CTestConfig::WriteFileL(const TDesC& aFileName)
+ {
+ RFile file;
+ User::LeaveIfError(file.Replace(iFs, aFileName, EFileShareAny | EFileWrite));
+ CleanupClosePushL(file);
+
+ const TInt count = iSections.Count();
+
+ for (TInt i=0; i < count; i++)
+ iSections[i]->WriteL(file);
+
+ User::LeaveIfError(file.Flush());
+ CleanupStack::PopAndDestroy(); //file
+ }
+
+EXPORT_C TBool CTestConfig::operator==(const CTestConfig& aFile) const
+ {
+ TInt count = iSections.Count();
+ if (count != aFile.Sections().Count())
+ return EFalse;
+
+ TBool retVal = ETrue;
+
+ while (count-- && retVal)
+ {
+ retVal = retVal && (*iSections[count] == aFile[count]);
+ }
+
+ return retVal;
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyserverplugins/simtsy/testconfigfileparser/src/testconfigitem.cpp Thu Sep 02 21:42:07 2010 +0300
@@ -0,0 +1,68 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include "testconfigfileparser.h"
+#include <f32file.h>
+
+CTestConfigItem::CTestConfigItem(CTestConfigSection& aParent)
+: iParent(aParent)
+ {
+ }
+
+void CTestConfigItem::ConstructL(const TDesC8& aItem, const TDesC8& aValue)
+ {
+ iItem = aItem.AllocL();
+ iValue = aValue.AllocL();
+ }
+
+EXPORT_C CTestConfigItem::~CTestConfigItem()
+ {
+ delete iItem;
+ delete iValue;
+ }
+
+EXPORT_C CTestConfigItem* CTestConfigItem::NewLC(CTestConfigSection& aParent, const TDesC8& aItem, const TDesC8& aValue)
+ {
+ CTestConfigItem* self = new (ELeave) CTestConfigItem(aParent);
+ CleanupStack::PushL(self);
+ self->ConstructL(aItem, aValue);
+ return self;
+ }
+
+void CTestConfigItem::WriteL(RFile& aFile) const
+ {
+ //Write the section name
+ HBufC8* buf = HBufC8::NewLC(iItem->Length());
+ TPtr8 ptr(buf->Des());
+
+ ptr.Copy(*iItem);
+ User::LeaveIfError(aFile.Write(*buf));
+ User::LeaveIfError(aFile.Write(KScriptItemEnd8));
+ User::LeaveIfError(aFile.Write(KScriptSpace8));
+ CleanupStack::PopAndDestroy(buf);
+
+ HBufC8* val = CTestConfig::ReplaceLC(KScriptLF, KScriptCRLF, *iValue);
+
+ buf = HBufC8::NewLC(val->Length());
+ ptr.Set(buf->Des());
+ ptr.Copy(*val);
+
+ User::LeaveIfError(aFile.Write(*buf));
+ User::LeaveIfError(aFile.Write(KScriptCRLF8));
+
+ CleanupStack::PopAndDestroy(buf);
+ CleanupStack::PopAndDestroy(val);
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyserverplugins/simtsy/testconfigfileparser/src/testconfigsection.cpp Thu Sep 02 21:42:07 2010 +0300
@@ -0,0 +1,312 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include "testconfigfileparser.h"
+#include <f32file.h>
+
+
+//
+// CTestConfigSection
+//
+
+CTestConfigSection::CTestConfigSection()
+ : CBase()
+ {
+ }
+
+EXPORT_C CTestConfigSection* CTestConfigSection::NewLC(const TDesC8& aSectionName, CTestConfigSection& aDefaults)
+ {
+ CTestConfigSection* self = new (ELeave) CTestConfigSection();
+ CleanupStack::PushL(self);
+ self->iDefaults = aDefaults.CopyLC();
+ CleanupStack::Pop(self->iDefaults);
+ self->ConstructL(aSectionName);
+ return self;
+ }
+
+EXPORT_C CTestConfigSection* CTestConfigSection::NewLC(const TDesC8& aSectionName)
+ {
+ CTestConfigSection* self = new (ELeave) CTestConfigSection();
+ CleanupStack::PushL(self);
+ self->ConstructL(aSectionName);
+ return self;
+ }
+
+void CTestConfigSection::ConstructL(const TDesC8& aSectionName)
+ {
+ iSectionName = aSectionName.AllocL();
+ }
+
+EXPORT_C const TDesC8& CTestConfigSection::ItemValue(const TDesC8& aItem, const TDesC8& aDefault) const
+ {
+ const CTestConfigItem* sectionItem = Item(aItem);
+
+ if (sectionItem != NULL)
+ {
+ const TPtrC8 value(sectionItem->Value());
+
+ if (iDefaults != NULL && (value.CompareF(KScriptDefault1) == 0 || value.CompareF(KScriptDefault2) == 0))
+ {
+ return iDefaults->ItemValue(aItem, aDefault);
+ }
+ else
+ {
+ return sectionItem->Value();
+ }
+ }
+ else if (iDefaults != NULL)
+ {
+ return iDefaults->ItemValue(aItem, aDefault);
+ }
+ else
+ {
+ return aDefault;
+ }
+ }
+
+
+EXPORT_C TInt CTestConfigSection::ItemValue(const TDesC8& aItem, const TInt aDefault) const
+ {
+ const TDesC8& value = ItemValue(aItem, KNullDesC8);
+
+ if (value.Length() == 0)
+ {
+ if (iDefaults != NULL)
+ return iDefaults->ItemValue(aItem, aDefault);
+ else
+ return aDefault;
+ }
+
+ TLex8 input(value);
+ TInt ret = aDefault;
+ TInt err = input.Val(ret);
+
+ if (err)
+ {
+ if (iDefaults != NULL)
+ return iDefaults->ItemValue(aItem, aDefault);
+ else
+ return aDefault;
+ }
+
+ return ret;
+ }
+
+EXPORT_C CTestConfigItem& CTestConfigSection::AddItemL(const TDesC8& aItem, const TDesC8& aValue)
+ {
+ CTestConfigItem* sectionItem = CTestConfigItem::NewLC(*this, aItem, aValue);
+ User::LeaveIfError(iItems.Append(sectionItem));
+ CleanupStack::Pop(sectionItem);
+ return *sectionItem;
+ }
+
+EXPORT_C void CTestConfigSection::DeleteItemsL(const TDesC8& aItem)
+ {
+ TInt count = iItems.Count();
+
+ //Remove existing CTestConfigItems that have the same item name
+ while (count--)
+ {
+ CTestConfigItem* sectionItem = iItems[count];
+
+ if (sectionItem->Item().CompareF(aItem) == 0)
+ {
+ delete sectionItem;
+ iItems.Remove(count);
+ }
+ }
+ }
+
+
+EXPORT_C CTestConfigSection::~CTestConfigSection()
+ {
+ iItems.ResetAndDestroy();
+ iItems.Close();
+
+ delete iSectionName;
+ delete iDefaults;
+ }
+
+EXPORT_C CTestConfigSection* CTestConfigSection::CopyLC() const
+ {
+ TInt count = iItems.Count();
+ CTestConfigSection* copy = NULL;
+
+ if (iDefaults != NULL)
+ copy = CTestConfigSection::NewLC(SectionName(), *iDefaults);
+ else
+ copy = CTestConfigSection::NewLC(SectionName());
+
+ while (count--)
+ {
+ CTestConfigItem* item = iItems[count]->CopyLC();
+ User::LeaveIfError(copy->iItems.Append(item));
+ CleanupStack::Pop(item);
+ }
+
+ return copy;
+ }
+
+void CTestConfigSection::WriteL(RFile& aFile) const
+ {
+ //Write the section name
+ HBufC8* buf = HBufC8::NewLC(iSectionName->Length());
+ buf->Des().Copy(*iSectionName);
+
+ User::LeaveIfError(aFile.Write(KScriptSectionStart));
+ User::LeaveIfError(aFile.Write(*buf));
+ User::LeaveIfError(aFile.Write(KScriptSectionEnd));
+ User::LeaveIfError(aFile.Write(KScriptCRLF8));
+
+ CleanupStack::PopAndDestroy(buf);
+ const TInt count = iItems.Count();
+
+ //Write the items
+ for (TInt i = 0; i < count; i++)
+ iItems[i]->WriteL(aFile);
+
+ User::LeaveIfError(aFile.Write(KScriptCRLF8));
+ }
+
+TBool CTestConfigSection::operator==(const CTestConfigSection& aSection) const
+ {
+ TInt count = iItems.Count();
+
+ if (count != aSection.Items().Count())
+ return EFalse;
+
+ TBool retVal = (*iSectionName == aSection.SectionName());
+
+ while (count-- && retVal)
+ {
+ retVal = retVal && (*iItems[count] == aSection[count]);
+ }
+
+ return retVal;
+ }
+
+EXPORT_C const CTestConfigItem* CTestConfigSection::Item(const TDesC8& aItem) const
+ {
+ const CTestConfigItem* sectionItem = NULL;
+ const TInt count = iItems.Count();
+ for (TInt i = 0; i < count; i++)
+ {
+ if (iItems[i]->Item().CompareF(aItem) == 0)
+ {
+ sectionItem = iItems[i];
+ break;
+ }
+ }
+ return sectionItem;
+ }
+
+EXPORT_C CTestConfigItem* CTestConfigSection::Item(const TDesC8& aItem)
+ {
+ CTestConfigItem* sectionItem = NULL;
+ const TInt count = iItems.Count();
+ for (TInt i = 0; i < count; i++)
+ {
+ if (iItems[i]->Item().CompareF(aItem) == 0)
+ {
+ sectionItem = iItems[i];
+ break;
+ }
+ }
+ return sectionItem;
+ }
+
+EXPORT_C const CTestConfigItem* CTestConfigSection::Item(const TDesC8& aItem,TInt aIndex) const
+ {
+ const CTestConfigItem* sectionItem = NULL;
+ const TInt count = iItems.Count();
+ TInt foundItemCnt=0;
+ for (TInt i = 0; i < count; i++)
+ {
+ if (iItems[i]->Item().CompareF(aItem) == 0)
+ {
+ if(foundItemCnt++==aIndex)
+ {
+ sectionItem = iItems[i];
+ break;
+ }
+ }
+ }
+ return sectionItem;
+ }
+
+EXPORT_C CTestConfigItem* CTestConfigSection::Item(const TDesC8& aItem,TInt aIndex)
+ {
+ CTestConfigItem* sectionItem = NULL;
+ const TInt count = iItems.Count();
+ TInt foundItemCnt=0;
+ for (TInt i = 0; i < count; i++)
+ {
+ if (iItems[i]->Item().CompareF(aItem) == 0)
+ {
+ if(foundItemCnt++==aIndex)
+ {
+ sectionItem = iItems[i];
+ break;
+ }
+ }
+ }
+ return sectionItem;
+ }
+
+EXPORT_C void CTestConfigSection::ItemsL(RPointerArray<CTestConfigItem>& aArray, const TDesC8& aItemTag)
+ {
+ aArray.Reset();
+ const TInt count = iItems.Count();
+
+ for (TInt i = 0; i < count; i++) //< Order important
+ {
+ CTestConfigItem& item = *iItems[i];
+
+ if (item.Item().CompareF(aItemTag) == 0)
+ {
+ User::LeaveIfError(aArray.Append(&item));
+ }
+ }
+ }
+
+EXPORT_C void CTestConfigSection::ItemsL(RPointerArray<const CTestConfigItem>& aArray, const TDesC8& aItemTag) const
+ {
+ aArray.Reset();
+ const TInt count = iItems.Count();
+
+ for (TInt i = 0; i < count; i++) //< Order important
+ {
+ const CTestConfigItem& item = *iItems[i];
+
+ if (item.Item().CompareF(aItemTag) == 0)
+ {
+ User::LeaveIfError(aArray.Append(&item));
+ }
+ }
+ }
+
+
+EXPORT_C TInt CTestConfigSection::ItemCount(const TDesC8& aItem) const
+ {
+ const TInt count = iItems.Count();
+ TInt foundItemCnt=0;
+ for (TInt i = 0; i < count; i++)
+ {
+ if (iItems[i]->Item().CompareF(aItem) == 0)
+ foundItemCnt++;
+ }
+ return foundItemCnt;
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyserverplugins/simtsy/testconfigfileparser/test/t_testconfigfileparser.cpp Thu Sep 02 21:42:07 2010 +0300
@@ -0,0 +1,261 @@
+// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Tests classes defined in testconfigfileparser.h
+//
+//
+
+/**
+ @file t_testconfigfileparser.cpp
+ @since Hurricane
+ @copyright Copyright (c) 2001 Symbian Ltd. All rights reserved.
+*/
+
+#include <autotest.h>
+#include <e32base.h>
+#include <e32test.h> //< for RTest
+#include "testconfigfileparser.h"
+#include <f32file.h>
+
+
+_LIT(KTestScriptFile, "t_testconfigfileparser.txt");
+_LIT(KTestScriptComponent, "testscripts");
+_LIT(KTestScriptComponentFull, "\\testscripts\\");
+_LIT(KTestScriptOutput, "c:\\output.txt");
+
+CAutoTest* gAutoTest;
+RTest gTest(_L("Test Config File Test"));
+
+void TestGetElementL(TInt aTestCase, const TDesC8& aInput, TChar aDel, TInt aIndex, const TDesC8& aExpected, TBool aTrimOutput=ETrue)
+ {
+ TPtrC8 item(KNullDesC8);
+ const TInt err = CTestConfig::GetElement(aInput, aDel, aIndex, item, aTrimOutput);
+
+ const TInt KPrintfMaxLen = 200;
+ TBuf<KPrintfMaxLen> temp;
+
+ if (aInput.Length() <= KPrintfMaxLen)
+ {
+ temp.Copy(aInput);
+ gTest.Printf(_L("aInput=\"%S\" "), &temp);
+ }
+ else
+ gTest.Printf(_L("aInput=TOO LONG "));
+
+ gTest.Printf(_L("aIndex=%d "), aIndex);
+ gTest.Printf(_L("aTimeOutput=%d "), aTrimOutput);
+
+ if (aExpected.Length() <= KPrintfMaxLen)
+ {
+ temp.Copy(aExpected);
+ gTest.Printf(_L("aExpected=\"%S\" "), &temp);
+ }
+ else
+ gTest.Printf(_L("aExpected=TOO LONG "));
+
+ if (item.Length() <= KPrintfMaxLen)
+ {
+ temp.Copy(item);
+ gTest.Printf(_L("Get=\"%S\" "), &temp);
+ }
+ else
+ gTest.Printf(_L("Get=TOO LONG "));
+
+ gTest.Printf(_L("Err=%d\n"), err);
+
+ GLOBAL_CHECKPOINT_COMPARE(err, KErrNone, _L("Error getting element"));
+
+ temp.Format(_L("Element not expected [test=%d"), aTestCase);
+ GLOBAL_CHECKPOINT_COMPARE(!(item == aExpected), EFalse, temp);
+ }
+
+void TestGetElementL(const CTestConfig& aFile)
+ {
+ TInt sectionCount = aFile.Sections().Count();
+
+ while (sectionCount--)
+ {
+ const CTestConfigSection& section = aFile[sectionCount];
+
+ TInt itemCount = section.Items().Count();
+
+ while (itemCount--)
+ {
+ const CTestConfigItem& item = section[itemCount];
+ TPtrC8 output(KNullDesC8);
+ aFile.GetElement(item.Value(), ',', 0, output);
+ }
+ }
+ }
+
+void TestParseFileL()
+ {
+ RFs fs;
+ User::LeaveIfError(fs.Connect());
+ CleanupClosePushL(fs);
+
+ TFindFile findFile(fs);
+ _LIT(KWild, "*.txt");
+
+ CDir* dirs=NULL;
+ User::LeaveIfError(findFile.FindWildByDir(KWild, KTestScriptComponentFull, dirs));
+
+ TInt count = dirs->Count();
+
+ while (count--)
+ {
+ const TFileName fileName((*dirs)[count].iName);
+
+ CTestConfig* file = CTestConfig::NewLC(fs, KTestScriptComponent, fileName);
+
+ file->WriteFileL(KTestScriptOutput);
+
+ CTestConfig* output = CTestConfig::NewLC(fs, KTestScriptComponent, KTestScriptOutput);
+
+ TBool test = (*output == *file);
+
+ GLOBAL_CHECKPOINT_COMPARE(!test, EFalse, _L("Output != File"));
+
+ TestGetElementL(*file);
+
+ CleanupStack::PopAndDestroy(output);
+ CleanupStack::PopAndDestroy(file);
+ }
+
+ CleanupStack::PopAndDestroy(&fs);
+ }
+
+const TInt del = ';';
+_LIT8(KFirst, "First");
+_LIT8(KMiddle, "Middle");
+_LIT8(KLast, "Last");
+_LIT8(KElem1, "First;Middle;Last");
+_LIT8(KElem2, " First; ;Last");
+_LIT8(KElem3, "; Middle ;Last");
+_LIT8(KElem4, "First;Middle; ");
+_LIT8(KElem5, ";;");
+
+void TestGetElementL()
+ {
+ TInt testCase = 0;
+
+ TestGetElementL(++testCase, KElem1, del, 0, KFirst);
+ TestGetElementL(++testCase, KElem1, del, 1, KMiddle);
+ TestGetElementL(++testCase, KElem1, del, 2, KLast);
+
+ TestGetElementL(++testCase, KElem2, del, 0, KFirst);
+ TestGetElementL(++testCase, KElem2, del, 1, KNullDesC8);
+ TestGetElementL(++testCase, KElem2, del, 2, KLast);
+
+ TestGetElementL(++testCase, KElem3, del, 0, KNullDesC8);
+ TestGetElementL(++testCase, KElem3, del, 1, KMiddle);
+ TestGetElementL(++testCase, KElem3, del, 2, KLast);
+
+ TestGetElementL(++testCase, KElem4, del, 0, KFirst);
+ TestGetElementL(++testCase, KElem4, del, 1, KMiddle);
+ TestGetElementL(++testCase, KElem4, del, 2, KNullDesC8);
+
+ TestGetElementL(++testCase, KElem5, del, 0, KNullDesC8);
+ TestGetElementL(++testCase, KElem5, del, 1, KNullDesC8);
+ TestGetElementL(++testCase, KElem5, del, 2, KNullDesC8);
+ }
+
+void PrepareBuf(TDes8& aOutput, TInt aLeadingSpaces, const TDesC8& aInput, TInt aTrailingSpaces)
+ {
+ const TInt KSpace = ' ';
+ aOutput.Zero();
+ aOutput.AppendFill(KSpace, aLeadingSpaces);
+ aOutput.Append(aInput);
+ aOutput.AppendFill(KSpace, aTrailingSpaces);
+ }
+
+void TestGetElementWithoutTrimL()
+ {
+ TInt testCase = 0;
+ TBuf8<32> temp;
+
+ TestGetElementL(++testCase, KElem1, del, 0, KFirst, EFalse);
+ TestGetElementL(++testCase, KElem1, del, 1, KMiddle, EFalse);
+ TestGetElementL(++testCase, KElem1, del, 2, KLast, EFalse);
+
+ PrepareBuf(temp, 4, KFirst, 0);
+ TestGetElementL(++testCase, KElem2, del, 0, temp, EFalse);
+ PrepareBuf(temp, 11, KNullDesC8, 0);
+ TestGetElementL(++testCase, KElem2, del, 1, temp, EFalse);
+ TestGetElementL(++testCase, KElem2, del, 2, KLast, EFalse);
+
+ TestGetElementL(++testCase, KElem3, del, 0, KNullDesC8, EFalse);
+ PrepareBuf(temp, 3, KMiddle, 7);
+ TestGetElementL(++testCase, KElem3, del, 1, temp, EFalse);
+ TestGetElementL(++testCase, KElem3, del, 2, KLast, EFalse);
+
+ TestGetElementL(++testCase, KElem4, del, 0, KFirst, EFalse);
+ TestGetElementL(++testCase, KElem4, del, 1, KMiddle, EFalse);
+ PrepareBuf(temp, 5, KNullDesC8, 0);
+ TestGetElementL(++testCase, KElem4, del, 2, temp, EFalse);
+
+ TestGetElementL(++testCase, KElem5, del, 0, KNullDesC8, EFalse);
+ TestGetElementL(++testCase, KElem5, del, 1, KNullDesC8, EFalse);
+ TestGetElementL(++testCase, KElem5, del, 2, KNullDesC8, EFalse);
+
+ TPtrC8 output;
+ const TInt err = CTestConfig::GetElement(KNullDesC8, 0, 0, output);
+ GLOBAL_CHECKPOINT(err != KErrNone);
+ }
+
+
+// Set up the array of test functions, which make the API calls
+LOCAL_C const TAutoTestCase Cases[] =
+ {
+ {TestParseFileL,_S("Parse File")},
+ {TestGetElementL,_S("Get Element")},
+ {TestGetElementWithoutTrimL,_S("Get Element Without Trim")}
+ };
+
+void AutoTestExecuteL()
+ {
+ _LIT(KDummyTests,"TestConfigFileParser_testreport.txt");
+ _LIT8(KComponentInfo,"TestConfigFileParser");
+ // Library defined macro
+ // Uses a global pointer instance of CAutoTest
+ GLOBAL_AUTOTEST_EXECUTE(Cases, KDummyTests, KComponentInfo, gTest);
+ }
+
+TInt E32Main()
+/**
+ * Main
+ */
+ {
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ __UHEAP_MARK;
+
+ gTest.SetLogged(ETrue);
+ gTest.Title();
+ gTest.Start(_L("Starting tests..."));
+
+ TRAPD(err, AutoTestExecuteL());
+
+ if (err!=KErrNone)
+ gTest.Printf(_L("ERROR: Leave %d\n"),err);
+
+ gTest.Printf(_L("Test Complete. Press any key ...\n"));
+ gTest.Getch();
+ gTest.End();
+ gTest.Close();
+
+ __UHEAP_MARKEND;
+
+ delete cleanup;
+ return KErrNone;
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyserverplugins/simtsy/testconfigfileparser/test/t_testconfigfileparser.mmp Thu Sep 02 21:42:07 2010 +0300
@@ -0,0 +1,36 @@
+// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Test harness for testscripts
+//
+//
+
+/**
+ @file t_testconfigfileparser.mmp
+ @since Hurricane
+*/
+
+
+TARGET t_testconfigfileparser.exe
+TARGETTYPE exe
+
+USERINCLUDE ..\inc
+SOURCE t_testconfigfileparser.cpp
+
+
+SYSTEMINCLUDE \epoc32\include
+LIBRARY euser.lib efsrv.lib testconfigfileparser.lib autotest.lib
+
+
+
+VENDORID 0x70000001
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyserverplugins/simtsy/testconfigfileparser/test/t_testconfigfileparser.txt Thu Sep 02 21:42:07 2010 +0300
@@ -0,0 +1,54 @@
+[Defaults]
+
+#This is a comment
+
+Item1=This is item 1
+Item2 = This is item 2
+Item3= Thisitem3
+ Item4= Thisitem4
+ Item5=Thisitem5
+ Item6 =Thisitem6
+ Item7 = Thisitem7
+Item8 = Thisitem8
+ Item9 = Thisitem9
+Item10=Thisitem10=9348092384
+Item11=Thisitem11=9348092384
+Item12=Thisitem12 = 9348092384=lksdjflskjf = 9348092384 = lksdjflskjf
+
+Test=Blah
+Test =Blah
+Test= Blah
+Test = Blah
+
+#This is my first comment
+
+[Section1]
+Section11= Section11Item
+Section12= Section12Item
+#This is my second comment
+Section122= Section12Item Hello
+
+[Section3]
+Section21= Section21Item Section22= blah blah blah Section23= tu tu tu
+Section24= Multi
+Line
+#This is my third comment
+Section Item < Note: this will be ignored
+#This is my fourth comment
+
+[Section4]
+RepeatItem= 1
+RepeatItem= 2
+RepeatItem= 3
+RepeatItem= 4
+RepeatItem= 5
+RepeatItem= 6
+RepeatItem= 7
+RepeatItem= 8
+
+endscript
+
+#This is my fifth comment
+
+[Section4]
+NotExpected= Nothing
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyserverplugins/simtsy/testconfigfileparser/test/t_testconfigfileparser2.txt Thu Sep 02 21:42:07 2010 +0300
@@ -0,0 +1,167 @@
+[SendAndReceiveDifferentClasses0]
+#Messages
+Message= 1, SendAndReceiveDifferentClasses class is _
+#Classes
+SmsClass1= 0
+SmsClass2= 1
+SmsClass3= 2
+SmsClass4= 3
+
+
+[SendAndReceiveIndicatorMsgs0]
+#Messages
+Message= 1, VoicemailMessageWaiting WaitingIndication7Bit IndicationActive
+Message= 2, VoicemailMessageWaiting WaitingIndication7Bit IndicationInactive
+Message= 3, VoicemailMessageWaiting WaitingIndicationUCS2 IndicationActive
+Message= 4, FaxMessageWaiting WaitingIndication7Bit IndicationInactive
+Message= 5, ElectronicMailMessageWaiting WaitingIndication7Bit IndicationInactive
+Message= 6, FaxOtherMessageWaiting WaitingIndication7Bit IndicationActive
+Message= 7, VoicemailMessageWaiting WaitingIndicationDiscardMessage IndicationActive
+
+#IndicationTypes
+IndicationType1= 0 #ESmsVoicemailMessageWaiting
+IndicationType2= 0
+IndicationType3= 0
+IndicationType4= 1 #ESmsFaxMessageWaiting
+IndicationType5= 2 #ESmsElectronicMailMessageWaiting
+IndicationType6= 3 #ESmsFaxOtherMessageWaiting
+IndicationType7= 0
+
+#DCSBits7To4s
+DCSBits7To41= 208 #0xD0 ESmsDCSMessageWaitingIndication7Bit
+DCSBits7To42= 208
+DCSBits7To43= 224 #0xE0 ESmsDCSMessageWaitingIndicationUCS2
+DCSBits7To44= 208
+DCSBits7To45= 208
+DCSBits7To46= 208
+DCSBits7To47= 192 #0xC0 ESmsDCSMessageWaitingIndicationDiscardMessage
+
+#IndicationStates
+IndicationState1= 8 #0x08 ESmsIndicationActive
+IndicationState2= 0 #0x00 ESmsIndicationInactive
+IndicationState3= 8
+IndicationState4= 0
+IndicationState5= 0
+IndicationState6= 8
+IndicationState7= 8
+
+
+[SendMsgsWithDifferentVP0]
+Message= 1, Message with validity period in minutes _
+
+#ValidityPeriods
+ValidityPeriod1= 60
+ValidityPeriod2= 120
+ValidityPeriod3= 240
+ValidityPeriod4= 480
+
+
+[CommandMessages0]
+Message= 1, test message length 22
+
+
+[SendAndRecvMsgsWithDifferentTON0]
+#Messages
+Message= 1, Test message.
+
+#Alphabets
+Alphabet1= 0 # ESmsAlphabet7Bit=0x00
+
+#TypeOfNumbers
+TypeOfNumber1= 0 #EGsmSmsTONUnknown=0x00
+TypeOfNumber2= 16 #EGsmSmsTONInternationalNumber=0x10
+TypeOfNumber3= 32 #EGsmSmsTONNationalNumber=0x20
+TypeOfNumber4= 48 #EGsmSmsTONNetworkSpecificNumber=0x30
+TypeOfNumber5= 96 #EGsmSmsTONAbbreviatedNumber=0x60
+TypeOfNumber6= 64 #EGsmSmsTONSubscriberNumber=0x40
+
+
+[SmartMessaging0]
+#Pdus
+PDU= 021B504A20543A5585510540D19082956108CD0549D06090045500008500
+
+#Messages
+Message= 1, BEGIN:VCALENDAR\nVERSION:1.0\nBEGIN:VEVENT\nCATEGORIES:MEETING\nSTATUS:TENTATIVE\nDTSTART:20010401T033000Z\nDTEND:20010401T043000Z\nSUMMARY:Messaging Meeting\nDESCRIPTION:Britney and Justin to review newest proposal material\nCLASS:PRIVATE\nEND:VEVENT\nEND:VCALENDAR
+Message= 2, BEGIN:VCARD\nVERSION:2.1\nN:Kukkonen;Sami\nTEL;PREF:+358503878682\nEND:VCARD
+Message= 3, 024A3A51D195CDD004001B20550590610560558550548540820849900000
+
+#IEIDatas
+ieiData11= 35 #0x23 Destination port 0x23F5
+ieiData12= 245 #0xF5
+ieiData13= 0 #0x00 Originator port 0x0000
+ieiData14= 0 #0x00
+ieiData21= 35 #0x23 Destination port 0x23F4
+ieiData22= 244 #0xF4
+ieiData23= 0 #0x00 Originator port 0x0000
+ieiData24= 0 #0x00
+ieiData31= 21 #0x15 Destination port 0x1581
+ieiData32= 129 #0x81
+ieiData33= 0 #0x00 Originator port 0x0000
+ieiData34= 0 #0x00
+
+#InformationElements
+InformationElement1= 5 #ESmsIEIApplicationPortAddressing16Bit
+InformationElement2= 4 #ESmsIEIApplicationPortAddressing8Bit
+InformationElement3= 5
+
+#Alphabets
+Alphabet1= 0 # ESmsAlphabet7Bit=0x00
+Alphabet2= 0
+Alphabet3= 4 # ESmsAlphabet8Bit=0x04
+
+
+[SendSMS2Port00000]
+Message= 1, //SCKL0000
+Message= 2, //SCKL23F4 \nBEGIN:VCARD\nVERSION:2.1\nNAME:HOWE\nTEL:+447747065825\nEND:VCARD
+
+
+# Used values:
+#
+# enum TSmsClass
+# {
+# ESmsClass0=0x00,
+# ESmsClass1=0x01,
+# ESmsClass2=0x02,
+# ESmsClass3=0x03,
+# };
+#
+# enum TSmsIndicationType
+# {
+# ESmsVoicemailMessageWaiting=0x00,
+# ESmsFaxMessageWaiting=0x01,
+# ESmsElectronicMailMessageWaiting=0x02,
+# ESmsFaxOtherMessageWaiting=0x03,
+# };
+# enum TSmsDCSBits7To4
+# {
+# ESmsDCSTextUncompressedWithNoClassInfo=0x00,
+# ESmsDCSTextUncompressedWithClassInfo=0x10,
+# ESmsDCSTextCompressedWithNoClassInfo=0x20,
+# ESmsDCSTextCompressedWithClassInfo=0x30,
+# ESmsDCSMessageWaitingIndicationDiscardMessage=0xC0,
+# ESmsDCSMessageWaitingIndication7Bit=0xD0, // 7 bit User data
+# ESmsDCSMessageWaitingIndicationUCS2=0xE0, // unicode User data
+# ESmsDCSTextUncompressed7BitOr8Bit=0xF0,
+# ESmsDCSBits7To4Mask=0xF0
+# };
+# enum TSmsIndicationState
+# {
+# ESmsIndicationInactive=0x00,
+# ESmsIndicationActive=0x08,
+# };
+# enum TGsmSmsTypeOfNumber
+# {
+# EGsmSmsTONUnknown=0x00,
+# EGsmSmsTONInternationalNumber=0x10,
+# EGsmSmsTONNationalNumber=0x20,
+# EGsmSmsTONNetworkSpecificNumber=0x30,
+# EGsmSmsTONSubscriberNumber=0x40,
+# EGsmSmsTONAlphaNumeric=0x50,
+# EGsmSmsTONAbbreviatedNumber=0x60,
+# EGsmSmsTONReserverved=0x70,
+# };
+
+
+
+
+