homescreensrv_plat/menu_content_service_api/tsrc/inc/mcsmenuopwatcher.h
changeset 0 79c6a41cd166
equal deleted inserted replaced
-1:000000000000 0:79c6a41cd166
       
     1 /*
       
     2 * Copyright (c) 2008 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 
       
    19 #ifndef __MCSMENUOPWATCHER_H
       
    20 #define __MCSMENUOPWATCHER_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 class CMenuOperation;
       
    25 
       
    26 /**
       
    27  * This class implements MCS SAPI menu action watcher for async calls.
       
    28  * 
       
    29  */
       
    30 class CMCSMenuOpWatcher: public CActive
       
    31     {
       
    32     public:
       
    33 
       
    34     	/**
       
    35 		* Two-phased constructor.
       
    36 	    * @param iObserver Menu operation observer object.
       
    37 	    * @return CMCSMenuOpWatcher reference.
       
    38 		*/
       
    39 		static CMCSMenuOpWatcher* NewL( TBool aStopScheduler = 0);
       
    40 		
       
    41 		/**
       
    42 	     * Destructor.
       
    43 		*/
       
    44 	    virtual ~CMCSMenuOpWatcher();
       
    45 
       
    46 		/**
       
    47 		* Watch menu operation watcher.
       
    48 	    * @param iObserver Menu operation observer object.
       
    49 	    * @return CMCSMenuOpWatcher reference.
       
    50 		*/
       
    51 	    void Watch( CMenuOperation& aOperation); 
       
    52 	    
       
    53 	    TInt GetStatus();
       
    54 	    
       
    55     private:
       
    56     
       
    57     	/** 
       
    58 	    * Default constructor.
       
    59 	    * @param iObserver Menu operation observer object.
       
    60 	    */
       
    61 	    CMCSMenuOpWatcher( TBool aStopScheduler );
       
    62 
       
    63 		/** 
       
    64 		 * ConstructL
       
    65 		 */
       
    66 		void ConstructL();
       
    67 		
       
    68 		/**
       
    69 		* Inherited from CActive class 
       
    70 		*/ 
       
    71 	    void RunL();
       
    72 	    
       
    73 		/**
       
    74 		* Inherited from CActive class 
       
    75 		*/ 
       
    76 	    void DoCancel();
       
    77     
       
    78 	private:
       
    79 		
       
    80 		/** Menu operation */
       
    81 	    CMenuOperation* iOperation; 
       
    82 	    
       
    83 	    TBool iStopScheduler;
       
    84     };
       
    85 
       
    86 #endif /*__MCSMENUOPWATCHER_H*/