appinstaller/AppinstUi/Plugin/SisxUI/Inc/SisxUISelectionCache.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 CSisxUISelectionCache
       
    15 *                class.
       
    16 *
       
    17 *                This class acts as a cache for user selections during
       
    18 *                installation.
       
    19 *
       
    20 */
       
    21 
       
    22 
       
    23 #ifndef SISXUISELECTIONCACHE_H
       
    24 #define SISXUISELECTIONCACHE_H
       
    25 
       
    26 //  INCLUDES
       
    27 #include <e32base.h>
       
    28 #include <f32file.h>
       
    29 
       
    30 namespace SwiUI
       
    31 {
       
    32 class CSisxUIHandler;
       
    33 
       
    34 /**
       
    35 * This class acts as a cache for user selections during installation.
       
    36 * @lib sisxui
       
    37 * @since 3.0 
       
    38 */
       
    39 class CSisxUISelectionCache : public CBase
       
    40     {
       
    41     public:  // Constructors and destructor
       
    42         
       
    43         /**
       
    44         * Two-phased constructor.
       
    45         */
       
    46         static CSisxUISelectionCache* NewL();
       
    47         
       
    48         /**
       
    49         * Destructor.
       
    50         */
       
    51         virtual ~CSisxUISelectionCache();
       
    52 
       
    53     public:  // From base classes
       
    54              
       
    55         /**
       
    56         * Indicates if language selection is cached. 
       
    57         * @since 3.0
       
    58         * @return ETrue, EFalse
       
    59         */
       
    60         TBool LanguageCached() const;
       
    61         
       
    62         /**
       
    63         * Returns cached language.
       
    64         * @since 3.0
       
    65         * @return Cached language.
       
    66         */
       
    67         TLanguage Language() const;
       
    68         
       
    69         /**
       
    70         * Sets the cached language.
       
    71         * @since 3.0
       
    72         * @param aLanguage - Language to be cached.
       
    73         */
       
    74         void SetLanguage( const TLanguage& aLanguage );
       
    75 
       
    76         /**
       
    77         * Indicates if drive selection is cached. 
       
    78         * @since 3.0
       
    79         * @return ETrue, EFalse
       
    80         */
       
    81         TBool DriveCached() const;
       
    82         
       
    83         /**
       
    84         * Returns cached drive.
       
    85         * @since 3.0
       
    86         * @return Cached drive.
       
    87         */
       
    88         TDriveUnit Drive() const;
       
    89         
       
    90         /**
       
    91         * Sets the cached drive.
       
    92         * @since 3.0
       
    93         * @param aLanguage - Drive to be cached.
       
    94         */
       
    95         void SetDrive( TDriveUnit aDrive );
       
    96 
       
    97         /**
       
    98         * Indicates if options selection is cached. 
       
    99         * @since 3.0
       
   100         * @param aOptions - Array of current options.
       
   101         * @return ETrue, EFalse
       
   102         */
       
   103         TBool OptionsCached( const RPointerArray<TDesC>& aOptions ) const;
       
   104 
       
   105         /**
       
   106         * Returns cached option selections.
       
   107         * @since 3.0
       
   108         * @param aSelections - On return contains the cached selections.
       
   109         */
       
   110         void Options( RArray<TBool>& aSelections );
       
   111         
       
   112         /**
       
   113         * Sets the cached options.
       
   114         * @since 3.0
       
   115         * @param aLanguage - Drive to be cached.
       
   116         */
       
   117         void SetOptionsL( const RPointerArray<TDesC>& aOptions, const RArray<TBool>& aSelections );    
       
   118         
       
   119     private:
       
   120 
       
   121         /**
       
   122         * Constructor.
       
   123         */  
       
   124         CSisxUISelectionCache();
       
   125          
       
   126         /**
       
   127         * 2nd phase constructor.
       
   128         */
       
   129         void ConstructL();
       
   130 
       
   131     private: //  Data
       
   132 
       
   133         TBool iLanguageCached;
       
   134         TLanguage iLanguage;
       
   135         
       
   136         TDriveUnit iDrive;        
       
   137 
       
   138         RPointerArray<HBufC> iOptions;        
       
   139         RArray<TBool> iSelections;       
       
   140     };
       
   141 }
       
   142 
       
   143 #endif      // SISXUISELECTIONCACHE_H  
       
   144             
       
   145 // End of File