baseport/syborg/webcamera/webcamera_device.h
changeset 124 606eafc6d6a8
parent 52 0dfaca43d90e
equal deleted inserted replaced
52:0dfaca43d90e 124:606eafc6d6a8
    22 #include <e32hal.h>
    22 #include <e32hal.h>
    23 #include <e32ver.h>
    23 #include <e32ver.h>
    24 
    24 
    25 
    25 
    26 class DWebcameraLogicalChannelBase : public DLogicalChannel
    26 class DWebcameraLogicalChannelBase : public DLogicalChannel
    27 {
    27 	{
    28 public:
    28 public:
    29 	/**
    29 	/**
    30 	  Called by PDD from ISR to indicate that a get oneflame operation has completed.
    30 	Called by PDD from ISR to indicate that a get oneflame operation has completed.
    31 	*/
    31 	*/
    32     virtual void GetOneFlameComplete(TInt aResult)=0;
    32     virtual void GetOneFlameComplete(TInt aResult) = 0;
    33 	/** 
    33 	/** 
    34 	call to the function if one Capture image is received.
    34 	call to the function if one Capture image is received.
    35 	*/
    35 	*/
    36     virtual void CaptureComplete(TInt aResult)=0;
    36 	virtual void DoCaptureComplete() = 0;
    37 	/** 
    37 
    38 	call to the function if one flame is received.
    38 public:
       
    39 	/**
       
    40 	pointer to client.
    39 	*/
    41 	*/
    40 	/** 
    42 	DThread* iClient;
    41 	call to the function if one Capture image is received.
    43 	};
    42 	*/
       
    43 	virtual void DoCaptureComplete()=0;
       
    44 	
       
    45 public:
       
    46   /**
       
    47    * pointer to client.
       
    48    */	
       
    49 	DThread* iClient;	
       
    50 };
       
    51 
    44 
    52 class DWebcameraDriverBase : public DBase
    45 class DWebcameraDriverBase : public DBase
    53 {
    46 	{
    54 public:
    47 public:
    55   /**
    48 	/**
    56   Enumeration of stop modes.
    49 	Enumeration of stop modes.
    57   */
    50 	*/
    58   enum TUSBStopMode
    51 	enum TUSBStopMode
    59 	{
    52 		{
    60 	USB_ViewerFinder =0,
    53 		USB_ViewerFinder	= 0,
    61 	USB_capture      =1,
    54 		USB_capture			= 1,
    62 	USB_cancel      =2
    55 		USB_cancel			= 2
       
    56 		};
       
    57 
       
    58 	/**
       
    59 	PowerOn.
       
    60 	*/
       
    61 	virtual TInt PowerOn(TAny* aHeaderPtr) = 0;
       
    62 
       
    63 	/**
       
    64 	InitViewFinder.
       
    65 	*/
       
    66 	virtual TInt InitViewFinder() = 0;
       
    67 
       
    68 	/**
       
    69 	request.
       
    70 	*/
       
    71 	virtual TInt StartViewerFinder(TAny* aDataPtr, TInt aSize) = 0;
       
    72 
       
    73 	/**
       
    74 	Enumeration of stop modes.
       
    75 	*/
       
    76 	virtual void Stop(TUSBStopMode aMode) = 0;
       
    77 
       
    78 	/**
       
    79 	*/
       
    80 	virtual void Disconnect() = 0;
       
    81 
       
    82 //virtual void Caps(TDes8 &aCaps) const;
       
    83 
       
    84 public:
       
    85 	/**
       
    86 	pointer to logic channel.
       
    87 	*/
       
    88 	DWebcameraLogicalChannelBase* iLdd;
       
    89 	/**
       
    90 	Linear Addresses of Peripherals.
       
    91 	*/
       
    92 	TLinAddr iPortAddr;
       
    93 	/**
       
    94 	interrupt number.
       
    95 	*/
       
    96 	TInt iIrq;
    63 	};
    97 	};
    64   /**
       
    65   request.
       
    66   */
       
    67   virtual TInt StartViewerFinder(TUint aBuffer,TInt aSize)=0;
       
    68   /**
       
    69   Enumeration of stop modes.
       
    70   */
       
    71   virtual TInt StartCapture(TUint aBuffer,TInt aSize)=0;
       
    72   /**
       
    73   Enumeration of stop modes.
       
    74   */
       
    75   virtual void Stop(TUSBStopMode aMode)=0;
       
    76 //virtual void Caps(TDes8 &aCaps) const;
       
    77  
       
    78 public:
       
    79   /**
       
    80    * pointer to logic channel.
       
    81    */		
       
    82   DWebcameraLogicalChannelBase* iLdd;
       
    83    /**
       
    84    * Linear Addresses of Peripherals.
       
    85    */		
       
    86   TLinAddr iPortAddr;
       
    87   /**
       
    88    * interrupt number.
       
    89    */		
       
    90   TInt iIrq;
       
    91   
       
    92 };
       
    93 
    98 
    94 #endif
    99 #endif