iaupdate/IAD/backgroundchecker/inc/iaupdatebgfirsttimehandler.h
changeset 0 ba25891c3a9e
child 25 7333d7932ef7
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/backgroundchecker/inc/iaupdatebgfirsttimehandler.h	Thu Dec 17 08:51:10 2009 +0200
@@ -0,0 +1,131 @@
+/*
+* 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 __IAUPDATEBGFIRSTTIMEHANDLER_H__
+#define __IAUPDATEBGFIRSTTIMEHANDLER_H__
+
+// INCLUDES
+#include <e32base.h>
+#include <f32file.h>
+
+// FORWARD DECLARATIONS
+class RReadStream;
+class RWriteStream;
+
+// CLASS DECLARATION
+/**
+*
+*/
+
+class CIAUpdateBGFirstTimeHandler : public CBase
+    {
+public:
+
+    /**
+    * Construct a CIAUpdateBGFirstTimeHandler using two phase construction,
+    * and return a pointer to the created object
+    * @return A pointer to the created instance of CIAUpdateBGFirstTimeHandler
+    */
+    static CIAUpdateBGFirstTimeHandler* NewL();
+    
+    /**
+    * Construct a CIAUpdateBGFirstTimeHandler using two phase construction,
+    * and return a pointer to the created object
+    * @return A pointer to the created instance of CIAUpdateBGFirstTimeHandler
+    */
+    static CIAUpdateBGFirstTimeHandler* NewLC();
+    
+    /**
+    * Destructor
+    */
+    ~CIAUpdateBGFirstTimeHandler();
+
+public: // new functions
+    
+    /**
+    * Set Nokia agreement as accepted by an user
+    */
+    void SetAgreementAcceptedL();
+    
+    /**
+    * Set Nokia agreement as asked (prompted) to an user
+    */
+    void SetAgreementAskedL();
+        
+    /**
+    * Set automatic update checks as asked (prompted) to an user
+    */
+    void SetAutomaticUpdatesAskedL();
+    
+    /**
+    * Is Nokia agreement of Application Update accepted by an user
+    *
+    * @return True value if agreement accepted 
+    */
+    TBool AgreementAcceptedL();
+    
+    /**
+    * Is Nokia agreement of Application Update already asked 
+    *
+    * @return True value if agreement already asked 
+    */
+    TBool AgreementAskedL();
+    
+    /**
+    * Is activation for automatic update cheks from network already asked 
+    *
+    * @return True value if agreement already asked 
+    */
+    TBool AutomaticUpdateChecksAskedL();  
+
+private:
+
+    /**
+    * C++ constructor 
+    */
+    CIAUpdateBGFirstTimeHandler();
+    
+    /**
+    * Perform the second phase construction of a CFirstTimeHandler object
+    */
+    void ConstructL();
+    
+    void ReadDataL();
+    
+    void WriteDataL();
+    
+    void InternalizeL( RReadStream& aStream );
+    
+    void ExternalizeL( RWriteStream& aStream );
+ 
+private: //data
+        
+    RFs iFsSession;
+        
+    TFileName iPath;
+    
+    TBool iAgreementAccepted;
+    
+    TBool iAgreementAsked;
+    
+    TBool iAutomaticUpdateChecksAsked;   
+   
+    };
+
+
+#endif // __IAUPDATEBGFIRSTTIMEHANDLER_H__