www.pudn.com > MyP990Camera.zip > MyCameraHandler.h


/*****************************************************************************  
COPYRIGHT All rights reserved Sony Ericsson Mobile Communications AB 2006.  
The software is the copyrighted work of Sony Ericsson Mobile Communications AB.  
The use of the software is subject to the terms of use or of the end-user license  
agreement which accompanies or is included with the software. The software is  
provided "as is" and Sony Ericsson specifically disclaim any warranty or  
condition whatsoever regarding merchantability or fitness for a specific  
purpose, title or non-infringement. No warranty of any kind is made in  
relation to the condition, suitability, availability, accuracy, reliability,  
merchantability and/or non-infringement of the software provided herein.  
*****************************************************************************/ 
 
// MyCameraHandler.h 
 
#ifndef __MYCAMERAHANDLER_H__ 
#define __MYCAMERAHANDLER_H__ 
 
#include  
 
class CMyFileHandler; 
 
class CMyCameraHandler : public MCameraObserver2 
{ 
public: 
  static CMyCameraHandler* NewLC(); 
  virtual ~CMyCameraHandler(); 
 
  void StartCamera(RWindowBase* aWindow); 
  void StopCamera(); 
  TInt ShootPicture(CMyFileHandler* aFileHandler); 
 
  void ListSupportedFormats(); 
  void DoAutoFocus(); 
 
private: 
  CMyCameraHandler(); 
  void ConstructL(); 
 
  // from MCameraObserver2 
  void HandleEvent(const TECAMEvent& aEvent); 
  void ViewFinderReady(MCameraBuffer& aCameraBuffer, TInt aError); 
  void ImageBufferReady(MCameraBuffer& aCameraBuffer, TInt aError); 
  void VideoBufferReady(MCameraBuffer& aCameraBuffer, TInt aError); 
 
  void CloseCamera(); 
 
  void ShowError(const TDesC& aInfo, TInt aErr); 
 
private: 
  CCamera* iCamera; 
  TCameraInfo iCameraInfo; 
 
  TBool iReadyToShoot; 
  TBool iIsShooting; 
 
  RWindowBase* iWindow; 
  CMyFileHandler* iFileHandler; 
 
  TRect iVFRect; 
}; 
 
 
 
#endif