camerauis/cameraxui/cxengine/tsrc/fakeclasses/cxefakeimagedataitem.cpp
changeset 19 d9aefe59d544
child 37 64817133cd1d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/camerauis/cameraxui/cxengine/tsrc/fakeclasses/cxefakeimagedataitem.cpp	Fri Apr 16 14:51:30 2010 +0300
@@ -0,0 +1,67 @@
+/*
+* 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 <QByteArray>
+#include <QString>
+
+#include "cxefakeimagedataitem.h"
+#include "cxeimagedataitem.h"
+#include "cxutils.h"
+
+CxeFakeImageDataItem::CxeFakeImageDataItem(int index, QByteArray data, QString filename, int id)
+    : mId(id),
+      mIndex(index),
+      mData(data),
+      mFileName(filename),
+      mState(CxeImageDataItem::SavePending)
+{
+    CX_DEBUG_IN_FUNCTION();
+}
+
+CxeFakeImageDataItem::~CxeFakeImageDataItem()
+{
+    CX_DEBUG_IN_FUNCTION();
+}
+
+CxeError::Id CxeFakeImageDataItem::save()
+{
+    CX_DEBUG_ENTER_FUNCTION();
+    mState = CxeImageDataItem::Saved;
+    emit imageSaved(CxeError::None, mFileName, mId);
+    CX_DEBUG_EXIT_FUNCTION();
+    return CxeError::None;
+}
+
+
+CxeImageDataItem::State CxeFakeImageDataItem::state() const
+{
+    CX_DEBUG_ENTER_FUNCTION();
+    CX_DEBUG_EXIT_FUNCTION();
+    return mState;
+}
+
+int CxeFakeImageDataItem::id() const
+{
+    return mId;
+}
+
+QString CxeFakeImageDataItem::path() const
+{
+    return mFileName;
+}
+
+// end of file