calendarengines/caleninterimutils/inc/CalenEcomWatcher.h
changeset 0 f979ecb2b13e
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     1 /*
       
     2 * Copyright (c) 2005 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 *             This class watches for changes to the ECOM registry
       
    16 *             and forces a recheck of Meeting request availablity
       
    17 *       
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 #ifndef __CALENECOMWATCHER_H__
       
    23 #define __CALENECOMWATCHER_H__
       
    24 
       
    25 //  INCLUDES
       
    26 #include <e32base.h>
       
    27 #include <ecom/ecom.h>
       
    28 
       
    29 class CCalenInterimUtils2Impl;
       
    30 class MCalenEComChangeObserver;
       
    31 
       
    32 /**
       
    33 * CCalenEComWatcher watches for changes to the ECOM registry and forces a recheck
       
    34 * of meetng request availablity
       
    35 */
       
    36 NONSHARABLE_CLASS(CCalenEComWatcher) : public CActive
       
    37     {
       
    38     public: 
       
    39         /**
       
    40         * Constructor.
       
    41         * @param aUtils CCalenInterimUtils2Impl reference
       
    42         * @return a pointer to the new CCalenEComWatcher instance
       
    43         */
       
    44         IMPORT_C static CCalenEComWatcher* NewL( MCalenEComChangeObserver& aObserver );
       
    45 
       
    46         /**
       
    47         * Destructor
       
    48         */
       
    49         ~CCalenEComWatcher();
       
    50 
       
    51         /**
       
    52         * From CActive
       
    53         * Called when outstanding asynchronous request completes
       
    54         * This will be called when iNotificationTimer either completes
       
    55         * or is cancelled
       
    56         */
       
    57         void RunL();
       
    58 
       
    59         /**
       
    60         * From CActive
       
    61         * Called by the active scheduler if RunL leaves
       
    62         * Ensures we are ready to receive the next database event
       
    63         */
       
    64         TInt RunError();
       
    65 
       
    66         /**
       
    67         * From CActive
       
    68         * Implements cancellation of outstanding asynchronous requests
       
    69         * Cancels iNotificationTimer if started
       
    70         */
       
    71         void DoCancel();
       
    72 
       
    73     private:
       
    74         /**
       
    75         * C++ default constructor.
       
    76         * @param aUtils CCalenInterimUtils2Impl reference
       
    77         */
       
    78         CCalenEComWatcher( MCalenEComChangeObserver& aObserver );
       
    79 
       
    80         /**
       
    81         * By default Symbian 2nd phase constructor is private.
       
    82         * Performs any construction which may leave
       
    83         */
       
    84         void ConstructL();
       
    85 
       
    86     private:
       
    87         REComSession iSession;
       
    88         MCalenEComChangeObserver& iEComObserver;
       
    89     };
       
    90 
       
    91 #endif // __CALENECOMWATCHER_H__
       
    92 
       
    93 // End of File