idlehomescreen/examples/mcsexample/inc/mcspluginwatcher.h
branchRCL_3
changeset 102 ba63c83f4716
parent 93 b01126ce0bec
child 103 966d119a7e67
equal deleted inserted replaced
93:b01126ce0bec 102:ba63c83f4716
     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 __MCSPLUGINWATCHER_H
       
    19 #define __MCSPLUGINWATCHER_H
       
    20 
       
    21 #include <e32base.h>
       
    22 
       
    23 class CMenuOperation;
       
    24 class CMCSPluginEngine;
       
    25 class CMCSExampleAppView;
       
    26 
       
    27 
       
    28 /**
       
    29  *
       
    30  *  This class implements MCS menu action watcher for async calls.
       
    31  * 
       
    32  */
       
    33 class CMCSExampleWatcher: public CActive
       
    34     {
       
    35     public:
       
    36         
       
    37         
       
    38         /**
       
    39          * Two-phased constructor.
       
    40          * 
       
    41          * @param aType
       
    42          */
       
    43         static CMCSExampleWatcher* NewL( );
       
    44         
       
    45         /**
       
    46          * Destructor.
       
    47          */
       
    48         virtual ~CMCSExampleWatcher();
       
    49 
       
    50         /**
       
    51          * Watch menu operation or notification.
       
    52          * 
       
    53          * @param aOperation
       
    54          */
       
    55         void Watch( CMenuOperation* aOperation, CMCSExampleAppView* aObserver );
       
    56 
       
    57         
       
    58         /**
       
    59          * GetStatus 
       
    60          */
       
    61         TInt GetStatus();
       
    62 
       
    63     private:
       
    64     
       
    65         /** 
       
    66          * Default constructor.
       
    67          * 
       
    68          * @param aType
       
    69          */
       
    70         CMCSExampleWatcher();
       
    71 
       
    72         /** 
       
    73          * ConstructL
       
    74          */
       
    75         void ConstructL();
       
    76         
       
    77         /**
       
    78         * Inherited from CActive class 
       
    79         */ 
       
    80         void RunL();
       
    81         
       
    82         /**
       
    83         * Inherited from CActive class 
       
    84         */ 
       
    85         void DoCancel();
       
    86     
       
    87     private:
       
    88         
       
    89         /** 
       
    90          * Menu operation
       
    91          * Owned
       
    92          */
       
    93         CMenuOperation* iOperation; 
       
    94         CMCSExampleAppView* iObserver;
       
    95     };
       
    96 
       
    97 #endif /*__MCSPLUGINWATCHER_H*/