messagingapp/msgnotifications/msgerrorwatcher/inc/msgerrorcommdbobserver.h
changeset 56 f42d9a78f435
equal deleted inserted replaced
55:5b3b2fa8c3ec 56:f42d9a78f435
       
     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 *     CMsgErrorCommDbObserver declaration file
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef MSGERRORCOMMDBOBSERVER_H
       
    22 #define MSGERRORCOMMDBOBSERVER_H
       
    23 
       
    24 #include    <e32base.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CMsgErrorWatcherPrivate;
       
    28 class CCommsDatabase;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33 * CMsgErrorCommDbObserver
       
    34 */
       
    35 class CMsgErrorCommDbObserver : public CActive
       
    36     {
       
    37     public:  // Constructors and destructor
       
    38         
       
    39         /**
       
    40         * Two-phased constructor.
       
    41         *
       
    42         * @param aWatcher A pointer to CMsgErrorWatcherPrivate
       
    43         */
       
    44         static CMsgErrorCommDbObserver* NewL( CMsgErrorWatcherPrivate& aWatcher );
       
    45         
       
    46         /**
       
    47         * Destructor.
       
    48         */
       
    49         virtual ~CMsgErrorCommDbObserver();
       
    50 
       
    51         /**
       
    52         * For external reactivating the active object.
       
    53         */
       
    54         void Restart();
       
    55 
       
    56     private:
       
    57 
       
    58         /**
       
    59         * By default Symbian OS constructor is private.
       
    60         */
       
    61         void ConstructL();
       
    62 
       
    63         /**
       
    64         * Private C++ constructor.
       
    65         *
       
    66         * @param aWatcher A pointer to CMsgErrorWatcherPrivate
       
    67         */
       
    68         CMsgErrorCommDbObserver( CMsgErrorWatcherPrivate&  aWatcher );
       
    69 
       
    70     private: // from CActive
       
    71 
       
    72         /**
       
    73         * For starting the active object.
       
    74         */
       
    75         void Start();
       
    76 
       
    77         /**
       
    78         * From CActive
       
    79         */
       
    80         void DoCancel();
       
    81 
       
    82         /**
       
    83         * From CActive
       
    84         */
       
    85         void RunL();
       
    86 
       
    87     private:    // Data
       
    88 
       
    89         /*
       
    90          * Pointer to commdb
       
    91          * Own
       
    92          */
       
    93         CCommsDatabase*     iDb;
       
    94         
       
    95         /**
       
    96          * Reference to watcher to give call back
       
    97          * Doesn't own
       
    98          */
       
    99         CMsgErrorWatcherPrivate&   iWatcher;
       
   100     };
       
   101 
       
   102 #endif      // MSGERRORCOMMDBOBSERVER_H
       
   103             
       
   104 // End of File