diff -r 000000000000 -r af10295192d8 networkcontrol/qosipscpr/inc/IPSCPRStates.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/networkcontrol/qosipscpr/inc/IPSCPRStates.h Tue Jan 26 15:23:49 2010 +0200 @@ -0,0 +1,121 @@ +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// IPSCPR States +// +// + +/** + @file + @internalComponent +*/ + +#ifndef SYMBIAN_IPSCPRSTATES_H +#define SYMBIAN_IPSCPRSTATES_H + +#include +#include +#include "IPSCPR.h" +#include "qos_msg.h" + +//-========================================================= +// +// States +// +//-========================================================= + +namespace QoSIpSCprActivities +{ +enum QoSIpSCprActivityId + { + EQoSIpSCprOpenInternalSocket = ESock::ECFActivityCustom + 100 // + 100 to keep out of way of anything in base + }; +} + +namespace QoSIpSCprStates +{ +typedef MeshMachine::TNodeContext TContext; + +typedef MeshMachine::TAwaitingMessageState TAwaitingOpenInternalSocket; +typedef MeshMachine::TAwaitingMessageState TAwaitingInternalSocketOpened; + +DECLARE_SERIALIZABLE_STATE( + TNoTagBlockedByOpenInternalSocket, + MeshMachine::TActivityIdMutex, + MeshMachine::TNoTag + ) + +DECLARE_SMELEMENT_HEADER( TNoTagOrSendApplyResponse, MeshMachine::TStateFork, NetStateMachine::MStateFork, QoSIpSCprStates::TContext ) + virtual TInt TransitionTag(); +DECLARE_SMELEMENT_FOOTER( TNoTagOrSendApplyResponse ) + +typedef MeshMachine::TActivitiesIdMutex TOpenInternalSocketAndAddressUpdateActivityMutex; + +DECLARE_SERIALIZABLE_STATE( + TNoTagOrSendApplyResponseBlockedByOpenInternalSocketAndAddressUpdate, + TOpenInternalSocketAndAddressUpdateActivityMutex, + TNoTagOrSendApplyResponse + ) + +DECLARE_SMELEMENT_HEADER( TAwaitingJoinComplete, MeshMachine::TState, NetStateMachine::MState, QoSIpSCprStates::TContext ) + virtual TBool Accept(); +DECLARE_SMELEMENT_FOOTER( TAwaitingJoinComplete ) + +DECLARE_SMELEMENT_HEADER( TAwaitingLeaveComplete, MeshMachine::TState, NetStateMachine::MState, QoSIpSCprStates::TContext ) + virtual TBool Accept(); +DECLARE_SMELEMENT_FOOTER( TAwaitingLeaveComplete ) + +DECLARE_SMELEMENT_HEADER( TAddClientToQoSChannel, MeshMachine::TStateTransition, NetStateMachine::MStateTransition, QoSIpSCprStates::TContext ) + virtual void DoL(); +DECLARE_SMELEMENT_FOOTER( TAddClientToQoSChannel ) + +DECLARE_SMELEMENT_HEADER( TRemoveClientToQoSChannel, MeshMachine::TStateTransition, NetStateMachine::MStateTransition, QoSIpSCprStates::TContext ) + virtual void DoL(); +DECLARE_SMELEMENT_FOOTER( TRemoveClientToQoSChannel ) + +DECLARE_SMELEMENT_HEADER( TOpenInternalSocket, MeshMachine::TStateTransition, NetStateMachine::MStateTransition, QoSIpSCprStates::TContext ) + virtual void DoL(); +DECLARE_SMELEMENT_FOOTER( TOpenInternalSocket ) + +DECLARE_SMELEMENT_HEADER( TRemoveLeavingClientFromQoSChannel, MeshMachine::TStateTransition, NetStateMachine::MStateTransition, QoSIpSCprStates::TContext ) + virtual void DoL(); +DECLARE_SMELEMENT_FOOTER( TRemoveLeavingClientFromQoSChannel ) + +DECLARE_SMELEMENT_HEADER( TStoreAddressUpdateAndAddClientToQoSChannel, MeshMachine::TStateTransition, NetStateMachine::MStateTransition, QoSIpSCprStates::TContext ) + virtual void DoL(); +DECLARE_SMELEMENT_FOOTER( TStoreAddressUpdateAndAddClientToQoSChannel ) + +DECLARE_SMELEMENT_HEADER( TSetParameters, MeshMachine::TStateTransition, NetStateMachine::MStateTransition, QoSIpSCprStates::TContext ) + virtual void DoL(); +DECLARE_SMELEMENT_FOOTER( TSetParameters ) + +DECLARE_SMELEMENT_HEADER( TBindSelfToDefaultServiceProvider, MeshMachine::TStateTransition, NetStateMachine::MStateTransition, QoSIpSCprStates::TContext ) + virtual void DoL(); +DECLARE_SMELEMENT_FOOTER( TBindSelfToDefaultServiceProvider ) + +#ifdef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW +DECLARE_AGGREGATED_TRANSITION2( + TStoreAndSetParameters, + PRStates::TStoreParams, + QoSIpSCprStates::TSetParameters + ) +#else +DECLARE_AGGREGATED_TRANSITION2( + TStoreAndSetParameters, + SCprStates::TStoreParams, + QoSIpSCprStates::TSetParameters + ) +#endif // SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW +} + +#endif // SYMBIAN_IPSCPRSTATES_H