appinstaller/AppinstUi/Plugin/Tasks/StartupTask/Inc/StartupItem.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 CStartupItem 
       
    15 *                class.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef STARTUPITEM_H
       
    21 #define STARTUPITEM_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <StartupItem.hrh>
       
    26 #include "SWInstStartupTaskParam.h"
       
    27 
       
    28 class RReadStream;
       
    29 class RWriteStream;
       
    30 
       
    31 namespace SwiUI
       
    32 {
       
    33 
       
    34 /**
       
    35 * Class to represent a single item in startup list.
       
    36 *
       
    37 * @since 3.0
       
    38 */
       
    39 class CStartupItem : public CBase
       
    40     {
       
    41     public:  // Constructors and destructor
       
    42         
       
    43         /**
       
    44         * Two-phased constructor.
       
    45         */
       
    46         static CStartupItem* NewL( const TStartupTaskParam& aParam );
       
    47 
       
    48         /**
       
    49         * Two-phased constructor.
       
    50         */
       
    51         static CStartupItem* NewL( RReadStream& aStream );
       
    52 
       
    53         /**
       
    54         * Destructor.
       
    55         */
       
    56         virtual ~CStartupItem();
       
    57 
       
    58     public: // New functions
       
    59         
       
    60         /**
       
    61         * Get the executable file of this startup item.
       
    62         * @since 3.0
       
    63         * @return Full path to executable file.
       
    64         */
       
    65         const TDesC& ExecutableFile() const;
       
    66         
       
    67         /**
       
    68         * Get the startup recovery policy for this item.
       
    69         * @since 3.0
       
    70         * @return Recovery policy.
       
    71         */
       
    72         TStartupExceptionPolicy RecoveryPolicy() const;
       
    73 
       
    74         /**
       
    75         * Externalize the class.
       
    76         * @since 3.0
       
    77         * @param - aStream stream where to externalize.
       
    78         */
       
    79         void ExternalizeL( RWriteStream &aStream ) const;
       
    80 
       
    81     private:
       
    82 
       
    83         /**
       
    84         * Constructor.
       
    85         */  
       
    86         CStartupItem();
       
    87         
       
    88         /**
       
    89         * 2nd phase constructor.
       
    90         */
       
    91         void ConstructL( const TStartupTaskParam& aParam );    
       
    92 
       
    93         /**
       
    94         * 2nd phase constructor.
       
    95         */
       
    96         void ConstructL( RReadStream& aStream );        
       
    97     
       
    98     private: // Data
       
    99 
       
   100         HBufC* iExecutableFile;
       
   101         TStartupExceptionPolicy iRecoveryPolicy;
       
   102     };
       
   103 }
       
   104 
       
   105 #endif      // STARTUPITEM_H   
       
   106             
       
   107 // End of File