watchdog/inc/centrepmonitor.h
changeset 16 2729d20a0010
equal deleted inserted replaced
14:8bd192d47aaa 16:2729d20a0010
       
     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 
       
    18 #ifndef CENTREPMONITOR_H_
       
    19 #define CENTREPMONITOR_H_
       
    20 
       
    21 #include <e32base.h>
       
    22 #include "mcentrephandler.h"
       
    23 
       
    24 class CRepository;
       
    25 
       
    26 class CentrepMonitor : public CActive
       
    27     {
       
    28 public:
       
    29     /*
       
    30      * Construction
       
    31      * @return instance of CentrepMonitor
       
    32      */
       
    33     static CentrepMonitor* NewL( MCentrepHandler* aCentrepHandler, TUint32 aKey ); //For callback
       
    34     /*
       
    35      * Construction
       
    36      * @return instance of CentrepMonitor
       
    37      */
       
    38     static CentrepMonitor* NewLC( MCentrepHandler* aCentrepHandler, TUint32 aKey );
       
    39     /*
       
    40      * Destructor
       
    41      */
       
    42     virtual ~CentrepMonitor();
       
    43 public:
       
    44     /*
       
    45      * Srats the notifier to monitor the changes done for HS and SS centrep key
       
    46      */
       
    47     void StartNotifier();
       
    48     
       
    49     //From CActive
       
    50     void RunL();
       
    51     void DoCancel();
       
    52     TInt RunError( TInt aError );
       
    53 private:    
       
    54     /*
       
    55      * Constructor
       
    56      */
       
    57     CentrepMonitor();
       
    58     
       
    59     /*
       
    60      * Second phase constructor
       
    61      */
       
    62     void ConstructL( MCentrepHandler* aCentrepHandler, TUint32 aKey );    
       
    63 
       
    64 private:
       
    65 
       
    66     TUint32 iKey;
       
    67     //centrep handler.Not owned
       
    68     MCentrepHandler* iCentrepHandler;
       
    69     //repository db for watchdog.owned
       
    70     CRepository* aWDrepo;
       
    71     };
       
    72 
       
    73 
       
    74 #endif //CENTREPMONITOR_H_