mtpfws/mtpfw/datatypes/src/tmtptypeint8.cpp
changeset 0 d0791faffa3f
equal deleted inserted replaced
-1:000000000000 0:d0791faffa3f
       
     1 // Copyright (c) 2006-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  @file
       
    18  @publishedPartner
       
    19 */
       
    20 
       
    21 #include <mtp/mtpdatatypeconstants.h>
       
    22 #include <mtp/tmtptypeint8.h>
       
    23 
       
    24 /**
       
    25 Default constructor.
       
    26 */
       
    27 EXPORT_C TMTPTypeInt8::TMTPTypeInt8() :
       
    28     TMTPTypeIntBase(0, KMTPTypeINT8Size, EMTPTypeINT8)
       
    29     {
       
    30     
       
    31     }
       
    32 
       
    33 /**
       
    34 Conversion constructor.
       
    35 @param aData The initial data value.
       
    36 */
       
    37 EXPORT_C TMTPTypeInt8::TMTPTypeInt8(TInt8 aData) : 
       
    38     TMTPTypeIntBase(aData, KMTPTypeINT8Size, EMTPTypeINT8)
       
    39     {
       
    40     
       
    41     }
       
    42 
       
    43 /**
       
    44 Sets the data type to the specified value.
       
    45 */  
       
    46 EXPORT_C void TMTPTypeInt8::Set(TInt8 aValue)
       
    47 	{
       
    48 	iData = aValue;
       
    49 	}
       
    50     
       
    51 /**
       
    52 Provides data types's value.
       
    53 @return The value of the data type
       
    54 */   
       
    55 EXPORT_C TInt8 TMTPTypeInt8::Value() const
       
    56 	{
       
    57 	return static_cast<TInt8>(iData);
       
    58 	}
       
    59