sipvoipprovider/svphold/inc/svpholdstatebase.h
changeset 17 6d0b9f605b61
parent 2 7b872347d83b
equal deleted inserted replaced
2:7b872347d83b 17:6d0b9f605b61
     1 /*
       
     2 * Copyright (c) 2006 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:  Base class for state.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef SVPHOLDSTATEBASE_H
       
    20 #define SVPHOLDSTATEBASE_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 class CSVPHoldContext;
       
    25 
       
    26 /**
       
    27 *  Base class for state.
       
    28 *  
       
    29 *  @lib svp.dll
       
    30 *  @since Series 60 3.2
       
    31 */
       
    32 class CSVPHoldStateBase : public CBase
       
    33     {
       
    34 public:  // Constructors and destructor
       
    35     
       
    36     /**
       
    37     * Destructor.
       
    38     */
       
    39     virtual ~CSVPHoldStateBase();
       
    40 
       
    41 public: // New functions
       
    42     
       
    43     /**
       
    44     * Applies the current state. Called after the state transition.
       
    45     * Leaves on error.
       
    46     * @since Series 60 3.2
       
    47     * @param aContext The Context of hold
       
    48     */
       
    49     void ApplyL( CSVPHoldContext& aContext );
       
    50 
       
    51     /**
       
    52     * Called when the state is entered, before it is applied.
       
    53     * @since Series 60 3.2
       
    54     * @param aSession The MCE session
       
    55     */
       
    56     void Enter( CSVPHoldContext& aSession );
       
    57 
       
    58     /**
       
    59     * Checks if OutEstablishingState is active.
       
    60     * @since Series 60 3.2
       
    61     * @return ETrue if establishing state active, EFalse otherways
       
    62     */
       
    63     virtual TBool IsOutEstablishingStateActive();
       
    64 
       
    65    
       
    66 protected:  // New functions
       
    67     
       
    68     /**
       
    69     * Applies the current concrete state. Leaves on error.
       
    70     * @since Series 60 3.2
       
    71     * @param aContext SVP Hold context
       
    72     * @return None
       
    73     */
       
    74     virtual void DoApplyL( CSVPHoldContext& aContex ) = 0;
       
    75 
       
    76     /**
       
    77     * Called when the state is entered. Implemented by
       
    78     * concrete states.
       
    79     * @since Series 60 3.2
       
    80     * @param aContext SVP Hold context
       
    81     * @return None
       
    82     */
       
    83     virtual void DoEnter( CSVPHoldContext& aContex ) = 0;
       
    84     
       
    85     /**
       
    86     * C++ default constructor.
       
    87     */
       
    88     CSVPHoldStateBase();
       
    89         
       
    90     };
       
    91 
       
    92 #endif      // SVPHOLDSTATEBASE_H 
       
    93