os/mm/imagingandcamerafws/camerafw/testapps/testcameraapp/TestCameraApp.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/imagingandcamerafws/camerafw/testapps/testcameraapp/TestCameraApp.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,117 @@
     1.4 +// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#ifndef __TESTCAMERAAPP_H__
    1.20 +#define __TESTCAMERAAPP_H__
    1.21 +
    1.22 +#include <coecntrl.h>
    1.23 +#include <eikappui.h>
    1.24 +#include <eikapp.h>
    1.25 +#include <eikdoc.h>
    1.26 +
    1.27 +#include <ecam.h>
    1.28 +#include <ecamadvsettings.h>
    1.29 +#include <ecam/camerasnapshot.h>
    1.30 +
    1.31 +const TUid KUidTestCameraApp={ 0x101F7D31 };
    1.32 +
    1.33 +// class CTCamAppView
    1.34 +
    1.35 +class CTCamAppView : public CCoeControl
    1.36 +    {
    1.37 +public:
    1.38 +	CTCamAppView();
    1.39 +	~CTCamAppView();
    1.40 +    void ConstructL(const TRect& aRect);
    1.41 +	void DrawImage(CFbsBitmap* aImage) const;
    1.42 +	TPoint DrawBorders(const TSize& aSize) const;
    1.43 +private:
    1.44 +	// from CCoeControl
    1.45 +	void Draw(const TRect& /*aRect*/) const;
    1.46 +    };
    1.47 +
    1.48 +// CTCamAppUi
    1.49 +
    1.50 +class CTCamAppUi : public CEikAppUi, public MCameraObserver, public MCameraObserver2
    1.51 +    {
    1.52 +public:
    1.53 +    void ConstructL();
    1.54 +	~CTCamAppUi();
    1.55 +private:
    1.56 +	// From CEikAppUi
    1.57 +	virtual void HandleCommandL(TInt aCommand);
    1.58 +	// New functions
    1.59 +	void ViewFinderL();
    1.60 +	void BurstModeL();
    1.61 +	void SingleShotL();
    1.62 +	void CaptureImageL();
    1.63 +	void CaptureVideoL();
    1.64 +	void IncImgProcAdjustmentL(TUid aTransformation);
    1.65 +	void DecImgProcAdjustmentL(TUid aTransformation);
    1.66 +	void EnableSnapshotL();
    1.67 +	void DisableSnapshot();
    1.68 +	// From MCameraObserver
    1.69 +	virtual void ReserveComplete(TInt aError);
    1.70 +	virtual void PowerOnComplete(TInt aError);
    1.71 +	virtual void ViewFinderFrameReady(CFbsBitmap& aFrame);
    1.72 +	virtual void ImageReady(CFbsBitmap* aBitmap,HBufC8* aData,TInt aError);
    1.73 +	virtual void FrameBufferReady(MFrameBuffer* aFrameBuffer,TInt aError);
    1.74 +	//From MCameraObserver2
    1.75 +	virtual void HandleEvent(const TECAMEvent& aEvent);
    1.76 +	virtual void ViewFinderReady(MCameraBuffer& aCameraBuffer,TInt aError);
    1.77 +	virtual void ImageBufferReady(MCameraBuffer& aCameraBuffer,TInt aError);
    1.78 +	virtual void VideoBufferReady(MCameraBuffer& aCameraBuffer,TInt aError);
    1.79 +	
    1.80 +    void CreateDependencyFileL();
    1.81 +    void RemoveDependencyFile();
    1.82 +    
    1.83 +    void SnapshotDataDisplayL();
    1.84 +    
    1.85 +    void HandleEvent1(const TECAMEvent& aEvent);
    1.86 +    void HandleEvent2(const TECAMEvent2& aEvent2);
    1.87 +    
    1.88 +private:
    1.89 +	CCamera* iCamera;
    1.90 +	CCamera::CCameraAdvancedSettings* iCameraAdvSet;
    1.91 +	CCamera::CCameraPresets* iCameraPresets;
    1.92 +	CCamera::CCameraSnapshot* iCameraSnapshot;
    1.93 +	CCamera::CCameraImageProcessing* iCameraImgProc;
    1.94 +    CTCamAppView* iAppView;
    1.95 +    RFs ifsSession;
    1.96 +    };
    1.97 +
    1.98 +// CTCamDocument
    1.99 +
   1.100 +class CTCamDocument : public CEikDocument
   1.101 +	{
   1.102 +public:
   1.103 +	CTCamDocument(CEikApplication& aApp);
   1.104 +private:
   1.105 +	 // from CEikDocument
   1.106 +	CEikAppUi* CreateAppUiL();
   1.107 +	};
   1.108 +
   1.109 +// CTCamApp
   1.110 +
   1.111 +class CTCamApp : public CEikApplication
   1.112 +	{
   1.113 +private:
   1.114 +	// from CApaApplication
   1.115 +	CApaDocument* CreateDocumentL();
   1.116 +	TUid AppDllUid() const;
   1.117 +	};
   1.118 +
   1.119 +#endif
   1.120 +