24
|
1 |
// Copyright (c) 2006-2010 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 |
// Pdp MCPR
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
/**
|
|
19 |
@file
|
|
20 |
@internalComponent
|
|
21 |
*/
|
|
22 |
|
|
23 |
#ifndef SYMBIAN_PDPMCPR_H
|
|
24 |
#define SYMBIAN_PDPMCPR_H
|
|
25 |
|
|
26 |
#include <etelqos.h>
|
|
27 |
#include <comms-infras/ss_mcprnodemessages.h>
|
|
28 |
#include <comms-infras/linkprovision.h>
|
|
29 |
#include <networking/pppconfig.h>
|
|
30 |
#include <networking/qos3gpp_subconparams.h>
|
|
31 |
#include <comms-infras/ss_log.h>
|
|
32 |
|
|
33 |
#include <comms-infras/agentmcpr.h>
|
|
34 |
#include <comms-infras/coremcprstates.h>
|
|
35 |
|
|
36 |
#include "PDPProvision.h"
|
|
37 |
#include "pdpmcprfactory.h"
|
|
38 |
|
|
39 |
|
|
40 |
#if defined __CFLOG_ACTIVE || defined SYMBIAN_TRACE_ENABLE
|
|
41 |
#define KPdpMCprTag KESockMetaConnectionTag
|
|
42 |
_LIT8(KPdpMCprSubTag, "pdpmcpr");
|
|
43 |
#endif
|
|
44 |
|
|
45 |
class CPsdAvailabilityListener;
|
|
46 |
|
|
47 |
class CPdpMetaConnectionProvider : public CAgentMetaConnectionProvider
|
|
48 |
/** PPP meta connection provider
|
|
49 |
|
|
50 |
@internalTechnology
|
|
51 |
@released Since 9.4 */
|
|
52 |
{
|
|
53 |
public:
|
|
54 |
typedef CPdpMetaConnectionProviderFactory FactoryType;
|
|
55 |
|
|
56 |
static CPdpMetaConnectionProvider* NewL(ESock::CMetaConnectionProviderFactoryBase& aFactory, const ESock::TProviderInfo& aProviderInfo);
|
|
57 |
virtual ~CPdpMetaConnectionProvider();
|
|
58 |
|
|
59 |
public:
|
|
60 |
void ContentionResolved(const Messages::TNodeId& aPendingCprId, TBool aResult);
|
|
61 |
void ContentionOccured();
|
|
62 |
void ReportContentionAvailabilityStatus(const ESock::TAvailabilityStatus& aStatus) const;
|
|
63 |
|
|
64 |
protected:
|
|
65 |
CPdpMetaConnectionProvider(ESock::CMetaConnectionProviderFactoryBase& aFactory, const ESock::TProviderInfo& aProviderInfo);
|
|
66 |
void ConfigurePDPLayerL();
|
|
67 |
void SetAccessPointConfigFromDbL();
|
|
68 |
void FillInLCPConfig();
|
|
69 |
void FillInAuthConfig();
|
|
70 |
void ConstructL();
|
|
71 |
|
|
72 |
void StartAvailabilityMonitoringL(const Messages::TNodeCtxId& aAvailabilityActivity);
|
|
73 |
void CancelAvailabilityMonitoring();
|
|
74 |
|
|
75 |
protected:
|
|
76 |
virtual void ReceivedL(const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage);
|
|
77 |
|
|
78 |
private:
|
|
79 |
CPsdAvailabilityListener* iAvailabilityListener;
|
|
80 |
};
|
|
81 |
|
|
82 |
namespace PdpMCprErrorRecoveryActivity
|
|
83 |
{
|
|
84 |
class CPdpErrorRecoveryActivity : public MeshMachine::CNodeParallelActivityBase
|
|
85 |
{
|
|
86 |
public:
|
|
87 |
static MeshMachine::CNodeActivityBase* NewL(const MeshMachine::TNodeActivity& aActivitySig, MeshMachine::AMMNodeBase& aNode);
|
|
88 |
~CPdpErrorRecoveryActivity();
|
|
89 |
|
|
90 |
protected:
|
|
91 |
typedef MeshMachine::TNodeContext<CPdpMetaConnectionProvider, MCprStates::TContext> TContext;
|
|
92 |
|
|
93 |
public:
|
|
94 |
|
|
95 |
DECLARE_SMELEMENT_HEADER( TAwaitingContentionResult, MeshMachine::TState<TContext>, NetStateMachine::MState, TContext )
|
|
96 |
virtual TBool Accept();
|
|
97 |
DECLARE_SMELEMENT_FOOTER( TAwaitingContentionResult )
|
|
98 |
|
|
99 |
DECLARE_SMELEMENT_HEADER( TProcessErrorRecoveryReq, MeshMachine::TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
|
|
100 |
virtual void DoL();
|
|
101 |
DECLARE_SMELEMENT_FOOTER( TProcessErrorRecoveryReq )
|
|
102 |
|
|
103 |
DECLARE_SMELEMENT_HEADER( TProcessContentionResult, MeshMachine::TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
|
|
104 |
virtual void DoL();
|
|
105 |
DECLARE_SMELEMENT_FOOTER( TProcessContentionResult )
|
|
106 |
|
|
107 |
DECLARE_SMELEMENT_HEADER( TPdpContentionNoTagOrError, MeshMachine::TStateFork<TContext>, NetStateMachine::MStateFork, TContext )
|
|
108 |
virtual TInt TransitionTag();
|
|
109 |
DECLARE_SMELEMENT_FOOTER( TPdpContentionNoTagOrError )
|
|
110 |
|
|
111 |
public:
|
|
112 |
Messages::TNodeId iPendingCprId;
|
|
113 |
Messages::TNodeSignal::TMessageId iCprMessageId;
|
|
114 |
TUint iCprActivity;
|
|
115 |
TInt iErrorCode;
|
|
116 |
|
|
117 |
protected:
|
|
118 |
CPdpErrorRecoveryActivity(const MeshMachine::TNodeActivity& aActivitySig, MeshMachine::AMMNodeBase& aNode, TUint aActivitiesCount);
|
|
119 |
};
|
|
120 |
}
|
|
121 |
|
|
122 |
|
|
123 |
#endif //SYMBIAN_PDPMCPR_H
|