networkcontrol/iptransportlayer/inc/ipcprups_states.h
changeset 0 af10295192d8
equal deleted inserted replaced
-1:000000000000 0:af10295192d8
       
     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 // IP Connection Provider state declarations for User Prompt Service (UPS).
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @internalComponent
       
    21 */
       
    22 
       
    23 #ifndef IPCPRUPS_STATES_H_INCLUDED
       
    24 #define IPCPRUPS_STATES_H_INCLUDED
       
    25 
       
    26 #define SYMBIAN_NETWORKING_UPS
       
    27 
       
    28 #ifdef SYMBIAN_NETWORKING_UPS
       
    29 
       
    30 #include <comms-infras/corecpr.h>
       
    31 
       
    32 class CIPConnectionProvider;
       
    33 
       
    34 namespace IpCprStates
       
    35 {
       
    36 typedef MeshMachine::TNodeContext<CIPConnectionProvider, CprStates::TContext> TContext;
       
    37 
       
    38 // -------- Capability Checks for Starting/Stopping a connection --------
       
    39 
       
    40 // @TODO PREQ1116 - should we move TCheckCapabilitiesForUpscan into CoreCpr ?
       
    41 DECLARE_SMELEMENT_HEADER(TCheckCapabilitiesForUps,  MeshMachine::TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext)
       
    42 	virtual void DoL();
       
    43 	virtual void GetPlatSecResultAndDestinationL(ESock::MPlatsecApiExt& aPlatSecApi, TInt& aPlatSecResult, TUpsDestinationAddrType& aDestinationType, TDes8& aDestination) = 0;
       
    44 DECLARE_SMELEMENT_FOOTER(TCheckCapabilitiesForUps)
       
    45 
       
    46 DECLARE_SMELEMENT_HEADER(TCheckStartCapabilities, IpCprStates::TCheckCapabilitiesForUps, NetStateMachine::MStateTransition, TContext)
       
    47 	void GetPlatSecResultAndDestinationL(ESock::MPlatsecApiExt& aPlatSecApi, TInt& aPlatSecResult, TUpsDestinationAddrType& aDestinationType, TDes8& aDestination);
       
    48 DECLARE_SMELEMENT_FOOTER(TCheckStartCapabilities)
       
    49 
       
    50 TInt CheckAttachPolicy(const ESock::MPlatsecApiExt& aPlatSecApi);		// utility for checking attach policy
       
    51 
       
    52 DECLARE_SMELEMENT_HEADER(TCheckAttachCapabilities, MeshMachine::TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext)
       
    53 	virtual void DoL();
       
    54 DECLARE_SMELEMENT_FOOTER(TCheckAttachCapabilities)
       
    55 
       
    56 
       
    57 
       
    58 const TInt KUpsQuery = 10000;
       
    59 const TInt KAttachCapabilityQuery = 10001;
       
    60 
       
    61 DECLARE_SMELEMENT_HEADER(TNoTagOrUpsQueryOrAttachCapabilityQuery, MeshMachine::TStateFork<TContext>, NetStateMachine::MStateFork, TContext)
       
    62 	virtual TInt TransitionTag();
       
    63 DECLARE_SMELEMENT_FOOTER(TNoTagOrUpsQueryOrAttachCapabilityQuery)
       
    64 
       
    65 const TInt KUpsDisabled = 10012;
       
    66 const TInt KUpsEnabled  = 10013;
       
    67 
       
    68 DECLARE_SMELEMENT_HEADER(TNoTagOrUpsDisabledOrUpsEnabled, MeshMachine::TStateFork<TContext>, NetStateMachine::MStateFork, TContext)
       
    69 	virtual TInt TransitionTag();
       
    70 DECLARE_SMELEMENT_FOOTER(TNoTagOrUpsDisabledOrUpsEnabled)
       
    71 
       
    72 DECLARE_SMELEMENT_HEADER(TPostDisabledPolicyCheckResponseToOriginators, MeshMachine::TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext)
       
    73 	virtual void DoL();
       
    74 DECLARE_SMELEMENT_FOOTER(TPostDisabledPolicyCheckResponseToOriginators)
       
    75 
       
    76 DECLARE_SMELEMENT_HEADER(TPopulatePolicyCheckRequest, MeshMachine::TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext)
       
    77 	virtual void DoL();
       
    78 DECLARE_SMELEMENT_FOOTER(TPopulatePolicyCheckRequest)
       
    79 
       
    80 DECLARE_SMELEMENT_HEADER( TSendUpsStatusChange, MeshMachine::TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
       
    81 	virtual void DoL();
       
    82 DECLARE_SMELEMENT_FOOTER( TSendUpsStatusChange )
       
    83 
       
    84 // Utility
       
    85 
       
    86 TBool UpsDisabled(TContext& aContext);
       
    87 ESock::MPlatsecApiExt* GetPlatsecApiExt(TContext& aContext);
       
    88 TInt GetPlatsecResult(TContext& aContext);
       
    89 TInt GetPlatsecResultL(TContext& aContext);
       
    90 } // IpCprStates
       
    91 
       
    92 #endif //SYMBIAN_NETWORKING_UPS
       
    93 
       
    94 #endif //IPCPRUPS_STATES_H_INCLUDED