os/mm/imagingandcamerafws/cameraunittest/src/ECamUnitTestPlugin/ECamUnitTestPlugin.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #include <f32file.h>
    17 #include <ecom/ecom.h>
    18 #include <ecom/implementationproxy.h>
    19 #include <ecamuids.hrh>
    20 #include <ecam.h>
    21 #include <ecam/ecamadvsettingsintfuids.hrh>
    22 #include "ECamUnitTestPlugin.h"
    23 #include "ECamUnitTestPluginUids.hrh"
    24 #include "AdvancedSettings.h"
    25 #include <ecam/ecamcommonuids.hrh>
    26 #include "EnhanceFunctionality.h"
    27 #include "directviewfinder.h"
    28 #include "extended_functionality.h"
    29 
    30 const TBool KTestCamerasPresent[] = {ETrue, EFalse, EFalse};
    31 const CCamera::CCameraAdvancedSettings::TCameraType KTestCamerasTypes[] = 	
    32 									{
    33 									CCamera::CCameraAdvancedSettings::ECameraOnBoard, 
    34 									CCamera::CCameraAdvancedSettings::ECameraPluggable, 
    35 									CCamera::CCameraAdvancedSettings::ECameraPluggable
    36 									}; 
    37 
    38 //
    39 // Main stuff
    40 //
    41 static void Panic(TInt aReason)
    42 	{
    43 	_LIT(KDllName, "ECam Unit Test Plugin");
    44 	User::Panic(KDllName, aReason);
    45 	}
    46 	
    47 //
    48 // CCamUnitTestPlugin
    49 //
    50 CCamUnitTestPlugin::CCamUnitTestPlugin()
    51 	{
    52 	iPresets.Reset();
    53 	iSupportedISORates.Reset();
    54 	iIsoRate = KDefaultIsoRate;
    55 	for ( TInt i = 0; i< KECamSetAvailableCameras; i++)
    56 		{
    57 		iCameras[i] = KTestCamerasPresent[i]; 
    58 		iCameraTypes[i] = KTestCamerasTypes[i];
    59 		}	
    60 		
    61 	iVFHandleGenerater = 0;
    62 	}
    63 	
    64 CCamUnitTestPlugin::~CCamUnitTestPlugin()
    65 	{
    66 	iSupportedISORates.Close();
    67 	}
    68 	
    69 CCamUnitTestPlugin* CCamUnitTestPlugin::NewL()
    70 	{
    71 	FileDependencyUtil::CheckFileDependencyL();
    72 	return new (ELeave) CCamUnitTestPlugin;
    73 	}
    74 	
    75 // 
    76 // 2nd stage ConstructL calls called by framework
    77 //
    78 
    79 void CCamUnitTestPlugin::Construct2L(MCameraObserver& aObserver,TInt aCameraIndex)
    80 	{
    81 	iObserver = &aObserver;
    82 	iCameraIndex = aCameraIndex;
    83 	}
    84 	
    85 void CCamUnitTestPlugin::Construct2DupL(MCameraObserver& aObserver,TInt aCameraHandle)
    86 	{
    87 	iObserver = &aObserver;
    88 	iCameraHandle = aCameraHandle;
    89 	}
    90 
    91 
    92 void CCamUnitTestPlugin::Construct2L(MCameraObserver2& aObserver,TInt aCameraIndex,TInt aPriority)
    93 	{
    94 	iObserver2 = &aObserver;
    95 	iCameraIndex = aCameraIndex;
    96 	iPriority = aPriority;
    97 			
    98 	iSupportedISORates.AppendL(KMinIsoRate);
    99 	iSupportedISORates.AppendL(KDefaultIsoRate);
   100 	iSupportedISORates.AppendL(KIsoRate1);
   101 	iSupportedISORates.AppendL(KIsoRate2);
   102 	iSupportedISORates.AppendL(KIsoRate3);
   103 	iSupportedISORates.AppendL(KIsoRate4);
   104 	iSupportedISORates.AppendL(KIsoRate5);
   105 	iSupportedISORates.AppendL(KMaxIsoRate);
   106 	}
   107 	
   108 void CCamUnitTestPlugin::Construct2DupL(MCameraObserver2& aObserver,TInt aCameraHandle)
   109 	{
   110 	iObserver2 = &aObserver;
   111 	iCameraHandle = aCameraHandle;
   112 	
   113 		
   114 	iSupportedISORates.AppendL(KMinIsoRate);
   115 	iSupportedISORates.AppendL(KDefaultIsoRate);
   116 	iSupportedISORates.AppendL(KIsoRate1);
   117 	iSupportedISORates.AppendL(KIsoRate2);
   118 	iSupportedISORates.AppendL(KIsoRate3);
   119 	iSupportedISORates.AppendL(KIsoRate4);
   120 	iSupportedISORates.AppendL(KIsoRate5);
   121 	iSupportedISORates.AppendL(KMaxIsoRate);
   122 	}
   123 
   124 
   125 	
   126 //
   127 // Dummy versions of virtual functions
   128 //
   129 
   130 void CCamUnitTestPlugin::CameraInfo(TCameraInfo& /*aInfo*/) const
   131 	{
   132 	}
   133 
   134 void CCamUnitTestPlugin::Reserve()
   135 	{
   136 	}
   137 
   138 
   139 void CCamUnitTestPlugin::Release()
   140 	{
   141 	}
   142 
   143 void CCamUnitTestPlugin::PowerOn()
   144 	{
   145 	}
   146 
   147 void CCamUnitTestPlugin::PowerOff()
   148 	{
   149 	}
   150 
   151 TInt CCamUnitTestPlugin::Handle()
   152 	{
   153 	return 0;
   154 	}
   155 
   156 void CCamUnitTestPlugin::SetZoomFactorL(TInt /*aZoomFactor = 0*/)
   157 	{
   158 	}
   159 
   160 TInt CCamUnitTestPlugin::ZoomFactor() const
   161 	{
   162 	return 0;
   163 	}
   164 
   165 void CCamUnitTestPlugin::SetDigitalZoomFactorL(TInt /*aDigitalZoomFactor = 0*/)
   166 	{
   167 	}
   168 
   169 TInt CCamUnitTestPlugin::DigitalZoomFactor() const
   170 	{
   171 	return 0;
   172 	}
   173 
   174 void CCamUnitTestPlugin::SetContrastL(TInt /*aContrast*/)
   175 	{
   176 	}
   177 
   178 TInt CCamUnitTestPlugin::Contrast() const
   179 	{
   180 	return 0;
   181 	}
   182 
   183 void CCamUnitTestPlugin::SetBrightnessL(TInt /*aBrightness*/)
   184 	{
   185 	}
   186 
   187 TInt CCamUnitTestPlugin::Brightness() const
   188 	{
   189 	return 0;
   190 	}
   191 
   192 
   193 void CCamUnitTestPlugin::SetFlashL(TFlash /*aFlash = EFlashNone*/)
   194 	{
   195 	Panic(EPanicUnimplemented);
   196 	}
   197 
   198 CCamera::TFlash CCamUnitTestPlugin::Flash() const
   199 	{
   200 	Panic(EPanicUnimplemented);
   201 	return EFlashNone;
   202 	}
   203 
   204 void CCamUnitTestPlugin::SetExposureL(TExposure /*aExposure = EExposureAuto*/)
   205 	{
   206 	Panic(EPanicUnimplemented);
   207 	}
   208 
   209 CCamera::TExposure CCamUnitTestPlugin::Exposure() const
   210 	{
   211 	Panic(EPanicUnimplemented);
   212 	return EExposureAuto;
   213 	}
   214 
   215 void CCamUnitTestPlugin::SetWhiteBalanceL(TWhiteBalance /*aWhiteBalance = EWBAuto*/)
   216 	{
   217 	Panic(EPanicUnimplemented);
   218 	}
   219 
   220 CCamera::TWhiteBalance CCamUnitTestPlugin::WhiteBalance() const
   221 	{
   222 	Panic(EPanicUnimplemented);
   223 	return EWBAuto;
   224 	}
   225 
   226 void CCamUnitTestPlugin::StartViewFinderDirectL(RWsSession& /*aWs*/,CWsScreenDevice& /*aScreenDevice*/,RWindowBase& /*aWindow*/,TRect& /*aScreenRect*/)
   227 	{
   228 	Panic(EPanicUnimplemented);
   229 	}
   230 
   231 void CCamUnitTestPlugin::StartViewFinderDirectL(RWsSession& /*aWs*/,CWsScreenDevice& /*aScreenDevice*/,RWindowBase& /*aWindow*/,TRect& /*aScreenRect*/,TRect& /*aClipRect*/)
   232 	{
   233 	Panic(EPanicUnimplemented);
   234 	}
   235 
   236 void CCamUnitTestPlugin::StartViewFinderBitmapsL(TSize& /*aSize*/)
   237 	{
   238 	Panic(EPanicUnimplemented);
   239 	}
   240 	
   241 void CCamUnitTestPlugin::StartViewFinderBitmapsL(TSize& /*aSize*/,TRect& /*aClipRect*/)
   242 	{
   243 	Panic(EPanicUnimplemented);
   244 	}
   245 
   246 
   247 void CCamUnitTestPlugin::StartViewFinderL(TFormat /*aImageFormat*/,TSize& /*aSize*/)
   248 	{
   249 	Panic(EPanicUnimplemented);
   250 	}
   251 
   252 void CCamUnitTestPlugin::StartViewFinderL(TFormat /*aImageFormat*/,TSize& /*aSize*/,TRect& /*aClipRect*/)
   253 	{
   254 	Panic(EPanicUnimplemented);
   255 	}
   256 
   257 
   258 void CCamUnitTestPlugin::StopViewFinder()
   259 	{
   260 	Panic(EPanicUnimplemented);
   261 	}
   262 
   263 TBool CCamUnitTestPlugin::ViewFinderActive() const
   264 	{
   265 	Panic(EPanicUnimplemented);
   266 	return EFalse;
   267 	}
   268 
   269 void CCamUnitTestPlugin::SetViewFinderMirrorL(TBool /*aMirror*/)
   270 	{
   271 	Panic(EPanicUnimplemented);
   272 	}
   273 
   274 TBool CCamUnitTestPlugin::ViewFinderMirror() const
   275 	{
   276 	Panic(EPanicUnimplemented);
   277 	return EFalse;
   278 	}
   279 
   280 void CCamUnitTestPlugin::PrepareImageCaptureL(TFormat /*aImageFormat*/,TInt /*aSizeIndex*/)
   281 	{
   282 	Panic(EPanicUnimplemented);
   283 	}
   284 
   285 void CCamUnitTestPlugin::PrepareImageCaptureL(TFormat /*aImageFormat*/,TInt /*aSizeIndex*/,const TRect& /*aClipRect*/)
   286 	{
   287 	Panic(EPanicUnimplemented);
   288 	}
   289 
   290 void CCamUnitTestPlugin::CaptureImage()
   291 	{
   292 	Panic(EPanicUnimplemented);
   293 	}
   294 
   295 void CCamUnitTestPlugin::CancelCaptureImage()
   296 	{
   297 	Panic(EPanicUnimplemented);
   298 	}
   299 
   300 void CCamUnitTestPlugin::EnumerateCaptureSizes(TSize& /*aSize*/,TInt /*aSizeIndex*/,TFormat /*aFormat*/) const
   301 	{
   302 	Panic(EPanicUnimplemented);
   303 	}
   304 
   305 void CCamUnitTestPlugin::PrepareVideoCaptureL(TFormat /*aFormat*/,TInt /*aSizeIndex*/,TInt /*aRateIndex*/,TInt /*aBuffersToUse*/,TInt /*aFramesPerBuffer*/)
   306 	{
   307 	Panic(EPanicUnimplemented);
   308 	}
   309 
   310 void CCamUnitTestPlugin::PrepareVideoCaptureL(TFormat /*aFormat*/,TInt /*aSizeIndex*/,TInt /*aRateIndex*/,TInt /*aBuffersToUse*/,TInt /*aFramesPerBuffer*/,const TRect& /*aClipRect*/)
   311 	{
   312 	Panic(EPanicUnimplemented);
   313 	}
   314 
   315 void CCamUnitTestPlugin::StartVideoCapture()
   316 	{
   317 	Panic(EPanicUnimplemented);
   318 	}
   319 
   320 void CCamUnitTestPlugin::StopVideoCapture()
   321 	{
   322 	Panic(EPanicUnimplemented);
   323 	}
   324 
   325 TBool CCamUnitTestPlugin::VideoCaptureActive() const
   326 	{
   327 	Panic(EPanicUnimplemented);
   328 	return EFalse;
   329 	}
   330 
   331 void CCamUnitTestPlugin::EnumerateVideoFrameSizes(TSize& /*aSize*/,TInt /*aSizeIndex*/,TFormat /*aFormat*/) const
   332 	{
   333 	Panic(EPanicUnimplemented);
   334 	}
   335 
   336 void CCamUnitTestPlugin::EnumerateVideoFrameRates(TReal32& /*aRate*/,TInt /*aRateIndex*/,TFormat /*aFormat*/,TInt /*aSizeIndex*/,TExposure /*aExposure = EExposureAuto*/) const
   337 	{
   338 	Panic(EPanicUnimplemented);
   339 	}
   340 
   341 void CCamUnitTestPlugin::GetFrameSize(TSize& /*aSize*/) const
   342 	{
   343 	Panic(EPanicUnimplemented);
   344 	}
   345 
   346 TReal32 CCamUnitTestPlugin::FrameRate() const
   347 	{
   348 	Panic(EPanicUnimplemented);
   349 	return 0.0;
   350 	}
   351 
   352 TInt CCamUnitTestPlugin::BuffersInUse() const
   353 	{
   354 	Panic(EPanicUnimplemented);
   355 	return 0;
   356 	}
   357 
   358 TInt CCamUnitTestPlugin::FramesPerBuffer() const
   359 	{
   360 	Panic(EPanicUnimplemented);
   361 	return 0;
   362 	}
   363 
   364 void CCamUnitTestPlugin::SetJpegQuality(TInt /*aQuality*/)
   365 	{
   366 	Panic(EPanicUnimplemented);
   367 	}
   368 
   369 TInt CCamUnitTestPlugin::JpegQuality() const
   370 	{
   371 	Panic(EPanicUnimplemented);
   372 	return 0;
   373 	}
   374 
   375 TAny* CCamUnitTestPlugin::CustomInterface(TUid aInterfaceUid)
   376 	{
   377 	TAny* advSettingObject = NULL;
   378 	// use the fact that the parent is a friend of the class
   379 	
   380 	TRAPD(err, advSettingObject = CCamera::CustomInterface(aInterfaceUid));
   381 	
   382 	if (err == KErrNone)
   383 		{
   384 		return advSettingObject;
   385 		}
   386 	/*else if (err == KErrNoMemory)
   387 		{
   388 		User::Leave(KErrNoMemory);
   389 		}*/
   390 	return NULL;
   391 	}
   392 
   393 
   394 TAny* CCamera::CustomInterface(TUid aInterfaceUid)
   395 	{
   396 	switch (aInterfaceUid.iUid)
   397 		{
   398 		// presets
   399 		case KECamPresetsUidValue:
   400 			{
   401 			CCamera::CCameraPresets* presets = new (ELeave)CCamera::CCameraPresets(*this); 
   402 			CleanupStack::PushL(presets);
   403 			presets->ConstructL();
   404 			CleanupStack::Pop(presets);
   405 			
   406 			return static_cast<TAny*>(presets); 
   407 			}	
   408 
   409 		case KECamMCameraPresetsUidValue:
   410 			{
   411 			return static_cast<MCameraPresets*>(CCamPresets::NewL(static_cast<CCamUnitTestPlugin&>(*this)));
   412 			}
   413 			
   414 		case KECamMCameraPresets2UidValue:
   415 			{
   416 			return static_cast<MCameraPresets2*>(CCamPresets::NewL(static_cast<CCamUnitTestPlugin&>(*this)));
   417 			}
   418 			
   419 		// image processing 
   420 		case KECamImageProcessingUidValue:
   421 			{
   422 			CCamera::CCameraImageProcessing* processing = new (ELeave)CCamera::CCameraImageProcessing(*this); 
   423 			CleanupStack::PushL(processing);
   424 			processing->ConstructL();
   425 			CleanupStack::Pop(processing);
   426 			
   427 			return static_cast<TAny*>(processing); 
   428 			}
   429 						
   430 		case KECamMCameraImageProcessingUidValue:
   431 			{
   432 			return static_cast<MCameraImageProcessing*>(CCamImgProc::NewL(static_cast<CCamUnitTestPlugin&>(*this)));
   433 			}
   434 			
   435 		case KECamMCameraImageProcessing2UidValue:
   436 			{
   437 			return static_cast<MCameraImageProcessing2*>(CCamImgProc::NewL(static_cast<CCamUnitTestPlugin&>(*this)));
   438 			}
   439 			
   440 		case KECamMCameraImageProcessing3UidValue:
   441 			{
   442 			return static_cast<MCameraImageProcessing3*>(CCamImgProc::NewL(static_cast<CCamUnitTestPlugin&>(*this)));
   443 			}
   444 			
   445 		// advanced settings
   446 		case KECamAdvancedSettingUidValue:
   447 			{
   448 			CCamera::CCameraAdvancedSettings* settings = new (ELeave)CCamera::CCameraAdvancedSettings(*this); 
   449 			CleanupStack::PushL(settings);
   450 			settings->ConstructL();
   451 			CleanupStack::Pop(settings);
   452 			
   453 			return static_cast<TAny*>(settings); 
   454 			}
   455 			
   456 		case KECamMCameraAdvancedSettingsUidValue:
   457 			{
   458 			return static_cast<MCameraAdvancedSettings*>(CCamAdvSet::NewL(static_cast<CCamUnitTestPlugin&>(*this)));
   459 			}
   460 		
   461 		case KECamMCameraAdvancedSettings2UidValue:
   462 			{
   463 			return static_cast<MCameraAdvancedSettings2*>(CCamAdvSet::NewL(static_cast<CCamUnitTestPlugin&>(*this)));
   464 			}	
   465 			
   466 		case KECamMCameraAdvancedSettings3UidValue:
   467 			{
   468 			return static_cast<MCameraAdvancedSettings3*>(CCamAdvSet::NewL(static_cast<CCamUnitTestPlugin&>(*this)));
   469 			}
   470 			
   471 		case KECamMCameraAdvancedSettings4UidValue:
   472 			{
   473 			return static_cast<MCameraAdvancedSettings4*>(CCamAdvSet::NewL(static_cast<CCamUnitTestPlugin&>(*this)));
   474 			}
   475 		
   476 		case KUidCameraManagementUidValue:
   477 			{
   478 			return (CCamManagement::NewL(static_cast<CCamUnitTestPlugin&>(*this)));
   479 			}
   480 
   481 		//		
   482 		// enhance camera functionality //
   483 		//
   484 		case KECamHistogramUidValue:
   485 			{
   486 			return static_cast<TAny*>(CCamera::CCameraHistogram::NewL(*this)); 
   487 			}
   488 			
   489 		case KECamMCameraHistogramUidValue:
   490 			{
   491 			return static_cast<MCameraHistogram*>(CCamHistogram::NewL(static_cast<CCamUnitTestPlugin&>(*this)));
   492 			}
   493 			
   494 		case KECamOverlayUidValue:
   495 			{
   496 			return static_cast<TAny*>(CCamera::CCameraOverlay::NewL(*this)); 
   497 			}	
   498 			
   499 		case KECamMCameraOverlayUidValue:
   500 			{
   501 			return static_cast<MCameraOverlay*>(CCamOverlay::NewL(static_cast<CCamUnitTestPlugin&>(*this)));
   502 			}	
   503 			
   504 		case KECamMCameraOverlay2UidValue:
   505 			{
   506 			return static_cast<MCameraOverlay2*>(CCamOverlay::NewL(static_cast<CCamUnitTestPlugin&>(*this)));
   507 			}
   508 			
   509 		case KECamSnapshotUidValue:
   510 			{
   511 			return static_cast<TAny*>(CCamera::CCameraSnapshot::NewL(*this)); 
   512 			}
   513 					
   514 		case KECamMCameraSnapshotUidValue:
   515 			{
   516 			return static_cast<MCameraSnapshot*>(CCamSnapshot::NewL(static_cast<CCamUnitTestPlugin&>(*this)));
   517 			}	
   518 			
   519 		//		
   520 		// direct viewfinder functionality //
   521 		//			
   522 		case KECamDirectViewFinderUidValue:
   523 			{
   524 			return static_cast<TAny*>(CCamera::CCameraDirectViewFinder::NewL(*this));  
   525 			}		
   526 			
   527 		case KECamMCameraDirectViewFinderUidValue:
   528 			{
   529 			return static_cast<MCameraDirectViewFinder*>(CCamDirectViewFinder::NewL(static_cast<CCamUnitTestPlugin&>(*this)));
   530 			}	
   531 		
   532 		case KECamMCameraPreImageCaptureControlUidValue:
   533 			{
   534 			return static_cast<MCameraPreImageCaptureControl*>(CCamPreImageCaptureControl::NewL(static_cast<CCamUnitTestPlugin&>(*this)));
   535 			}
   536 		
   537 		case KECamMCameraImageCaptureUidValue:
   538 			{
   539 			return static_cast<MCameraImageCapture*>(CCamImageCapture::NewL(static_cast<CCamUnitTestPlugin&>(*this)));
   540 			}
   541 
   542 		case KECamMCameraVideoCaptureControlUidValue:
   543 			{
   544 			return static_cast<MCameraVideoCaptureControl*>(CCamVideoCaptureControl::NewL(static_cast<CCamUnitTestPlugin&>(*this)));
   545 			}
   546 			
   547 		case KECamMCameraClientViewFinderUidValue:
   548 			{
   549 			return static_cast<MCameraClientViewFinder*>(CCamClientViewFinder::NewL(static_cast<CCamUnitTestPlugin&>(*this)));
   550 			}
   551 			
   552 		case KECamMCameraBaseClientViewFinderUidValue:
   553 			{
   554 			return static_cast<MCameraViewFinder*>(CCamClientViewFinder::NewL(static_cast<CCamUnitTestPlugin&>(*this)));
   555 			}
   556 			
   557 		case KECamMCameraV2DirectViewFinderUidValue:
   558 			{
   559 			return static_cast<MCameraV2DirectViewFinder*>(CCamV2DirectViewFinder::NewL(static_cast<CCamUnitTestPlugin&>(*this)));
   560 			}
   561 			
   562 		case KECamMCameraBaseV2DirectViewFinderUidValue:
   563 			{
   564 			return static_cast<MCameraViewFinder*>(CCamV2DirectViewFinder::NewL(static_cast<CCamUnitTestPlugin&>(*this)));
   565 			}
   566 		default:
   567 			{		
   568 			return NULL;
   569 			}
   570 		}
   571 	}
   572 	
   573 void CCamUnitTestPlugin::GenerateVFHandle(TInt& aVFHandle)
   574 	{
   575 	iVFHandleGenerater++;
   576 	aVFHandle = iVFHandleGenerater;
   577 	}
   578 	
   579 void CCamUnitTestPlugin::Notify(TUid aMessageId, TInt aError)
   580 	{
   581 	if (iObserver2 != NULL)
   582 		{
   583 		iObserver2->HandleEvent(TECAMEvent(aMessageId, aError));
   584 		}
   585 	}
   586 	
   587 void CCamUnitTestPlugin::Notify2(TUid aMessageId, TInt aError, TInt aParam)
   588 	{
   589 	if (iObserver2 != NULL)
   590 		{
   591 		iObserver2->HandleEvent(TECAMEvent2(aMessageId, aError, aParam));	
   592 		}
   593 	}
   594 	
   595 //
   596 // CCamUnitTestPluginInfo
   597 //
   598 
   599 CCamUnitTestPluginInfo::CCamUnitTestPluginInfo()
   600 	{
   601 	}
   602 	
   603 CCamUnitTestPluginInfo::~CCamUnitTestPluginInfo()
   604 	{
   605 	}
   606 	
   607 CCamUnitTestPluginInfo* CCamUnitTestPluginInfo::NewL()
   608 	{
   609 	FileDependencyUtil::CheckFileDependencyL();
   610 	return new (ELeave) CCamUnitTestPluginInfo;
   611 	}
   612 	
   613 TInt CCamUnitTestPluginInfo::CamerasAvailable()
   614 	{
   615 	return KECamSetAvailableCameras;
   616 	}
   617 
   618 //
   619 // CCamUnitTestPluginSecureId
   620 //	
   621 
   622 CCamUnitTestPluginSecureId::CCamUnitTestPluginSecureId()
   623 	{
   624 	}
   625 	
   626 CCamUnitTestPluginSecureId::~CCamUnitTestPluginSecureId()
   627 	{
   628 	}
   629 	
   630 CCamUnitTestPluginSecureId* CCamUnitTestPluginSecureId::NewL()
   631 	{
   632 	CCamUnitTestPluginSecureId* pluginSecureId = new (ELeave) CCamUnitTestPluginSecureId;
   633 	return pluginSecureId;
   634 	}
   635 	
   636 void CCamUnitTestPluginSecureId::Release()
   637 	{
   638 	delete this;
   639 	}
   640 	
   641 void CCamUnitTestPluginSecureId::GetSecureIdL(TInt& aSecureId) const
   642 	{
   643 	TSecureId secureId = User::CreatorSecureId();	
   644 	aSecureId = secureId.iId;
   645 	}
   646 
   647 void FileDependencyUtil::CheckFileDependencyL()
   648 	{
   649 	RFs fsSession;
   650   	RFile file;
   651     
   652   	User::LeaveIfError(fsSession.Connect());
   653   	CleanupClosePushL(fsSession);
   654     TInt err = file.Open(fsSession, KECamUnitTestPluginName, EFileRead);
   655   	file.Close();
   656   	
   657   	if(err != KErrNone)
   658   		{
   659 	    User::LeaveIfError(KErrNotSupported);
   660   		}
   661   	CleanupStack::PopAndDestroy(); //fsSession 
   662 	
   663 	}
   664 
   665 // __________________________________________________________________________
   666 // Exported proxy for instantiation method resolution
   667 // Define the interface UIDs
   668 const TImplementationProxy ImplementationTable[] = 
   669 	{
   670 		IMPLEMENTATION_PROXY_ENTRY(KUidCameraUnitTestPlugin,	CCamUnitTestPlugin::NewL),
   671 		IMPLEMENTATION_PROXY_ENTRY(KUidCameraUnitTestInfo,	CCamUnitTestPluginInfo::NewL),
   672 		IMPLEMENTATION_PROXY_ENTRY(KUidCameraUnitTestSecureId,	CCamUnitTestPluginSecureId::NewL)
   673 	};
   674 
   675 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
   676 	{
   677 	aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
   678 
   679 	return ImplementationTable;
   680 	}
   681