camerauis/cameraxui/cxui/tsrc/cxuifakestillcapturecontrol.h
changeset 19 d9aefe59d544
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 CXUIFAKESTILLCAPTURECONTROL_H
       
    18 #define CXUIFAKESTILLCAPTURECONTROL_H
       
    19 
       
    20 #include <QList>
       
    21 #include <ecam/camerasnapshot.h>
       
    22 
       
    23 #include "cxestillcapturecontrol.h"
       
    24 #include "cxestillcapturecontrolsymbian.h"
       
    25 #include "cxenamespace.h"
       
    26 
       
    27 class CxeSoundPlayerSymbian;
       
    28 class CxeFilenameGenerator;
       
    29 class CxeCameraDevice;
       
    30 class CxeStillImageSymbian;
       
    31 class CxeImageDataQueue;
       
    32 class CxeImageDataQueueSymbian;
       
    33 class CxeViewfinderControl;
       
    34 class CxeCameraDeviceControl;
       
    35 
       
    36 class CxuiFakeStillCaptureControl : public CxeStillCaptureControlSymbian
       
    37 
       
    38 {
       
    39     Q_OBJECT
       
    40 
       
    41 public:  // constructors
       
    42     CxuiFakeStillCaptureControl(
       
    43         CxeCameraDevice &cameraDevice,
       
    44         CxeViewfinderControl &viewfinderControl,
       
    45         CxeCameraDeviceControl &cameraDeviceControl,
       
    46         CxeSoundPlayerSymbian &soundPlayer,
       
    47         CxeFilenameGenerator &nameGenerator);
       
    48 
       
    49     virtual ~CxuiFakeStillCaptureControl();
       
    50 
       
    51 public:  // from CxeStillCaptureControl
       
    52     int prepare();
       
    53     void capture();
       
    54 
       
    55 public:  // public member functions, not in client API
       
    56     //void handleSnapshotEvent();
       
    57     void setFakeState(CxeStillCaptureControl::State aState);
       
    58 
       
    59 signals:
       
    60     void imagePrepareComplete(int error);
       
    61 
       
    62 signals:
       
    63     void capturedCalled();
       
    64 
       
    65 public slots:
       
    66     //! Notification for when camera device is ready and we're entering still image mode
       
    67     void init();
       
    68 
       
    69     //! Notification for when we're exiting still image mode
       
    70     void deinit();
       
    71 
       
    72 protected slots:
       
    73     // notifications when camera reference is changed
       
    74     void prepareForCameraDelete();
       
    75     void handleCameraAllocated(CxeError::Id error);
       
    76 
       
    77     // notification for when camera is released
       
    78     void prepareForRelease();
       
    79 
       
    80     // settings call back
       
    81     void handleSceneChanged(CxeScene* scene);
       
    82 
       
    83 private:
       
    84     CCamera::CCameraSnapshot *iCameraSnapshot; // own
       
    85     CxeImageDataQueueSymbian *mImageDataQueue;  // own
       
    86 
       
    87     CxeCameraDevice &mCameraDevice;
       
    88     CxeViewfinderControl &mViewfinderControl;
       
    89     CxeCameraDeviceControlSymbian &mCameraDeviceControl;
       
    90 
       
    91 
       
    92     CxeSoundPlayerSymbian &mSoundPlayer;
       
    93     CxeFilenameGenerator &mFilenameGenerator;
       
    94 
       
    95     CaptureMode mMode;
       
    96     QList<CxeStillImageSymbian*> mImages;
       
    97     int mNextSnapshotIndex;
       
    98     int mNextImageDataIndex;
       
    99 };
       
   100 
       
   101 #endif // CXESTILLCAPTURECONTROLSYMBIAN_H