|
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: This file contains the header file of the CIAUpdateFirstTimeInfo |
|
15 * class |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef __IAUPDATE_FIRSTTIMEINFO_H__ |
|
21 #define __IAUPDATE_FIRSTTIMEINFO_H__ |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <f32file.h> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class RReadStream; |
|
29 class RWriteStream; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 /** |
|
33 * |
|
34 */ |
|
35 |
|
36 class CIAUpdateFirstTimeInfo : public CBase |
|
37 { |
|
38 public: |
|
39 |
|
40 /** |
|
41 * Construct a CIAUpdateFirstTimeInfo using two phase construction, |
|
42 * and return a pointer to the created object |
|
43 * @return A pointer to the created instance of CIAUpdateFirstTimeInfo |
|
44 */ |
|
45 static CIAUpdateFirstTimeInfo* NewL(); |
|
46 |
|
47 /** |
|
48 * Construct a CIAUpdateFirstTimeInfo using two phase construction, |
|
49 * and return a pointer to the created object |
|
50 * @return A pointer to the created instance of CIAUpdateFirstTimeInfo |
|
51 */ |
|
52 static CIAUpdateFirstTimeInfo* NewLC(); |
|
53 |
|
54 /** |
|
55 * Destructor |
|
56 */ |
|
57 ~CIAUpdateFirstTimeInfo(); |
|
58 |
|
59 public: // new functions |
|
60 |
|
61 /** |
|
62 * Set Nokia agreement as accepted by an user |
|
63 */ |
|
64 void SetAgreementAcceptedL(); |
|
65 |
|
66 /** |
|
67 * Set Nokia agreement as asked (prompted) to an user |
|
68 */ |
|
69 void SetAgreementAskedL(); |
|
70 |
|
71 /** |
|
72 * Set automatic update checks as asked (prompted) to an user |
|
73 */ |
|
74 void SetAutomaticUpdatesAskedL(); |
|
75 |
|
76 /** |
|
77 * Time stamp of first check updates form application is stored |
|
78 */ |
|
79 void SetFirstTimeIfNotSetL(); |
|
80 |
|
81 /** |
|
82 * Is Nokia agreement of Application Update accepted by an user |
|
83 * |
|
84 * @return True value if agreement accepted |
|
85 */ |
|
86 TBool AgreementAcceptedL(); |
|
87 |
|
88 /** |
|
89 * Is Nokia agreement of Application Update already asked |
|
90 * |
|
91 * @return True value if agreement already asked |
|
92 */ |
|
93 TBool AgreementAskedL(); |
|
94 |
|
95 /** |
|
96 * Is activation for automatic update cheks from network already asked |
|
97 * |
|
98 * @return True value if agreement already asked |
|
99 */ |
|
100 TBool AutomaticUpdateChecksAskedL(); |
|
101 |
|
102 /** |
|
103 * There is a delay (eg. 2 weeks) after first check updates request from an application |
|
104 * when update check is not performed. This method checks is update check delayed. |
|
105 * |
|
106 * @return True value if agreement accepted |
|
107 */ |
|
108 TBool FirstTimeDelayL(); |
|
109 |
|
110 private: |
|
111 |
|
112 /** |
|
113 * C++ constructor |
|
114 */ |
|
115 CIAUpdateFirstTimeInfo(); |
|
116 |
|
117 /** |
|
118 * Perform the second phase construction of a CIAUpdateFirstTimeInfo object |
|
119 */ |
|
120 void ConstructL(); |
|
121 |
|
122 void ReadDataL(); |
|
123 |
|
124 void WriteDataL(); |
|
125 |
|
126 void InternalizeL( RReadStream& aStream ); |
|
127 |
|
128 void ExternalizeL( RWriteStream& aStream ); |
|
129 |
|
130 private: //data |
|
131 |
|
132 RFs iFsSession; |
|
133 |
|
134 TFileName iPath; |
|
135 |
|
136 TBool iAgreementAccepted; |
|
137 |
|
138 TBool iAgreementAsked; |
|
139 |
|
140 TBool iAutomaticUpdateChecksAsked; |
|
141 |
|
142 }; |
|
143 |
|
144 |
|
145 #endif // __IAUPDATE_FIRSTTIMEINFO_H__ |