iaupdate/IAD/backgroundchecker/inc/iaupdatebgfirsttimehandler.h
changeset 0 ba25891c3a9e
child 44 329d304c1aa1
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 #ifndef __IAUPDATEBGFIRSTTIMEHANDLER_H__
       
    20 #define __IAUPDATEBGFIRSTTIMEHANDLER_H__
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <f32file.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class RReadStream;
       
    28 class RWriteStream;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 /**
       
    32 *
       
    33 */
       
    34 
       
    35 class CIAUpdateBGFirstTimeHandler : public CBase
       
    36     {
       
    37 public:
       
    38 
       
    39     /**
       
    40     * Construct a CIAUpdateBGFirstTimeHandler using two phase construction,
       
    41     * and return a pointer to the created object
       
    42     * @return A pointer to the created instance of CIAUpdateBGFirstTimeHandler
       
    43     */
       
    44     static CIAUpdateBGFirstTimeHandler* NewL();
       
    45     
       
    46     /**
       
    47     * Construct a CIAUpdateBGFirstTimeHandler using two phase construction,
       
    48     * and return a pointer to the created object
       
    49     * @return A pointer to the created instance of CIAUpdateBGFirstTimeHandler
       
    50     */
       
    51     static CIAUpdateBGFirstTimeHandler* NewLC();
       
    52     
       
    53     /**
       
    54     * Destructor
       
    55     */
       
    56     ~CIAUpdateBGFirstTimeHandler();
       
    57 
       
    58 public: // new functions
       
    59     
       
    60     /**
       
    61     * Set Nokia agreement as accepted by an user
       
    62     */
       
    63     void SetAgreementAcceptedL();
       
    64     
       
    65     /**
       
    66     * Set Nokia agreement as asked (prompted) to an user
       
    67     */
       
    68     void SetAgreementAskedL();
       
    69         
       
    70     /**
       
    71     * Set automatic update checks as asked (prompted) to an user
       
    72     */
       
    73     void SetAutomaticUpdatesAskedL();
       
    74     
       
    75     /**
       
    76     * Is Nokia agreement of Application Update accepted by an user
       
    77     *
       
    78     * @return True value if agreement accepted 
       
    79     */
       
    80     TBool AgreementAcceptedL();
       
    81     
       
    82     /**
       
    83     * Is Nokia agreement of Application Update already asked 
       
    84     *
       
    85     * @return True value if agreement already asked 
       
    86     */
       
    87     TBool AgreementAskedL();
       
    88     
       
    89     /**
       
    90     * Is activation for automatic update cheks from network already asked 
       
    91     *
       
    92     * @return True value if agreement already asked 
       
    93     */
       
    94     TBool AutomaticUpdateChecksAskedL();  
       
    95 
       
    96 private:
       
    97 
       
    98     /**
       
    99     * C++ constructor 
       
   100     */
       
   101     CIAUpdateBGFirstTimeHandler();
       
   102     
       
   103     /**
       
   104     * Perform the second phase construction of a CFirstTimeHandler object
       
   105     */
       
   106     void ConstructL();
       
   107     
       
   108     void ReadDataL();
       
   109     
       
   110     void WriteDataL();
       
   111     
       
   112     void InternalizeL( RReadStream& aStream );
       
   113     
       
   114     void ExternalizeL( RWriteStream& aStream );
       
   115  
       
   116 private: //data
       
   117         
       
   118     RFs iFsSession;
       
   119         
       
   120     TFileName iPath;
       
   121     
       
   122     TBool iAgreementAccepted;
       
   123     
       
   124     TBool iAgreementAsked;
       
   125     
       
   126     TBool iAutomaticUpdateChecksAsked;   
       
   127    
       
   128     };
       
   129 
       
   130 
       
   131 #endif // __IAUPDATEBGFIRSTTIMEHANDLER_H__