apengine/apeng/inc/ActiveApDbNotifier.h
changeset 61 8b0c979bbe8c
parent 59 2709c04a4af5
child 70 ac5daea24fb0
equal deleted inserted replaced
59:2709c04a4af5 61:8b0c979bbe8c
     1 /*
       
     2 * Copyright (c) 2002 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 *     Declares the CActiveApDbNotifier class.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef ACTIVE_AP_DB_NOTIFIER_H
       
    21 #define ACTIVE_AP_DB_NOTIFIER_H
       
    22 
       
    23 //  INCLUDES
       
    24 
       
    25 #include <e32base.h>
       
    26 #include <ApEngineVer.h>
       
    27 
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 
       
    31 class CActiveApDb;
       
    32 
       
    33 // CLASS DECLARATION
       
    34 
       
    35 /**
       
    36 * Active object encapsulating an access point database notifier.
       
    37 * Used by CActiveApDb.
       
    38 */
       
    39 class CActiveApDbNotifier : public CActive
       
    40     {
       
    41     public:     // construct / destruct
       
    42 
       
    43         /**
       
    44         * Constructor.
       
    45         * @param aDb Active access point database to watch for.
       
    46         */
       
    47         CActiveApDbNotifier( CActiveApDb& aDb );
       
    48 
       
    49         /**
       
    50         * Destructor.
       
    51         */
       
    52         virtual ~CActiveApDbNotifier();
       
    53 
       
    54     protected:  // from CActive
       
    55         /**
       
    56         * Invoked when the outstanding request completes.
       
    57         */
       
    58         void RunL() ;
       
    59 
       
    60         /**
       
    61         * Implementation of the Cancel protocol;
       
    62         * cancel any outstanding request.
       
    63         */
       
    64         void DoCancel();
       
    65 
       
    66     public:     // new methods
       
    67 
       
    68         /**
       
    69         * Start the notifier. The notification request is automatically
       
    70         * renewed until it is cancelled, or the database is closed by
       
    71         * all clients (i.e. released by DBMS).
       
    72         */
       
    73         void Start();
       
    74 
       
    75         /**
       
    76         * Cancel and close the notifier now.
       
    77         */
       
    78         void Stop();
       
    79 
       
    80     private:
       
    81         /**
       
    82         * Request database change notification from the Access Point Engine.
       
    83         */
       
    84         void NotifyChange();
       
    85 
       
    86     private:    // data
       
    87         CActiveApDb* iActiveDb;     ///< Pointer to the database.
       
    88                                     ///< Does not owns it.
       
    89     };
       
    90 
       
    91 #endif
       
    92 
       
    93 // End of File