camerauis/cameraxui/cxengine/inc/cxefilesavethread.h
changeset 19 d9aefe59d544
child 37 64817133cd1d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/camerauis/cameraxui/cxengine/inc/cxefilesavethread.h	Fri Apr 16 14:51:30 2010 +0300
@@ -0,0 +1,61 @@
+/*
+* 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:
+*
+*/
+#ifndef  CXEFILESAVETHREAD_H_
+#define  CXEFILESAVETHREAD_H_
+
+#include <QThread>
+#include "cxeerror.h"
+
+class CxeImageDataItem;
+
+/*!
+* Base class for file save thread.
+*/
+class CxeFileSaveThread : public QThread
+{
+    Q_OBJECT
+public:
+    virtual ~CxeFileSaveThread();
+
+    /**
+     * Save is called by Camera UI thread.
+     * Method takes ownership of data.
+     */
+    virtual void save(CxeImageDataItem *data) = 0;
+
+public slots:
+
+    virtual void handleVideoSaved(CxeError::Id status, const QString& filename) = 0;
+    virtual void handleSnapshotReady(CxeError::Id status, const QPixmap& snapshot, const QString& filename) = 0;
+    virtual void handleSnapshotReady(CxeError::Id status, const QPixmap& snapshot, int id) = 0;
+
+protected:
+
+    CxeFileSaveThread(QObject *parent = 0);
+};
+
+/*!
+* Factory for creating file save thread.
+*/
+class CxeFileSaveThreadFactory
+{
+public:
+
+    static CxeFileSaveThread *createFileSaveThread(QObject *parent = 0);
+};
+
+#endif  // CXEFILESAVETHREAD_H_