wim/Scard/inc/ScardEventStack.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:  A class implementing two stacks. One is a fifo-stack of
       
    15 *               reader events, the other a random-access stack of service
       
    16 *               providers that are not used with a given reader.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 
       
    22 #ifndef CSCARDEVENTSTACK_H
       
    23 #define CSCARDEVENTSTACK_H
       
    24 
       
    25 //  INCLUDES
       
    26 #include "ScardServerBase.h"
       
    27 #include "ScardDefs.h"
       
    28 
       
    29 //  FORWARD DECLARATIONS
       
    30 class CScardConnector;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35 *  A class implementing two stacks. 
       
    36 *  One is a fifo-stack of reader events, the other a random-access stack of
       
    37 *  service providers that are not used with a given reader.
       
    38 *
       
    39 *  @lib Scard.lib
       
    40 *  @since Series60 2.1
       
    41 */
       
    42 class CScardEventStack : public CBase  
       
    43     {
       
    44     public:  // Constructors and destructor
       
    45 
       
    46         /**
       
    47         * Two-phased constructor.
       
    48         * @param aConnector Pointer to connector object
       
    49         */
       
    50         static CScardEventStack* NewL( CScardConnector* aConnector );
       
    51 
       
    52         /**
       
    53         * Destructor.
       
    54         */
       
    55         virtual ~CScardEventStack();
       
    56    
       
    57     public: // New functions
       
    58        
       
    59         /**
       
    60         * Queue events
       
    61         * @param aReaderID ReaderID
       
    62         * @param aEventType Event type
       
    63         * @return void
       
    64         */
       
    65         void QueueEvent( const TReaderID aReaderID,
       
    66                          const TScardServiceStatus aEventType );
       
    67 
       
    68     private:
       
    69 
       
    70         /**
       
    71         * C++ default constructor.
       
    72         */
       
    73         CScardEventStack();
       
    74 
       
    75         /**
       
    76         * By default Symbian 2nd phase constructor is private.
       
    77         * @param aConnector Pointer to connector object
       
    78         */
       
    79         void ConstructL( CScardConnector* aConnector );
       
    80 
       
    81     private:    // Data
       
    82         // Array of event. Owned.
       
    83         CArrayFixFlat<TQueueEvent>*  iEvents;
       
    84         // Pointer to connector object. Not owned.
       
    85         CScardConnector* iConnector;
       
    86     };
       
    87 
       
    88 #endif      // CSCARDEVENTSTACK_H
       
    89 
       
    90 // End of File