iaupdate/IAD/backgroundchecker/inc/iaupdatebginternalfilehandler.h
changeset 0 ba25891c3a9e
child 25 7333d7932ef7
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2008 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:    
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef IAUPDATEBGINTERNAL_FILE_HANDLER
       
    21 #define IAUPDATEBGINTERNAL_FILE_HANDLER
       
    22 
       
    23 
       
    24 #include <e32std.h>
       
    25 #include <s32strm.h>
       
    26 #include <e32cmn.h>
       
    27 #include <f32file.h>
       
    28 #include <e32const.h>
       
    29 #include "iaupdatebgcheckermode.h"
       
    30 
       
    31 class CIAUpdateBGInternalFileHandler : public CBase
       
    32     {
       
    33 
       
    34 public:
       
    35 
       
    36     static CIAUpdateBGInternalFileHandler* NewL();
       
    37 
       
    38     static CIAUpdateBGInternalFileHandler* NewLC();
       
    39     
       
    40     
       
    41     virtual ~CIAUpdateBGInternalFileHandler();
       
    42 
       
    43 
       
    44     TBool ReadControllerDataL();
       
    45 
       
    46     void WriteControllerDataL();
       
    47     
       
    48     
       
    49     const TTime& LastTimeShowNewFeatureDialog() const;
       
    50     
       
    51     void SetLastTimeShowNewFeatureDialog( const TTime& aTime );
       
    52 
       
    53     void SetLastTimeShowNewFeatureDialog( TInt64 aTime );
       
    54 
       
    55     //void SetCurrentRefreshTime();
       
    56 
       
    57     TBool UserRejectNewFeatureDialog() const;
       
    58     
       
    59     void SetUserRejectNewFeatureDialog( TBool aUserDecision );
       
    60     
       
    61     TBool ReminderOn();
       
    62     
       
    63     void SetReminder( TBool aOn );
       
    64     
       
    65     TTime NextRemindTime();
       
    66     
       
    67     void SetNextRemindTime( TTime aNextRemindTime );
       
    68     
       
    69     void SetNextRemindTime( TInt64 aNextRemindTime );
       
    70     
       
    71     void SetMode( TIAUpdateBGMode aMode );
       
    72     
       
    73     TIAUpdateBGMode Mode();
       
    74     
       
    75     HBufC* FwVersion();
       
    76     
       
    77     TInt SetFwVersionL( const TDesC& aFwVersion );
       
    78     
       
    79     TInt SoftNotificationID();
       
    80     
       
    81     void SetSoftNotificationID( TInt aID );
       
    82     
       
    83     TInt RetryTimes();
       
    84     
       
    85     void SetRetryTimes( TInt aRetry );
       
    86 
       
    87 protected:
       
    88 
       
    89     CIAUpdateBGInternalFileHandler();
       
    90     
       
    91     void ConstructL();
       
    92 
       
    93 
       
    94     void InternalizeL( RReadStream& aStream );
       
    95 
       
    96     void ExternalizeL( RWriteStream& aStream );
       
    97 
       
    98 
       
    99 private:
       
   100 
       
   101     // Prevent these if not implemented
       
   102     CIAUpdateBGInternalFileHandler( const CIAUpdateBGInternalFileHandler& aObject );
       
   103     CIAUpdateBGInternalFileHandler& operator =( const CIAUpdateBGInternalFileHandler& aObject );
       
   104 
       
   105 
       
   106 private: // data
       
   107 
       
   108     // file server session
       
   109     RFs iFsSession;
       
   110     
       
   111     // controller data file path
       
   112     TFileName iPath;
       
   113 
       
   114     // Time when the content was refreshed.
       
   115     TTime iLastTimeShowNewFeatureDialog;
       
   116 
       
   117     
       
   118     TBool iUserRejectNewFeatureDialog;
       
   119     
       
   120     TTime iNextRemindTime;
       
   121     
       
   122     TBool iIsReminderOn;
       
   123     
       
   124     TIAUpdateBGMode iMode;
       
   125     
       
   126     HBufC* iFwVersion;
       
   127       
       
   128     TInt iSNID;
       
   129     
       
   130     TInt iRetryTimes;
       
   131      
       
   132     };
       
   133         
       
   134 #endif // IAUPDATEBGINTERNAL_FILE_HANDLER
       
   135