diff -r 641f389e9157 -r a71299154b21 authenticationservices/authenticationserver/source/common/arrayutils.inl --- a/authenticationservices/authenticationserver/source/common/arrayutils.inl Tue Aug 31 17:00:08 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,66 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Utility functions for copying and streaming RArrays. -* RPointerArray utilities -* -*/ - -template -void ExternalizePointerArrayL(const RPointerArray& aArray, RWriteStream& aStream) - { - aStream.WriteInt32L(aArray.Count()); - for (TInt i = 0; i < aArray.Count(); ++i) - { - TTraits::WriteToStreamL(*aArray[i], aStream); - } - } - -template -void InternalizePointerArrayL(RPointerArray& aArray, RReadStream& aStream) - { - TInt count = aStream.ReadInt32L(); - for (TInt i = 0; i < count; ++i) - { - T* item = TTraits::ReadFromStreamLC(aStream); - User::LeaveIfError(aArray.Append(item)); - CleanupStack::Pop(); - } - } - -///////////////////////////////////////////////////////////////////// -// RArray utilities -///////////////////////////////////////////////////////////////////// -template -void ExternalizeArrayL(const RArray& aArray, RWriteStream& aStream) - { - aStream.WriteInt32L(aArray.Count()); - for (TInt i = 0; i < aArray.Count(); ++i) - { - aStream.WriteL(TPckgC(aArray[i])); - } - } - -template -void InternalizeArrayL(RArray& aArray, RReadStream& aStream) - { - TInt count = aStream.ReadInt32L(); - for (TInt i = 0; i < count; ++i) - { - T item; - TPckg itemPckg(item); - aStream.ReadL(itemPckg); - User::LeaveIfError(aArray.Append(item)); - } - }