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 |
// Open state
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
/**
|
|
19 |
@file
|
|
20 |
@internalComponent
|
|
21 |
*/
|
|
22 |
|
|
23 |
#include <etelpckt.h>
|
|
24 |
#include <networking/umtsnifcontrolif.h>
|
|
25 |
#include "tpdpstates.h"
|
|
26 |
#include "spudfsmdebuglogger.h"
|
|
27 |
#include "pdpfsmnmspace.h"
|
|
28 |
#include "PDPFSM.h"
|
|
29 |
#include "cpdpfsm.h"
|
|
30 |
|
|
31 |
TInt TPdpStateOpen::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
|
|
32 |
{
|
|
33 |
SPUDFSMVERBOSE_FNLOG("TPdpStateOpen::Input()");
|
|
34 |
SPUDFSMVERBOSE_LOG2(_L("aOperation : %S(%d)"), LogOperation(aFsm, aOperation), aOperation);
|
|
35 |
|
|
36 |
switch (aOperation)
|
|
37 |
{
|
|
38 |
case PdpFsm::EQoSProfileChangeNetwork:
|
|
39 |
// //RPacketQoS::TQoSR99_R4Negotiated
|
|
40 |
SpudManNotify (aFsm, KContextParametersChangeEvent, KErrNone);
|
|
41 |
return KErrNone;
|
|
42 |
case PdpFsm::EConfigGPRSChangeNetwork:
|
|
43 |
// //RPacketContext::TContextConfigGPRS
|
|
44 |
SpudManNotify (aFsm, KContextParametersChangeEvent, KErrNone);
|
|
45 |
return KErrNone;
|
|
46 |
case PdpFsm::EContextStatusChangeNetwork:
|
|
47 |
if (aFsm.iContextStatus == RPacketContext::EStatusSuspended)
|
|
48 |
{
|
|
49 |
aFsm.ChangeStateToSuspended();
|
|
50 |
SpudManNotify(aFsm, KContextBlockedEvent, KErrNone);
|
|
51 |
}
|
|
52 |
else if (aFsm.iContextStatus == RPacketContext::EStatusDeleted)
|
|
53 |
{
|
|
54 |
aFsm.ChangeStateToClosing();
|
|
55 |
EtelDriverInput(aFsm, EtelDriver::EContextDelete);
|
|
56 |
}
|
|
57 |
else
|
|
58 |
{
|
|
59 |
// no change in state - the upper layer must change the state if it needs to
|
|
60 |
SpudManNotify (aFsm, KContextParametersChangeEvent, aErrorCode);
|
|
61 |
}
|
|
62 |
return KErrNone;
|
|
63 |
case SpudMan::EContextDelete:
|
|
64 |
aFsm.ChangeStateToClosing();
|
|
65 |
EtelDriverInput(aFsm, EtelDriver::EContextDelete);
|
|
66 |
return KErrNone;
|
|
67 |
case SpudMan::EContextQoSSet:
|
|
68 |
aFsm.ChangeStateToChangingQoS();
|
|
69 |
EtelDriverInput(aFsm, EtelDriver::ESetQoS);
|
|
70 |
return KErrNone;
|
|
71 |
case SpudMan::EContextModifyActive:
|
|
72 |
aFsm.ChangeStateToModifingActive();
|
|
73 |
EtelDriverInput(aFsm, EtelDriver::EModifyActive);
|
|
74 |
return KErrNone;
|
|
75 |
case SpudMan::EContextTFTModify:
|
|
76 |
aFsm.ChangeStateToChangingTFT();
|
|
77 |
EtelDriverInput(aFsm, EtelDriver::EChangeTft);
|
|
78 |
return KErrNone;
|
|
79 |
case SpudMan::ESuspend: // think this is superfluous - DAN will see at review :)
|
|
80 |
aFsm.ChangeStateToSuspended();
|
|
81 |
SpudManNotify(aFsm, KContextBlockedEvent, KErrNone);
|
|
82 |
return KErrNone;
|
|
83 |
}
|
|
84 |
|
|
85 |
// default error handling
|
|
86 |
return TPdpState::Input(aFsm, aOperation, aErrorCode);
|
|
87 |
}
|
|
88 |
|
|
89 |
|