epoc32/include/swi/AppVersion.h
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
     1 /*
       
     2 * Copyright (c) 2002-2007 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 the License "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: Java Registy API header file
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef TAPPVERSION_H
       
    19 #define TAPPVERSION_H
       
    20 
       
    21 /**
       
    22  * This class is used to represent the version of a Java application.
       
    23  * The standard TVersion provided in Symbian OS can't be used because it 
       
    24  * doesn't allow for major and minor version numbers above 127. 
       
    25  */
       
    26 class TAppVersion
       
    27     {
       
    28     public:
       
    29 
       
    30         /**
       
    31          * This constructor creates a 0.0.0 version.
       
    32          */
       
    33         inline TAppVersion();
       
    34 
       
    35         /**
       
    36          * This is the copy constructor.
       
    37          * @param aAppVersion is the app version that will be copied
       
    38          */	
       
    39         inline TAppVersion(const TAppVersion& aAppVersion);
       
    40 
       
    41         /**
       
    42          * This constructor creates a version according to the arguments.
       
    43          * @param aMajor is the major version number 
       
    44          * @param aMinor is the minor version number
       
    45          * @param aBuild is the micro version number
       
    46          */
       
    47         inline TAppVersion(TInt aMajor, TInt aMinor, TInt aBuild);
       
    48 
       
    49         /**
       
    50          * Assignment operator.
       
    51          * @param aAppVersion is the app version to be assigned to the object
       
    52          */
       
    53         inline TAppVersion& operator =(const TAppVersion& aAppVersion);
       
    54 
       
    55         /**
       
    56          * Equality operator.
       
    57          * @param aAppVersion is the app version to be compared with 
       
    58          * the object's app version
       
    59          * @return ETrue if the app versions are the same, EFalse otherwise
       
    60          */
       
    61         inline TBool operator ==(const TAppVersion& aAppVersion) const;
       
    62 	
       
    63         /**
       
    64          * Inequality operator.
       
    65          * @param aAppVersion is the app version to be compared with 
       
    66          * the object's app version
       
    67          * @return ETrue if the app versions are not the same, EFalse otherwise
       
    68          */
       
    69         inline TBool operator !=(const TAppVersion& aAppVersion) const;
       
    70 
       
    71         /**
       
    72          * Less than operator.
       
    73          * @param aAppVersion is the app version to be compared with 
       
    74          * the object's app version
       
    75          * @return ETrue if the app version to the left of the operator is less
       
    76          * than the version to the right, EFalse otherwise
       
    77          */
       
    78         inline TBool operator <(const TAppVersion& aAppVersion) const;
       
    79 
       
    80         /**
       
    81          * Greater than operator.
       
    82          * @param aAppVersion is the app version to be compared with 
       
    83          * the object's app version
       
    84          * @return ETrue if the app version to the left of the operator is 
       
    85          * greater than the version to the right, EFalse otherwise
       
    86          */
       
    87         inline TBool operator >(const TAppVersion& aAppVersion) const;
       
    88 
       
    89         /**
       
    90          * Less or equal operator.
       
    91          * @param aAppVersion is the app version to be compared with 
       
    92          * the object's app version
       
    93          * @return ETrue if the app version to the left of the operator is 
       
    94          * less than or equal to the version to the right, EFalse otherwise
       
    95          */
       
    96         inline TBool operator <=(const TAppVersion& aAppVersion) const;
       
    97 
       
    98         /**
       
    99          * Greater or equal operator.
       
   100          * @param aAppVersion is the app version to be compared with 
       
   101          * the object's app version
       
   102          * @return ETrue if the app version to the left of the operator is 
       
   103          * greater than or equal to the version to the right, EFalse otherwise
       
   104          */
       
   105          inline TBool operator >=(const TAppVersion& aAppVersion) const;
       
   106 
       
   107     public:
       
   108         TInt iMajor;
       
   109         TInt iMinor;
       
   110         TInt iBuild;
       
   111     };
       
   112 
       
   113 #include <swi/appversion.inl>
       
   114 
       
   115 #endif // TAPPVERSION_H
       
   116 
       
   117 // End of File