williamr@2: /* williamr@2: * Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies). williamr@2: * All rights reserved. williamr@2: * This component and the accompanying materials are made available williamr@2: * under the terms of the License "Eclipse Public License v1.0" williamr@2: * which accompanies this distribution, and is available williamr@2: * at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@2: * williamr@2: * Initial Contributors: williamr@2: * Nokia Corporation - initial contribution. williamr@2: * williamr@2: * Contributors: williamr@2: * williamr@2: * Description: Java Registy API header file williamr@2: * williamr@2: */ williamr@2: williamr@2: #ifndef TAPPVERSION_H williamr@2: #define TAPPVERSION_H williamr@2: williamr@2: /** williamr@2: * This class is used to represent the version of a Java application. williamr@2: * The standard TVersion provided in Symbian OS can't be used because it williamr@2: * doesn't allow for major and minor version numbers above 127. williamr@2: */ williamr@2: class TAppVersion williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: * This constructor creates a 0.0.0 version. williamr@2: */ williamr@2: inline TAppVersion(); williamr@2: williamr@2: /** williamr@2: * This is the copy constructor. williamr@2: * @param aAppVersion is the app version that will be copied williamr@2: */ williamr@2: inline TAppVersion(const TAppVersion& aAppVersion); williamr@2: williamr@2: /** williamr@2: * This constructor creates a version according to the arguments. williamr@2: * @param aMajor is the major version number williamr@2: * @param aMinor is the minor version number williamr@2: * @param aBuild is the micro version number williamr@2: */ williamr@2: inline TAppVersion(TInt aMajor, TInt aMinor, TInt aBuild); williamr@2: williamr@2: /** williamr@2: * Assignment operator. williamr@2: * @param aAppVersion is the app version to be assigned to the object williamr@2: */ williamr@2: inline TAppVersion& operator =(const TAppVersion& aAppVersion); williamr@2: williamr@2: /** williamr@2: * Equality operator. williamr@2: * @param aAppVersion is the app version to be compared with williamr@2: * the object's app version williamr@2: * @return ETrue if the app versions are the same, EFalse otherwise williamr@2: */ williamr@2: inline TBool operator ==(const TAppVersion& aAppVersion) const; williamr@2: williamr@2: /** williamr@2: * Inequality operator. williamr@2: * @param aAppVersion is the app version to be compared with williamr@2: * the object's app version williamr@2: * @return ETrue if the app versions are not the same, EFalse otherwise williamr@2: */ williamr@2: inline TBool operator !=(const TAppVersion& aAppVersion) const; williamr@2: williamr@2: /** williamr@2: * Less than operator. williamr@2: * @param aAppVersion is the app version to be compared with williamr@2: * the object's app version williamr@2: * @return ETrue if the app version to the left of the operator is less williamr@2: * than the version to the right, EFalse otherwise williamr@2: */ williamr@2: inline TBool operator <(const TAppVersion& aAppVersion) const; williamr@2: williamr@2: /** williamr@2: * Greater than operator. williamr@2: * @param aAppVersion is the app version to be compared with williamr@2: * the object's app version williamr@2: * @return ETrue if the app version to the left of the operator is williamr@2: * greater than the version to the right, EFalse otherwise williamr@2: */ williamr@2: inline TBool operator >(const TAppVersion& aAppVersion) const; williamr@2: williamr@2: /** williamr@2: * Less or equal operator. williamr@2: * @param aAppVersion is the app version to be compared with williamr@2: * the object's app version williamr@2: * @return ETrue if the app version to the left of the operator is williamr@2: * less than or equal to the version to the right, EFalse otherwise williamr@2: */ williamr@2: inline TBool operator <=(const TAppVersion& aAppVersion) const; williamr@2: williamr@2: /** williamr@2: * Greater or equal operator. williamr@2: * @param aAppVersion is the app version to be compared with williamr@2: * the object's app version williamr@2: * @return ETrue if the app version to the left of the operator is williamr@2: * greater than or equal to the version to the right, EFalse otherwise williamr@2: */ williamr@2: inline TBool operator >=(const TAppVersion& aAppVersion) const; williamr@2: williamr@2: public: williamr@2: TInt iMajor; williamr@2: TInt iMinor; williamr@2: TInt iBuild; williamr@2: }; williamr@2: williamr@2: #include williamr@2: williamr@2: #endif // TAPPVERSION_H williamr@2: williamr@2: // End of File