os/mm/imagingandcamerafws/cameraunittest/src/TSU_ECM_ADV/ecamextendedfunctest.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
//
sl@0
    15
sl@0
    16
#ifndef ECAMEXTENDEDFUNCTEST_H
sl@0
    17
#define ECAMEXTENDEDFUNCTEST_H
sl@0
    18
sl@0
    19
#include <testframework.h>
sl@0
    20
#include "ECamObserverTest.h"
sl@0
    21
#include "extended_functionality.h"
sl@0
    22
sl@0
    23
class RECamClientViewFinderTest : public RTestStep
sl@0
    24
	{
sl@0
    25
public:
sl@0
    26
	static RECamClientViewFinderTest* NewL(const TDesC& aTestStep);
sl@0
    27
	
sl@0
    28
protected:
sl@0
    29
	// from RTestStep;
sl@0
    30
	TVerdict DoTestStepL();
sl@0
    31
	
sl@0
    32
	// new
sl@0
    33
	TVerdict DoTestStep_50L();
sl@0
    34
	
sl@0
    35
	TVerdict DoClientVFTestStepL();
sl@0
    36
	
sl@0
    37
private:
sl@0
    38
	RECamClientViewFinderTest(const TDesC& aTestStep);
sl@0
    39
	};
sl@0
    40
	
sl@0
    41
class RECamClientVFNotificationTest : public RECamObserverTest, public MClientViewFinderObserver
sl@0
    42
	{
sl@0
    43
public:
sl@0
    44
	static RECamClientVFNotificationTest* NewL(TBool aAllocTest);
sl@0
    45
	
sl@0
    46
protected:
sl@0
    47
	// from RTestStep;
sl@0
    48
	TVerdict DoTestStepL();
sl@0
    49
	TVerdict DoTestStepL_51L();
sl@0
    50
	void ConstructL();
sl@0
    51
	
sl@0
    52
private:
sl@0
    53
	RECamClientVFNotificationTest(TBool aAllocTest);
sl@0
    54
	
sl@0
    55
	//MClientViewFinderObserver
sl@0
    56
	void ViewFinderBufferReady(CCamera::CCameraClientViewFinder& aClientViewFinderHandle, TInt aErrorCode);
sl@0
    57
	void DirectHistogramDisplayed(CCamera::CCameraClientViewFinder& aClientViewFinderHandle, CCamera::CCameraV2Histogram& aDirectHistogramDisplayed, TInt aErrorCode);
sl@0
    58
	void ClientHistogramReady(CCamera::CCameraClientViewFinder& aClientViewFinderHandle, MHistogramV2Buffer* aClientHistogramBuffer, TInt aErrorCode);
sl@0
    59
	void ImageProcessingFailed(CCamera::CCameraClientViewFinder& aClientViewFinderHandle, TInt aErrorCode);
sl@0
    60
	TInt CustomInterface(TUid aInterface, TAny*& aPtrInterface);
sl@0
    61
sl@0
    62
	void CheckViewFinderNegNotification(TInt aVFHandle, TVerdict& aResult);
sl@0
    63
	
sl@0
    64
private:
sl@0
    65
sl@0
    66
	TInt iVFHandle;
sl@0
    67
	TInt iError;
sl@0
    68
	TUid iInputEventUid;
sl@0
    69
	};
sl@0
    70
	
sl@0
    71
class RECamV2DirectViewFinderTest : public RTestStep
sl@0
    72
	{
sl@0
    73
public:
sl@0
    74
	static RECamV2DirectViewFinderTest* NewL(const TDesC& aTestStep);
sl@0
    75
	
sl@0
    76
protected:
sl@0
    77
	// from RTestStep;
sl@0
    78
	TVerdict DoTestStepL();
sl@0
    79
	
sl@0
    80
	// new
sl@0
    81
	TVerdict DoTestStep_52L();
sl@0
    82
	
sl@0
    83
	TVerdict DoV2DirectVFTestStepL();
sl@0
    84
	
sl@0
    85
private:
sl@0
    86
	RECamV2DirectViewFinderTest(const TDesC& aTestStep);
sl@0
    87
	};
sl@0
    88
	
sl@0
    89
class RECamV2DirectVFNotificationTest : public RECamObserverTest, public MDirectViewFinderObserver
sl@0
    90
	{
sl@0
    91
public:
sl@0
    92
	static RECamV2DirectVFNotificationTest* NewL(TBool aAllocTest);
sl@0
    93
	
sl@0
    94
protected:
sl@0
    95
	// from RTestStep;
sl@0
    96
	TVerdict DoTestStepL();
sl@0
    97
	TVerdict DoTestStep_53L();
sl@0
    98
	
sl@0
    99
	void ConstructL();
sl@0
   100
	
sl@0
   101
private:
sl@0
   102
	RECamV2DirectVFNotificationTest(TBool aAllocTest);
sl@0
   103
	
sl@0
   104
	//MDirectViewFinderObserver
sl@0
   105
	void DirectViewFinderFirstFrameDisplayed(CCamera::CCameraV2DirectViewFinder& aDirectViewFinderHandle, TInt aErrorCode);
sl@0
   106
	void DirectHistogramDisplayed(CCamera::CCameraV2DirectViewFinder& aDirectViewFinderHandle, CCamera::CCameraV2Histogram& aDirectHistogramDisplayed, TInt aErrorCode);
sl@0
   107
	void ClientHistogramReady(CCamera::CCameraV2DirectViewFinder& aDirectViewFinderHandle, MHistogramV2Buffer* aClientHistogramBuffer, TInt aErrorCode);
sl@0
   108
	void DirectViewFinderFailed(CCamera::CCameraV2DirectViewFinder& aDirectViewFinderHandle, TInt aErrorCode);
sl@0
   109
	void DirectSnapshotForImageDisplayed(CCamera::CCameraV2DirectViewFinder& aDirectViewFinderHandle, CCamera::CCameraImageCapture& aCaptureImageHandle, TPostCaptureControlId aPostCaptureControlId, TInt aErrorCode);
sl@0
   110
	TInt CustomInterface(TUid aInterface, TAny*& aPtrInterface);
sl@0
   111
sl@0
   112
	void CheckViewFinderNegNotification(TInt aVFHandle, TVerdict& aResult);
sl@0
   113
	
sl@0
   114
private:
sl@0
   115
sl@0
   116
	TInt iVFHandle;
sl@0
   117
	TInt iError;
sl@0
   118
	TUid iInputEventUid;
sl@0
   119
	};
sl@0
   120
	
sl@0
   121
class RECamPreImgCaptureNotificationTest : public RECamObserverTest, public MPreImageCaptureControlObserver
sl@0
   122
	{
sl@0
   123
public:
sl@0
   124
	static RECamPreImgCaptureNotificationTest* NewL(TBool aAllocTest);
sl@0
   125
	
sl@0
   126
protected:
sl@0
   127
	// from RTestStep;
sl@0
   128
	TVerdict DoTestStepL();
sl@0
   129
	TVerdict DoPreImgCaptureTestStepL();
sl@0
   130
sl@0
   131
private:
sl@0
   132
	RECamPreImgCaptureNotificationTest(TBool aAllocTest);
sl@0
   133
	
sl@0
   134
	//MPreImageCaptureControlObserver
sl@0
   135
	void PrepareImageComplete(CCamera::CCameraImageCapture* aCaptureImageHandle, TInt aErrorCode);
sl@0
   136
	TInt CustomInterface(TUid aInterface, TAny*& aPtrInterface);
sl@0
   137
sl@0
   138
	void CheckCaptureNotification(CCamera::CCameraImageCapture*& aImageCapture, TVerdict& aResult);
sl@0
   139
	
sl@0
   140
private:
sl@0
   141
	CCamera::CCameraImageCapture* iCaptureImageHandle;
sl@0
   142
	TInt iError;
sl@0
   143
	TUid iInputEventUid;
sl@0
   144
	};
sl@0
   145
	
sl@0
   146
class RECamImgCaptureNotificationTest : public RECamObserverTest, public MPreImageCaptureControlObserver, MCaptureImageObserver
sl@0
   147
	{
sl@0
   148
public:
sl@0
   149
	static RECamImgCaptureNotificationTest* NewL(TBool aAllocTest);
sl@0
   150
	
sl@0
   151
protected:
sl@0
   152
	// from RTestStep;
sl@0
   153
	TVerdict DoTestStepL();
sl@0
   154
	TVerdict DoImgCaptureAdvFuncConstruction();
sl@0
   155
	
sl@0
   156
private:
sl@0
   157
	RECamImgCaptureNotificationTest(TBool aAllocTest);
sl@0
   158
	
sl@0
   159
	//MPreImageCaptureControlObserver
sl@0
   160
	void PrepareImageComplete(CCamera::CCameraImageCapture* aCaptureImageHandle, TInt aErrorCode);
sl@0
   161
	TInt CustomInterface(TUid aInterface, TAny*& aPtrInterface);
sl@0
   162
sl@0
   163
	void CheckPreCaptureNotification(CCamera::CCameraImageCapture*& aImageCapture, TVerdict& aResult);
sl@0
   164
	
sl@0
   165
	//MCaptureImageObserver
sl@0
   166
	void IndividualImageControlHandle(CCamera::CCameraImageCapture& aCaptureImageHandle, TPostCaptureControlId aPostCaptureControlId);
sl@0
   167
	void ImageBufferReady(CCamera::CCameraImageCapture& aCaptureImageHandle, TPostCaptureControlId aPostCaptureControlId, TInt aErrorCode);
sl@0
   168
	void ClientSnapshotForImageReady(CCamera::CCameraImageCapture& aCaptureImageHandle, TPostCaptureControlId aPostCaptureControlId, MCameraBuffer2* aSnapshotBuffer, TInt aErrorCode);
sl@0
   169
	void DirectSnapshotForImageDisplayed(CCamera::CCameraImageCapture& aCaptureImageHandle, TPostCaptureControlId aPostCaptureControlId, TInt aErrorCode);
sl@0
   170
	void CutDownImageDirectSavingCompleted(CCamera::CCameraImageCapture& aCaptureImageHandle, TPostCaptureControlId aPostCaptureControlId, TInt aErrorCode);
sl@0
   171
	void ImageDirectSavingCompleted(CCamera::CCameraImageCapture& aCaptureImageHandle, TPostCaptureControlId aPostCaptureControlId, TInt aErrorCode);
sl@0
   172
	void ImageCaptureComplete(CCamera::CCameraImageCapture& aCaptureImageHandle, TInt aErrorCode);
sl@0
   173
	void ClientHistogramForImageReady(CCamera::CCameraImageCapture& aCaptureImageHandle, TPostCaptureControlId aPostCaptureControlId, MHistogramV2Buffer* aClientHistogramBuffer, TInt aErrorCode);
sl@0
   174
	void ClientHistogramForSnapshotReady(CCamera::CCameraImageCapture& aCaptureImageHandle, TPostCaptureControlId aPostCaptureControlId, MHistogramV2Buffer* aClientHistogramBuffer, TInt aErrorCode);
sl@0
   175
	void DirectHistogramForSnapshotDisplayed(CCamera::CCameraImageCapture& aCaptureImageHandle, TPostCaptureControlId aPostCaptureControlId, CCamera::CCameraV2Histogram& aDirectHistogramDisplayed, TInt aErrorCode);
sl@0
   176
	void ProcessingFailed(CCamera::CCameraImageCapture& aCaptureImageHandle, TPostCaptureControlId aPostCaptureControlId, TUint aProcessingTypes, TInt aErrorCode);
sl@0
   177
	
sl@0
   178
	void CheckCaptureNotification(CCamera::CCameraImageCapture*& aImageCapture, TPostCaptureControlId& aPostCaptureControlId, TVerdict& aResult);
sl@0
   179
	void CheckCaptureCompletion(CCamera::CCameraImageCapture*& aImageCapture, TVerdict& aResult);
sl@0
   180
	
sl@0
   181
private:
sl@0
   182
	CCamera::CCameraImageCapture* iCaptureImageHandle;
sl@0
   183
	TPostCaptureControlId iPostCaptureControlId;
sl@0
   184
	TUint iProcessingTypes;
sl@0
   185
	TInt iError;
sl@0
   186
	TUid iInputEventUid;
sl@0
   187
	};
sl@0
   188
	
sl@0
   189
class RECamVideoCaptureControlTest : public RTestStep
sl@0
   190
	{
sl@0
   191
public:
sl@0
   192
	static RECamVideoCaptureControlTest* NewL(const TDesC& aTestStep);
sl@0
   193
	
sl@0
   194
protected:
sl@0
   195
	// from RTestStep;
sl@0
   196
	TVerdict DoTestStepL();
sl@0
   197
	
sl@0
   198
	// new
sl@0
   199
	TVerdict DoTestStep_56L();
sl@0
   200
	
sl@0
   201
	TVerdict DoVideoCaptureTestStepL();
sl@0
   202
	
sl@0
   203
private:
sl@0
   204
	RECamVideoCaptureControlTest(const TDesC& aTestStep);
sl@0
   205
	};
sl@0
   206
sl@0
   207
class RECamVideoCaptureNotificationTest : public RECamObserverTest, public MCaptureVideoObserver
sl@0
   208
	{
sl@0
   209
public:
sl@0
   210
	static RECamVideoCaptureNotificationTest* NewL(TBool aAllocTest);
sl@0
   211
	
sl@0
   212
protected:
sl@0
   213
	// from RTestStep;
sl@0
   214
	TVerdict DoTestStepL();
sl@0
   215
	void ConstructL();
sl@0
   216
	
sl@0
   217
private:
sl@0
   218
	RECamVideoCaptureNotificationTest(TBool aAllocTest);
sl@0
   219
	
sl@0
   220
	//MCaptureVideoObserver
sl@0
   221
	void VideoBufferReady(MCameraBuffer2* aVideoBuffer, TInt aErrorCode);
sl@0
   222
	void ClientSnapshotReady(MCameraBuffer2* aSnapshotBuffer, TInt aErrorCode);
sl@0
   223
	void ClientHistogramReady(MHistogramV2Buffer* aClientHistogramBuffer, TInt aErrorCode);
sl@0
   224
	void ImageProcessingFailed(TInt aErrorCode);
sl@0
   225
	void DirectVideoCaptureFailed(TInt aErrorCode);
sl@0
   226
	TInt CustomInterface(TUid aInterface, TAny*& aPtrInterface);
sl@0
   227
sl@0
   228
	void CheckVideoCaptureNegNotification(TInt aErrorCode, TVerdict& aResult);
sl@0
   229
	
sl@0
   230
private:
sl@0
   231
sl@0
   232
	TInt iError;
sl@0
   233
	TUid iInputEventUid;
sl@0
   234
	};
sl@0
   235
	
sl@0
   236
#endif // ECAMEXTENDEDFUNCTEST_H
sl@0
   237