1 /* |
|
2 * Copyright (c) 2008-2009 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: Handles version fetching |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef SCONVERSIONINFO_H_ |
|
20 #define SCONVERSIONINFO_H_ |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <sysversioninfo.h> |
|
24 #include <versioninfo.h> |
|
25 #include <etelmm.h> |
|
26 #include <sysutil.h> |
|
27 |
|
28 const TInt KSconSWVersionSize = 50; |
|
29 const TInt KSconDateSize = 16; |
|
30 const TInt KMaxLangSize = 5; |
|
31 |
|
32 NONSHARABLE_CLASS( CSconVersionInfo ) : public CBase |
|
33 { |
|
34 public: |
|
35 CSconVersionInfo(); |
|
36 ~CSconVersionInfo(); |
|
37 |
|
38 static CSconVersionInfo* NewL(); |
|
39 |
|
40 /** |
|
41 * |
|
42 * @param aFs RFs session |
|
43 * @return none. |
|
44 */ |
|
45 void FetchInfoL( RFs& aFs ); |
|
46 |
|
47 /** |
|
48 * Is all data ready. |
|
49 * @return ETrue if FetchInfoL has been called succesfully. |
|
50 */ |
|
51 TBool IsReady(); |
|
52 |
|
53 /** |
|
54 * Get symbian version. FetchInfoL must be called first |
|
55 * @param aSymbianVersion symbian version |
|
56 * @return error code. |
|
57 */ |
|
58 TInt GetSymbianVersion( SysVersionInfo::TSymbianOSVersion& aSymbianVersion ); |
|
59 |
|
60 /** |
|
61 * Get S60 platform version. FetchInfoL must be called first |
|
62 * @param aS60Version S60 platform version |
|
63 * @return error code. |
|
64 */ |
|
65 TInt GetS60Version( VersionInfo::TPlatformVersion& aS60Version ); |
|
66 |
|
67 public: // data |
|
68 |
|
69 /** Contains the manufacturer name. For example "Nokia". */ |
|
70 HBufC* iManufacturer; |
|
71 |
|
72 /** Contains the phone model sales name. For example "N01". */ |
|
73 HBufC* iModel; |
|
74 |
|
75 /** Contains the product code name. For example "RM-1". */ |
|
76 HBufC* iProduct; |
|
77 |
|
78 /** Contains the product revision. For example "01". */ |
|
79 HBufC* iRevision; |
|
80 |
|
81 TBuf< KSconDateSize > iDate; |
|
82 |
|
83 HBufC* iSWVersion; |
|
84 |
|
85 /** Phone serial number (IMEI or ESN), in character string format. */ |
|
86 HBufC* iSerialNumber; |
|
87 |
|
88 TBuf<KMaxLangSize> iLanguage; |
|
89 |
|
90 HBufC* iSysVersionInfo; |
|
91 |
|
92 HBufC* iLangVersion; |
|
93 |
|
94 HBufC* iLangSWVersion; |
|
95 |
|
96 HBufC* iOPVersion; |
|
97 |
|
98 TSize iScreenSize; |
|
99 |
|
100 HBufC* iProductCode; |
|
101 |
|
102 TInt iDesktopSyncError; |
|
103 TInt iDesktopSync; |
|
104 |
|
105 private: |
|
106 TBool iInfoFetched; // ETrue if FetchInfoL has been called succesfully. |
|
107 |
|
108 TInt iSymbianVersionError; |
|
109 SysVersionInfo::TSymbianOSVersion iSymbianVersion; |
|
110 |
|
111 TInt iS60VersionError; |
|
112 VersionInfo::TPlatformVersion iS60Version; |
|
113 |
|
114 }; |
|
115 |
|
116 #endif /*SCONVERSIONINFO_H_*/ |
|