natfw/natfwstunturnclient/inc/cstunsharedsecretstate.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2005 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:    
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef C_CSTUNSHAREDSECRETSTATE_H
       
    22 #define C_CSTUNSHAREDSECRETSTATE_H
       
    23 
       
    24 // INCLUDES
       
    25 #include <e32base.h>
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CNATFWUNSAFMessage;
       
    29 class CSTUNSharedSecret;
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34  *  Base class for CSTUNSharedSecret's states. 
       
    35  */
       
    36 class CSTUNSharedSecretState : public CBase
       
    37     {
       
    38     public:
       
    39 
       
    40           /**
       
    41         * Destructor
       
    42         */
       
    43         virtual ~CSTUNSharedSecretState();
       
    44 
       
    45         /**
       
    46         * TLS connection successfully established.
       
    47         * @param aContext SharedSecret instance who received the event
       
    48         */
       
    49         virtual void TlsConnectedL( CSTUNSharedSecret& aContext ) const;
       
    50 
       
    51         /**
       
    52         * An UNSAF message has been received from the TLS connection.
       
    53         * @param aContext SharedSecret instance who received the event
       
    54         * @param aMessage incoming message, the ownership is transferred.
       
    55         */
       
    56         virtual void IncomingMessageL( CSTUNSharedSecret& aContext,
       
    57                                        CNATFWUNSAFMessage* aMessage ) const;
       
    58 
       
    59         /**
       
    60         * TLS connection establishment has failed or 
       
    61         * sending or receiving using the connection has failed or
       
    62         * there was a leave in TlsConnectedL or IncomingMessageL.
       
    63         * @param aContext SharedSecret instance who received the event
       
    64         * @param aError a reason for the failure.
       
    65         */
       
    66         virtual void ErrorOccured( CSTUNSharedSecret& aContext,
       
    67                                    TInt aError ) const;
       
    68 
       
    69         virtual void TimerExpiredL( CSTUNSharedSecret& aContext ) const;
       
    70 
       
    71     protected:
       
    72 
       
    73         CSTUNSharedSecretState();
       
    74 
       
    75     private:
       
    76 
       
    77         CSTUNSharedSecretState( const CSTUNSharedSecretState& aState );
       
    78     };
       
    79 
       
    80 #endif // C_CSTUNSHAREDSECRETSTATE_H