internetradio2.0/uiinc/irviewstack.h
changeset 0 09774dfdd46b
equal deleted inserted replaced
-1:000000000000 0:09774dfdd46b
       
     1 /*
       
     2 * Copyright (c) 2008-2008 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 #ifndef C_CIRVIEWSTACK_H
       
    20 #define C_CIRVIEWSTACK_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 class CIRViewStack : public CBase
       
    25 {
       
    26 
       
    27 public:
       
    28 
       
    29     /**
       
    30      * Two-phased constructor.
       
    31      *
       
    32      * @return Instance of CVRViewStack
       
    33      */
       
    34     static CIRViewStack* NewL();
       
    35 
       
    36     /**
       
    37      * ~CVRViewStack
       
    38      * Destructor.
       
    39      */
       
    40     ~CIRViewStack();
       
    41     
       
    42     /**
       
    43      * Returns UID of the previously active view.
       
    44      * @return UID of previous view.
       
    45      */
       
    46     TUid Peek() const;
       
    47 
       
    48     /**
       
    49      * Pushes view UID to view stack.
       
    50      * View stack holds all previous views, not the current view.
       
    51      * So the top item of this stack should usually be the previous view.
       
    52      * @param aView UID of the view to push to view stack.
       
    53      */
       
    54     void PushL( TUid aView );
       
    55 
       
    56     /**
       
    57      * Returns number of views in to the stack.
       
    58      * @return UID of the view popped from view stack.
       
    59      */
       
    60     TInt Count() const;
       
    61     
       
    62     /**
       
    63      * Pops and returns view UID from top of view stack.
       
    64      * View stack holds all previous views, not the current view.
       
    65      * So the top item of this stack should usually be the previous view.
       
    66      * @return UID of the view popped from view stack.
       
    67      */
       
    68     TUid Pop();
       
    69 
       
    70     /**
       
    71      * Pops to given Id and returns view UID from top of view stack.
       
    72      * View stack holds all previous views, not the current view.
       
    73      * So the top item of this stack should usually be the previous view.
       
    74      * @return UID of the view popped from view stack.
       
    75      */ 
       
    76     TUid CIRViewStack::PopTo( TUid aId );
       
    77 
       
    78 private:
       
    79 
       
    80     /**
       
    81      * CVRViewStack.
       
    82      * C++ default constructor.
       
    83      */
       
    84     CIRViewStack();
       
    85     
       
    86     /**
       
    87      * Second phase constructor.
       
    88      */
       
    89     void ConstructL();
       
    90 
       
    91 private: // Owned
       
    92     /**
       
    93      * View stack holds all previous views, not the current view.
       
    94      * So the top item of this stack should usually be the previous view.
       
    95      */  
       
    96     RArray<TUid> iViewStack;
       
    97 
       
    98 };
       
    99 
       
   100 #endif // C_CIRVIEWSTACKk_H