appinstaller/AppinstUi/Server/Inc/SWInstUninstallRequest.h
changeset 80 9dcba1ee99f7
parent 77 d1838696558c
equal deleted inserted replaced
77:d1838696558c 80:9dcba1ee99f7
     1 /*
       
     2 * Copyright (c) 2002-2004 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 CSWInstUninstallRequest class 
       
    15 *
       
    16 *                This class implements functionality for install request.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef SWINSTUNINSTALLREQUEST_H
       
    22 #define SWINSTUNINSTALLREQUEST_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include <e32base.h>
       
    26 #include <SWInstDefs.h>
       
    27 #include "SWInstRequestObject.h"
       
    28 
       
    29 namespace SwiUI
       
    30 {
       
    31 
       
    32 // FORWARD DECLARATIONS
       
    33 
       
    34 class CSWInstUIPluginAPI;
       
    35 
       
    36 // CLASS DECLARATION
       
    37 
       
    38 /**
       
    39 * This class implements functionality for install request.
       
    40 *
       
    41 * @since 3.0
       
    42 */
       
    43 class CSWInstUninstallRequest : public CSWInstRequestObject
       
    44     {
       
    45     public:  // Constructors and destructor
       
    46      
       
    47         /**
       
    48         * Two-phased constructor.
       
    49         * @param aMessage - Message object having this request.
       
    50         */
       
    51         static CSWInstUninstallRequest* NewL( const RMessage2& aMessage );
       
    52 
       
    53         /**
       
    54         * Two-phased constructor.
       
    55         * @param aMessage - Message object having this request.
       
    56         */
       
    57         static CSWInstUninstallRequest* NewL( TInt aObjectId );
       
    58     
       
    59         /**
       
    60         * Destructor.
       
    61         */
       
    62         virtual ~CSWInstUninstallRequest();
       
    63 
       
    64     public: // New functions
       
    65 
       
    66         /**
       
    67         * Perform uninstallation
       
    68         * @since 3.0
       
    69         * @param aUid - Uid of the package to uninstall.
       
    70         * @patam aMIME - Mime of the package to uninstall.
       
    71         */
       
    72         void Uninstall( const TUid& aUid, const TDesC8& aMIME );
       
    73 
       
    74         /**
       
    75         * Perform silent uninstallation
       
    76         * @since 3.0
       
    77         * @param aUid - Uid of the package to uninstall.
       
    78         * @patam aMIME - Mime of the package to uninstall.
       
    79         * @param aOptions - Options for uninstallation
       
    80         */
       
    81         void SilentUninstall( const TUid& aUid, 
       
    82                               const TDesC8& aMIME, 
       
    83                               TUninstallOptions& aOptions );        
       
    84 
       
    85         /**
       
    86         * Perform a custom uninstallation.
       
    87         * @since 3.0
       
    88         * @param aOperation - Operation to be performed.
       
    89         * @param aParams - Parameters of the operation.
       
    90         * @param aMIME - Mime of the package to uninstall.
       
    91         */
       
    92         void CustomUninstall( TOperation aOperation, 
       
    93                               const TDesC8& aParams, 
       
    94                               const TDesC8& aMIME );   
       
    95 
       
    96         /**
       
    97         * Perform a silent custom uninstallation.
       
    98         * @since 3.0
       
    99         * @param aOperation - Operation to be performed.
       
   100         * @param aOptions - Options for the silent operation.
       
   101         * @param aParams - Parameters of the operation.
       
   102         * @param aMIME - Mime of the package to uninstall.
       
   103         */
       
   104         void SilentCustomUninstall( TOperation aOperation, 
       
   105                                     TUninstallOptions& aOptions,
       
   106                                     const TDesC8& aParams, 
       
   107                                     const TDesC8& aMIME );            
       
   108 
       
   109     protected: // Functions from base classes
       
   110 
       
   111         /**
       
   112         * From CSWInstRequestObject, Cancels the current request.
       
   113         * @since 3.0
       
   114         */
       
   115         void CancelRequest();
       
   116         
       
   117         /**
       
   118         * From CSWInstRequestObject, Gets called when the request is completed.
       
   119         * @since 3.0
       
   120         */
       
   121         void RequestCompleteL( TInt aResult );       
       
   122 
       
   123     private:
       
   124         
       
   125         /**
       
   126         * C++ default constructor.
       
   127         * @param aMessage - Message object having this request.
       
   128         */
       
   129         CSWInstUninstallRequest( const RMessage2& aMessage );
       
   130 
       
   131         /**
       
   132         * C++ default constructor.
       
   133         * @param aMessage - Message object having this request.
       
   134         */
       
   135         CSWInstUninstallRequest( TInt aObjectId );
       
   136 
       
   137         /**
       
   138         * 2nd phase constructor.
       
   139         */
       
   140         void ConstructL();   
       
   141 
       
   142         /**
       
   143         * Performs the actual uninstallation.
       
   144         * @since 3.0
       
   145         */
       
   146         void DoUninstallL( const TDesC8& aMIME );  
       
   147 
       
   148         /**
       
   149         * Perform a custom uninstallation.
       
   150         * @since 3.0
       
   151         * @param aOperation - Operation to be performed.
       
   152         * @param aParams - Parameters of the operation.
       
   153         * @param aMIME - Mime of the package to uninstall.
       
   154         */
       
   155         void DoCustomUninstallL( TOperation aOperation, 
       
   156                                 const TDesC8& aParams, 
       
   157                                 const TDesC8& aMIME );   
       
   158 
       
   159         /**
       
   160         * Perform a silent custom uninstallation.
       
   161         * @since 3.0
       
   162         * @param aOperation - Operation to be performed.
       
   163         * @param aOptions - Options for the silent operation.
       
   164         * @param aParams - Parameters of the operation.
       
   165         * @param aMIME - Mime of the package to uninstall.
       
   166         */
       
   167         void DoSilentCustomUninstallL( TOperation aOperation, 
       
   168                                       TUninstallOptions& aOptions,
       
   169                                       const TDesC8& aParams, 
       
   170                                       const TDesC8& aMIME );           
       
   171 
       
   172     private: // Data
       
   173         
       
   174         TUid iUid;        
       
   175         TUninstallOptions iOptions;
       
   176     };
       
   177 }
       
   178 
       
   179 #endif      // SWINSTUNINSTALLREQUEST_H   
       
   180             
       
   181 // End of File