appinstaller/AppinstUi/Server/Inc/SWInstAppUi.h
changeset 80 9dcba1ee99f7
parent 77 d1838696558c
equal deleted inserted replaced
77:d1838696558c 80:9dcba1ee99f7
     1 /*
       
     2 * Copyright (c) 2002-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:   This file contains the header file of the CSWInstAppUi class 
       
    15 *
       
    16 *                This class is a part of the standard application framework.
       
    17 *                It instantiates the application views.
       
    18 *                It also acts as the default command handler for the application.
       
    19 *
       
    20 */
       
    21 
       
    22 
       
    23 #ifndef SWINSTAPPUI_H
       
    24 #define SWINSTAPPUI_H
       
    25 
       
    26 //  INCLUDES
       
    27 #include <aknappui.h>
       
    28 #include "SWInstRequestObject.h"
       
    29 
       
    30 namespace SwiUI
       
    31 {
       
    32 
       
    33 // FORWARD DECLARATIONS
       
    34 
       
    35 // CLASS DECLARATION
       
    36 
       
    37 /**
       
    38 * This class is a part of the standard application framework.
       
    39 * It instantiates the application views.
       
    40 * It also acts as the default command handler for the application.
       
    41 */
       
    42 class CSWInstAppUi : public CAknAppUi, public MRequestCallback
       
    43     {
       
    44     public:  // Constructors and destructor
       
    45 
       
    46         /**
       
    47         * Constructor.
       
    48         */ 
       
    49         CSWInstAppUi();
       
    50         
       
    51         /**
       
    52         * 2nd phase constructor.
       
    53         */
       
    54         void ConstructL();
       
    55 	
       
    56         /**
       
    57         * Destructor.
       
    58         */
       
    59 	virtual ~CSWInstAppUi();   
       
    60 
       
    61     public: // New functions
       
    62 
       
    63         /**
       
    64         * Perform installation.
       
    65         * @since 3.0
       
    66         * @param aFileName - Full path to the package to be installed.
       
    67         */
       
    68         void InstallL( const TDesC& aFileName );   
       
    69 
       
    70         /**
       
    71         * Perform installation.
       
    72         * @since 3.0
       
    73         * @param aFile - Handle to the file to be installed.
       
    74         */
       
    75         void InstallL( RFile& aFile );    
       
    76 
       
    77     public: // Functions from base classes
       
    78         
       
    79         /**
       
    80         * From MRequestCallback, Called when request is completed.
       
    81         * @param aResult - Result of the request.
       
    82         */
       
    83         void RequestCompleted( TInt aResult );
       
    84 
       
    85     private: // Functions from base classes
       
    86 
       
    87         /**
       
    88         * From CEikAppUi, Handles user commands.
       
    89         * @since 3.0
       
    90         * @param aCommand - Command ID
       
    91         */
       
    92 	virtual void HandleCommandL( TInt aCommand );
       
    93 
       
    94         /**
       
    95         * From CEikAppUi, Processes shell commands.
       
    96         * @since 3.0
       
    97         * @param aCommand - The shell command sent to the application
       
    98         * @param aDocumentName - The document name that will be given to 
       
    99         * OpenFileL()
       
   100         * @param aTail - The rest of the command line
       
   101         * @return Whether the final document name represents an existing file
       
   102         */
       
   103 	virtual TBool ProcessCommandParametersL( TApaCommand aCommand,
       
   104                                                  TFileName& aDocumentName,
       
   105                                                  const TDesC8& aTail );
       
   106         
       
   107         /**
       
   108         * From CEikAppUi, Handles system events.
       
   109         * @since 3.0
       
   110         * @param aEvent - Event to handle.
       
   111         */
       
   112         virtual void HandleSystemEventL( const TWsEvent &aEvent );        
       
   113 
       
   114     private:    // Data
       
   115 
       
   116         CSWInstRequestObject* iReqObj;
       
   117         TBool iCancelInProgress; 
       
   118         TBool iOkToExit;        
       
   119     };
       
   120 
       
   121 }
       
   122 
       
   123 #endif      // SWINSTAPPUI_H   
       
   124             
       
   125 // End of File