| 
sl@0
 | 
     1  | 
// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
  | 
| 
sl@0
 | 
     2  | 
// All rights reserved.
  | 
| 
sl@0
 | 
     3  | 
// This component and the accompanying materials are made available
  | 
| 
sl@0
 | 
     4  | 
// under the terms of "Eclipse Public License v1.0"
  | 
| 
sl@0
 | 
     5  | 
// which accompanies this distribution, and is available
  | 
| 
sl@0
 | 
     6  | 
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
  | 
| 
sl@0
 | 
     7  | 
//
  | 
| 
sl@0
 | 
     8  | 
// Initial Contributors:
  | 
| 
sl@0
 | 
     9  | 
// Nokia Corporation - initial contribution.
  | 
| 
sl@0
 | 
    10  | 
//
  | 
| 
sl@0
 | 
    11  | 
// Contributors:
  | 
| 
sl@0
 | 
    12  | 
//
  | 
| 
sl@0
 | 
    13  | 
// Description:
  | 
| 
sl@0
 | 
    14  | 
//
  | 
| 
sl@0
 | 
    15  | 
  | 
| 
sl@0
 | 
    16  | 
// Template class TCapture
  | 
| 
sl@0
 | 
    17  | 
template <class T>
  | 
| 
sl@0
 | 
    18  | 
inline TCapture<T>::TCapture(T& aRef)
  | 
| 
sl@0
 | 
    19  | 
	: iPtr(&aRef)
  | 
| 
sl@0
 | 
    20  | 
	{}
 | 
| 
sl@0
 | 
    21  | 
template <class T>
  | 
| 
sl@0
 | 
    22  | 
inline T& TCapture<T>::Object() const
  | 
| 
sl@0
 | 
    23  | 
	{return *iPtr;}
 | 
| 
sl@0
 | 
    24  | 
  | 
| 
sl@0
 | 
    25  | 
// Class TDesHeader
  | 
| 
sl@0
 | 
    26  | 
inline TDesHeader::TDesHeader(const TDesC8& aDes8)
  | 
| 
sl@0
 | 
    27  | 
	: iVal((aDes8.Length()<<1)+1)
  | 
| 
sl@0
 | 
    28  | 
	{}
 | 
| 
sl@0
 | 
    29  | 
inline TDesHeader::TDesHeader(const TDesC16& aDes16)
  | 
| 
sl@0
 | 
    30  | 
	: iVal((aDes16.Length()<<1))
  | 
| 
sl@0
 | 
    31  | 
	{}
 | 
| 
sl@0
 | 
    32  | 
inline TDesHeader& TDesHeader::operator=(const TDesC8& aDes8)
  | 
| 
sl@0
 | 
    33  | 
	{return *this=TDesHeader(aDes8);}
 | 
| 
sl@0
 | 
    34  | 
inline TDesHeader& TDesHeader::operator=(const TDesC16& aDes16)
  | 
| 
sl@0
 | 
    35  | 
	{return *this=TDesHeader(aDes16);}
 | 
| 
sl@0
 | 
    36  | 
inline TBool TDesHeader::IsWidth8() const
  | 
| 
sl@0
 | 
    37  | 
	{return TInt(iVal)&0x1;}
 | 
| 
sl@0
 | 
    38  | 
inline TBool TDesHeader::IsWidth16() const
  | 
| 
sl@0
 | 
    39  | 
	{return !IsWidth8();}
 | 
| 
sl@0
 | 
    40  | 
inline TInt TDesHeader::Length() const
  | 
| 
sl@0
 | 
    41  | 
	{return TInt(iVal)>>1;}
 | 
| 
sl@0
 | 
    42  | 
inline void TDesHeader::ExternalizeL(RWriteStream& aStream) const
  | 
| 
sl@0
 | 
    43  | 
	{aStream<<iVal;}
 | 
| 
sl@0
 | 
    44  | 
inline void TDesHeader::InternalizeL(RReadStream& aStream)
  | 
| 
sl@0
 | 
    45  | 
	{aStream>>iVal;}
 | 
| 
sl@0
 | 
    46  | 
  | 
| 
sl@0
 | 
    47  | 
// Class TDesInternalizer
  | 
| 
sl@0
 | 
    48  | 
inline const TDesHeader& TDesInternalizer::Header() const
  | 
| 
sl@0
 | 
    49  | 
	{return iHeader;}
 | 
| 
sl@0
 | 
    50  | 
inline TDesHeader& TDesInternalizer::Header()
  | 
| 
sl@0
 | 
    51  | 
	{return iHeader;}
 | 
| 
sl@0
 | 
    52  | 
  | 
| 
sl@0
 | 
    53  | 
// Class TPtrInput
  | 
| 
sl@0
 | 
    54  | 
inline TPtrInput::TPtrInput(TAny* aPtr)
  | 
| 
sl@0
 | 
    55  | 
	: iPtr((TUint8*)aPtr)
  | 
| 
sl@0
 | 
    56  | 
	{}
 | 
| 
sl@0
 | 
    57  | 
  | 
| 
sl@0
 | 
    58  | 
// Class TPtrOutput
  | 
| 
sl@0
 | 
    59  | 
inline TPtrOutput::TPtrOutput(const TAny* aPtr)
  | 
| 
sl@0
 | 
    60  | 
	: iPtr((TUint8*)aPtr)
  | 
| 
sl@0
 | 
    61  | 
	{}
 | 
| 
sl@0
 | 
    62  | 
  | 
| 
sl@0
 | 
    63  | 
// Class HDirectStoreBuf
  | 
| 
sl@0
 | 
    64  | 
inline HDirectStoreBuf::~HDirectStoreBuf()
  | 
| 
sl@0
 | 
    65  | 
	{RShareBuf::DoRelease();}
 | 
| 
sl@0
 | 
    66  | 
inline HDirectStoreBuf::HDirectStoreBuf(TInt anOffset)
  | 
| 
sl@0
 | 
    67  | 
	: iOff(anOffset)
  | 
| 
sl@0
 | 
    68  | 
	{}
 | 
| 
sl@0
 | 
    69  | 
  |