os/mm/imagingandcamerafws/camerafw/testapps/testcameraapps60/TestCameraApp.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef __TESTCAMERAAPP_H__
    17 #define __TESTCAMERAAPP_H__
    18 
    19 #include <coecntrl.h>
    20 #include <aknappui.h>
    21 #include <aknapp.h>
    22 #include <akndoc.h>
    23 
    24 #include <ECam.h>
    25 
    26 const TUid KUidTestCameraApp={ 268450181 };
    27 
    28 // class CTCamAppView
    29 
    30 class CTCamAppView : public CCoeControl
    31     {
    32 public:
    33 	CTCamAppView();
    34 	~CTCamAppView();
    35     void ConstructL(const TRect& aRect);
    36 	void DrawImage(CFbsBitmap* aImage) const;
    37 	TPoint DrawBorders(const TSize& aSize) const;
    38 private:
    39 	// from CCoeControl
    40 	void Draw(const TRect& /*aRect*/) const;
    41     };
    42 
    43 // CTCamAppUi
    44 
    45 class CTCamAppUi : public CAknAppUi, public MCameraObserver
    46     {
    47 public:
    48     void ConstructL();
    49 	~CTCamAppUi();
    50 private:
    51 	// From CEikAppUi
    52 	virtual void HandleCommandL(TInt aCommand);
    53 	// New functions
    54 	void ViewFinderL();
    55 	void CaptureImageL();
    56 	void CaptureVideoL();
    57 	// From MCameraObserver
    58 	virtual void ReserveComplete(TInt aError);
    59 	virtual void PowerOnComplete(TInt aError);
    60 	virtual void ViewFinderFrameReady(CFbsBitmap& aFrame);
    61 	virtual void ImageReady(CFbsBitmap* aBitmap,HBufC8* aData,TInt aError);
    62 	virtual void FrameBufferReady(MFrameBuffer* aFrameBuffer,TInt aError);
    63 private:
    64 	CCamera* iCamera;
    65     CTCamAppView* iAppView;
    66     };
    67 
    68 // CTCamDocument
    69 
    70 class CTCamDocument : public CAknDocument
    71 	{
    72 public:
    73 	CTCamDocument(CEikApplication& aApp);
    74 private:
    75 	 // from CEikDocument
    76 	CEikAppUi* CreateAppUiL();
    77 	};
    78 
    79 // CTCamApp
    80 
    81 class CTCamApp : public CAknApplication
    82 	{
    83 private:
    84 	// from CApaApplication
    85 	CApaDocument* CreateDocumentL();
    86 	TUid AppDllUid() const;
    87 	};
    88 
    89 #endif
    90