2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Interface for quering system version information.
20 #ifndef VERSION_INFO_H
21 #define VERSION_INFO_H
26 // FORWARD DECLARATIONS
31 * Class holds system version information. Version Info API provides
32 * an interface for quering system version information.
36 * Get platform version information:
38 * // iFs contains open file server session
40 * VersionInfo::TPlatformVersion platformVersion;
41 * // Select the overload of VersionInfo::GetVersion() that suits best for
42 * // the current client.
43 * User::LeaveIfError( VersionInfo::GetVersion( platformVersion, iFs ) );
45 * // Now platformVersion contains platform version information.
49 * @lib platformver.lib
53 NONSHARABLE_CLASS(VersionInfo)
58 * Class TVersionBase is a base class for all version information data.
63 friend class VersionInfo;
67 * Constructor for subclasses
69 * @param aType Sets type of version info specified by TVersionType
71 inline TVersionBase( TInt aType );
75 * C++ default constructor.
80 /** Contains type of version info specified by TVersionType */
85 * Class TPlatformVersion stores platform version information.
86 * The class is used as parameter in GetVersionInfo() methods.
89 class TPlatformVersion : public TVersionBase
93 * C++ default constructor.
95 inline TPlatformVersion();
98 /** Contains the major version. For example 3 if S60 3.2 */
99 TUint16 iMajorVersion;
101 /** Contains the minor version. For example 2 if S60 3.2 */
102 TUint16 iMinorVersion;
106 * This method gets the version information.
109 * @param aVersion Stores the version information
110 * @return System wide error code
114 IMPORT_C static TInt GetVersion( TVersionBase& aVersion );
117 * This method gets the version information. Given file server
118 * session avoids the overhead of new file server connection.
121 * @param aVersion Stores the version information
122 * @param aFs An opened file server session
123 * @return System wide error code
127 IMPORT_C static TInt GetVersion( TVersionBase& aVersion, RFs& aFs );
131 * C++ default constructor.
135 /** Used internally to detect type of version info */
142 #include "versioninfo.inl"
144 #endif // VERSION_INFO_H