iaupdate/IAD/ui/inc/iaupdateparametersfilemanager.h
changeset 0 ba25891c3a9e
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2007-2007 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:   CIAUpdateParametersFileManager
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef IA_UPDATE_PARAMETERS_FILE_MANAGER_H
       
    22 #define IA_UPDATE_PARAMETERS_FILE_MANAGER_H
       
    23 
       
    24 
       
    25 #include <e32base.h>
       
    26 #include <s32strm.h>
       
    27 #include <f32file.h>
       
    28 
       
    29 class CIAUpdateParameters;
       
    30 
       
    31 
       
    32 /**
       
    33  *
       
    34  *
       
    35  * @since S60 v3.2
       
    36  */
       
    37 class CIAUpdateParametersFileManager : public CBase
       
    38     {
       
    39 
       
    40 public:
       
    41 
       
    42     /**
       
    43      * @note The default path to the file where ReadDataL gets its data
       
    44      * is set to the private directory file of the UI and the default
       
    45      * name of the file is used.
       
    46      *
       
    47      * @since S60 v3.2
       
    48      */
       
    49     static CIAUpdateParametersFileManager* NewL();
       
    50 
       
    51     IMPORT_C static CIAUpdateParametersFileManager* NewLC();
       
    52     
       
    53     
       
    54     IMPORT_C virtual ~CIAUpdateParametersFileManager();
       
    55     
       
    56 
       
    57     /**
       
    58      * @return CIAUpdateParameters* Parameter object that was created from
       
    59      * file data. If file did not exist, then NULL is returned.
       
    60      * @exception Leaves with system wide error code.
       
    61      *
       
    62      * @since S60 v3.2
       
    63      */
       
    64     CIAUpdateParameters* ReadL();
       
    65 
       
    66     void WriteL( const CIAUpdateParameters& aParams );
       
    67 
       
    68 
       
    69     TInt RemoveFile();    
       
    70 
       
    71 
       
    72 private:
       
    73 
       
    74     // Prevent these if not implemented
       
    75     CIAUpdateParametersFileManager( const CIAUpdateParametersFileManager& aObject );
       
    76     CIAUpdateParametersFileManager& operator =( const CIAUpdateParametersFileManager& aObject );
       
    77 
       
    78 
       
    79     CIAUpdateParametersFileManager();
       
    80     
       
    81     void ConstructL();
       
    82 
       
    83 
       
    84     CIAUpdateParameters* InternalizeL( RReadStream& aStream );
       
    85 
       
    86     void ExternalizeL( RWriteStream& aStream, const CIAUpdateParameters& aParams );
       
    87 
       
    88 
       
    89 private: // data
       
    90 
       
    91 	// file server session
       
    92 	RFs iFsSession;
       
    93 	
       
    94 	// controller data file path
       
    95 	TFileName iPath;
       
    96 
       
    97     };
       
    98 		
       
    99 #endif // IA_UPDATE_PARAMETERS_FILE_MANAGER_H
       
   100