mmplugins/cameraplugins/testapp/testcameraapps60/inc/TestCameraApp.h
branchRCL_3
changeset 9 9ae0fe04e757
child 64 92a82bc706f7
equal deleted inserted replaced
8:bc06d8566074 9:9ae0fe04e757
       
     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 the License "Symbian Foundation License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/sfl-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 //const TUid KUidTestCameraApp={ 270499122 };
       
    28 //const TUid KUidTestCameraApp={ 0x101F7D32 };
       
    29 #define KUidTestCameraApp 0x101F857A
       
    30 
       
    31 // class CTCamAppView
       
    32 
       
    33 class CTCamAppView : public CCoeControl
       
    34     {
       
    35 public:
       
    36 	CTCamAppView();
       
    37 	~CTCamAppView();
       
    38     void ConstructL(const TRect& aRect);
       
    39 	void DrawImage(CFbsBitmap* aImage) const;
       
    40 	TPoint DrawBorders(const TSize& aSize) const;
       
    41 private:
       
    42 	// from CCoeControl
       
    43 	void Draw(const TRect& /*aRect*/) const;
       
    44     };
       
    45 
       
    46 // CTCamAppUi
       
    47 
       
    48 class CTCamAppUi : public CAknAppUi, public MCameraObserver
       
    49     {
       
    50 public:
       
    51     void ConstructL();
       
    52 	~CTCamAppUi();
       
    53 private:
       
    54 	// From CEikAppUi
       
    55 	virtual void HandleCommandL(TInt aCommand);
       
    56 	// New functions
       
    57 	void ViewFinderL();
       
    58 	void CaptureImageL();
       
    59 	void CaptureVideoL();
       
    60 	// From MCameraObserver
       
    61 	virtual void ReserveComplete(TInt aError);
       
    62 	virtual void PowerOnComplete(TInt aError);
       
    63 	virtual void ViewFinderFrameReady(CFbsBitmap& aFrame);
       
    64 	virtual void ImageReady(CFbsBitmap* aBitmap,HBufC8* aData,TInt aError);
       
    65 	virtual void FrameBufferReady(MFrameBuffer* aFrameBuffer,TInt aError);
       
    66 private:
       
    67 	CCamera* iCamera;
       
    68     CTCamAppView* iAppView;
       
    69     };
       
    70 
       
    71 // CTCamDocument
       
    72 
       
    73 class CTCamDocument : public CAknDocument
       
    74 	{
       
    75 public:
       
    76 	CTCamDocument(CEikApplication& aApp);
       
    77 private:
       
    78 	 // from CEikDocument
       
    79 	CEikAppUi* CreateAppUiL();
       
    80 	};
       
    81 
       
    82 // CTCamApp
       
    83 
       
    84 class CTCamApp : public CAknApplication
       
    85 	{
       
    86 private:
       
    87 	// from CApaApplication
       
    88 	CApaDocument* CreateDocumentL();
       
    89 	TUid AppDllUid() const;
       
    90 	};
       
    91 
       
    92 #endif