omxil_generic/omxilcomplib/src/omxilspecversion.cpp
changeset 0 0e4a32b9112d
equal deleted inserted replaced
-1:000000000000 0:0e4a32b9112d
       
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 
       
    17 /**
       
    18  @file
       
    19  @internalComponent
       
    20 */
       
    21 
       
    22 #include <openmax/il/common/omxilspecversion.h>
       
    23 
       
    24 const TUint8 TOmxILSpecVersion::KSpecVersionMajor;
       
    25 const TUint8 TOmxILSpecVersion::KSpecVersionMinor;
       
    26 const TUint8 TOmxILSpecVersion::KSpecVersionRevision;
       
    27 const TUint8 TOmxILSpecVersion::KSpecVersionStep;
       
    28 
       
    29 EXPORT_C
       
    30 TOmxILVersion::TOmxILVersion(TUint8	aMajor,
       
    31 							 TUint8	aMinor,
       
    32 							 TUint8	aRev,
       
    33 							 TUint8	aStep)
       
    34 	{
       
    35 	iSpecVersion.s.nVersionMajor = aMajor;
       
    36 	iSpecVersion.s.nVersionMinor = aMinor;
       
    37 	iSpecVersion.s.nRevision	 = aRev;
       
    38 	iSpecVersion.s.nStep		 = aStep;
       
    39 	}
       
    40 
       
    41 EXPORT_C
       
    42 TOmxILVersion::operator OMX_VERSIONTYPE&()
       
    43 	{
       
    44 	return iSpecVersion;
       
    45 	}
       
    46 
       
    47 #ifdef _OMXIL_COMMON_SPEC_VERSION_CHECKS_ON
       
    48 TBool
       
    49 TOmxILVersion::operator!=(
       
    50 	const OMX_VERSIONTYPE& aVer) const
       
    51 	{
       
    52 	return !operator==(aVer);
       
    53 	}
       
    54 
       
    55 TBool
       
    56 TOmxILVersion::operator==(
       
    57 	const OMX_VERSIONTYPE& aVer) const
       
    58 	{
       
    59 	if (iSpecVersion.s.nVersionMajor == aVer.s.nVersionMajor		&&
       
    60 		iSpecVersion.s.nVersionMinor == aVer.s.nVersionMinor		&&
       
    61 		iSpecVersion.s.nRevision	 == aVer.s.nRevision			&&
       
    62 		iSpecVersion.s.nStep		 == aVer.s.nStep)
       
    63 		{
       
    64 		return ETrue;
       
    65 		}
       
    66 	return EFalse;
       
    67 	}
       
    68 #endif	
       
    69 
       
    70 EXPORT_C
       
    71 TOmxILSpecVersion::TOmxILSpecVersion()
       
    72 	:
       
    73 	TOmxILVersion(KSpecVersionMajor,
       
    74 				  KSpecVersionMinor,
       
    75 				  KSpecVersionRevision,
       
    76 				  KSpecVersionStep)
       
    77 	{
       
    78 	}
       
    79 
       
    80 
       
    81