1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/imagingandcamerafws/camerafw/testapps/testcameraapps60/TestCameraApp.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,90 @@
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 <aknappui.h>
1.24 +#include <aknapp.h>
1.25 +#include <akndoc.h>
1.26 +
1.27 +#include <ECam.h>
1.28 +
1.29 +const TUid KUidTestCameraApp={ 268450181 };
1.30 +
1.31 +// class CTCamAppView
1.32 +
1.33 +class CTCamAppView : public CCoeControl
1.34 + {
1.35 +public:
1.36 + CTCamAppView();
1.37 + ~CTCamAppView();
1.38 + void ConstructL(const TRect& aRect);
1.39 + void DrawImage(CFbsBitmap* aImage) const;
1.40 + TPoint DrawBorders(const TSize& aSize) const;
1.41 +private:
1.42 + // from CCoeControl
1.43 + void Draw(const TRect& /*aRect*/) const;
1.44 + };
1.45 +
1.46 +// CTCamAppUi
1.47 +
1.48 +class CTCamAppUi : public CAknAppUi, public MCameraObserver
1.49 + {
1.50 +public:
1.51 + void ConstructL();
1.52 + ~CTCamAppUi();
1.53 +private:
1.54 + // From CEikAppUi
1.55 + virtual void HandleCommandL(TInt aCommand);
1.56 + // New functions
1.57 + void ViewFinderL();
1.58 + void CaptureImageL();
1.59 + void CaptureVideoL();
1.60 + // From MCameraObserver
1.61 + virtual void ReserveComplete(TInt aError);
1.62 + virtual void PowerOnComplete(TInt aError);
1.63 + virtual void ViewFinderFrameReady(CFbsBitmap& aFrame);
1.64 + virtual void ImageReady(CFbsBitmap* aBitmap,HBufC8* aData,TInt aError);
1.65 + virtual void FrameBufferReady(MFrameBuffer* aFrameBuffer,TInt aError);
1.66 +private:
1.67 + CCamera* iCamera;
1.68 + CTCamAppView* iAppView;
1.69 + };
1.70 +
1.71 +// CTCamDocument
1.72 +
1.73 +class CTCamDocument : public CAknDocument
1.74 + {
1.75 +public:
1.76 + CTCamDocument(CEikApplication& aApp);
1.77 +private:
1.78 + // from CEikDocument
1.79 + CEikAppUi* CreateAppUiL();
1.80 + };
1.81 +
1.82 +// CTCamApp
1.83 +
1.84 +class CTCamApp : public CAknApplication
1.85 + {
1.86 +private:
1.87 + // from CApaApplication
1.88 + CApaDocument* CreateDocumentL();
1.89 + TUid AppDllUid() const;
1.90 + };
1.91 +
1.92 +#endif
1.93 +