accessoryservices/accessoryserver/inc/ASYProxy/ASYProxyCommsStack.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 /*
       
     2 * Copyright (c) 2002-2004 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:  Stack for handling transactions
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CASYPROXYCOMMSSTACK_H
       
    20 #define CASYPROXYCOMMSSTACK_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32std.h>
       
    24 #include <e32base.h>
       
    25 
       
    26 // CONSTANTS
       
    27 
       
    28 // MACROS
       
    29 
       
    30 // DATA TYPES
       
    31 
       
    32 // FUNCTION PROTOTYPES
       
    33 
       
    34 // FORWARD DECLARATIONS
       
    35 class CASYProxyTRRecord;
       
    36 class CASYProxyCommandObserver;
       
    37 
       
    38 // CLASS DECLARATION
       
    39 
       
    40 /**
       
    41 *  Class for handling concurrent transactions.
       
    42 *  Uses array as a stack.
       
    43 *
       
    44 *  @lib ASYProxy.dll
       
    45 *  @since S60 3.1
       
    46 */
       
    47 class CASYProxyCommsStack: public CBase
       
    48     {
       
    49     public: // Constructors and destructor
       
    50 
       
    51         /**
       
    52         * Two-phased constructor.
       
    53         */
       
    54         static CASYProxyCommsStack* NewL();
       
    55 
       
    56         /**
       
    57         * Destructor.
       
    58         */
       
    59         virtual ~CASYProxyCommsStack();
       
    60 
       
    61     public: // New functions
       
    62 
       
    63         /**
       
    64         * Creates and adds a new transaction record to stack.
       
    65         * @since S60 3.1
       
    66         * @param aASYProxyCommandObserver Pointer to a observer
       
    67         * @return void
       
    68         */
       
    69         void AddL( CASYProxyCommandObserver* aASYProxyCommandObserver );
       
    70 
       
    71         /**
       
    72         * Removes current transaction from stack.
       
    73         * @since S60 3.1
       
    74         * @param aTrId Transaction to be removed
       
    75         * @return void
       
    76         */
       
    77         void Remove( TInt aTrId );
       
    78 
       
    79         /**
       
    80         * Removes all transactions from stack.
       
    81         * @since S60 3.1
       
    82         * @param void
       
    83         * @return void
       
    84         */
       
    85         void RemoveAll();
       
    86 
       
    87     public: // Functions from base classes
       
    88 
       
    89     protected: // New functions
       
    90 
       
    91     protected: // Functions from base classes
       
    92 
       
    93     private:
       
    94 
       
    95         /**
       
    96         * C++ default constructor.
       
    97         */
       
    98         CASYProxyCommsStack();
       
    99 
       
   100         /**
       
   101         * By default Symbian 2nd phase constructor is private.
       
   102         */
       
   103         void ConstructL();
       
   104 
       
   105     public:     // Data
       
   106 
       
   107     protected:  // Data
       
   108 
       
   109     private:    // Data
       
   110 
       
   111         // Array used as a stack of transactions
       
   112         RPointerArray<CASYProxyTRRecord> iTRRecordArray;
       
   113 
       
   114     public:     // Friend classes
       
   115 
       
   116     protected:  // Friend classes
       
   117 
       
   118     private:    // Friend classes
       
   119 
       
   120     };
       
   121 
       
   122 #endif // CASYPROXYCOMMSSTACK_H
       
   123 
       
   124 // End of File