commsfwsupport/commselements/StateMachine/include/AsynchEvent.h
changeset 0 dfb7c4ff071f
equal deleted inserted replaced
-1:000000000000 0:dfb7c4ff071f
       
     1 // Copyright (c) 2003-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 // declaration of CAsynchEvent class
       
    15 // THIS API IS INTERNAL TO NETWORKING AND IS SUBJECT TO CHANGE AND NOT FOR EXTERNAL USE
       
    16 // 
       
    17 //
       
    18 
       
    19 /**
       
    20  @file 
       
    21  @internalTechnology
       
    22 */
       
    23 
       
    24 #include <e32base.h>
       
    25 
       
    26 #ifndef _ASYNCHEVENT_H_
       
    27 #define _ASYNCHEVENT_H_
       
    28 
       
    29 class CStateMachine;
       
    30 /**
       
    31  This is an abstract base for one asynchronous statemachine event
       
    32 
       
    33  The event can be part of the list built beforehand or on the fly.
       
    34  @see CStateMachine
       
    35  @internalTechnology
       
    36 
       
    37 **/
       
    38 class CAsynchEvent : public CBase
       
    39 {
       
    40 public:
       
    41    CAsynchEvent( CStateMachine* aStateMachine ) :
       
    42       iStateMachine( aStateMachine )
       
    43    {
       
    44    }
       
    45 
       
    46    virtual CAsynchEvent* ProcessL( TRequestStatus& aStatus ) = 0;
       
    47 
       
    48    void SetNext( CAsynchEvent* aNext );
       
    49    CAsynchEvent* Next() const;
       
    50 
       
    51 protected:
       
    52    CAsynchEvent* iNext; //reference
       
    53    CStateMachine* iStateMachine; //reference
       
    54 };
       
    55 
       
    56 inline void CAsynchEvent::SetNext( CAsynchEvent* aNext )
       
    57 /** 
       
    58  * Sets the next event
       
    59  *
       
    60  * @param aNext the next event to be set
       
    61  */
       
    62 {
       
    63    iNext = aNext;
       
    64 }
       
    65 
       
    66 inline CAsynchEvent* CAsynchEvent::Next() const
       
    67 /** 
       
    68  * Gets the next event in the chain
       
    69  *
       
    70  * @return the next event in the chain
       
    71  */
       
    72 {
       
    73    return iNext;
       
    74 }
       
    75 
       
    76 #endif
       
    77