testexecfw/stf/stffw/eventsystem/client/inc/stfasynceventlist.h
changeset 2 8bb370ba6d1d
equal deleted inserted replaced
1:bbd31066657e 2:8bb370ba6d1d
       
     1 /*
       
     2 * Copyright (c) 2010 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 #ifndef STFASYNCEVENTLIST_H_
       
    18 #define STFASYNCEVENTLIST_H_
       
    19 
       
    20 #include <e32base.h>
       
    21 
       
    22 #include <stfeventsystemdefs.h>
       
    23 
       
    24 class CAsyncEventActive;
       
    25 
       
    26 // This class defines list of asynchronous event calls.
       
    27 // It is planned that only wait events will be realised in a real asynchronous
       
    28 // way. All others will be synchronous, even they pretend to be asynchronous.
       
    29 class CAsyncEventList: public CBase 
       
    30     {
       
    31     public:
       
    32         /**
       
    33         * NewL is two-phased constructor.
       
    34         */
       
    35         IMPORT_C static CAsyncEventList* NewL();
       
    36         
       
    37         /**
       
    38         * Destructor.
       
    39         */
       
    40         ~CAsyncEventList();
       
    41 
       
    42         /**
       
    43         * Add active object to the list.
       
    44         */
       
    45         IMPORT_C void AddAsyncEventL(CAsyncEventActive* aAsyncEvent);
       
    46         
       
    47         /**
       
    48         * Remove active object from the list.
       
    49         */
       
    50         IMPORT_C void RemoveAsyncEventL(CAsyncEventActive* aAsyncEvent);
       
    51 
       
    52     private:
       
    53         /**
       
    54         * By default Symbian OS constructor is private.
       
    55         */
       
    56         void ConstructL();
       
    57 
       
    58         /**
       
    59         * Default C++ constructor.
       
    60         */
       
    61         CAsyncEventList();
       
    62     
       
    63         /**
       
    64         * Cancel and remove all active objects from the list.
       
    65         */
       
    66         void CancelAllAsyncEvents();
       
    67         
       
    68         
       
    69     private:
       
    70         /**
       
    71         * Array of all existing active objects waiting for asynchronous 
       
    72         * completion.
       
    73         */
       
    74         RPointerArray<CAsyncEventActive> iAsyncEvents;
       
    75 
       
    76     }; /* class CAsyncEventList */
       
    77     
       
    78 
       
    79 #endif /* STFASYNCEVENTLIST_H_ */
       
    80 // EOF