sl@0: // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #ifndef __TESTCAMERAAPP_H__ sl@0: #define __TESTCAMERAAPP_H__ sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: const TUid KUidTestCameraApp={ 0x101F7D31 }; sl@0: sl@0: // class CTCamAppView sl@0: sl@0: class CTCamAppView : public CCoeControl sl@0: { sl@0: public: sl@0: CTCamAppView(); sl@0: ~CTCamAppView(); sl@0: void ConstructL(const TRect& aRect); sl@0: void DrawImage(CFbsBitmap* aImage) const; sl@0: TPoint DrawBorders(const TSize& aSize) const; sl@0: private: sl@0: // from CCoeControl sl@0: void Draw(const TRect& /*aRect*/) const; sl@0: }; sl@0: sl@0: // CTCamAppUi sl@0: sl@0: class CTCamAppUi : public CEikAppUi, public MCameraObserver, public MCameraObserver2 sl@0: { sl@0: public: sl@0: void ConstructL(); sl@0: ~CTCamAppUi(); sl@0: private: sl@0: // From CEikAppUi sl@0: virtual void HandleCommandL(TInt aCommand); sl@0: // New functions sl@0: void ViewFinderL(); sl@0: void BurstModeL(); sl@0: void SingleShotL(); sl@0: void CaptureImageL(); sl@0: void CaptureVideoL(); sl@0: void IncImgProcAdjustmentL(TUid aTransformation); sl@0: void DecImgProcAdjustmentL(TUid aTransformation); sl@0: void EnableSnapshotL(); sl@0: void DisableSnapshot(); sl@0: // From MCameraObserver sl@0: virtual void ReserveComplete(TInt aError); sl@0: virtual void PowerOnComplete(TInt aError); sl@0: virtual void ViewFinderFrameReady(CFbsBitmap& aFrame); sl@0: virtual void ImageReady(CFbsBitmap* aBitmap,HBufC8* aData,TInt aError); sl@0: virtual void FrameBufferReady(MFrameBuffer* aFrameBuffer,TInt aError); sl@0: //From MCameraObserver2 sl@0: virtual void HandleEvent(const TECAMEvent& aEvent); sl@0: virtual void ViewFinderReady(MCameraBuffer& aCameraBuffer,TInt aError); sl@0: virtual void ImageBufferReady(MCameraBuffer& aCameraBuffer,TInt aError); sl@0: virtual void VideoBufferReady(MCameraBuffer& aCameraBuffer,TInt aError); sl@0: sl@0: void CreateDependencyFileL(); sl@0: void RemoveDependencyFile(); sl@0: sl@0: void SnapshotDataDisplayL(); sl@0: sl@0: void HandleEvent1(const TECAMEvent& aEvent); sl@0: void HandleEvent2(const TECAMEvent2& aEvent2); sl@0: sl@0: private: sl@0: CCamera* iCamera; sl@0: CCamera::CCameraAdvancedSettings* iCameraAdvSet; sl@0: CCamera::CCameraPresets* iCameraPresets; sl@0: CCamera::CCameraSnapshot* iCameraSnapshot; sl@0: CCamera::CCameraImageProcessing* iCameraImgProc; sl@0: CTCamAppView* iAppView; sl@0: RFs ifsSession; sl@0: }; sl@0: sl@0: // CTCamDocument sl@0: sl@0: class CTCamDocument : public CEikDocument sl@0: { sl@0: public: sl@0: CTCamDocument(CEikApplication& aApp); sl@0: private: sl@0: // from CEikDocument sl@0: CEikAppUi* CreateAppUiL(); sl@0: }; sl@0: sl@0: // CTCamApp sl@0: sl@0: class CTCamApp : public CEikApplication sl@0: { sl@0: private: sl@0: // from CApaApplication sl@0: CApaDocument* CreateDocumentL(); sl@0: TUid AppDllUid() const; sl@0: }; sl@0: sl@0: #endif sl@0: