telephonyprotocols/umtsgprsscpr/Test/te_spud/inc/CPdpFsmInterface.h
author hgs
Mon, 28 Jun 2010 17:02:18 +0100
changeset 45 28dbf5a297f4
parent 44 8b72faa1200f
permissions -rw-r--r--
201024_05
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
44
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     1
// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     2
// All rights reserved.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     3
// This component and the accompanying materials are made available
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     4
// under the terms of "Eclipse Public License v1.0"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     5
// which accompanies this distribution, and is available
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     7
//
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     8
// Initial Contributors:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     9
// Nokia Corporation - initial contribution.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    10
//
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    11
// Contributors:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    12
//
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    13
// Description:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    14
//
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    15
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    16
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    17
 @file
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    18
 @internalComponent
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    19
*/
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    20
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    21
// NOTE: This guard define is used to prevent the real PDPFSM.h from being included.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    22
//       This file MUST be included first in test code
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    23
#ifndef PDPFSM_H
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    24
#define PDPFSM_H
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    25
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    26
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    27
#include <networking/mpdpfsminterface.h>
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    28
#include "RSpudManInterface.h"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    29
#include <etelpckt.h>
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    30
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    31
class CPdpFsmFactory;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    32
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    33
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    34
Dummy implementation of the MPdpFsmInterface that is seperated from the UmtsGprsSCPR
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    35
*/
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    36
class CPdpFsmInterface : public MPdpFsmInterface
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    37
   {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    38
public:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    39
	//-=========================================================
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    40
	// custom methods
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    41
	//-=========================================================	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    42
    CPdpFsmInterface();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    43
    ~CPdpFsmInterface();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    44
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    45
    // We need this 'factory' method since the test harness has to have a means (albeit indirect) of
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    46
    // creating the CPdpFsm objects, but within the Active Scheduler Thread (terminology from the test's
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    47
    // design document). and not within the test harness (which is what happens if they get created via
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    48
    // 'MPdpFsmInterface' Set() or Get() methods in this test harness). Because the 'CEtelDriverContext'
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    49
    // objects that are indirectly created are added to the test thread's ActiveScheduler
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    50
    //
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    51
    TInt NewFsmContext(TContextId aPdpId);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    52
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    53
    void SpudInput (TContextId aPdpId, TInt aNotification, TInt aParam);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    54
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    55
	//-=========================================================
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    56
	// MPdpFsmInterface methods
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    57
	//-=========================================================	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    58
	virtual void OpenL(MSpudManInterface * aSpudManInterface, TName& aName);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    59
	virtual void Close();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    60
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    61
	virtual TInt Input (TContextId aPdpId, const TInt aOperation, const TInt aParam=KErrNone);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    62
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    63
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    64
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    65
#ifdef SYMBIAN_NETWORKING_UMTSR5
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    66
    virtual void SetIMCNSignalling(TBool aImCnSignalling);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    67
	virtual TInt Set(TContextId aPdpId, const RPacketQoS::TQoSR5Requested& aParam);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    68
	virtual TInt Set(TContextId aPdpId, const RPacketQoS::TQoSR5Negotiated& aParam);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    69
	virtual TInt Get(TContextId aPdpId, RPacketQoS::TQoSR5Requested& aParam) const;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    70
	virtual TInt Get(TContextId aPdpId, RPacketQoS::TQoSR5Negotiated& aParam) const;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    71
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    72
#else
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    73
// !SYMBIAN_NETWORKING_UMTSR5 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    74
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    75
	virtual TInt Set(TContextId aPdpId, const RPacketQoS::TQoSR99_R4Requested& aParam);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    76
	virtual TInt Set(TContextId aPdpId, const RPacketQoS::TQoSR99_R4Negotiated& aParam);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    77
	virtual TInt Get(TContextId aPdpId, RPacketQoS::TQoSR99_R4Requested& aParam) const;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    78
	virtual TInt Get(TContextId aPdpId, RPacketQoS::TQoSR99_R4Negotiated& aParam) const;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    79
#endif 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    80
// SYMBIAN_NETWORKING_UMTSR5 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    81
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    82
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    83
	virtual TInt Set(TContextId aPdpId, const TTFTInfo& aParam);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    84
	virtual TInt Set(TContextId aPdpId, const TTFTOperationCode& aParam);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    85
	virtual TInt Set(TContextId aPdpId, const RPacketContext::TDataChannelV2& aParam);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    86
	virtual TInt Set(TContextId aPdpId, const RPacketContext::TContextConfigGPRS& aParam);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    87
	virtual TInt Set(TContextId aPdpId, const RPacketContext::TContextStatus& aParam);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    88
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    89
	virtual TInt GetLastErrorCause(TContextId aPdpId, TInt& aLastErrorCause) const;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    90
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    91
	virtual TInt Get(TContextId aPdpId, TTFTInfo& aParam) const;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    92
	virtual TInt Get(TContextId aPdpId, TTFTOperationCode& aParam) const;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    93
	virtual TInt Get(TContextId aPdpId, RPacketContext::TDataChannelV2& aParam) const;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    94
	virtual TInt Get(TContextId aPdpId, RPacketContext::TContextConfigGPRS& aParam) const;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    95
	virtual TInt Get(TContextId aPdpId, RPacketContext::TContextStatus& aParam) const;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    96
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    97
	virtual void Set(const RPacketService::TStatus aParam); // applies to all contexts
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    98
	virtual void Get(RPacketService::TStatus& aParam);// applies to all contexts
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    99
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   100
	virtual const TName& TsyName(void);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   101
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   102
	virtual void SetContextTerminationErrorAndStop(TContextId aPdpId, TInt aErrorCode);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   103
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   104
protected:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   105
private:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   106
	// DO NOT provide implementations to these methods: Copying this object should be disabled
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   107
	CPdpFsmInterface(CPdpFsmInterface&);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   108
	CPdpFsmInterface& operator= (CPdpFsmInterface& aInput);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   109
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   110
public:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   111
protected:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   112
private:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   113
	// FSM Factory - churns out FSMs
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   114
	CPdpFsmFactory * iPdpFsmFactory;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   115
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   116
	RPacketService::TStatus iNetworkStatus;	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   117
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   118
	RSpudManInterface iSpudManInterface;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   119
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   120
	TBool iSpudMainInterfaceSet;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   121
};
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   122
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   123
#endif
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   124
// PDPFSM_H