usbmgmt/usbmgr/usbman/client/SRC/RUsb.cpp
changeset 31 4bea936937d0
parent 0 c9bc50fca66e
child 29 59aa7d6e3e0f
equal deleted inserted replaced
30:0897fb188e2a 31:4bea936937d0
     1 /*
     1 /*
     2 * Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
   748 	LOG_FUNC
   748 	LOG_FUNC
   749 
   749 
   750 	return SendReceive(EUsbRequestSession);
   750 	return SendReceive(EUsbRequestSession);
   751 	}
   751 	}
   752 
   752 
   753 EXPORT_C TInt RUsb::GetDetailedDescription(TInt aPersonalityId, HBufC*& aLocalizedPersonalityDescriptor)
   753 EXPORT_C TInt RUsb::GetDetailedDescription(TInt /*aPersonalityId*/, HBufC*& /*aLocalizedPersonalityDescriptor*/)
   754 	{
   754 	{
   755 	LOG_LINE
   755 	LOG_LINE
   756 	LOG_FUNC
   756 	LOG_FUNC
   757 
   757 	//This API has been deprecated
   758  	TInt ret = KErrNone;
   758 	return KErrNotSupported; 
   759 	// caller is responsible for freeing up memory allocated for aLocalizedPersonalityDescriptor
       
   760 	TRAP(ret, aLocalizedPersonalityDescriptor = HBufC::NewL(KUsbStringDescStringMaxSize));
       
   761 	if (ret == KErrNone)
       
   762 		{
       
   763 		TPtr ptr = aLocalizedPersonalityDescriptor->Des();
       
   764 		TIpcArgs ipcArgs(0, &ptr);
       
   765 		ipcArgs.Set(0, aPersonalityId);
       
   766 		ret = SendReceive(EUsbGetDetailedDescription, ipcArgs);
       
   767 		}
       
   768 	else
       
   769 		{
       
   770 		// just in case caller tries to free the memory before checking the return code
       
   771 		aLocalizedPersonalityDescriptor = NULL;
       
   772 		}
       
   773 
       
   774 	return ret; 
       
   775 	}
   759 	}
   776 
   760 
   777 EXPORT_C TInt RUsb::GetPersonalityProperty(TInt aPersonalityId, TUint32& aProperty)
   761 EXPORT_C TInt RUsb::GetPersonalityProperty(TInt aPersonalityId, TUint32& aProperty)
   778 	{
   762 	{
   779 	LOG_LINE
   763 	LOG_LINE