iaupdate/IAD/backgroundchecker/inc/iaupdatebginternalfilehandler.h
author Pat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:22:02 +0100
branchRCL_3
changeset 26 8b7f4e561641
parent 25 7333d7932ef7
permissions -rw-r--r--
Revert incorrect RCL_3 drop: Revision: 201033 Kit: 201035

/*
* Copyright (c) 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:    
*
*/



#ifndef IAUPDATEBGINTERNAL_FILE_HANDLER
#define IAUPDATEBGINTERNAL_FILE_HANDLER


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

class CIAUpdateBGInternalFileHandler : public CBase
    {

public:

    static CIAUpdateBGInternalFileHandler* NewL();

    static CIAUpdateBGInternalFileHandler* NewLC();
    
    
    virtual ~CIAUpdateBGInternalFileHandler();


    TBool ReadControllerDataL();

    void WriteControllerDataL();
    
    
    const TTime& LastTimeShowNewFeatureDialog() const;
    
    void SetLastTimeShowNewFeatureDialog( const TTime& aTime );

    void SetLastTimeShowNewFeatureDialog( TInt64 aTime );

    //void SetCurrentRefreshTime();

    TBool UserRejectNewFeatureDialog() const;
    
    void SetUserRejectNewFeatureDialog( TBool aUserDecision );
    
    TBool ReminderOn();
    
    void SetReminder( TBool aOn );
    
    TTime NextRemindTime();
    
    void SetNextRemindTime( TTime aNextRemindTime );
    
    void SetNextRemindTime( TInt64 aNextRemindTime );
    
    void SetMode( TIAUpdateBGMode aMode );
    
    TIAUpdateBGMode Mode();
    
    HBufC* FwVersion();
    
    TInt SetFwVersionL( const TDesC& aFwVersion );
    
    TInt SoftNotificationID();
    
    void SetSoftNotificationID( TInt aID );
    
    TInt RetryTimes();
    
    void SetRetryTimes( TInt aRetry );

protected:

    CIAUpdateBGInternalFileHandler();
    
    void ConstructL();


    void InternalizeL( RReadStream& aStream );

    void ExternalizeL( RWriteStream& aStream );


private:

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


private: // data

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

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

    
    TBool iUserRejectNewFeatureDialog;
    
    TTime iNextRemindTime;
    
    TBool iIsReminderOn;
    
    TIAUpdateBGMode iMode;
    
    HBufC* iFwVersion;
      
    TInt iSNID;
    
    TInt iRetryTimes;
     
    };
        
#endif // IAUPDATEBGINTERNAL_FILE_HANDLER