wim/Scard/inc/ScardCommandTimer.h
changeset 0 164170e6151a
equal deleted inserted replaced
-1:000000000000 0:164170e6151a
       
     1 /*
       
     2 * Copyright (c) 2003 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:  Smart card command timer
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CSCARDCOMMANDTIMER_H
       
    21 #define CSCARDCOMMANDTIMER_H
       
    22 
       
    23 // FORWARD DECLARATIONS
       
    24 class CScardAccessControl;
       
    25 
       
    26 // CLASS DECLARATION
       
    27 
       
    28 /**
       
    29 *  Timer class.
       
    30 *  Timer class, which is used when smart card is accessed after connection 
       
    31 *  is established.
       
    32 *
       
    33 *  @lib Scard.lib
       
    34 *  @since Series60 2.1
       
    35 */
       
    36 class CScardCommandTimer : public CActive  
       
    37     {
       
    38     public:  // Constructors and destructor
       
    39         
       
    40         /**
       
    41         * Two-phased constructor.
       
    42         * @param aTimeOut Timeout
       
    43         * @param aController Pointer to access controller
       
    44         */
       
    45         static CScardCommandTimer* NewL( TInt32 aTimeOut, 
       
    46                                          CScardAccessControl* aController );
       
    47         
       
    48         /**
       
    49         * Destructor.
       
    50         */
       
    51         virtual ~CScardCommandTimer();
       
    52 
       
    53     public: // New functions
       
    54 
       
    55         /**
       
    56         * Starts the timer.
       
    57         * @return void
       
    58         */
       
    59         void StartTiming();
       
    60         
       
    61     public: // Functions from base classes
       
    62     
       
    63         /**
       
    64         * From CActive DoCancel.
       
    65         */
       
    66         void DoCancel();
       
    67 
       
    68         /**
       
    69         * From CActive RunL.
       
    70         */
       
    71         void RunL();
       
    72 
       
    73     private:
       
    74 
       
    75         /**
       
    76         * C++ default constructor.
       
    77         */
       
    78         CScardCommandTimer();
       
    79 
       
    80         /**
       
    81         * By default Symbian 2nd phase constructor is private.
       
    82         * @param aTimeOut Timeout
       
    83         * @param aController Pointer to access controller
       
    84         */
       
    85         void ConstructL( TInt32 aTimeOut,
       
    86                          CScardAccessControl* aController );
       
    87 
       
    88     private:
       
    89         // Pointer to RTimer object. Owned.
       
    90         RTimer* iTimer;
       
    91         // Pointer to Controller. Not owned.
       
    92         CScardAccessControl* iController;
       
    93         // Timeout
       
    94         TInt32 iTimeOut;
       
    95     };
       
    96 
       
    97 #endif      // CSCARDCOMMANDTIMER_H
       
    98 
       
    99 // End of File