baseport/syborg/webcamera/webcamera_device.h
changeset 52 0dfaca43d90e
equal deleted inserted replaced
51:457d682728ee 52:0dfaca43d90e
       
     1 /*
       
     2 * Copyright (c) 2010 ISB.
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * ISB - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: USB driver for test
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __deviceBASE_H
       
    19 #define __deviceBASE_H
       
    20 
       
    21 #include <comm.h>
       
    22 #include <e32hal.h>
       
    23 #include <e32ver.h>
       
    24 
       
    25 
       
    26 class DWebcameraLogicalChannelBase : public DLogicalChannel
       
    27 {
       
    28 public:
       
    29 	/**
       
    30 	  Called by PDD from ISR to indicate that a get oneflame operation has completed.
       
    31 	*/
       
    32     virtual void GetOneFlameComplete(TInt aResult)=0;
       
    33 	/** 
       
    34 	call to the function if one Capture image is received.
       
    35 	*/
       
    36     virtual void CaptureComplete(TInt aResult)=0;
       
    37 	/** 
       
    38 	call to the function if one flame is received.
       
    39 	*/
       
    40 	/** 
       
    41 	call to the function if one Capture image is received.
       
    42 	*/
       
    43 	virtual void DoCaptureComplete()=0;
       
    44 	
       
    45 public:
       
    46   /**
       
    47    * pointer to client.
       
    48    */	
       
    49 	DThread* iClient;	
       
    50 };
       
    51 
       
    52 class DWebcameraDriverBase : public DBase
       
    53 {
       
    54 public:
       
    55   /**
       
    56   Enumeration of stop modes.
       
    57   */
       
    58   enum TUSBStopMode
       
    59 	{
       
    60 	USB_ViewerFinder =0,
       
    61 	USB_capture      =1,
       
    62 	USB_cancel      =2
       
    63 	};
       
    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 
       
    94 #endif