mtpfws/mtpfw/datatypes/interface/tmtptypeuintbase.h
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  @released
       
    20 */
       
    21 
       
    22 #ifndef TMTPTYPEUINTBASE_H
       
    23 #define TMTPTYPEUINTBASE_H
       
    24 
       
    25 #include <e32std.h>
       
    26 #include <mtp/mmtptype.h>
       
    27 
       
    28 /**
       
    29 Defines the MTP unsigned integer data type base class for 8 to 32-bit integers.
       
    30 This class is intended for derivation.
       
    31 @publishedPartner
       
    32 @released
       
    33 */
       
    34 class TMTPTypeUintBase : public MMTPType
       
    35     {
       
    36 public: // From MMTPType
       
    37 
       
    38     IMPORT_C TInt FirstReadChunk(TPtrC8& aChunk) const;
       
    39     IMPORT_C TInt NextReadChunk(TPtrC8& aChunk) const;
       
    40     IMPORT_C TInt FirstWriteChunk(TPtr8& aChunk);
       
    41     IMPORT_C TInt NextWriteChunk(TPtr8& aChunk);
       
    42     IMPORT_C TUint64 Size() const;
       
    43     IMPORT_C TUint Type() const;
       
    44     
       
    45 protected:
       
    46 
       
    47 	IMPORT_C TMTPTypeUintBase(TUint aData, TUint aSize, TInt aType);
       
    48 	
       
    49 protected:
       
    50 
       
    51     /**
       
    52     The data buffer.
       
    53     */
       
    54 	TUint   iData;
       
    55 	
       
    56 private:
       
    57 
       
    58 	/**
       
    59 	The type's size in bytes.
       
    60 	*/
       
    61 	TUint64 iSize;
       
    62 	
       
    63 	/**
       
    64 	The type's MTP datatype code.
       
    65 	*/
       
    66 	TUint   iType;
       
    67     };
       
    68 
       
    69 #endif // TMTPTYPEUINTBASE_H