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