commsfwsupport/commselements/NetMeta/inc/MetaBuffer.h
changeset 0 dfb7c4ff071f
equal deleted inserted replaced
-1:000000000000 0:dfb7c4ff071f
       
     1 // Copyright (c) 2004-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  @internalTechnology
       
    19 */
       
    20 
       
    21 #if (!defined METABUFFER_H)
       
    22 #define METABUFFER_H
       
    23 
       
    24 #include <elements/metatypevariablelen.h>
       
    25 
       
    26 namespace Meta
       
    27 {
       
    28 
       
    29 class TMetaBuf8 : public TMetaVarLen8<RBuf8>
       
    30 /**
       
    31 
       
    32 Implementation of MMetaType for dynamicaly allocated RBuf8
       
    33 
       
    34 @internalComponent
       
    35 @released since v9.0
       
    36 */
       
    37 	{
       
    38 public:
       
    39 	IMPORT_C static MMetaType* NewL(const TAny* aMem, const TAny* aData);
       
    40 
       
    41 	IMPORT_C virtual TInt Load(TPtrC8& aBuffer);
       
    42 	IMPORT_C virtual TInt Store(TDes8& aBuffer) const;
       
    43 	IMPORT_C virtual void Copy(const TAny* aData);
       
    44 	IMPORT_C virtual TInt Length() const;
       
    45 
       
    46 protected:
       
    47 	TMetaBuf8(const TAny* aData);
       
    48 	};
       
    49 
       
    50 class TMetaBuf16 : public TMetaVarLen16<RBuf16>
       
    51 /**
       
    52 
       
    53 Implementation of MMetaType for dynamicaly allocated RBuf16
       
    54 
       
    55 @internalComponent
       
    56 @released since v9.0
       
    57 */
       
    58 	{
       
    59 public:
       
    60 	IMPORT_C static MMetaType* NewL(const TAny* aMem, const TAny* aData);
       
    61 
       
    62 	IMPORT_C virtual TInt Load(TPtrC8& aBuffer);
       
    63 	IMPORT_C virtual TInt Store(TDes8& aBuffer) const;
       
    64 	IMPORT_C virtual void Copy(const TAny* aData);
       
    65 	IMPORT_C virtual TInt Length() const;
       
    66 
       
    67 protected:
       
    68 	TMetaBuf16(const TAny* aData);
       
    69 	};
       
    70 
       
    71 
       
    72 #if defined(_UNICODE)
       
    73 typedef TMetaBuf16 TMetaBuf;
       
    74 #else
       
    75 typedef TMetaBuf8 TMetaBuf;
       
    76 #endif
       
    77 } //namespace Meta
       
    78 
       
    79 
       
    80 #endif //METABUFFER_H
       
    81