tsrc/mceclientstub/src/mcecamerasource.cpp
branchRCL_3
changeset 23 bc78a40cd63c
parent 22 73a1feb507fb
equal deleted inserted replaced
22:73a1feb507fb 23:bc78a40cd63c
    54 
    54 
    55 // -----------------------------------------------------------------------------
    55 // -----------------------------------------------------------------------------
    56 // 
    56 // 
    57 // -----------------------------------------------------------------------------
    57 // -----------------------------------------------------------------------------
    58 //
    58 //
    59 EXPORT_C CMceCameraSource* CMceCameraSource::NewLC( CMceManager& /*aManager*/ )
    59 EXPORT_C CMceCameraSource* CMceCameraSource::NewLC( CMceManager& aManager )
    60     {
    60     {
    61     CMceCameraSource* self = new( ELeave )CMceCameraSource();
    61     CMceCameraSource* self = new (ELeave) CMceCameraSource();
    62     CleanupStack::PushL( self );
    62     CleanupStack::PushL( self );
       
    63     self->ConstructL( &aManager );
    63     return self;
    64     return self;
    64     }
    65     }
    65 
    66 
    66 // -----------------------------------------------------------------------------
       
    67 // 
       
    68 // -----------------------------------------------------------------------------
       
    69 //
       
    70 EXPORT_C CMceCameraSource* CMceCameraSource::NewL()
       
    71     {
       
    72     CMceCameraSource* self = CMceCameraSource::NewLC();
       
    73     CleanupStack::Pop( self );
       
    74     return self;
       
    75     }
       
    76 
       
    77 
       
    78 // -----------------------------------------------------------------------------
       
    79 // 
       
    80 // -----------------------------------------------------------------------------
       
    81 //
       
    82 EXPORT_C CMceCameraSource* CMceCameraSource::NewLC()
       
    83     {
       
    84     CMceCameraSource* self = new( ELeave )CMceCameraSource();
       
    85     CleanupStack::PushL( self );
       
    86     return self;
       
    87     }
       
    88 
    67 
    89 // -----------------------------------------------------------------------------
    68 // -----------------------------------------------------------------------------
    90 // 
    69 // 
    91 // -----------------------------------------------------------------------------
    70 // -----------------------------------------------------------------------------
    92 //
    71 //
   119 // 
    98 // 
   120 // -----------------------------------------------------------------------------
    99 // -----------------------------------------------------------------------------
   121 //	    
   100 //	    
   122 EXPORT_C TInt CMceCameraSource::CamerasAvailable() const
   101 EXPORT_C TInt CMceCameraSource::CamerasAvailable() const
   123     {
   102     {
   124     return iCameraCount;
   103     return 1;
   125     }
   104     }
   126 
   105 
   127 
   106 
   128 // -----------------------------------------------------------------------------
   107 // -----------------------------------------------------------------------------
   129 // 
   108 // 
   146 // -----------------------------------------------------------------------------
   125 // -----------------------------------------------------------------------------
   147 //	     
   126 //	     
   148 EXPORT_C void CMceCameraSource::GetCameraInfo( TCameraInfo& aInfo ) const
   127 EXPORT_C void CMceCameraSource::GetCameraInfo( TCameraInfo& aInfo ) const
   149     {
   128     {
   150     aInfo = iCameraInfo;
   129     aInfo = iCameraInfo;
   151     
       
   152     aInfo.iMaxZoom += iCameraIndex*5;
       
   153     aInfo.iMaxDigitalZoom += iCameraIndex*5;
       
   154     }
   130     }
   155 
   131 
   156 
   132 
   157 // -----------------------------------------------------------------------------
   133 // -----------------------------------------------------------------------------
   158 // 
   134 // 
   344     iZoomFactor( 1 ),
   320     iZoomFactor( 1 ),
   345     iDigitalZoomFactor( 0 ),
   321     iDigitalZoomFactor( 0 ),
   346     iContrast( 0 ),
   322     iContrast( 0 ),
   347     iBrightness( 0 ),
   323     iBrightness( 0 ),
   348     iExposure( CCamera::EExposureAuto ),
   324     iExposure( CCamera::EExposureAuto ),
   349     iWhiteBalance( CCamera::EWBAuto ),
   325     iWhiteBalance( CCamera::EWBAuto )
   350     iCameraCount ( 2 )
       
   351     {
   326     {
   352     iType = KMceCameraSource;
   327     iType = KMceCameraSource;
   353     iCameraInfo.iMinZoom = 1;
   328     iCameraInfo.iMinZoom = 1;
   354     iCameraInfo.iMaxZoom = 3;
   329     iCameraInfo.iMaxZoom = 3;
   355     iCameraInfo.iMaxDigitalZoom = 10;
   330     iCameraInfo.iMaxDigitalZoom = 10;
   356     }
   331     }
       
   332 
       
   333 
       
   334 // -----------------------------------------------------------------------------
       
   335 // 
       
   336 // -----------------------------------------------------------------------------
       
   337 //
       
   338 void CMceCameraSource::ConstructL( CMceManager* /*aManager*/ )
       
   339     {
       
   340     }
       
   341