diff -r f54ad444594d -r 61bc0f252b2b camerauis/cameraxui/cxengine/src/cxeimagedataqueuesymbian.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/camerauis/cameraxui/cxengine/src/cxeimagedataqueuesymbian.cpp Tue Aug 31 15:03:46 2010 +0300 @@ -0,0 +1,93 @@ +/* +* Copyright (c) 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: +* +*/ +#include +#include + +#include "cxeimagedataqueuesymbian.h" +#include "cxutils.h" + + +CxeImageDataQueueSymbian::CxeImageDataQueueSymbian() +{ + CX_DEBUG_IN_FUNCTION(); +} + +CxeImageDataQueueSymbian::~CxeImageDataQueueSymbian() +{ + CX_DEBUG_ENTER_FUNCTION(); + + // This will delete all remaining items! + // qDeleteAll( mList ); // not owned. Ownership is with filesavethread + mList.clear(); + + CX_DEBUG_EXIT_FUNCTION(); +} + +int CxeImageDataQueueSymbian::size() const +{ + return mList.size(); +} + +void CxeImageDataQueueSymbian::clear() +{ + CX_DEBUG_ENTER_FUNCTION(); + + // This will delete all remaining items! + // qDeleteAll( mList ); + mList.clear(); + + CX_DEBUG_EXIT_FUNCTION(); +} + +/* +void CxeImageDataQueueSymbian::deleteImage( int index ) + { + CX_DEBUG_ENTER_FUNCTION(); + + mList[index]->deleteImage(); + + CX_DEBUG_EXIT_FUNCTION(); + } + +void CxeImageDataQueueSymbian::renameImage( int index, const QString& path ) + { + CX_DEBUG_ENTER_FUNCTION(); + + TPtrC16 newPath (reinterpret_cast(path.utf16())); + mList[index]->renameImage( newPath ); + + CX_DEBUG_EXIT_FUNCTION(); + } +*/ + +CxeImageDataItem &CxeImageDataQueueSymbian::operator[]( int index ) +{ + CX_DEBUG_ASSERT( index >= 0 && index < mList.count() ); + return *mList[index]; +} + +CxeImageDataItemSymbian *CxeImageDataQueueSymbian::startSave(QByteArray data, QString path, int id, bool addLocation) +{ + CX_DEBUG_ENTER_FUNCTION(); + + CxeImageDataItemSymbian* dataItem = new CxeImageDataItemSymbian(data, path, id, addLocation); + mList.append(dataItem); + + CX_DEBUG_EXIT_FUNCTION(); + return dataItem; +} +