natplugins/natpnatfwsdpprovider/inc/nspstateconnected.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Connected state description.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef NSPSTATECONNECTED_H
       
    19 #define NSPSTATECONNECTED_H
       
    20 
       
    21 #include "nspstatebase.h"
       
    22 
       
    23 /**
       
    24  *  State where both ends of the connection are solved.
       
    25  *
       
    26  *  The result of Ice/Stun resolving is that state machine only updates
       
    27  *  needed connection info to correct position in Sdp document. If Ice
       
    28  *  is in use, then also restart can happen.
       
    29  *
       
    30  *  @lib natfwsdpprovider.dll
       
    31  *  @since S60 3.2
       
    32  */
       
    33 class CNSPStateConnected : public CNSPStateBase
       
    34     {
       
    35 public: // Constructors and destructor
       
    36 
       
    37     /**
       
    38      * A two-phase constructor.
       
    39      */
       
    40     static CNSPStateConnected* NewL();
       
    41     
       
    42     /**
       
    43      * A two-phase constructor.
       
    44      */
       
    45     static CNSPStateConnected* NewLC();
       
    46     
       
    47     /**
       
    48      * Destructor.
       
    49      */
       
    50     virtual ~CNSPStateConnected();
       
    51 
       
    52 
       
    53 private: // Constructors and destructor
       
    54 
       
    55     CNSPStateConnected();
       
    56 
       
    57 
       
    58 protected: // From CNSPStateBase
       
    59 
       
    60     /**
       
    61      * Called to check if individual state accepts event, i.e.
       
    62      * whether to execute DoApplyL.
       
    63      *
       
    64      * @since       S60 3.2
       
    65      * @param       aEvent          State machine event.
       
    66      * @return      ETrue if event is accepted, EFalse otherwise.
       
    67      */
       
    68     TBool DoAcceptL( TNSPStateMachineEvent& aEvent );
       
    69     
       
    70     /**
       
    71      * Called when the state is entered.
       
    72      * 
       
    73      * @since       S60 3.2
       
    74      * @param       aEvent          State machine event.
       
    75      */
       
    76     void DoStateEntryL( TNSPStateMachineEvent& aEvent );
       
    77     
       
    78     /**
       
    79      * Called when state entry to next state will leave, and return
       
    80      * into 'this' state must be done.
       
    81      * 
       
    82      * @since       S60 3.2
       
    83      * @param       aEvent          State machine event.
       
    84      */
       
    85     void DoReverse( TNSPStateMachineEvent& aEvent );
       
    86     
       
    87     /**
       
    88      * Current state is applied with this method.
       
    89      * 
       
    90      * @since       S60 3.2
       
    91      * @param       aEvent          State machine event.
       
    92      */
       
    93     void DoApplyL( TNSPStateMachineEvent& aEvent );
       
    94     
       
    95     /**
       
    96      * Current state is exited with this method.
       
    97      * 
       
    98      * @since       S60 3.2
       
    99      * @param       aEvent          State machine event.
       
   100      */
       
   101     void DoExitL( TNSPStateMachineEvent& aEvent );
       
   102 
       
   103 
       
   104 private: // New functions
       
   105 
       
   106 	void ControlMediaL( TNSPStateMachineEvent& aEvent ) const;
       
   107 	
       
   108     void ApplyCreateOfferL( TNSPStateMachineEvent& aEvent ) const;
       
   109     
       
   110     void ApplyResolveL( TNSPStateMachineEvent& aEvent ) const;
       
   111     
       
   112     void ApplyDecodeAnswerL( TNSPStateMachineEvent& aEvent ) const;
       
   113     
       
   114     void ApplyUpdateL( TNSPStateMachineEvent& aEvent ) const;
       
   115     
       
   116     };
       
   117 
       
   118 #endif // NSPSTATECONNECTED_H
       
   119 
       
   120 // end of file
       
   121