44
|
1 |
// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
// The interface to the PDP Context Finite State Machine.
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
/**
|
|
19 |
@file
|
|
20 |
@internalComponent
|
|
21 |
*/
|
|
22 |
|
|
23 |
|
|
24 |
#ifndef MPDPFSMINTERFACE_H
|
|
25 |
#define MPDPFSMINTERFACE_H
|
|
26 |
|
|
27 |
|
|
28 |
#include <etelmm.h>
|
|
29 |
#include <etelqos.h>
|
|
30 |
#include <etelpckt.h>
|
|
31 |
|
|
32 |
#include <networking/umtsnifcontrolif.h>
|
|
33 |
#include <networking/mspudmaninterface.h>
|
|
34 |
|
|
35 |
/** Maximum number of PDP contexts supported by SPUD
|
|
36 |
This is derived from the number of bits available for NSAPIs
|
|
37 |
Each PDP context corresponds with a NSAPI (and each NSAPI at most maps to one primary or secondary PDP Context)
|
|
38 |
There are 4 bits allocated for NSAPIs with values 0 - 4 being reserved, leaving 11 values for PDP contexts
|
|
39 |
@see GSM24.008
|
|
40 |
*/
|
|
41 |
const TContextId KMaxPdpContexts = 11;
|
|
42 |
|
|
43 |
/** Internal pseudo-context ID meaning all contexts */
|
|
44 |
const TContextId KAllContexts = -1;
|
|
45 |
|
|
46 |
/** ID of the primary PDP context
|
|
47 |
Primary context is the first context created, and it can be
|
|
48 |
created only once during Spud lifetime.
|
|
49 |
There is a subltly here. There is always a default context.
|
|
50 |
This just happens to be the primary until it is deleted, at
|
|
51 |
which point one of the secondries will become the default.
|
|
52 |
This can happen in a network handover situation.
|
|
53 |
This is documented in the design spec. */
|
|
54 |
const TContextId KPrimaryContextId = 0;
|
|
55 |
|
|
56 |
|
|
57 |
namespace SpudMan
|
|
58 |
{
|
|
59 |
enum SpudManGuQoSSignal
|
|
60 |
{
|
|
61 |
EContextStart = 0x80,
|
|
62 |
EContextCreate,
|
|
63 |
EContextDelete,
|
|
64 |
EContextActivate,
|
|
65 |
ERegisterEventHandler,
|
|
66 |
EContextSetEvents,
|
|
67 |
EContextQoSSet,
|
|
68 |
EContextModifyActive,
|
|
69 |
EContextTFTModify,
|
|
70 |
ENifSetDefaultQoS,
|
|
71 |
EStartupPrimaryContextCreation,
|
|
72 |
|
|
73 |
// sentinal
|
|
74 |
ESpudManGuQoSSignalSentinal
|
|
75 |
};
|
|
76 |
|
|
77 |
enum SpudManSignal
|
|
78 |
{
|
|
79 |
ESetDefaultQoS = ESpudManGuQoSSignalSentinal,
|
|
80 |
ECreatePrimaryPDPContext,
|
|
81 |
ECreateSecondaryPDPContext,
|
|
82 |
ESuspend,
|
|
83 |
EResume,
|
|
84 |
E1ryPdpActivate,
|
|
85 |
ECancelContextCreate,
|
|
86 |
|
|
87 |
EGetNegQoS,
|
|
88 |
|
|
89 |
// sentinal
|
|
90 |
ESpudManSignalSentinal
|
|
91 |
};
|
|
92 |
|
|
93 |
}
|
|
94 |
|
|
95 |
class MPdpFsmInterface
|
|
96 |
/**
|
|
97 |
* Definition of PDP Context Finite State Machine interface.
|
|
98 |
* UmtsGprsSCPR comes with an implementation of this interface.
|
|
99 |
* The interface is to be used by SpudMan.
|
|
100 |
*
|
|
101 |
* @internalComponent
|
|
102 |
*/
|
|
103 |
{
|
|
104 |
public:
|
|
105 |
virtual void OpenL(MSpudManInterface* aSpudManInterface, TName& aName) = 0;
|
|
106 |
virtual void Close() = 0;
|
|
107 |
|
|
108 |
virtual TInt Input (TContextId aPdpId, const TInt aOperation, const TInt aParam=KErrNone) = 0;
|
|
109 |
|
|
110 |
|
|
111 |
#ifdef SYMBIAN_NETWORKING_UMTSR5
|
|
112 |
// This is to set the status of IM CN signalling parameter
|
|
113 |
|
|
114 |
virtual TInt Set(TContextId aPdpId, const RPacketQoS::TQoSR5Requested& aParam) = 0;
|
|
115 |
virtual TInt Set(TContextId aPdpId, const RPacketQoS::TQoSR5Negotiated& aParam) = 0;
|
|
116 |
virtual TInt Get(TContextId aPdpId, RPacketQoS::TQoSR5Requested& aParam) const = 0 ;
|
|
117 |
virtual TInt Get(TContextId aPdpId, RPacketQoS::TQoSR5Negotiated& aParam) const = 0;
|
|
118 |
|
|
119 |
#else
|
|
120 |
// !SYMBIAN_NETWORKING_UMTSR5
|
|
121 |
|
|
122 |
virtual TInt Set(TContextId aPdpId, const RPacketQoS::TQoSR99_R4Requested& aParam) = 0;
|
|
123 |
virtual TInt Set(TContextId aPdpId, const RPacketQoS::TQoSR99_R4Negotiated& aParam) = 0;
|
|
124 |
virtual TInt Get(TContextId aPdpId, RPacketQoS::TQoSR99_R4Requested& aParam) const = 0;
|
|
125 |
virtual TInt Get(TContextId aPdpId, RPacketQoS::TQoSR99_R4Negotiated& aParam) const = 0;
|
|
126 |
#endif
|
|
127 |
// SYMBIAN_NETWORKING_UMTSR5
|
|
128 |
|
|
129 |
|
|
130 |
|
|
131 |
virtual TInt Set(TContextId aPdpId, const TTFTInfo& aParam) = 0;
|
|
132 |
virtual TInt Set(TContextId aPdpId, const TTFTOperationCode& aParam) = 0;
|
|
133 |
virtual TInt Set(TContextId aPdpId, const RPacketContext::TDataChannelV2& aParam) = 0;
|
|
134 |
virtual TInt Set(TContextId aPdpId, const RPacketContext::TContextConfigGPRS& aParam) = 0;
|
|
135 |
virtual TInt Set(TContextId aPdpId, const RPacketContext::TContextStatus& aParam) = 0;
|
|
136 |
|
|
137 |
virtual TInt Get(TContextId aPdpId, TTFTInfo& aParam) const = 0;
|
|
138 |
virtual TInt Get(TContextId aPdpId, TTFTOperationCode& aParam) const = 0;
|
|
139 |
virtual TInt Get(TContextId aPdpId, RPacketContext::TDataChannelV2& aParam) const = 0;
|
|
140 |
virtual TInt Get(TContextId aPdpId, RPacketContext::TContextConfigGPRS& aParam) const = 0;
|
|
141 |
virtual TInt Get(TContextId aPdpId, RPacketContext::TContextStatus& aParam) const = 0;
|
|
142 |
|
|
143 |
virtual TInt GetLastErrorCause(TContextId aPdpId, TInt& aLastErrorCause) const = 0;
|
|
144 |
|
|
145 |
virtual void Set(const RPacketService::TStatus aParam) = 0; // applies to all contexts
|
|
146 |
virtual void Get(RPacketService::TStatus& aParam) = 0; // applies to all contexts
|
|
147 |
|
|
148 |
// additional accessors
|
|
149 |
virtual const TName& TsyName(void) = 0;
|
|
150 |
|
|
151 |
virtual void SetContextTerminationErrorAndStop(TContextId aPdpId, TInt aErrorCode) = 0;
|
|
152 |
|
|
153 |
#ifdef SYMBIAN_NETWORKING_UMTSR5
|
|
154 |
virtual void SetIMCNSignalling(TBool aImCnSignalling) = 0;
|
|
155 |
#endif //SYMBIAN_NETWORKING_UMTSR5
|
|
156 |
protected:
|
|
157 |
private:
|
|
158 |
|
|
159 |
};
|
|
160 |
|
|
161 |
|
|
162 |
#endif
|
|
163 |
// MPDPFSMINTERFACE_H
|