diff -r b73a2e62868f -r 6dfc5f825351 harvester/client/src/clientharvestitem.cpp --- a/harvester/client/src/clientharvestitem.cpp Tue Feb 02 00:24:33 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,99 +0,0 @@ -/* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "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: Client harvest item implementation -* -*/ - - -#include "clientharvestitem.h" -#include "harvesterlog.h" - -// --------------------------------------------------------------------------- -// Constructor -// --------------------------------------------------------------------------- -// -RClientHarvestItem::RClientHarvestItem() - { - WRITELOG( "RClientHarvestItem::RClientHarvestItem()" ); - iUri = NULL; - } - -// --------------------------------------------------------------------------- -// Copy constructor -// --------------------------------------------------------------------------- -// -RClientHarvestItem::RClientHarvestItem( const RClientHarvestItem& aItem ) - { - iUri = aItem.iUri; - iTimeStamp = aItem.iTimeStamp; - const TInt count = aItem.iAlbumIds.Count(); - iAlbumIds.Reserve( count ); - for ( TInt i = 0; i < count; i++ ) - { - iAlbumIds.Append( aItem.iAlbumIds[i] ); - } - } - -// --------------------------------------------------------------------------- -// InitL -// --------------------------------------------------------------------------- -// -void RClientHarvestItem::InitL( const TDesC& aUri, RArray& aAlbumIds ) - { - if ( aUri.Length() <= 0 || aUri.Length() > KMaxFileName ) - { - User::Leave( KErrArgument ); - } - - this->Reset(); - - iTimeStamp.UniversalTime(); - iUri = aUri.AllocL(); - const TInt count = aAlbumIds.Count(); - - iAlbumIds.Reserve( count ); - for ( TInt i = 0; i < count; i++ ) - { - iAlbumIds.Append( aAlbumIds[i] ); - } - } - -// --------------------------------------------------------------------------- -// Reset -// --------------------------------------------------------------------------- -// -void RClientHarvestItem::Reset() - { - if ( iUri ) - { - delete iUri; - iUri = NULL; - } - - iAlbumIds.Reset(); - } - -// --------------------------------------------------------------------------- -// Close -// --------------------------------------------------------------------------- -// -void RClientHarvestItem::Close() - { - Reset(); - iAlbumIds.Close(); - } - - - -