baseport/syborg/webcamera/webcamera_ldd.cpp
changeset 69 634f7e208f90
parent 52 0dfaca43d90e
child 124 606eafc6d6a8
equal deleted inserted replaced
68:c9d64fb26f98 69:634f7e208f90
       
     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 #include <kern_priv.h>
       
    19 #include "webcamera_ldd.h"
       
    20 #include <webcamera_driver.h>
       
    21 
       
    22 #define DP(format...) Kern::Printf(format)
       
    23 
       
    24 _LIT(KDriver1PanicCategory,"WebcameraDevice");
       
    25 
       
    26 /**
       
    27  *Create Logic device.
       
    28  *
       
    29  */
       
    30 DECLARE_STANDARD_LDD()
       
    31 	{
       
    32     DP("DECLARE_STANDARD_LDD()");
       
    33     return new DWebcameraLogicalDevice;
       
    34 	}
       
    35 
       
    36 /**
       
    37   Constructor
       
    38 */
       
    39 DWebcameraLogicalDevice::DWebcameraLogicalDevice()
       
    40 	{
       
    41 	DP("DWebcameraLogicalDevice()");
       
    42     // Set version number for this device
       
    43     iVersion=RWebcameraDevice::VersionRequired();
       
    44     // Indicate that we work with a PDD
       
    45     iParseMask=KDeviceAllowPhysicalDevice;
       
    46 	}
       
    47 
       
    48 /**
       
    49   Destructor
       
    50 */
       
    51 DWebcameraLogicalDevice::~DWebcameraLogicalDevice()
       
    52 	{
       
    53 	}
       
    54 
       
    55 /**
       
    56   Second stage constructor for DDriver1Factory.
       
    57   This must at least set a name for the driver object.
       
    58 
       
    59   @return KErrNone if successful, otherwise one of the other system wide error codes.
       
    60 */
       
    61 TInt DWebcameraLogicalDevice::Install()
       
    62 	{
       
    63 	DP("DWebcameraLogicalDevice::Install()");
       
    64 
       
    65 	return SetName(&RWebcameraDevice::Name());
       
    66 	}
       
    67 
       
    68 /**
       
    69   Return the drivers capabilities.
       
    70   Called in the response to an RDevice::GetCaps() request.
       
    71 
       
    72   @param aDes User-side descriptor to write capabilities information into
       
    73 */
       
    74 void DWebcameraLogicalDevice::GetCaps(TDes8& aDes) const
       
    75 	{
       
    76     // Create a capabilities object
       
    77 	RWebcameraDevice::TCaps caps;
       
    78     caps.iVersion = iVersion;
       
    79     // Write it back to user memory
       
    80     Kern::InfoCopy(aDes,(TUint8*)&caps,sizeof(caps));
       
    81 	}
       
    82 
       
    83 /**
       
    84   Called by the kernel's device driver framework to create a Logical Channel.
       
    85   This is called in the context of the user thread (client) which requested the creation of a Logical Channel
       
    86   (E.g. through a call to RBusLogicalChannel::DoCreate)
       
    87   The thread is in a critical section.
       
    88 
       
    89   @param aChannel Set to point to the created Logical Channel
       
    90 
       
    91   @return KErrNone if successful, otherwise one of the other system wide error codes.
       
    92 */
       
    93 TInt DWebcameraLogicalDevice::Create(DLogicalChannelBase*& aChannel)
       
    94 	{
       
    95 	DP("DWebcameraLogicalDevice::Create() start");
       
    96 	aChannel = new DWebcameraLogicalChannel;
       
    97 	if(!aChannel)
       
    98 		return KErrNoMemory;
       
    99 	return KErrNone;
       
   100 	DP("DWebcameraLogicalDevice::Create() end");
       
   101 	}
       
   102 
       
   103 /**
       
   104   Constructor
       
   105 */
       
   106 DWebcameraLogicalChannel::DWebcameraLogicalChannel()
       
   107 	: iReceiveDataDfc(GetOneFlameDfc, this, 1)
       
   108 	  ,iCaptureDfc(CaptureDfc,this,1)
       
   109 	{
       
   110 	DP("DWebcameraLogicalChannel::DWebcameraLogicalChannel() start");
       
   111 
       
   112     // Get pointer to client threads DThread object
       
   113 	iClient=&Kern::CurrentThread();
       
   114     // Open a reference on client thread so it's control block can't dissapear until
       
   115     // this driver has finished with it.
       
   116 	((DObject*)iClient)->Open();
       
   117 	
       
   118 	DP("DWebcameraLogicalChannel::DWebcameraLogicalChannel() end");
       
   119 	}
       
   120 
       
   121 /**
       
   122   Destructor
       
   123 */
       
   124 DWebcameraLogicalChannel::~DWebcameraLogicalChannel()
       
   125 	{
       
   126 	DP("DWebcameraLogicalChannel::~DWebcameraLogicalChannel() start");
       
   127     // Cancel all processing that we may be doing
       
   128 	DoCancel(RWebcameraDevice::EAllRequests);	
       
   129 	if (iComm)
       
   130 		{
       
   131 		delete iComm;
       
   132 		}
       
   133     if (iChunk)
       
   134         {
       
   135         Epoc::FreePhysicalRam(iPhysAddr, iSize);
       
   136         }
       
   137     // Close our reference on the client thread
       
   138 	Kern::SafeClose((DObject*&)iClient,NULL);
       
   139 	DP("DWebcameraLogicalChannel::~DWebcameraLogicalChannel() end");
       
   140 	}
       
   141 
       
   142 /**
       
   143   Called when a user thread requests a handle to this channel.
       
   144 */
       
   145 TInt DWebcameraLogicalChannel::RequestUserHandle(DThread* aThread, TOwnerType aType)
       
   146     {
       
   147     // Make sure that only our client can get a handle
       
   148     if (aType!=EOwnerThread || aThread!=iClient)
       
   149         return KErrAccessDenied;
       
   150     return KErrNone;
       
   151     }
       
   152 
       
   153 /**
       
   154   Second stage constructor called by the kernel's device driver framework.
       
   155   This is called in the context of the user thread (client) which requested the creation of a Logical Channel
       
   156   (E.g. through a call to RBusLogicalChannel::DoCreate)
       
   157   The thread is in a critical section.
       
   158 
       
   159   @param aUnit The unit argument supplied by the client
       
   160   @param aInfo The info argument supplied by the client
       
   161   @param aVer The version argument supplied by the client
       
   162 
       
   163   @return KErrNone if successful, otherwise one of the other system wide error codes.
       
   164 */
       
   165 TInt DWebcameraLogicalChannel::DoCreate(TInt /*aUnit*/, const TDesC8* /*aInfo*/, const TVersion& aVer)
       
   166 	{
       
   167 	DP("DWebcameraLogicalChannel::DoCreate() start");
       
   168     if(!Kern::CurrentThreadHasCapability(ECapability_None,__PLATSEC_DIAGNOSTIC_STRING("Checked by Webcamera")))
       
   169     	{
       
   170         return KErrPermissionDenied;
       
   171     	}
       
   172     // Check version
       
   173 	if (!Kern::QueryVersionSupported(RWebcameraDevice::VersionRequired(),aVer))
       
   174 		{
       
   175 		return KErrNotSupported;
       
   176 		}
       
   177     // Setup LDD for receiving client messages
       
   178 	SetDfcQ(Kern::DfcQue0());
       
   179 	iMsgQ.Receive();
       
   180     // Associate DFCs with the same queue we set above to receive client messages on
       
   181 	iReceiveDataDfc.SetDfcQ(iDfcQ);
       
   182 	iCaptureDfc.SetDfcQ(iDfcQ);
       
   183     // Give PDD a pointer to this channel
       
   184 	Pdd()->iLdd=this;
       
   185 
       
   186 	//allocate Memory
       
   187 	iSize=Kern::RoundToPageSize(BUFSIZE);
       
   188 	TInt rtn=Epoc::AllocPhysicalRam(iSize, iPhysAddr);
       
   189 	if (rtn != KErrNone)
       
   190 		{
       
   191 		return rtn;
       
   192 		}
       
   193 	rtn=DPlatChunkHw::New(iChunk, iPhysAddr, iSize,EMapAttrUserRw|EMapAttrBufferedC);
       
   194 	if (rtn != KErrNone)
       
   195 		{
       
   196 		if (iPhysAddr)
       
   197 			{
       
   198 			Epoc::FreePhysicalRam(iPhysAddr, iSize);
       
   199 			}
       
   200 		return rtn;
       
   201 		}
       
   202 	iLAdr = reinterpret_cast<TUint8*>(iChunk->LinearAddress());
       
   203 	
       
   204 	iComm=HBuf8::New(BUFSIZE);
       
   205 	if (!iComm)
       
   206 		{
       
   207 		return KErrNotSupported;
       
   208 		}
       
   209 	iReceiveDataBuffer=iComm;
       
   210 	iCaptureBuffer=iComm;
       
   211 
       
   212 	DP("DWebcameraLogicalChannel::DoCreate() end");
       
   213 	return KErrNone;
       
   214 	}
       
   215 
       
   216 /**
       
   217   Process a message for this logical channel.
       
   218   This function is called in the context of a DFC thread.
       
   219 
       
   220   @param aMessage The message to process.
       
   221                   The iValue member of this distinguishes the message type:
       
   222                   iValue==ECloseMsg, channel close message
       
   223                   iValue==KMaxTInt, a 'DoCancel' message
       
   224                   iValue>=0, a 'DoControl' message with function number equal to iValue
       
   225                   iValue<0, a 'DoRequest' message with function number equal to ~iValue
       
   226 */
       
   227 void DWebcameraLogicalChannel::HandleMsg(TMessageBase* aMsg)
       
   228 	{
       
   229 	DP("DWebcameraLogicalChannel::HandleMsg() start");
       
   230 	TThreadMessage& m=*(TThreadMessage*)aMsg;
       
   231 
       
   232     // Get message type
       
   233 	TInt id=m.iValue;
       
   234     DP("id=%d",id);
       
   235     
       
   236     // Decode the message type and dispatch it to the relevent handler function...
       
   237 	if (id==(TInt)ECloseMsg)
       
   238 		{
       
   239 		DoCancel(RWebcameraDevice::EAllRequests);
       
   240 		m.Complete(KErrNone, EFalse);
       
   241 		return;
       
   242 		}
       
   243 
       
   244 	if(m.Client()!=iClient)
       
   245 		{
       
   246 		Kern::ThreadKill(m.Client(),
       
   247 						 EExitPanic,
       
   248 						 ERequestFromWrongThread,
       
   249 						 KDriver1PanicCategory);
       
   250 		m.Complete(KErrNone,ETrue);
       
   251 		return;
       
   252 		}
       
   253 
       
   254 	if (id==KMaxTInt)
       
   255 		{
       
   256 		DoCancel(m.Int0());
       
   257 		m.Complete(KErrNone,ETrue);
       
   258 		return;
       
   259 		}
       
   260 
       
   261 	if (id<0)
       
   262 		{
       
   263 		// DoRequest
       
   264 		TRequestStatus* pS=(TRequestStatus*)m.Ptr0();
       
   265 		TInt rtn =DoRequest(~id,pS,m.Ptr1(),aMsg);
       
   266 
       
   267 		if (rtn != KErrNone)
       
   268 			Kern::RequestComplete(iClient,pS,rtn);
       
   269         m.Complete(KErrNone,ETrue);
       
   270 		}
       
   271 	else
       
   272 		{
       
   273 		// DoControl
       
   274 		TInt rtn = DoControl(id,m.Ptr0(),aMsg);
       
   275 		m.Complete(rtn,ETrue);
       
   276 		}
       
   277 	DP("DWebcameraLogicalChannel::HandleMsg() end");
       
   278 	}
       
   279 
       
   280 /**
       
   281   Process synchronous 'control' requests
       
   282 */
       
   283 TInt DWebcameraLogicalChannel::DoControl(TInt aFunction, TAny* a1, TAny* a2)
       
   284 	{
       
   285 	DP("DWebcameraLogicalChannel::DoControl() start");
       
   286 	TInt rtn;
       
   287 	TThreadMessage& m=*(TThreadMessage*)a2;
       
   288 	TRequestStatus* pS=(TRequestStatus*)m.Ptr0();
       
   289 
       
   290 	switch (aFunction)
       
   291 		{
       
   292 		case RWebcameraDevice::EGetConfig:
       
   293 //			rtn = GetConfig((TDes8*)a1);
       
   294 			rtn = KErrNone;
       
   295 			if ( rtn != KErrNone )
       
   296 				{
       
   297 				Kern::RequestComplete(iClient,pS,rtn);
       
   298 				}
       
   299 			break;
       
   300         case RWebcameraDevice::ESetConfig:
       
   301  //       	rtn = SetConfig((const TDesC8*)a1);
       
   302             break;
       
   303             
       
   304 		default:
       
   305 			rtn = KErrNotSupported;
       
   306 			Kern::RequestComplete(iClient,pS,rtn);
       
   307 			break;
       
   308 		}
       
   309 	DP("DWebcameraLogicalChannel::DoControl() end");
       
   310 	return rtn;
       
   311 
       
   312 	}
       
   313 
       
   314 /**
       
   315   Process asynchronous requests.
       
   316 */
       
   317 TInt DWebcameraLogicalChannel::DoRequest(TInt aReqNo,
       
   318 											TRequestStatus* aStatus,
       
   319 											TAny* a1,
       
   320 											TAny* a2)
       
   321 	{
       
   322 	DP("DWebcameraLogicalChannel::DoRequest() start");
       
   323 	TInt rtn;
       
   324 	TThreadMessage& m=*(TThreadMessage*)a2;
       
   325 
       
   326 	iRequesting =ETrue;
       
   327 	rtn = KErrNone;
       
   328     DP("aReqNo=%d",aReqNo);
       
   329 	switch(aReqNo)
       
   330 		{
       
   331 		case RWebcameraDevice::EStart:
       
   332    			DP("EStart=%d",RWebcameraDevice::EStart);
       
   333 			iReceiveDataStatus = aStatus;
       
   334 			iReceiving = ETrue ;
       
   335 			iReceiveDataBuffer->FillZ(iCaptureBuffer->MaxLength());
       
   336 			iReceiveDataBuffer->Zero();
       
   337 			DP("iReceiveDataBuffer Len=%d",iReceiveDataBuffer->MaxLength());
       
   338 			DP("iReceiveDataBuffer Len=%d",iReceiveDataBuffer->Length());
       
   339 			rtn = Pdd()->StartViewerFinder(iPhysAddr,iSize);
       
   340 			if ( rtn != KErrNone ) 
       
   341 				{
       
   342 	   			DP("rtn=%d",rtn);
       
   343 				iReceiving = EFalse ;
       
   344 				Kern::RequestComplete(iClient,aStatus,rtn);
       
   345 				}
       
   346 			else
       
   347 				{
       
   348 	   			DP("rtn=%d",rtn);
       
   349 				// Example Platform Security capability check which tests the
       
   350 				// client for ECapability_None (which always passes)...
       
   351 				if ( iRequesting == EFalse )
       
   352 					{
       
   353 		   			DP("iRequesting=EFalse");
       
   354 					iReceiving = EFalse ;
       
   355 					Kern::RequestComplete(iClient,
       
   356 										  iReceiveDataStatus,
       
   357 										  iReceiveDataResult);
       
   358 					}
       
   359 				else
       
   360 					{
       
   361 					DP("iRequesting=ETrue");
       
   362 					iReceiveDataDescriptor=(TDes8*)a1;
       
   363 					}
       
   364 				}
       
   365 			break;
       
   366 		case RWebcameraDevice::ECapture:
       
   367 			iCaptureing = ETrue ;
       
   368 			iCaptureStatus = aStatus;
       
   369 			iCaptureBuffer->FillZ(iCaptureBuffer->MaxLength());
       
   370 			iCaptureBuffer->Zero();
       
   371 		    DP("iCaptureBuffer Len=%d",iCaptureBuffer->MaxLength());
       
   372 		    DP("iCaptureBuffer Len=%d",iCaptureBuffer->Length());
       
   373 			rtn = Pdd()->StartCapture(iPhysAddr,iSize);
       
   374 			DP("rtn=%d",rtn);
       
   375 			if ( rtn != KErrNone ) 
       
   376 				{
       
   377 				iCaptureing = EFalse ;
       
   378 				Kern::RequestComplete(iClient,aStatus,rtn);
       
   379 				}
       
   380 			else
       
   381 				{
       
   382 				if ( iRequesting == EFalse )
       
   383 					{
       
   384 				    DP("iRequesting=EFalse");
       
   385 					iReceiving = EFalse ;
       
   386 					Kern::RequestComplete(iClient,iCaptureStatus,iCaptureResult);
       
   387 					}
       
   388 				else
       
   389 					{
       
   390 			        DP("Capture iRequesting=ETrue");
       
   391 				    iCaptureDescriptor=(TDes8*)a1;
       
   392 					}
       
   393 				}
       
   394 			break;
       
   395 		default:
       
   396 			rtn=KErrNotSupported;
       
   397 			Kern::RequestComplete(iClient,aStatus,rtn);
       
   398 			break;
       
   399 		}
       
   400 	iRequesting = EFalse;
       
   401 
       
   402 	DP("DWebcameraLogicalChannel::DoRequest() end");
       
   403 	return rtn;
       
   404 
       
   405 	}
       
   406 
       
   407 /**
       
   408   Process cancelling of asynchronous requests.
       
   409 */
       
   410 void DWebcameraLogicalChannel::DoCancel(TUint aMask)
       
   411 	{
       
   412 	DP("DWebcameraLogicalChannel::DoCancel() start");
       
   413 	TInt rtn;
       
   414 	DP("aMask=%d",aMask);
       
   415     if (aMask&(1<<RWebcameraDevice::EStart))
       
   416     	{
       
   417 		DP("RWebcameraDevice::EStart=%d",RWebcameraDevice::EStart);
       
   418 		if (iReceiveDataStatus)
       
   419 			{
       
   420 			DP("iReceiveDataStatus=%d",iReceiveDataStatus);
       
   421 			Pdd()->Stop(DWebcameraDriverBase::USB_cancel);
       
   422 			iReceiving = EFalse ;
       
   423 			iReceiveDataDfc.Cancel();
       
   424 			Kern::RequestComplete(iClient,iReceiveDataStatus,KErrCancel);
       
   425 			}
       
   426     	}
       
   427     if (aMask&(1<<RWebcameraDevice::ECapture))
       
   428     	{
       
   429 		DP("RWebcameraDevice::ECapture=%d",RWebcameraDevice::ECapture);
       
   430 		if (iCaptureStatus)
       
   431 			{
       
   432 			Pdd()->Stop(DWebcameraDriverBase::USB_cancel);
       
   433 			iReceiving = EFalse ;
       
   434 			iCaptureDfc.Cancel();
       
   435 			Kern::RequestComplete(iClient,iCaptureStatus,KErrCancel);
       
   436 			}
       
   437     	}
       
   438 	DP("DWebcameraLogicalChannel::DoCancel() end");
       
   439 	}
       
   440 
       
   441 /**
       
   442   Called by PDD from ISR to indicate that a ReceiveData operation has completed.
       
   443 */
       
   444 void DWebcameraLogicalChannel::GetOneFlameComplete(TInt aDataSize)
       
   445     {
       
   446 	DP("DWebcameraLogicalChannel::GetOneFlameComplete() start");
       
   447 	DP("datasize=%d",aDataSize);
       
   448 	iSaveSize=iSize - aDataSize;
       
   449     // Queue DFC
       
   450     iReceiveDataDfc.Add();
       
   451     //set size of received data
       
   452     if (iSaveSize > 0)
       
   453     	{
       
   454 	    iReceiveDataResult = KErrNone;
       
   455     	}
       
   456     else
       
   457     	{
       
   458 		iReceiveDataResult = KErrUnknown;//TODO:define of error
       
   459     	}
       
   460 	DP("DWebcameraLogicalChannel::GetOneFlameComplete() end");
       
   461     }
       
   462 
       
   463 /**
       
   464   Called by PDD from ISR to indicate that a get capture image operation has completed.
       
   465 */
       
   466 void DWebcameraLogicalChannel::CaptureComplete(TInt aDataSize)
       
   467     {
       
   468 	DP("DWebcameraLogicalChannel::CaptureComplete() start");
       
   469 	DP("datasize=%d",aDataSize);
       
   470 	iSaveSize=iSize - aDataSize;
       
   471     // Queue DFC
       
   472 	iCaptureDfc.Add();
       
   473     //set size of received data
       
   474     if (iSaveSize > 0)
       
   475     	{
       
   476 		iCaptureResult = KErrNone;
       
   477     	}
       
   478     else
       
   479     	{
       
   480         iCaptureResult = KErrUnknown;//TODO:define of error
       
   481     	}
       
   482 	DP("DWebcameraLogicalChannel::CaptureComplete() end");
       
   483     }
       
   484 
       
   485 /**
       
   486   DFC Callback which gets triggered after the PDD has signalled that getting oneflame completed.
       
   487   This just casts aPtr and calls DoGetOneFlameComplete().
       
   488 */
       
   489 void DWebcameraLogicalChannel::GetOneFlameDfc(TAny* aPtr)
       
   490     {
       
   491 	DP("DWebcameraLogicalChannel::GetOneFlameDfc() start");
       
   492     ((DWebcameraLogicalChannel*)aPtr)->DoGetOneFlameComplete();
       
   493 	DP("DWebcameraLogicalChannel::GetOneFlameDfc() end");
       
   494     }
       
   495 
       
   496 /**
       
   497   DFC Callback which gets triggered after the PDD has signalled that getting Capture image completed.
       
   498   This just casts aPtr and calls DoCaptureComplete().
       
   499 */
       
   500 void DWebcameraLogicalChannel::CaptureDfc(TAny* aPtr)
       
   501     {
       
   502 	DP("DWebcameraLogicalChannel::CaptureDfc() start");
       
   503     ((DWebcameraLogicalChannel*)aPtr)->DoCaptureComplete();
       
   504 	DP("DWebcameraLogicalChannel::CaptureDfc() end");
       
   505     }
       
   506 
       
   507 /**
       
   508   Called from a DFC after the PDD has signalled that getting oneflame completed.
       
   509 */
       
   510 void DWebcameraLogicalChannel::DoGetOneFlameComplete()
       
   511     {
       
   512 	DP("DWebcameraLogicalChannel::DoGetOneFlameComplete() start");
       
   513 	iReceiveDataBuffer->Copy(iLAdr,iSaveSize);
       
   514     DP("iReceiveDataBuffer Len=%d",iReceiveDataBuffer->Length());
       
   515 	// Write data to client from our buffer
       
   516     TInt result=Kern::ThreadDesWrite(iClient,iReceiveDataDescriptor,*iReceiveDataBuffer,0);
       
   517     // Finished with client descriptor, so NULL it to help detect coding errors
       
   518     iReceiveDataDescriptor = NULL;
       
   519 
       
   520     // Use result code from PDD if it was an error
       
   521     if(iReceiveDataResult!=KErrNone)
       
   522         result = iReceiveDataResult;
       
   523     
       
   524     // Complete clients request
       
   525     Kern::RequestComplete(iClient,iReceiveDataStatus,result);
       
   526 	DP("DWebcameraLogicalChannel::DoGetOneFlameComplete() end");
       
   527     }
       
   528 
       
   529 /**
       
   530   Called from a DFC after the PDD has signalled that getting Capture image completed.
       
   531 */
       
   532 void DWebcameraLogicalChannel::DoCaptureComplete()
       
   533     {
       
   534 	DP("DWebcameraLogicalChannel::DoCaptureComplete() start");
       
   535 	iCaptureBuffer->Copy(iLAdr,iSaveSize);
       
   536     DP("iCaptureBuffer Len=%d",iCaptureBuffer->Length());
       
   537 	// Write data to client from our buffer
       
   538    TInt result=Kern::ThreadDesWrite(iClient,iCaptureDescriptor,*iCaptureBuffer,0);  	
       
   539     // Finished with client descriptor, so NULL it to help detect coding errors
       
   540     iCaptureDescriptor = NULL;
       
   541 
       
   542     // Use result code from PDD if it was an error
       
   543     if(iCaptureResult!=KErrNone)
       
   544         result = iCaptureResult;
       
   545 
       
   546     // Complete clients request
       
   547     Kern::RequestComplete(iClient,iCaptureStatus,result);
       
   548 	DP("DWebcameraLogicalChannel::DoCaptureComplete() end");
       
   549     }
       
   550 
       
   551 /**
       
   552   Process a GetConfig control message. This writes the current driver configuration to a
       
   553   RWebcameraDevice::TConfigBuf supplied by the client.
       
   554 */
       
   555 TInt DWebcameraLogicalChannel::GetConfig(TDes8* aConfigBuf)
       
   556     {
       
   557 	//unsupported
       
   558     }
       
   559 
       
   560 /**
       
   561   Process a SetConfig control message. This sets the driver configuration using a
       
   562   RWebcameraDevice::TConfigBuf supplied by the client.
       
   563 */
       
   564 TInt DWebcameraLogicalChannel::SetConfig(const TDesC8* aConfigBuf)
       
   565     {
       
   566 	//unsupported
       
   567     }
       
   568 
       
   569 /**
       
   570   Fill a TConfig with the drivers current configuration.
       
   571 */
       
   572 /*void DWebcameraLogicalChannel::CurrentConfig(RWebcameraDevice::TConfig& aConfig)
       
   573     {
       
   574 	//unsupported
       
   575     }
       
   576 */
       
   577 
       
   578 /**
       
   579  *Get the point to Physical channel.
       
   580  */
       
   581 DWebcameraDriverBase* DWebcameraLogicalChannel::Pdd()
       
   582 	{
       
   583 	DP("DWebcameraLogicalChannel::Pdd() start");
       
   584 	return (DWebcameraDriverBase*)iPdd;
       
   585 	}
       
   586