web_pub/favourites_engine_api/tsrc/inc/FavouritesDbTestObserver.h
changeset 1 7c90e6132015
child 25 0ed94ceaa377
equal deleted inserted replaced
0:dd21522fd290 1:7c90e6132015
       
     1 /*
       
     2 * Copyright (c) 2000 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 the License "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:  Declaration of class CFavouritesDbTestObserver.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef FAVOURITES_DB_TEST_OBSERVER_H
       
    20 #define FAVOURITES_DB_TEST_OBSERVER_H
       
    21 
       
    22 //  INCLUDES
       
    23 
       
    24 #include <e32base.h>
       
    25 #include <FavouritesDbObserver.h>
       
    26 #include "FavouritesEngineTest.h"
       
    27 
       
    28 // FORWARD DECLARATION
       
    29 
       
    30 class CActiveFavouritesDbNotifier;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35 * Favourites Engine test observer.
       
    36 */
       
    37 class CFavouritesDbTestObserver: public CActive, public MFavouritesDbObserver
       
    38     {
       
    39     public:     // Constructors and destructor
       
    40         
       
    41         /**
       
    42         * Constructor.
       
    43         * @param aTester Tester object.
       
    44         */
       
    45         CFavouritesDbTestObserver( CFavouritesEngineTest& aTester );
       
    46 
       
    47         /**
       
    48         * Destructor.
       
    49         */
       
    50         virtual ~CFavouritesDbTestObserver();
       
    51 
       
    52     protected:  // from CActive
       
    53 
       
    54         /**
       
    55         * Run a step of the observer test.
       
    56         */
       
    57         void RunL();
       
    58 
       
    59         /**
       
    60         * Cancel protocol implementation.
       
    61         */
       
    62         void DoCancel();
       
    63 
       
    64     public:     // from MFavouritesDbObserver
       
    65 
       
    66         /**
       
    67         * Act accordingly to database events.
       
    68         * @param aEvent Database event.
       
    69         */
       
    70         void HandleFavouritesDbEventL( RDbNotifier::TEvent aEvent );
       
    71 
       
    72     public:     // new methods
       
    73 
       
    74         /**
       
    75         * Start the test.
       
    76         */
       
    77         void Start();
       
    78 
       
    79         /**
       
    80         * Continue the test.
       
    81         */
       
    82         void Next();
       
    83 
       
    84     private:    // data
       
    85 
       
    86         CFavouritesEngineTest* iTester;           ///< Tester; not owned.
       
    87         CActiveFavouritesDbNotifier* iNotifier; ///< Database notifier.
       
    88         TInt iStep;                             ///< Test step.
       
    89         TInt iLastEvent;                        ///< Last event occurred.
       
    90         TInt iEventCount;                       ///< Count of events.
       
    91 
       
    92     };
       
    93 
       
    94 #endif
       
    95             
       
    96 // End of File