menucontentsrv/srvinc/mcsrunningappsaddremovehandler.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 
       
    20 #ifndef __MCSRUNNINGAPPSADDREMOVEHANDLER_H__
       
    21 #define __MCSRUNNINGAPPSADDREMOVEHANDLER_H__
       
    22 
       
    23 
       
    24 #include "menuengoperation.h"
       
    25 
       
    26 
       
    27 //Forward declatations
       
    28 class CMenuEng;
       
    29 class MMcsRunningAppsHandler;   
       
    30 
       
    31 /*
       
    32  * Supports AttributeChanged notification handling
       
    33  * if running application was moved from one folder to another 
       
    34  */
       
    35 
       
    36 NONSHARABLE_CLASS( CMcsRunningAppsAddRemoveHandler ): public CBase, 
       
    37 	MMenuEngOperation
       
    38     {
       
    39 public:
       
    40 	/**
       
    41 	*   Factory method.
       
    42 	*/
       
    43     static CMcsRunningAppsAddRemoveHandler* NewL( 
       
    44         CMenuEng& aEng, MMcsRunningAppsHandler* aRunningAppsHandler );
       
    45 
       
    46     /**
       
    47     *   Destructor.
       
    48     */
       
    49     ~CMcsRunningAppsAddRemoveHandler();
       
    50    
       
    51     /*
       
    52 	 * Appends a folder to iFolders array and queue to menueng operation
       
    53 	 * @param aFolder of folder for which the method was invoked
       
    54 	 */
       
    55     void HandleAddRemoveL( TInt aFolder );
       
    56     
       
    57 private:
       
    58 	/**
       
    59 	*   Constructor.
       
    60 	*/
       
    61 	CMcsRunningAppsAddRemoveHandler( 
       
    62 	    CMenuEng& aEng, MMcsRunningAppsHandler* aRunningAppsHandler );
       
    63 
       
    64 	/**
       
    65 	 * 2nd phase constructor
       
    66 	 */
       
    67 	void ConstructL();
       
    68 
       
    69 private:    // from MMenuEngOperation
       
    70 
       
    71     /**
       
    72     * Execute engine operation
       
    73     * Handles AttributeChanged notification and queue next operation
       
    74     * if iFolders array is not empty 
       
    75     */
       
    76     void RunMenuEngOperationL();
       
    77 
       
    78     /**
       
    79     * Error handling: ignore error.
       
    80     * @param aErr Error code.
       
    81     */
       
    82     void CompletedMenuEngOperation( TInt aErr );
       
    83     
       
    84 private://data
       
    85     /*
       
    86     * engine. not own
       
    87     */
       
    88     CMenuEng& iEng ; ///< Engine.
       
    89 
       
    90     /*
       
    91      * not own
       
    92      */
       
    93     MMcsRunningAppsHandler* iRunningAppsHandler;
       
    94     
       
    95     /*
       
    96      * Flag storing operation status information 
       
    97      */
       
    98     TBool iOperationInProgress;
       
    99     
       
   100     /*
       
   101      * own. 
       
   102      */
       
   103     RArray<TInt> iFolders;
       
   104     };
       
   105     
       
   106  
       
   107 	
       
   108 #endif // __MCSRUNNINGAPPSADDREMOVEHANDLER_H__