idlehomescreen/widgetmanager/inc/wminstaller.h
changeset 5 c743ef5928ba
child 15 ff572dfe6d86
equal deleted inserted replaced
4:4d54b72983ae 5:c743ef5928ba
       
     1 /*
       
     2 * Copyright (c) 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:
       
    15 * Handles istalling for wm
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef __WMINSTALLER_
       
    20 #define __WMINSTALLER_
       
    21 
       
    22 #include <SWInstApi.h> //installer
       
    23 
       
    24 class CIdle;
       
    25 class CWmWidgetData;
       
    26 class TUid;
       
    27 
       
    28 /**
       
    29  * CWmInstaller 
       
    30  */
       
    31 NONSHARABLE_CLASS( CWmInstaller ) : public CActive
       
    32     {
       
    33 public:
       
    34     /**
       
    35      * Two-phased constructors.
       
    36      */
       
    37     static CWmInstaller* NewL();
       
    38     static CWmInstaller* NewLC();
       
    39     
       
    40     /** Destructor */
       
    41     ~CWmInstaller();
       
    42     
       
    43 private:    
       
    44     /** constructor */
       
    45     CWmInstaller();
       
    46     
       
    47     /** 2nd phase constructor */
       
    48     void ConstructL();
       
    49     
       
    50 protected: // implementation of CActive
       
    51     /**
       
    52      * Implements cancellation of an outstanding request.
       
    53      * 
       
    54      * @see CActive::DoCancel
       
    55      */
       
    56     void DoCancel();
       
    57     
       
    58     /**
       
    59      * Handles an active object's request completion event.
       
    60      * 
       
    61      * @see CActive::RunL
       
    62      */
       
    63     void RunL();
       
    64     
       
    65     /**
       
    66      * RunError
       
    67      * 
       
    68      * @see CActive::RunError
       
    69      */
       
    70     TInt RunError(TInt aError);
       
    71 
       
    72 private:
       
    73     
       
    74     static TInt CloseSwiSession( TAny* aPtr );
       
    75     
       
    76 public:
       
    77     /**
       
    78      *  Uninstall given widget
       
    79      *  
       
    80      *  @param aData widget to unistall
       
    81      */
       
    82     void UninstallL( CWmWidgetData* aData );
       
    83     
       
    84 	/**
       
    85 	 * Returns wrt widget uid current been unistalled. 
       
    86 	 * If installer is not active returns KNullUid.
       
    87 	 */
       
    88     TUid UninstallUid();
       
    89     
       
    90 private:
       
    91     
       
    92     /** 
       
    93      * instance of the CIdle class for async swinstaller delete
       
    94      */
       
    95     CIdle* iIdle;
       
    96     
       
    97     /**
       
    98      * silent installer
       
    99      */
       
   100     SwiUI::RSWInstSilentLauncher iInstaller;
       
   101 
       
   102     /**
       
   103      * wrt widget that is currently been uninstalled
       
   104      */    
       
   105     TUid iUid;
       
   106     };
       
   107 
       
   108 #endif // __WMPLUGIN_