camerauis/cameraapp/generic/inc/CameraappDummyEngine.h
branchRCL_3
changeset 24 bac7acad7cb3
parent 0 1ddebce53859
equal deleted inserted replaced
23:61bc0f252b2b 24:bac7acad7cb3
       
     1 /*
       
     2 * Copyright (c) 2007 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:  Dummy Camera Application Engine*
       
    15 */
       
    16 
       
    17 
       
    18 
       
    19 #ifndef CAMERAAPPDUMMYENGINE_H
       
    20 #define CAMERAAPPDUMMYENGINE_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <CaeEngine.h>
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 class CCameraappDummyCallbackActive;
       
    27 
       
    28 // CLASS DECLARATION  
       
    29     
       
    30 /**
       
    31 * Dummy Camera Application Engine interface 
       
    32 *
       
    33 */
       
    34 class CCameraappDummyEngine : public CCaeEngine
       
    35     {
       
    36     public: // Creation
       
    37 
       
    38         /**
       
    39         * A static (factory) function to create the class instance.
       
    40         * @since 2.1
       
    41         * @return Pointer to a fully constructed CCaeEngine object. 
       
    42         * Ownership is passed to the caller.
       
    43         */
       
    44         static CCaeEngine* NewL();
       
    45     };
       
    46 
       
    47 
       
    48 class CCameraappDummyEngineImp : public CCameraappDummyEngine
       
    49     {
       
    50     public: // Creation
       
    51         static CCameraappDummyEngineImp* NewL();
       
    52 
       
    53         /**
       
    54         * Sets the Camera Application Engine observer.
       
    55         * @since 2.1
       
    56         * @param aObserver Reference to Camera Application Engine observer.
       
    57         * @return void
       
    58         */
       
    59         void SetCamAppEngineObserver( 
       
    60             MCamAppEngineObserver& aObserver );
       
    61 
       
    62         ~CCameraappDummyEngineImp();
       
    63 
       
    64     public: // General methods
       
    65 
       
    66         /**
       
    67         * Gets information about the supported Camera Application Engine and 
       
    68         * Camera features.
       
    69         * @since 2.1
       
    70         * @param aInfo Info about supported features.
       
    71         * @return void
       
    72         */
       
    73         void GetInfo( TCamAppEngineInfo& /*aInfo*/ ) const;
       
    74 
       
    75         /**
       
    76         * Initializes Camera Application Engine for still image capturing. 
       
    77         * Reserves the camera and switches the camera power on. 
       
    78         * Intialization must be done before all other operations, except 
       
    79         * SetCamAppEngineObserver and GetInfo. 
       
    80         * Calls observer method McaeoInitComplete().
       
    81         * @since 2.1
       
    82         * @param aCreateSnapImage Boolean indicating if "snap-images" 
       
    83         * should be created, leading to calls of McaeoSnapImageReady.
       
    84         * @return void
       
    85         */
       
    86         void InitL( TBool aCreateSnapImage = ETrue );
       
    87 
       
    88         /**
       
    89         * Initialize the engine for still image capturing. 
       
    90         * Switches also camera power on. 
       
    91         * Intialization must be done before all other operations, except 
       
    92         * SetCamAppEngineObserver and GetInfo. 
       
    93         * Calls observer method McaeoInitComplete().
       
    94         * @since 2.1
       
    95         * @param aSdUidStillQltyLevels Still capturing quality levels Shared Data initialization file UID.
       
    96         * @param aCreateSnapImage Boolean indicating if "snap-images" should be created 
       
    97         * leading to calls of McaeoSnapImageReady.
       
    98         * @return void
       
    99         */
       
   100         void InitL( TUid /*aSdUidStillQltyLevels*/, 
       
   101                             TBool /*aCreateSnapImage = ETrue*/ ){};
       
   102 
       
   103         /**
       
   104         * Initializes video recording. 
       
   105         * The initialization must be done before video recording operations.
       
   106         * @since 2.1
       
   107         * @return void
       
   108         */
       
   109         void InitVideoRecorderL(){};
       
   110 
       
   111         /**
       
   112         * Initializes video recording. 
       
   113         * The initialization must be done before video recording operations.
       
   114         * @since 2.1
       
   115         * @param aSdUidVideoQltyLevels Video recording quality levels Shared Data initialization file UID.
       
   116         * @return void
       
   117         */
       
   118         void InitVideoRecorderL( TUid /*aSdUidVideoQltyLevels*/ ){};
       
   119 
       
   120         /**
       
   121         * Reserves the camera into use and switches the camera power on. 
       
   122         * Calls observer method McaeoInitComplete().
       
   123         * @since 2.1
       
   124         * @return void
       
   125         */
       
   126         void Reserve();
       
   127         
       
   128         /**
       
   129         * Switches the camera power off and releases the camera.
       
   130         * @since 2.1
       
   131         * @return void
       
   132         */
       
   133         void Release(){};
       
   134 
       
   135         /**
       
   136         * Switches the camera power on. 
       
   137         * Calls observer method McaeoInitComplete().
       
   138         * @since 2.1
       
   139         * @return void
       
   140         */
       
   141         void PowerOn(){};
       
   142         
       
   143         /**
       
   144         * Switches the camera power off.
       
   145         * @since 2.1
       
   146         * @return void
       
   147         */
       
   148         void PowerOff(){};
       
   149 
       
   150     public: // Camera settings
       
   151 
       
   152         /**
       
   153         * Sets the zoom mode.
       
   154         * @since 2.1
       
   155         * @param aZoomMode Zoom mode to set.
       
   156         * @return void
       
   157         */
       
   158         void SetZoomModeL( TZoomMode /*aZoomMode = EZoomModeDigital*/ );
       
   159 
       
   160         /**
       
   161         * Gets the current zoom mode.
       
   162         * @since 2.1
       
   163         * @return The current zoom mode.
       
   164         */
       
   165         TZoomMode ZoomMode() const{ return EZoomModeDigital; };
       
   166 
       
   167         /**
       
   168         * Sets the zoom value.
       
   169         * @since 2.1
       
   170         * @param aZoomValue Index of the zoom factor to set.
       
   171         * @return void
       
   172         */
       
   173         void SetZoomValueL( TInt /*aZoomValue = 0*/ );
       
   174 
       
   175         /**
       
   176         * Gets the current zoom value.
       
   177         * @since 2.1
       
   178         * @return Index of the current zoom factor.
       
   179         */
       
   180         TInt ZoomValue() const;
       
   181 
       
   182         /**
       
   183         * Sets the brightness.
       
   184         * @since 2.1
       
   185         * @param aBrightness Brightness value in the range ECam.h SetBrightnessL allows.
       
   186         * @return void
       
   187         */
       
   188         void SetBrightnessL( TInt /*aBrightness = 0*/ ){}; 
       
   189 
       
   190         /**
       
   191         * Gets the current brightness setting.
       
   192         * @since 2.1
       
   193         * @return Brightness value.
       
   194         */
       
   195         TInt Brightness() const{ return 0; };
       
   196 
       
   197         /**
       
   198         * Sets the contrast.
       
   199         * @since 2.1
       
   200         * @param aContrast Contrast value in the range ECam.h SetContrastL allows.
       
   201         * @return void
       
   202         */
       
   203         void SetContrastL( TInt/* aContrast= 0*/ ){}; 
       
   204         
       
   205         /**
       
   206         * Gets the current contrast setting.
       
   207         * @since 2.1
       
   208         * @return Contrast value.
       
   209         */
       
   210         TInt Contrast() const{ return 0; };
       
   211 
       
   212         /**
       
   213         * Sets the exposure mode.
       
   214         * @since 2.1
       
   215         * @param aExposureMode Exposure mode in the range ECam.h SetExposureL allows.
       
   216         * @return void
       
   217         */
       
   218         void SetExposureModeL( 
       
   219             CCamera::TExposure /*aExposureMode = CCamera::EExposureAuto*/ ){};
       
   220 
       
   221         /**
       
   222         * Gets the current exposure mode.
       
   223         * @since 2.1
       
   224         * @return Exposure mode.
       
   225         */
       
   226         CCamera::TExposure ExposureMode() const{ return CCamera::EExposureAuto; };
       
   227 
       
   228         /**
       
   229         * Sets the white balance mode.
       
   230         * @since 2.1
       
   231         * @param aWhiteBalanceMode White balance mode in the range ECam.h SetWhiteBalanceL allows.
       
   232         * @return void
       
   233         */
       
   234         void SetWhiteBalanceModeL( 
       
   235             CCamera::TWhiteBalance /*aWhiteBalanceMode = CCamera::EWBAuto*/ ){};
       
   236 
       
   237         /**
       
   238         * Gets the current white balance mode.
       
   239         * @since 2.1
       
   240         * @return White balance mode.
       
   241         */
       
   242         CCamera::TWhiteBalance WhiteBalanceMode() const{ return CCamera::EWBAuto; };
       
   243 
       
   244         /**
       
   245         * Sets the flash mode.
       
   246         * @since 2.1
       
   247         * @param aFlashMode Flash mode in the range ECam.h SetFlashL allows.
       
   248         * @return void
       
   249         */
       
   250         void SetFlashModeL( 
       
   251             CCamera::TFlash /*aFlashMode = CCamera::EFlashNone*/ ){};
       
   252 
       
   253         /**
       
   254         * Gets the current flash mode.
       
   255         * @since 2.1
       
   256         * @return Flash mode.
       
   257         */
       
   258         CCamera::TFlash FlashMode() const{ return CCamera::EFlashNone; };
       
   259 
       
   260         /**
       
   261         * Resets to the default setting values.
       
   262         * Resets the following settings: exposure mode, white balance mode, 
       
   263         * zoom mode, zoom value, flash mode, brightness, and contrast. 
       
   264         * @since 2.1
       
   265         * @return void
       
   266         */
       
   267         void ResetToDefaultsL(){};
       
   268     
       
   269     public: // View finder
       
   270 
       
   271         /**
       
   272         * Sets/resets view finder image mirroring.
       
   273         * @since 2.1
       
   274         * @param aMirror Boolean indicating whether view finder image should be mirrored or not.
       
   275         * @return void
       
   276         */
       
   277         void SetViewFinderMirrorL( TBool /*aMirror = EFalse*/ ){};
       
   278 
       
   279         /**
       
   280         * Queries if view finder image mirroring is on.
       
   281         * @since 2.1
       
   282         * @return Boolean indicating whether view finder image is currently mirrored or not.
       
   283         */
       
   284         TBool ViewFinderMirror() const{ return EFalse; };
       
   285 
       
   286         /**
       
   287         * Starts the bitmap-based view finder.
       
   288         * The engine starts to call observer method McaeoViewFinderFrameReady() repeatedly.
       
   289         * @since 2.1
       
   290         * @param aSize Desired view finder size.
       
   291         * @return void
       
   292         */
       
   293         void StartViewFinderBitmapsL( TSize& aSize );
       
   294 
       
   295         /**
       
   296         * Starts the bitmap-based view finder.
       
   297         * The engine starts to call observer method McaeoViewFinderFrameReady() repeatedly.
       
   298         * @since 2.1
       
   299         * @param aSize Desired view finder size.
       
   300         * @param aCropRect Desired cropping/clipping rectangle.
       
   301         * @return void
       
   302         */
       
   303         void StartViewFinderBitmapsL(
       
   304             TSize& /*aSize*/, 
       
   305             TRect& /*aCropRect*/ ){};
       
   306 
       
   307         /**
       
   308         * Starts the direct screen access view finder.
       
   309         * @since 2.1
       
   310         * @param aWs Window server session.
       
   311         * @param aScreenDevice Software device screen.
       
   312         * @param aWindow Client-side handle to a server-side window.
       
   313         * @param aScreenRect Portion of screen in screen co-ordinates.
       
   314         * @return void
       
   315         */
       
   316         void StartViewFinderDirectL( 
       
   317             RWsSession& /*aWs*/, 
       
   318             CWsScreenDevice& /*aScreenDevice*/, 
       
   319             RWindowBase& /*aWindow*/, 
       
   320             TRect& /*aScreenRect*/ ){};
       
   321         
       
   322         /**
       
   323         * Starts the direct screen access view finder.
       
   324         * @since 2.1
       
   325         * @param aWs Window server session.
       
   326         * @param aScreenDevice Software device screen.
       
   327         * @param aWindow Client-side handle to a server-side window.
       
   328         * @param aScreenRect Portion of screen in screen co-ordinates.
       
   329         * @param aCropRect Desired cropping/clipping rectangle.
       
   330         * @return void
       
   331         */
       
   332         void StartViewFinderDirectL(
       
   333             RWsSession& /*aWs*/, 
       
   334             CWsScreenDevice& /*aScreenDevice*/, 
       
   335             RWindowBase& /*aWindow*/, 
       
   336             TRect& /*aScreenRect*/, 
       
   337             TRect& /*aCropRect*/ ){};
       
   338 
       
   339         /**
       
   340         * Stops the view finder.
       
   341         * @since 2.1
       
   342         * @return void
       
   343         */
       
   344         void StopViewFinder();
       
   345 
       
   346         /**
       
   347         * Queries if view finder is running.
       
   348         * @since 2.1
       
   349         * @return Boolean indicating whether view finder is running or not.
       
   350         */
       
   351         TBool IsViewFinding() const;
       
   352 
       
   353         /**
       
   354         * Gets the current view finder size.
       
   355         * @since 2.1
       
   356         * @param aSize View finder size.
       
   357         * @return void
       
   358         */
       
   359         void GetViewFinderSize( TSize& /*aSize*/ ){};
       
   360 
       
   361     public: // Still image capturing
       
   362 
       
   363         /**
       
   364         * Prepares Camera Application Engine for still image capture on 
       
   365         * specified quality level.
       
   366         * Calls observer method McaeoStillPrepareComplete().
       
   367         * @since 2.1
       
   368         * @param aStillQualityIndex Still image quality level index.
       
   369         * Imaging parameters linked to quality levels are defined by Shared Data ini-file. 
       
   370         * @return void
       
   371         */
       
   372         void PrepareStillCaptureL( TInt /*aStillQualityIndex*/ ){};
       
   373 
       
   374         /**
       
   375         * Prepares Camera Application Engine for still image capture on 
       
   376         * specified quality level.
       
   377         * Calls observer method McaeoStillPrepareComplete().
       
   378         * @since 2.1
       
   379         * @param aStillQualityIndex Still image quality level index. 
       
   380         * Can have values 0 ... TCamAppEngineInfo::iNumStillQualityLevelsSupported - 1
       
   381         * @param aCropRect Desired cropping/clipping rectangle.
       
   382         * @return void
       
   383         */
       
   384         void PrepareStillCaptureL( 
       
   385             TInt /*aStillQualityIndex*/, 
       
   386             const TRect& /*aCropRect*/ ){};
       
   387 
       
   388         /**
       
   389         * Prepares Camera Application Engine for still image capture with 
       
   390         * specified image size and format.
       
   391         * Calls observer method McaeoStillPrepareComplete().
       
   392         * @since 2.1
       
   393         * @param aSize Still image size.
       
   394         * @param aFormat Still image format.
       
   395         * @param aCompressionQuality Still image compression quality [0...100].
       
   396         * @return void
       
   397         */
       
   398         void PrepareStillCaptureL(
       
   399             const TSize& /*aSize*/, 
       
   400             CCamera::TFormat /*aFormat*/,  
       
   401             TInt /*aCompressionQuality*/ ){};
       
   402 
       
   403         /**
       
   404         * Prepares Camera Application Engine for still image capture with specified image size and format.
       
   405         * Calls observer method McaeoStillPrepareComplete().
       
   406         * @since 2.1
       
   407         * @param aSize Still image size.
       
   408         * @param aFormat Still image format.
       
   409         * @param aCompressionQuality Still image compression quality [0...100].
       
   410         * @param aCropRect Desired cropping/clipping rectangle.
       
   411         * @return void
       
   412         */
       
   413         void PrepareStillCaptureL(
       
   414             const TSize& /*aSize*/, 
       
   415             CCamera::TFormat /*aFormat*/,  
       
   416             TInt /*aCompressionQuality*/, 
       
   417             const TRect& /*aCropRect*/ ){};
       
   418 
       
   419         /**
       
   420         * Gets the current prepared still quality level index.
       
   421         * @since 2.1
       
   422         * @return Still quality level index.
       
   423         */
       
   424         TInt StillQualityIndex() const{ return 0; };
       
   425 
       
   426         /**
       
   427         * Gets the still image frame size for the specified quality level.
       
   428         * @since 2.1
       
   429         * @return void
       
   430         */
       
   431         void GetStillFrameSize(
       
   432             TInt /*aStillQualityIndex*/, 
       
   433             TSize& /*aSize*/ ) const{};
       
   434 
       
   435         /**
       
   436         * Gets the estimated still image size in bytes for the 
       
   437         * specified quality level.
       
   438         * @since 2.1
       
   439         * @return Estimated still capturing image size in bytes.
       
   440         */
       
   441         TInt EstimatedStillSizeInBytes( 
       
   442             TInt /*aStillQualityIndex*/ ) const{ return 0; };
       
   443 
       
   444         /**
       
   445         * Captures a still image or a still image burst.
       
   446         * Calls first observer method McaeoSnapImageReady() and then 
       
   447         * McaeoStillImageReady().
       
   448         * McaeoSnapImageReady() is not called if engine initialization 
       
   449         * has been done 
       
   450         * with parameter aCreateSnapImage == EFalse.
       
   451         * @since 2.1
       
   452         * @return void
       
   453         */
       
   454         void CaptureStill();
       
   455 
       
   456         /**
       
   457         * Cancels the on-going still image (single/burst) capture request.
       
   458         * @since 2.1
       
   459         * @return void
       
   460         */
       
   461         void CancelCaptureStill(){};
       
   462 
       
   463         /** 
       
   464         * Sets the size of the snap image bitmap.
       
   465         * @since 3.0
       
   466         * @param aSize The size of the snap bitmap. Corrected size is returned. 
       
   467         * @return void
       
   468         */
       
   469         void SetSnapImageSizeL(
       
   470             TSize& ){};
       
   471          /** 
       
   472         * Sets the color mode of the snap image bitmap
       
   473         * @since 3.0
       
   474         * @param aMode The color mode of the snap bitmap.
       
   475         * @return void
       
   476         */
       
   477         void SetSnapImageColorMode(
       
   478         TDisplayMode ){};
       
   479 
       
   480     public: // Video recording
       
   481 
       
   482         /**
       
   483         * Sets the file name for the video clip to be recorded.
       
   484         * @since 2.1
       
   485         * @param aVideoClipFileName File name.
       
   486         * @return void
       
   487         */
       
   488         void SetVideoRecordingFileNameL( 
       
   489             const TDesC& aVideoClipFileName );
       
   490 
       
   491         /**
       
   492         * Prepares Camera Application Engine for video recording on 
       
   493         * specified quality level.
       
   494         * Calls observer method McaeoVideoPrepareComplete().
       
   495         * @since 2.1
       
   496         * Can have values 0 ... TCamAppEngineInfo::iNumVideoQualityLevelsSupported - 1
       
   497         * @return void
       
   498         */
       
   499         void PrepareVideoRecordingL( TInt /*aVideoQualityIndex*/ ){};
       
   500 
       
   501         /**
       
   502         * Prepares Camera Application Engine for video recording with 
       
   503         * specified recording parameters.
       
   504         * Calls observer method McaeoVideoPrepareComplete().
       
   505         * @since 2.1
       
   506         * @return void
       
   507         */
       
   508         void PrepareVideoRecordingL( 
       
   509             const TSize& /*aFrameSize*/, 
       
   510             TReal32 /*aFrameRate*/, 
       
   511             TInt /*aBitRate*/, 
       
   512             TBool /*aAudioEnabled*/,
       
   513             const TDesC8& /*aMimeType*/, 
       
   514             const TDesC& /*aPreferredSupplier*/, 
       
   515             const TDesC8& /*aVideoType = KNullDesC8*/, 
       
   516             const TDesC8& /*aAudioType = KNullDesC8*/ ){};
       
   517 
       
   518          /**
       
   519         * Closes (prepared) video recording to free resources.
       
   520         * @since 2.1
       
   521         * @return void
       
   522         */
       
   523         void CloseVideoRecording(){};
       
   524 
       
   525         /**
       
   526         * Gets the current prepared video quality level index.
       
   527         * @since 2.1
       
   528         * @return Video quality level index.
       
   529         */
       
   530         TInt VideoQualityIndex() const{ return 0; };
       
   531         
       
   532         /**
       
   533         * Gets the video frame size for the specified video quality level.
       
   534         * @since 2.1
       
   535         * @return Video frame size.
       
   536         */
       
   537         void GetVideoFrameSize(
       
   538             TInt /*aVideoQualityIndex*/, 
       
   539             TSize& /*aSize*/ ) const{};
       
   540 
       
   541         /**
       
   542         * Gets the video frame rate for the specified video quality level.
       
   543         * @since 2.1
       
   544         * @return Video frame rate.
       
   545         */
       
   546         TReal32 VideoFrameRate( TInt /*aVideoQualityIndex*/ ) const{ return 0; };
       
   547 
       
   548         /**
       
   549         * Gets the estimated video recording bit rate including audio bit rate 
       
   550         * for the specified video quality level.
       
   551         * @since 2.1
       
   552         * @return Video recording bit rate rate including audio bit rate.
       
   553         */
       
   554         TInt EstimatedVideoRecordingBitRateL( 
       
   555             TInt /*aVideoQualityIndex*/ ) const{ return 0; };
       
   556 
       
   557         /**
       
   558         * Sets the maximum size in bytes for a video clip.
       
   559         * @since 2.1
       
   560         * If set to 0, then no limit but the available storage space.
       
   561         * @return void
       
   562         */
       
   563         void SetVideoClipMaxSizeL( TInt /*aMaxClipSizeInBytes = 0*/ ){};
       
   564         
       
   565         /**
       
   566         * Gets the current maximum size in bytes for a video clip.
       
   567         * @since 2.1
       
   568         * @return Video clip maximum size.
       
   569         */
       
   570         TInt VideoClipMaxSize() const{ return 0; };
       
   571 
       
   572         /**
       
   573         * Sets audio enabled or disabled for video recording.
       
   574         * @since 2.1
       
   575         * @return void
       
   576         */
       
   577         void SetVideoAudioL( TBool /*aAudioEnabled*/ ){};
       
   578         
       
   579         /**
       
   580         * Queries if audio is enabled or disabled for video recording.
       
   581         * @since 2.1
       
   582         * @return Boolean indicating whether audio is enabled or disabled for video recording.
       
   583         */
       
   584         TBool VideoAudio() const{ return EFalse; };
       
   585 
       
   586         /**
       
   587         * Sets the time interval for video recording time info.
       
   588         * @since 2.1
       
   589         * @return void
       
   590         */
       
   591         void SetVideoTimesIntervalL( 
       
   592             TTimeIntervalMicroSeconds /*aInterval*/ ){};
       
   593 
       
   594         /**
       
   595         * Gets the current time interval for video recording time info.
       
   596         * @since 2.1
       
   597         * @return Time interval in microseconds for video recording time info.
       
   598         */
       
   599         TTimeIntervalMicroSeconds VideoTimesInterval() const{ return TTimeIntervalMicroSeconds( 0 ); };
       
   600 
       
   601         /**
       
   602         * Starts video recording.
       
   603         * Calls observer method McaeoVideoRecordingOn().
       
   604         * @since 2.1
       
   605         * @return void
       
   606         */
       
   607         void StartVideoRecording();
       
   608 
       
   609         /**
       
   610         * Stops video recording.
       
   611         * Calls observer method McaeoVideoRecordingComplete().
       
   612         * @since 2.1
       
   613         * @return void
       
   614         */
       
   615         void StopVideoRecording();
       
   616 
       
   617         /**
       
   618         * Pauses video recording.
       
   619         * Calls observer method McaeoVideoRecordingPaused().
       
   620         * @since 2.1
       
   621         * @return void
       
   622         */
       
   623         void PauseVideoRecording();
       
   624 
       
   625         /**
       
   626         * Resumes video recording after pause.
       
   627         * Calls observer method McaeoVideoRecordingOn().
       
   628         * @since 2.1
       
   629         * @return void
       
   630         */
       
   631         void ResumeVideoRecording();
       
   632 
       
   633         /**
       
   634         * Gets the remaining video recording time before recording has started.
       
   635         * @since 2.1
       
   636         * @return Remaining video recording time.
       
   637         */
       
   638         TTimeIntervalMicroSeconds RemainingVideoRecordingTime()  
       
   639             const{ return TTimeIntervalMicroSeconds( 99999999 ); };
       
   640 
       
   641         /**
       
   642         * Queries if video recording is running.
       
   643         * @since 2.1
       
   644         * @return Boolean indicating whether video recording is running or not.
       
   645         */
       
   646         TBool IsVideoRecording() const{ return EFalse; };
       
   647 
       
   648     public: // New overloading method for preparing video recording
       
   649 
       
   650         /**
       
   651         * Prepares Camera Application Engine for video recording with specified recording parameters.
       
   652         * Calls observer method McaeoVideoPrepareComplete().
       
   653         * @since 2.1
       
   654         * @return void
       
   655         */
       
   656         void PrepareVideoRecordingL(
       
   657             const TSize&  /*aFrameSize*/, 
       
   658             TReal32       /*aFrameRate*/, 
       
   659             TInt          /*aBitRate*/, 
       
   660             TBool         /*aAudioEnabled*/,
       
   661             TInt          /*aAudioBitRate*/, 
       
   662             const TDesC8& /*aMimeType*/, 
       
   663             const TDesC&  /*aPreferredSupplier*/, 
       
   664             const TDesC8& /*aVideoType*/, 
       
   665             const TDesC8& /*aAudioType*/ );
       
   666 
       
   667     public: // Still image burst capturing
       
   668 
       
   669         /**
       
   670         * Sets the Camera Application Engine still image burst capturing 
       
   671         * observer.
       
   672         * @since 2.1
       
   673         * @param aObserver Camera Application Engine still burst observer.
       
   674         * @return void
       
   675         */
       
   676         void SetCaeStillBurstObserver( MCaeStillBurstObserver& aObserver );
       
   677 
       
   678         /**
       
   679         * Sets the image count for still image (burst) capturing.
       
   680         * Note: Inputting value 1 switches back to normal still capturing.
       
   681         * @since 2.1
       
   682         * @param aImageCount The desired count of images to capture (in a burst). 
       
   683         * @return The count of images to be captured (in a burst).
       
   684         */
       
   685         TInt SetStillCaptureImageCountL( TInt aImageCount );
       
   686 
       
   687         /**
       
   688         * Gets the image count for still image (burst) capturing.
       
   689         * @since 2.1
       
   690         * @return Count of images to capture (in a burst).
       
   691         */
       
   692         TInt StillCaptureImageCount() const{ return 0; };
       
   693 
       
   694         /**
       
   695         * Sets the time interval between single captures in still burst.
       
   696         * @since 2.1
       
   697         * @return void
       
   698         */
       
   699         void SetStillBurstCaptureIntervalL( 
       
   700             TTimeIntervalMicroSeconds /*aInterval*/ ){};
       
   701 
       
   702         /**
       
   703         * Gets the time interval between single captures in still burst.
       
   704         * @since 2.1
       
   705         * @return Time interval in microseconds.
       
   706         */
       
   707         TTimeIntervalMicroSeconds StillBurstCaptureInterval() const{ return TTimeIntervalMicroSeconds( 0 ); };
       
   708 
       
   709         /**
       
   710         * Stops still image burst capturing. 
       
   711         * Delivers the burst images captured before call. 
       
   712         * This is different from CancelCaptureStill that cancels the operation and 
       
   713         * prevents delivering the captured image.
       
   714         * @since 2.1
       
   715         * @return void
       
   716         */
       
   717         void StopStillBurstCapture();
       
   718 
       
   719     public: 
       
   720 
       
   721         /**
       
   722         * Prepare Camera Application Engine for still image capture on 
       
   723         * specified quality level with desired snap image size. 
       
   724         * The returned snap image size is always equal or bigger in both 
       
   725         * dimensions than the given size. The returned size is stepwise 
       
   726         * downscaled from the captured image size. The parameter aSnapSize 
       
   727         * is ignored if the image format does not support it in the engine.
       
   728         * Calls observer method McaeoStillPrepareComplete().
       
   729         * @since 2.1
       
   730         * @return void
       
   731         */
       
   732         void PrepareStillCaptureL(
       
   733             TInt /*aStillQualityIndex*/, 
       
   734             TSize& /*aSnapSize*/ ){};
       
   735 
       
   736         /**
       
   737         * Prepare Camera Application Engine for still image capture with 
       
   738         * specified image size, format, and desired snap image size. 
       
   739         * The returned snap image size is always equal or bigger in both 
       
   740         * dimensions than the given size. The returned size is stepwise 
       
   741         * downscaled  from the captured image size. The parameter aSnapSize 
       
   742         * is ignored if the image format does not support it in the engine.
       
   743         * Calls observer method McaeoStillPrepareComplete().
       
   744         * @since 2.1
       
   745         * @param aSize Still image size.
       
   746         * @param aFormat Still image format.
       
   747         * @param aCompressionQuality Still image compression quality [0...100].
       
   748         * @param aCropRect Desired cropping/clipping rectangle. The size (0,0) means that this parameter is ignored.
       
   749         * @param aSnapSize Desired snap image size. Returns the real snap image size.
       
   750         * @return void
       
   751         */
       
   752         void PrepareStillCaptureL(
       
   753             const TSize& aSize, 
       
   754             CCamera::TFormat aFormat,  
       
   755             TInt aCompressionQuality, 
       
   756             const TRect& aCropRect,
       
   757             TSize& aSnapSize );
       
   758 
       
   759         /**
       
   760         * Sets the exposure value (EV) compensation index.
       
   761         * @since 2.1
       
   762         * @return void
       
   763         */
       
   764         void SetEvCompensationL( TInt /*aEvIndex = 0*/ ){};
       
   765 
       
   766         /**
       
   767         * Gets the current exposure value (EV) compensation index.
       
   768         * @since 2.1
       
   769         * @return Exposure value compensation index.
       
   770         */
       
   771         TInt EvCompensation() const{ return 0; };
       
   772                 
       
   773         /**
       
   774         * Sets snap image creation on/off.
       
   775         * @since 2.1
       
   776         * @return void
       
   777         */
       
   778         void SetSnapImageCreation( 
       
   779             TBool /*aCreateSnapImage = ETrue*/ ){};
       
   780         
       
   781         /** 
       
   782         * A static (factory) function to create the class instance.
       
   783         * @since 2.6
       
   784         * @return Pointer to a fully constructed CCaeEngine object. 
       
   785         * Ownership is passed to the caller.
       
   786         */
       
   787         IMPORT_C static CCaeEngine* NewL( 
       
   788             TInt /*aCameraIndex*/ );
       
   789         
       
   790         /** 
       
   791         * Gets the number of cameras on the device.
       
   792         * @since 2.6
       
   793         * @return Count of cameras present on the device. 
       
   794         */
       
   795         IMPORT_C static TInt CamerasAvailable();
       
   796         
       
   797         /** 
       
   798         * Enumerates through the available image capture sizes. 
       
   799         * Returns the image size based on the specified size index and format. 
       
   800         * The largest image resolution is returned for index 0, the smallest 
       
   801         * for index TCamAppEngineInfo::iNumImageSizesSupported-1.
       
   802         * The size index must be in the range 0 to 
       
   803         * TCamAppEngineInfo::iNumImageSizesSupported-1 inclusive.
       
   804         * @since 2.6
       
   805         * @return void
       
   806         */
       
   807         void EnumerateStillCaptureSizes(
       
   808             TSize& /*aSize*/, 
       
   809             TInt /*aSizeIndex*/, 
       
   810             CCamera::TFormat /*aFormat*/ ) const{};
       
   811         
       
   812         /** 
       
   813         * Sets the quality value to use with JPEG and Exif image formats. 
       
   814         * @since 2.6
       
   815         * @return void
       
   816         */
       
   817         void SetJpegQuality(
       
   818             TInt /*aQuality*/ ){};
       
   819         
       
   820         /** 
       
   821         * Gets the currently set JPEG quality value.
       
   822         * Returns 0 if not previously prepared or set.
       
   823         * @since 2.6
       
   824         * @return The currently set JPEG quality value. 
       
   825         */
       
   826         TInt JpegQuality() const{ return 0; };
       
   827 
       
   828 	public: // New method to allow extension mechanism.
       
   829         TAny* CustomInterface(TUid /*aId*/) { return NULL; };
       
   830 
       
   831         /**
       
   832         * Gets array of features per interfaces. Each feature is ordered in
       
   833         * the current calling order e.g. when certain image prosessing 
       
   834         * operation is applied to the captured image. If SetOrder() has not yet
       
   835         * been called, the returned order is the default order.
       
   836         * @since 2.8
       
   837         * @param aOrderedFeatureArray Feature array sorted by the current calling order in an interface.
       
   838         * @return  void
       
   839         */
       
   840         void GetOrderL( RCaeOrderedFeatureList& aOrderedFeatureList );
       
   841 
       
   842         /**
       
   843         * Sets array of features per interfaces. Each feature should be ordered
       
   844         * according to the wanted calling order e.g. to define when certain image 
       
   845         * prosessing operation is applied to the captured image. If this method
       
   846         * leaves, the internal array has not been changed.
       
   847         * @since 2.8
       
   848         * @param aOrderedFeatureArray Feature array sorted by the wanted calling order in an interface.
       
   849         * @return void. 
       
   850         */
       
   851         void SetOrderL( const RCaeOrderedFeatureList& aOrderedFeatureList );
       
   852 
       
   853         /** 
       
   854         * Sets the source of the snap image bitmap.
       
   855         * @since 2.8
       
   856         * @param aSnapImageSource The source of the snap image bitmap.
       
   857         * @return void
       
   858         */
       
   859         void SetSnapImageSourceL( TSnapImageSource aSnapImageSource );
       
   860         
       
   861         /** 
       
   862         * Sets the specific image codec implementation to be used in decoding and encoding.
       
   863         * @since 3.0
       
   864         * @param aDecoderUid The UID of the specific image decoder to be used. KNullUid means the default decoder.
       
   865         * @param aEncoderUid The UID of the specific image encoder to be used. KNullUid means the default encoder.
       
   866         * @return void
       
   867         */  
       
   868         void SetImageCodecsL( TUid aDecoderUid, TUid aEncoderUid );
       
   869 
       
   870         /** 
       
   871         * Enumerate Video Frame Size
       
   872         * @since 3.2
       
   873         * @see CCaeEngine
       
   874         */
       
   875         TInt EnumerateVideoFrameSizeL( const TSize& /*aSize*/ );
       
   876         
       
   877         /** 
       
   878         * Gets the device-unique handle of camera object owned by the CCaeEngine.
       
   879         * @since 3.2
       
   880         * @see CCaeEngine
       
   881         */
       
   882         TInt CCameraHandle() const;
       
   883 
       
   884         /**
       
   885         * Set CamAppEngine internal camera state to reserved and power state on. 
       
   886         * @since 3.2
       
   887         * @see CCaeEngine
       
   888         */
       
   889         void EnableVideoRecording();
       
   890         
       
   891         /**
       
   892         * Set CamAppEngine internal camera state to released and power state off.
       
   893         * @since 3.2
       
   894         * @see CCaeEngine
       
   895         */
       
   896         void DisableVideoRecording();
       
   897         
       
   898         /** 
       
   899         * Sets CAE to Extension processing mode.
       
   900         * @since 3.2
       
   901         * @param aExtModeActive Boolean indicating if extension mode is enabled or disabled.
       
   902         * @param aCreateSnapImage Boolean indicating if "snap-images" should be created by CAE.
       
   903         * @return void
       
   904         */
       
   905         void SetCaeExtensionModeL( TBool aExtModeActive, TBool aCreateSnapImage );
       
   906 
       
   907         /** 
       
   908         * Process extension for view finder.
       
   909         * @since 3.2
       
   910         * @param aFrame The view finder frame bitmap that is processed.
       
   911         * @return void
       
   912         */
       
   913         void ProcessExtViewFinderFrameReadyL( CFbsBitmap& aFrame );
       
   914 
       
   915         /** 
       
   916         * Process extension for snap image.
       
   917         * @since 3.2
       
   918         * @param aSnapImage The bitmap of snap image. Does not transfer ownership.
       
   919         * @return void
       
   920         */
       
   921         void ProcessExtSnapImageL( CFbsBitmap& aSnapImage );
       
   922         
       
   923         /** 
       
   924         * Process extension for captured image.
       
   925         * @since 3.2
       
   926         * @param aBitmap The captured bitmap image. Does not transfer ownership.
       
   927         * @param aLastImage Set when last image of the burst is completed.
       
   928         * @return void
       
   929         */
       
   930         void ProcessExtCapturedImageL( CFbsBitmap& aBitmap, TBool aLastImage );
       
   931 
       
   932         /** 
       
   933         * Process extension for captured image.
       
   934         * @since 3.2
       
   935         * @param aImageData The captured image, if it is a formatted image and type of HBufC8. Ownership is transferred.
       
   936         * @param aLastImage Set when last image of the burst is completed.
       
   937         * @return void
       
   938         */
       
   939         void ProcessExtCapturedImageL( HBufC8* aImageData, TBool aLastImage );
       
   940 
       
   941         /** 
       
   942         * Process extension for captured image.
       
   943         * @since 3.2
       
   944         * @param aImageDataDes The captured image, if it is a formatted image and type of TDesC8. Does not transfer ownership.
       
   945         * @param aLastImage Set when last image of the burst is completed.
       
   946         * @return void
       
   947         */
       
   948         void ProcessExtCapturedImageL( TDesC8& aImageDataDes, TBool aLastImage );
       
   949 
       
   950         /** 
       
   951         * Cancels extensions processing
       
   952         * @since 3.2
       
   953         * @return void
       
   954         */
       
   955         void ProcessExtCancel();
       
   956 
       
   957         /** 
       
   958         * Get list of skipped extensions. Application may define which extensions are skipped during image processing. 
       
   959         * @since 3.2
       
   960         * @param aSkippedExtensions The list of skipped extensions TUid. 
       
   961         * @return void
       
   962         */
       
   963         void SkippedExtensionListL( RCaeOrderedFeatureList& aSkippedExtensions );
       
   964 
       
   965         /** 
       
   966         * Set list of skipped extensions. Application may define which extensions are skipped during image processing.
       
   967         * The GetOrderL() returns the list of all installed extensions.
       
   968         * @since 3.2
       
   969         * @param aSkippedExtensions The list of installed and skipped extensions TUid. 
       
   970         * @return void
       
   971         */
       
   972         void SetSkippedExtensionList( RCaeOrderedFeatureList& aSkippedExtensions );
       
   973 
       
   974         TInt SetAsyncVideoStopMode( TBool aAsyncVideoStopEnabled );
       
   975 
       
   976     private:
       
   977         CCameraappDummyEngineImp();
       
   978         void ConstructL();
       
   979 
       
   980     protected: // data
       
   981         MCamAppEngineObserver* iObserver;
       
   982         CCameraappDummyCallbackActive* iCallBackActive;
       
   983         TBool iIsViewFinding;
       
   984         TInt iZoomValue;
       
   985         TInt iImageCount;
       
   986         TBool iVideoPrepared;
       
   987         CCaeEngine::TZoomMode iZoomMode;        
       
   988     };
       
   989 
       
   990 
       
   991 #endif // CAMERAAPPDUMMYENGINE_H