camerauis/cameraxui/cxengine/inc/cxefilesavethread.h
changeset 19 d9aefe59d544
child 37 64817133cd1d
equal deleted inserted replaced
3:8b2d6d0384b0 19:d9aefe59d544
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 #ifndef  CXEFILESAVETHREAD_H_
       
    18 #define  CXEFILESAVETHREAD_H_
       
    19 
       
    20 #include <QThread>
       
    21 #include "cxeerror.h"
       
    22 
       
    23 class CxeImageDataItem;
       
    24 
       
    25 /*!
       
    26 * Base class for file save thread.
       
    27 */
       
    28 class CxeFileSaveThread : public QThread
       
    29 {
       
    30     Q_OBJECT
       
    31 public:
       
    32     virtual ~CxeFileSaveThread();
       
    33 
       
    34     /**
       
    35      * Save is called by Camera UI thread.
       
    36      * Method takes ownership of data.
       
    37      */
       
    38     virtual void save(CxeImageDataItem *data) = 0;
       
    39 
       
    40 public slots:
       
    41 
       
    42     virtual void handleVideoSaved(CxeError::Id status, const QString& filename) = 0;
       
    43     virtual void handleSnapshotReady(CxeError::Id status, const QPixmap& snapshot, const QString& filename) = 0;
       
    44     virtual void handleSnapshotReady(CxeError::Id status, const QPixmap& snapshot, int id) = 0;
       
    45 
       
    46 protected:
       
    47 
       
    48     CxeFileSaveThread(QObject *parent = 0);
       
    49 };
       
    50 
       
    51 /*!
       
    52 * Factory for creating file save thread.
       
    53 */
       
    54 class CxeFileSaveThreadFactory
       
    55 {
       
    56 public:
       
    57 
       
    58     static CxeFileSaveThread *createFileSaveThread(QObject *parent = 0);
       
    59 };
       
    60 
       
    61 #endif  // CXEFILESAVETHREAD_H_