mpx/tsrc/public/basic/common/testviewframework/inc/consolereader.h
changeset 64 92dbd2a406d9
equal deleted inserted replaced
61:3b098142db83 64:92dbd2a406d9
       
     1 /*
       
     2 * Copyright (c) 2002 - 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:  Obtain input from console or output to console
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CCONSOLEREADER_H
       
    19 #define CCONSOLEREADER_H
       
    20 
       
    21 // INCLUDES
       
    22 #include <aknlists.h>
       
    23 #include <e32cons.h>
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 class CConsoleMain;
       
    27 
       
    28 /**
       
    29 *  console read class
       
    30 *
       
    31 *  @lib AddonMenu.lib
       
    32 */
       
    33 class CConsoleReader
       
    34     :public CActive
       
    35     {
       
    36     public:  // Constructors and destructor
       
    37 
       
    38         /**
       
    39         * Two-phased constructor
       
    40         * @param aMain, main console
       
    41         * @param aConsole, console
       
    42         * @return object of CConsoleReader
       
    43         */
       
    44         static CConsoleReader* NewL( CConsoleMain* aMain, 
       
    45                                      CConsoleBase* aConsole );
       
    46 
       
    47         /**
       
    48         * Start
       
    49         */
       
    50         void Start();
       
    51 
       
    52         /**
       
    53         * Destructor of CConsoleReader.
       
    54         */
       
    55         virtual ~CConsoleReader();
       
    56 
       
    57 
       
    58     public: // Functions from base classes
       
    59 
       
    60         /**
       
    61         * RunL derived from CActive handles the completed requests.
       
    62         */
       
    63         void RunL();
       
    64 
       
    65         /**
       
    66         * DoCancel derived from CActive handles the Cancel
       
    67         */
       
    68         void DoCancel();
       
    69 
       
    70     private:
       
    71 
       
    72         /** 
       
    73         * C++ default constructor.
       
    74         * @param aMain, main console
       
    75         * @param aConsole, console
       
    76         */
       
    77         CConsoleReader( CConsoleMain* aMain, 
       
    78                         CConsoleBase* aConsole );
       
    79 
       
    80         /**
       
    81         * the second phase constructor ConstructL to safely construct things 
       
    82         * that can leave 
       
    83         */
       
    84         void ConstructL();
       
    85 
       
    86     private:    // Data
       
    87         CConsoleBase*   iConsole;   // Pointer to console
       
    88         CConsoleMain*   iMain;      // Backpointer
       
    89     };
       
    90 
       
    91 #endif