mtpfws/mtpfw/datatypes/interface/cmtptypetrivialdata.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 #ifndef CMTPTYPETRIVIALDATA_H_
       
    22 #define CMTPTYPETRIVIALDATA_H_
       
    23 
       
    24 #include <e32base.h>
       
    25 #include <mtp/mmtptype.h>
       
    26 
       
    27 class CMTPTypeTrivialData : public CBase, public MMTPType
       
    28     {
       
    29 public:
       
    30     IMPORT_C static CMTPTypeTrivialData* NewL();
       
    31     IMPORT_C static CMTPTypeTrivialData* NewLC();
       
    32     IMPORT_C ~CMTPTypeTrivialData();
       
    33     
       
    34 public: //MMTPType
       
    35     IMPORT_C virtual TInt FirstReadChunk(TPtrC8& aChunk) const;
       
    36     IMPORT_C virtual TInt NextReadChunk(TPtrC8& aChunk) const;
       
    37     IMPORT_C virtual TInt FirstWriteChunk(TPtr8& aChunk);
       
    38     IMPORT_C virtual TInt NextWriteChunk(TPtr8& aChunk);
       
    39     IMPORT_C virtual TInt FirstWriteChunk(TPtr8& aChunk, TUint aDataLength);
       
    40     IMPORT_C virtual TInt NextWriteChunk(TPtr8& aChunk, TUint aDataLength);
       
    41     
       
    42     IMPORT_C virtual TUint64 Size() const;
       
    43     IMPORT_C virtual TUint Type() const;
       
    44     
       
    45 private:
       
    46     void ConstructL();
       
    47     CMTPTypeTrivialData();
       
    48     
       
    49 private:
       
    50     RBuf8    iBuffer;
       
    51     };
       
    52 
       
    53 
       
    54 #endif /* CMTPTYPETRIVIALDATA_H_ */