|
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 |
|
21 #ifndef IAUPDATEBGCONTROLLER_FILE_H |
|
22 #define IAUPDATEBGCONTROLLER_FILE_H |
|
23 |
|
24 |
|
25 #include <e32std.h> |
|
26 #include <s32strm.h> |
|
27 #include <e32cmn.h> |
|
28 #include <f32file.h> |
|
29 #include <e32const.h> |
|
30 |
|
31 |
|
32 class CIAUpdateBGControllerFile : public CBase |
|
33 { |
|
34 |
|
35 public: |
|
36 |
|
37 static CIAUpdateBGControllerFile* NewL(); |
|
38 |
|
39 static CIAUpdateBGControllerFile* NewLC(); |
|
40 |
|
41 virtual ~CIAUpdateBGControllerFile(); |
|
42 |
|
43 TBool ReadControllerDataL(); |
|
44 |
|
45 void WriteControllerDataL(); |
|
46 |
|
47 const TTime& RefreshTime() const; |
|
48 |
|
49 void SetRefreshTime( const TTime& aTime ); |
|
50 |
|
51 void SetRefreshTime( TInt64 aTime ); |
|
52 |
|
53 void SetCurrentRefreshTime(); |
|
54 |
|
55 TLanguage Language() const; |
|
56 |
|
57 void SetLanguage( TLanguage aLanguage ); |
|
58 |
|
59 |
|
60 protected: |
|
61 |
|
62 CIAUpdateBGControllerFile(); |
|
63 |
|
64 void ConstructL(); |
|
65 |
|
66 void InternalizeL( RReadStream& aStream ); |
|
67 |
|
68 void ExternalizeL( RWriteStream& aStream ); |
|
69 |
|
70 |
|
71 private: |
|
72 |
|
73 // Prevent these if not implemented |
|
74 CIAUpdateBGControllerFile( const CIAUpdateBGControllerFile& aObject ); |
|
75 CIAUpdateBGControllerFile& operator =( const CIAUpdateBGControllerFile& aObject ); |
|
76 |
|
77 |
|
78 private: // data |
|
79 |
|
80 // file server session |
|
81 RFs iFsSession; |
|
82 |
|
83 // controller data file path |
|
84 TFileName iPath; |
|
85 |
|
86 // Time when the content was refreshed. |
|
87 TTime iRefreshTime; |
|
88 |
|
89 // The language that has been used. |
|
90 TLanguage iLanguage; |
|
91 }; |
|
92 |
|
93 #endif // IAUPDATEBGCONTROLLER_FILE_H |