AppEasy Core SDK  1.5.0
Cross platform mobile and desktop app and game development SDK - The easy way to make apps
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
IzPlatformCam.h
Go to the documentation of this file.
00001 // 
00002 //
00003 // AppEasy SDK - Cross Platform Multi-purpose Game and App Engine
00004 //
00005 // Developed by Matthew Hopwood of Pocketeers Limited - www.pocketeers.co.uk
00006 //
00007 // For updates, tutorials and more details check out www.appeasymobile.com
00008 //
00009 // This code is provided free of charge and without any warranty whatsoever. You must ensure that this whole notice is present in all files and derivatives, so the reader knows its origin.
00010 // If you use this SDK in your product then please ensure that you credit AppEasy's usage appropriately. Please see www.appeasymobile.com for licensing details and support
00011 //
00012 //
00013 
00014 #if !defined(_CIZ_PLATFORM_CAM_H_)
00015 #define _CIZ_PLATFORM_CAM_H_
00016 
00017 #include "CzPlatform.h"
00018 
00019 class CzImage;
00020 
00021 #define PLATFORM_CAM            PLATFORM->getCam()
00022 
00023 enum eCzCameraCaptureSize
00024 {
00025     CCS_Small,      // Approx 1/4 screen size
00026     CCS_Medium,     // Approx 1/2 screen size
00027     CCS_Large,      // Approx full screen size
00028 };
00029 
00030 enum eCzCameraCaptureQuality
00031 {
00032     CCQ_Low, 
00033     CCQ_Medium, 
00034     CCQ_High, 
00035 };
00036 
00037 enum eCzCameraType
00038 {
00039     CCT_Rear, 
00040     CCT_Front, 
00041 };
00042 
00043 enum eCzCameraStatus
00044 {
00045     CS_Idle,            // Camera is idle
00046     CS_Streaming,       // Camera is streaming
00047     CS_Failed,          // Error occurred during capture.
00048     CS_Suspended,       // Camera is paused due to device suspend
00049     CS_Restarting       // Camera is being restarted after a device suspend
00050 };
00051 
00052 
00053 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
00054 //
00055 // IzPlatformCam
00056 //
00057 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
00058 class IzPlatformCam
00059 {
00060     // Properties
00061 protected:
00062     bool                    Initialised;
00063 public:
00064     bool                    isInitialised() const   { return Initialised; }
00065     virtual bool            isAvailable() = 0;
00066     virtual bool            isStarted() const = 0;
00067     virtual void            setUpdated(bool updated) = 0;
00068     virtual bool            isUpdated() const = 0;
00069     virtual void            setImageValid(bool valid) = 0;
00070     virtual bool            isImageValid() const = 0;
00071     virtual void            setImageCreated(bool valid) = 0;
00072     virtual bool            isImageCreated() const = 0;
00073     virtual eCzCameraCaptureSize    getSizeHint() const = 0;
00074     virtual eCzCameraCaptureQuality getQuality() const = 0;
00075     virtual void            setImageBrush(CzImage* brush) = 0;
00076     virtual CzImage*        getImageBrush() = 0;
00077     virtual eCzCameraStatus getStatus() = 0;
00078     virtual bool            setFrontFacing() = 0;
00079     virtual bool            setRearFacing() = 0;
00080     virtual int             getLastFrameOrientation() const = 0;
00081     virtual void            setLastFrameOrientation(int angle) = 0;
00082     virtual eCzCameraType   getCameraType() const = 0;
00083     // Properties end
00084 protected:
00085 public:
00086     virtual int     Init() = 0;
00087     virtual void    Release() = 0;
00088 
00089     virtual bool    Start(eCzCameraCaptureSize size_hint, eCzCameraCaptureQuality quality = CCQ_Medium) = 0;
00090     virtual void    Stop() = 0;
00091 };
00092 
00093 
00094 #endif  // _CIZ_PLATFORM_CAM_H_