homescreensrv_plat/sapi_menucontent/mcsservice/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 MMCSMenuOpObserver;
       
    25 class CMenuOperation;
       
    26 class RMcsOperationManager;
       
    27 
       
    28 /**
       
    29  * This class implements MCS SAPI menu action watcher for async calls.
       
    30  * 
       
    31  */
       
    32 class CMCSMenuOpWatcher: public CActive
       
    33     {
       
    34     public:
       
    35 
       
    36     	/**
       
    37 		* Two-phased constructor.
       
    38 	    * @param iObserver Menu operation observer object.
       
    39 	    * @return CMCSMenuOpWatcher reference.
       
    40 		*/
       
    41 		static CMCSMenuOpWatcher* NewL( MMCSMenuOpObserver& iObserver, 
       
    42 		                RMcsOperationManager& aOperationManager );
       
    43 		
       
    44 		/**
       
    45 	     * Destructor.
       
    46 		*/
       
    47 	    virtual ~CMCSMenuOpWatcher();
       
    48 
       
    49 		/**
       
    50 		* Watch menu operation watcher.
       
    51 	    * @param iObserver Menu operation observer object.
       
    52 	    * @return CMCSMenuOpWatcher reference.
       
    53 		*/
       
    54 	    void Watch( CMenuOperation& aOperation); 
       
    55 	    
       
    56     private:
       
    57     
       
    58     	/** 
       
    59 	    * Default constructor.
       
    60 	    * @param iObserver Menu operation observer object.
       
    61 	    */
       
    62 	    CMCSMenuOpWatcher( MMCSMenuOpObserver& iObserver, 
       
    63 	                        RMcsOperationManager& aOperationManager );
       
    64 
       
    65 		/** 
       
    66 		 * ConstructL
       
    67 		 */
       
    68 		void ConstructL();
       
    69 		
       
    70 		/**
       
    71          * Notify callback in case RunL leaved;
       
    72          */ 
       
    73 		TInt RunError( TInt aError );
       
    74 		
       
    75 		/**
       
    76 		* Inherited from CActive class 
       
    77 		*/ 
       
    78 	    void RunL();
       
    79 	    
       
    80 		/**
       
    81 		* Inherited from CActive class 
       
    82 		*/ 
       
    83 	    void DoCancel();
       
    84     
       
    85 	private:
       
    86 		
       
    87 		/** Menu operation observer */
       
    88 		MMCSMenuOpObserver& iObserver;
       
    89 		/** Menu operation */
       
    90 	    CMenuOperation* iOperation; 
       
    91 	    /*not own*/
       
    92 	    RMcsOperationManager& iOperationManager;
       
    93 	    
       
    94     };
       
    95 
       
    96 #endif /*__MCSMENUOPWATCHER_H*/