iaupdate/IAD/engine/inc/iaupdatecontrollerfile.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 16 Apr 2010 15:05:20 +0300
changeset 25 98b66e4fb0be
parent 0 ba25891c3a9e
permissions -rw-r--r--
Revision: 201011 Kit: 201015

/*
* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:   Header file of CIAUpdateControllerFile class
*
*/






#ifndef IA_UPDATE_CONTROLLER_FILE_H
#define IA_UPDATE_CONTROLLER_FILE_H


#include <e32std.h>
#include <s32strm.h>
#include <e32cmn.h>
#include <f32file.h>
#include <e32const.h>


/**
 *
 */
class CIAUpdateControllerFile : public CBase
    {

public:

    IMPORT_C static CIAUpdateControllerFile* NewL( const TDesC& aFile );

    IMPORT_C static CIAUpdateControllerFile* NewLC( const TDesC& aFile );
    
    
    IMPORT_C virtual ~CIAUpdateControllerFile();


    IMPORT_C TBool ReadControllerDataL();

    IMPORT_C void WriteControllerDataL();
    
    
    IMPORT_C void SetCurrentData();

    
    IMPORT_C const TTime& RefreshTime() const;
    
    IMPORT_C void SetRefreshTime( const TTime& aTime );

    IMPORT_C void SetRefreshTime( TInt64 aTime );

    IMPORT_C void SetCurrentRefreshTime();
    

    IMPORT_C TLanguage Language() const;
    
    IMPORT_C void SetLanguage( TLanguage aLanguage );

    IMPORT_C void SetCurrentLanguage();
        

private:

    // Prevent these if not implemented
    CIAUpdateControllerFile( const CIAUpdateControllerFile& aObject );
    CIAUpdateControllerFile& operator =( const CIAUpdateControllerFile& aObject );


    CIAUpdateControllerFile();
    
    virtual void ConstructL( const TDesC& aFile );


    void InternalizeL( RReadStream& aStream );

    void ExternalizeL( RWriteStream& aStream );


private: // data

	// file server session
	RFs iFsSession;
	
	// controller data file path
	TFileName iPath;


    // Time when the content was refreshed.
    TTime iRefreshTime;

    // The language that has been used.
    TLanguage iLanguage;
    };
		
#endif // IA_UPDATE_CONTROLLER_FILE_H