bluetooth/btstack/linkmgr/hcifacade_commands.cpp
changeset 21 5e5528a288fe
parent 0 29b1cd4cb562
child 32 f72906e669b4
equal deleted inserted replaced
19:4b81101308c6 21:5e5528a288fe
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
   187 	}
   187 	}
   188 
   188 
   189 void CHCIFacade::HostNumberOfCompletedPacketsL(THCIConnHandle aConnH, TUint16 aFrags)
   189 void CHCIFacade::HostNumberOfCompletedPacketsL(THCIConnHandle aConnH, TUint16 aFrags)
   190 	{
   190 	{
   191 	RArray<THCIConnectionHandle> connHandles;
   191 	RArray<THCIConnectionHandle> connHandles;
   192 	connHandles.Append(aConnH);
   192 	connHandles.AppendL(aConnH);
       
   193 	CleanupClosePushL(connHandles);
   193 
   194 
   194 	RArray<THCINumOfCompletedPackets> numPackets;
   195 	RArray<THCINumOfCompletedPackets> numPackets;
   195 	numPackets.Append(aFrags);
   196 	numPackets.AppendL(aFrags);
   196 		
   197 	CleanupClosePushL(numPackets);
       
   198 	
   197 	CHostNumberOfCompletedPacketsCommand* cmd = CHostNumberOfCompletedPacketsCommand::NewL(1, connHandles, numPackets);
   199 	CHostNumberOfCompletedPacketsCommand* cmd = CHostNumberOfCompletedPacketsCommand::NewL(1, connHandles, numPackets);
       
   200 	// ownership of arrays has been taken by cmd
       
   201 	CleanupStack::Pop(2, &connHandles); // &numPackets, &connHandles
   198 
   202 
   199 	// Ownership of cmd transfered even if MhcqAddCommandL leaves
   203 	// Ownership of cmd transfered even if MhcqAddCommandL leaves
   200 	iCmdController->MhcqAddCommandL(cmd, *this);
   204 	iCmdController->MhcqAddCommandL(cmd, *this);
   201 	}
   205 	}
   202 
   206