meetingrequest/mrcommon/inc/cmractivitymanager.h
branchRCL_3
changeset 12 4ce476e64c59
equal deleted inserted replaced
11:0396474f30f5 12:4ce476e64c59
       
     1 /*
       
     2 * Copyright (c) 2007-2009 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:  Meeting Request timer for the focus
       
    15 *
       
    16 */
       
    17 #ifndef CMRTIMER_H
       
    18 #define CMRTIMER_H
       
    19 
       
    20 // INCLUDES
       
    21 #include <e32base.h>
       
    22 
       
    23 // FORWARD DECLARATIONS
       
    24 
       
    25 // CLASS DECLARATIONS
       
    26 class MMRActivityManagerObserver
       
    27     {
       
    28     public :
       
    29         virtual void PeriodCompleted() = 0;
       
    30     };
       
    31 
       
    32 NONSHARABLE_CLASS( CMRActivityManager ): public CBase
       
    33     {
       
    34     public:
       
    35 
       
    36         IMPORT_C static CMRActivityManager* NewL(
       
    37                 MMRActivityManagerObserver& aObserver,
       
    38                 TInt aTimeout = 6 );
       
    39 
       
    40         IMPORT_C ~CMRActivityManager();
       
    41 
       
    42         IMPORT_C void SetTimeout( TInt aTimeout );
       
    43 
       
    44         IMPORT_C void Start();
       
    45 
       
    46         IMPORT_C void Reset();
       
    47 
       
    48     private: // New functions
       
    49 
       
    50         /**
       
    51          * The call back function.
       
    52          * \param aAny A pointer to this class.
       
    53          */
       
    54         static TInt PeriodicTimerCallBack(TAny* aAny);
       
    55 
       
    56         /**
       
    57          * Notice that this is a sample fuction.
       
    58          *
       
    59          */
       
    60         void NotifyObserver();
       
    61 
       
    62     private: // Implementation
       
    63         CMRActivityManager(
       
    64                 MMRActivityManagerObserver& aObserver,
       
    65                 TInt aTimeout );
       
    66         void ConstructL();
       
    67 
       
    68     private:    // Member data
       
    69 
       
    70         /**
       
    71          * The periodic timer.
       
    72          * Owned by CMyClass
       
    73          */
       
    74         CPeriodic* iPeriodicTimer;
       
    75 
       
    76         /// Ref: Observer for listening the activity manager
       
    77         MMRActivityManagerObserver& iObserver;
       
    78         /// Timeout
       
    79         TInt iTimeoutInSecs;
       
    80     };
       
    81 
       
    82 #endif // CMRTIMER_H
       
    83 // End of file
       
    84