commonuis/CommonUi/inc/DocAppInstHandler.h
changeset 0 2f259fa3e83a
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     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:  header file for application installer handler.  
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef APPINSTHANDLER_H
       
    19 #define APPINSTHANDLER_H
       
    20 
       
    21 //  INCLUDES
       
    22 #include "DocDefaultHandler.h"
       
    23 #include <SWInstApi.h>
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 class CDocAppInstLauncher;
       
    27 
       
    28 /**
       
    29 * Handler for application intaller packages 
       
    30 */
       
    31 NONSHARABLE_CLASS(CDocAppInstHandler) : public CDocDefaultHandler
       
    32     {
       
    33     public:        // Constructors and destructor
       
    34 
       
    35         /**
       
    36         * Two-phased constructor.
       
    37         */
       
    38         static CDocAppInstHandler* NewL(
       
    39             const TDataType& aDataType,
       
    40             const TUid& aUid,
       
    41             CDocumentHandler* aDocDispatcher,
       
    42             TDocServiceMode aServiceMode );
       
    43 
       
    44         /**
       
    45         * Destructor.
       
    46         */
       
    47         virtual ~CDocAppInstHandler();
       
    48 
       
    49 
       
    50     protected:        // New functions
       
    51 
       
    52     
       
    53         /**
       
    54         * Open installable file. 
       
    55         * 
       
    56         * @return           KErrNone if success. If fail, a fail reason 
       
    57         *                   constant declared in CDocumentHandler.h
       
    58         */
       
    59         TInt OpenFileEmbeddedL(RFile &aFileHandle);
       
    60         
       
    61         /**
       
    62         * Open installable file. 
       
    63         * 
       
    64         * @return           KErrNone if success. If fail, a fail reason 
       
    65         *                   constant declared in CDocumentHandler.h
       
    66         */
       
    67         TInt OpenFileL(RFile &aFileHandle);
       
    68         
       
    69         /**
       
    70         * Creates parameter store (iParamPckg) for given parameter list.
       
    71         * 
       
    72         * @param aParams a parameter list to be passed.
       
    73         */
       
    74         void AddToParamListL(const CAiwGenericParamList& aParams);
       
    75 
       
    76     
       
    77     private:
       
    78     
       
    79         /**
       
    80         * C++ default constructor.
       
    81         */
       
    82         CDocAppInstHandler(
       
    83             const TDataType& aDataType,
       
    84             const TUid& aUid,
       
    85             CDocumentHandler* aDocDispatcher,
       
    86             TDocServiceMode aServiceMode ); 
       
    87         
       
    88         /**
       
    89         * C++ copy constructor
       
    90         */
       
    91         CDocAppInstHandler( const CDocAppInstHandler& );
       
    92 
       
    93         /**
       
    94         * Prohibit the assignment operation
       
    95         */
       
    96         CDocAppInstHandler operator=( const CDocAppInstHandler& )  const;
       
    97         
       
    98         /*
       
    99         * Helper class which launches installer asyncronously
       
   100         */
       
   101         CDocAppInstLauncher* iLauncher;     
       
   102         
       
   103         /*
       
   104         * If ETrue, we call Installer with parameters
       
   105         */
       
   106         TBool iCallWithParams;         
       
   107         
       
   108         /*
       
   109         * Parameters for Application installer
       
   110         */ 
       
   111         SwiUI::TInstallReqPckg* iParamPckg;
       
   112 
       
   113         /*
       
   114         * Heap buffer the URL
       
   115         * Owned
       
   116         */
       
   117         HBufC*  iHeapURL;
       
   118 
       
   119         /*
       
   120         * Heap buffer the iParamPckg + 4 byte + URL(iHeapURL)
       
   121         * Owned
       
   122         */
       
   123         HBufC8* iParamDescriptor;
       
   124 
       
   125         /*
       
   126         * indicate if we can use the iParamDescriptor
       
   127         */
       
   128         TBool   iUseDescriptor;
       
   129 
       
   130     };
       
   131 
       
   132 #endif      // APPINSTHANDLER_H
       
   133 
       
   134 // End of File