# HG changeset patch # User hgs # Date 1278969222 -10800 # Node ID acbdfeb56752e855f3a77c796ebd28cea456c09b # Parent 7d710eb9330d92b349bf814840e2cc30488a1373 201025 diff -r 7d710eb9330d -r acbdfeb56752 usbclasses/usbobexclasscontroller/group/UsbObexClassController.mmp --- a/usbclasses/usbobexclasscontroller/group/UsbObexClassController.mmp Tue Jul 13 00:03:51 2010 +0300 +++ b/usbclasses/usbobexclasscontroller/group/UsbObexClassController.mmp Tue Jul 13 00:13:42 2010 +0300 @@ -47,4 +47,4 @@ LIBRARY usbclasscontroller.lib //General Class Controller API LIBRARY obexusbapi.lib // Obex Service Manager Client API -#include + diff -r 7d710eb9330d -r acbdfeb56752 usbclasses/usbobexclasscontroller/inc/CUsbObexClassController.h --- a/usbclasses/usbobexclasscontroller/inc/CUsbObexClassController.h Tue Jul 13 00:03:51 2010 +0300 +++ b/usbclasses/usbobexclasscontroller/inc/CUsbObexClassController.h Tue Jul 13 00:13:42 2010 +0300 @@ -22,9 +22,9 @@ #include #include #include -#include #include "obexsmwatcher.h" + const TInt KObexClassPriority = 2; const TInt KObexNumInterfaces = 2; diff -r 7d710eb9330d -r acbdfeb56752 usbclasses/usbobexclasscontroller/inc/debug.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/usbclasses/usbobexclasscontroller/inc/debug.h Tue Jul 13 00:13:42 2010 +0300 @@ -0,0 +1,173 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Debug macros and declarations. +* +*/ + + +#ifndef DEBUG_H +#define DEBUG_H + +////////////////////////////////////////////////////////////////////////////// +// Here are parameters need to be modified. +// Component name +#define MODULE_NAME "UsbObexCc" +////////////////////////////////////////////////////////////////////////////// + + +// For handling unicode strings as L##MACRO is interpreted as LMACRO +#define WIDEN2( x ) L##x +#define WIDEN( x ) WIDEN2( x ) + +_LIT( KUsbPanicModule, ""WIDEN( MODULE_NAME ) ); + +#ifdef _DEBUG + +// Comment this line out if using real-time debugging +//#define LOG_TO_FILE +// =========================================================================== +#if defined ( LOG_TO_FILE ) +// =========================================================================== +// Add corresponding libabry in mmp file +// LIBRARY flogger.lib +// The log file is located at +// c:\logs\usb\MODULE_NAME.txt + +#include + +#define DESC( x ) TPtrC( ( const TText* ) ( x ) ) +#define DESC8( x ) TPtrC8( ( const TUint8* ) ( x ) ) +_LIT( KUsbLogDir, "USB" ); +_LIT( KUsbLogFile, ""WIDEN(MODULE_NAME)L".txt" ); + +// s: c string. +#define LOG(s) RFileLogger::WriteFormat( KUsbLogDir, \ + KUsbLogFile, EFileLoggingModeAppend, \ + DESC8( "["MODULE_NAME"] "##s ) ) + +// s: c string contains "%x" +// v: varaible corresponding to %x +#define LOG1(s, v) RFileLogger::WriteFormat( KUsbLogDir, \ + KUsbLogFile, EFileLoggingModeAppend, \ + DESC8( "["MODULE_NAME"] "##s ), v) +// s: c string contains "%x%y" +// v1: varaible corresponding to %x +// v2: varaible corresponding to %y +#define LOG2(s, v1, v2) RFileLogger::WriteFormat( KUsbLogDir, \ + KUsbLogFile, EFileLoggingModeAppend, \ + DESC8( "["MODULE_NAME"] "##s ), v1, v2) + +// s: c string contains "%x%y%z" +// v1: varaible corresponding to %x +// v2: varaible corresponding to %y +// v3: varaible corresponding to %z +#define LOG3(s, v1, v2, v3) RFileLogger::WriteFormat( KUsbLogDir, \ + KUsbLogFile, EFileLoggingModeAppend, \ + DESC8( "["MODULE_NAME"] "##s ), v1, v2, v3 ) + +class TFuncLogger + { +public: + TFuncLogger(const TDesC8& aFuncName) + { + iFuncName.Set( aFuncName ); + RFileLogger::WriteFormat( KUsbLogDir, KUsbLogFile, EFileLoggingModeAppend, + DESC8( "["MODULE_NAME"] >>%s" ), iFuncName.Ptr() ); + } + ~TFuncLogger() + { + RFileLogger::WriteFormat( KUsbLogDir, KUsbLogFile, + EFileLoggingModeAppend, + DESC8( "["MODULE_NAME"] <<%s" ), iFuncName.Ptr() ); + } +private: + TPtrC8 iFuncName; + }; +// =========================================================================== +#else //LOG_TO_FILE not defined +// =========================================================================== +#include + +// Paramters same as above. +#define LOG( str ) { RDebug::Printf( "["MODULE_NAME"] %s", str ); } + +#define LOG1( s, v ) { RDebug::Printf( "["MODULE_NAME"] "##s , v ); } + +#define LOG2( s, v1,v2 ) { RDebug::Printf( "["MODULE_NAME"] "##s , v1, v2 ); } + +#define LOG3( s, v1, v2, v3 ) { RDebug::Printf( "["MODULE_NAME"] "##s , \ + v1, v2, v3); } + +inline void LogBuf(const TDesC8& aBuf8) + { + LOG1("Buffer length = %d Buffer content:", aBuf8.Length()); + + TInt len(aBuf8.Length()); + for (TInt i(0); i < len; ++i) + RDebug::Print(_L("Buffer[%d] = 0x%x"), i, aBuf8[i]); + } + +class TFuncLogger + { +public: + TFuncLogger(const TPtrC8& aFuncName) : iFuncName( aFuncName ) + { + RDebug::Printf( "["MODULE_NAME"] >>%s", iFuncName.Ptr()); + } + ~TFuncLogger() + { + RDebug::Printf( "["MODULE_NAME"] <<%s", iFuncName.Ptr()); + } +private: + TPtrC8 iFuncName; + }; +#endif // LOG_TO_FILE + +#define LEAVE( exp ) {volatile TInt err_ = exp; \ + LOG3( "LEAVE(%d) @file: %s, line: %d", err_, __FILE__, __LINE__ );\ + User::Leave( err_ );} + +#define LEAVEIFERROR( exp ) {volatile TInt err__ = exp; \ + if(err__ < 0) LEAVE(err__);} + +#define PANIC( exp ) {volatile TInt err_ = exp; \ + LOG3( "PANIC(%d) @file: %s, line: %d", err_, __FILE__, __LINE__ );\ + User::Panic( KUsbPanicModule, err_ );} + +#define LOG_FUNC TFuncLogger __instrument(TPtrC8((TUint8*)__PRETTY_FUNCTION__)); + +#define ASSERT_DEBUG( exp, code ) {if(!(exp)) PANIC(code)} + +#else // _DEBUG not defined +// =========================================================================== + +#define LOG( s ) +#define LOG1( s, v ) +#define LOG2( s, v1, v2 ) +#define LOG3( s, v1, v2, v3 ) +#define LOG_FUNC_ENTRY +#define LOG_FUNC_EXIT +#define LEAVE( exp ) User::Leave( exp ); +#define LEAVEIFERROR( exp ) User::LeaveIfError( exp ); +#define PANIC( err ) // in non-debug builds PANICs are silent +#define LOG_FUNC +#define ASSERT_DEBUG( exp, code ) +inline void LogBuf(const TDesC8& /*aBuf8*/) + {} +// =========================================================================== +#endif // _DEBUG +// =========================================================================== +#endif // DEBUG_H + +// End of File diff -r 7d710eb9330d -r acbdfeb56752 usbclasses/usbobexclasscontroller/src/CUsbObexClassController.cpp --- a/usbclasses/usbobexclasscontroller/src/CUsbObexClassController.cpp Tue Jul 13 00:03:51 2010 +0300 +++ b/usbclasses/usbobexclasscontroller/src/CUsbObexClassController.cpp Tue Jul 13 00:13:42 2010 +0300 @@ -22,15 +22,8 @@ #include #include //for CleanupResetAndDestroyPushL #include +#include "debug.h" -// Panic category only used in debug builds -#ifdef _DEBUG -_LIT( KObexCcPanicCategory, "OBEXCC" ); -#endif - -#ifdef __FLOG_ACTIVE -_LIT8(KLogComponent, "UsbObexCc"); -#endif /** * Panic codes for the USB OBEX Class Controller. @@ -43,6 +36,8 @@ EBadApiCallStart = 1, /** Stop() called while in an illegal state */ EBadApiCallStop = 2, + /** Request completes in uknown state */ + EUnkownState = 3 }; // --------------------------------------------------------------------------- @@ -52,7 +47,7 @@ CUsbObexClassController* CUsbObexClassController::NewL( MUsbClassControllerNotify& aOwner) { - LOG_STATIC_FUNC_ENTRY + LOG_FUNC CUsbObexClassController* self = new (ELeave) CUsbObexClassController(aOwner); CleanupStack::PushL(self); @@ -107,13 +102,13 @@ LOG_FUNC //Start() should never be called if started, starting or stopping (or in state EUsbServiceFatalError) - __ASSERT_DEBUG(iState == EUsbServiceIdle, _USB_PANIC(KObexCcPanicCategory, EBadApiCallStart)); + ASSERT_DEBUG(iState == EUsbServiceIdle, EBadApiCallStart ); // Start OBEX SM iRequestStatus = &aStatus; iState = EUsbServiceStarting; aStatus = KRequestPending; - LOGTEXT(_L8("CUsbObexClassController::Start() calling ManageUSBService(ETrue)")); + LOG("CUsbObexClassController::Start() calling ManageUSBService(ETrue)"); iObexSM->ManageUSBServices(ETrue, iStatus); SetActive(); } @@ -127,10 +122,10 @@ { LOG_FUNC - LOGTEXT2(_L8("CUsbObexClassController::Stop iState = %d"), iState); + LOG1("CUsbObexClassController::Stop iState = %d", iState); //Stop() should never be called if stopping or starting (or in state EUsbServiceFatalError) - __ASSERT_DEBUG(iState == EUsbServiceStarted || iState == EUsbServiceIdle, _USB_PANIC(KObexCcPanicCategory, EBadApiCallStop)); + ASSERT_DEBUG(iState == EUsbServiceStarted || iState == EUsbServiceIdle, EBadApiCallStop ); //state may be idle after Cancel if ( iState == EUsbServiceIdle ) @@ -144,7 +139,7 @@ iRequestStatus = &aStatus; iState = EUsbServiceStopping; aStatus = KRequestPending; - LOGTEXT(_L8("CUsbObexClassController::Stop() calling ManageUSBService(EFalse)")); + LOG("CUsbObexClassController::Stop() calling ManageUSBService(EFalse)"); iObexSM->ManageUSBServices(EFalse, iStatus); SetActive(); } @@ -160,11 +155,11 @@ LOG_FUNC if (iStatus != KErrNone) { - LOGTEXT2(_L8("CUsbObexClassController::RunL() Error = %d"), iStatus.Int()); + LOG1("CUsbObexClassController::RunL() iStatus = %d", iStatus.Int()); User::RequestComplete(iRequestStatus, iStatus.Int()); return; } - LOGTEXT2(_L8("CUsbObexClassController::RunL() State is %d"), iState); + LOG1("CUsbObexClassController::RunL() State is %d", iState); switch (iState) { @@ -182,7 +177,8 @@ case EUsbServiceIdle: default: - LOGTEXT(_L8("CUsbObexClassController::RunL() Error or Unknown State")); + LOG("CUsbObexClassController::RunL() Unknown State"); + PANIC(EUnkownState); break; } } @@ -198,7 +194,7 @@ TRAPD(ret, DoGetDescriptorInfoL(aDescriptorInfo)); if(ret!=KErrNone) { - LOGTEXT2(_L8("CUsbObexClassController::GetDescriptorInfo leave with code: %d"), ret); + LOG1("CUsbObexClassController::GetDescriptorInfo leave with code: %d", ret); } } @@ -217,7 +213,7 @@ resolverParams.SetWildcardMatch(EFalse); REComSession::ListImplementationsL(KCSrcsInterfaceUid, resolverParams, implInfoArray); - LOGTEXT2(_L8("CUsbObexClassController::DoGetDescriptorInfoL Number of Interfaces is %d"), + LOG1("CUsbObexClassController::DoGetDescriptorInfoL Number of Interfaces is %d", implInfoArray.Count()); aDescriptorInfo.iNumInterfaces = (implInfoArray.Count())*KObexNumInterfaces; aDescriptorInfo.iLength = 0; @@ -242,7 +238,7 @@ break; default: - __ASSERT_DEBUG( EFalse, _USB_PANIC(KObexCcPanicCategory, EBadAsynchronousCall) ); + ASSERT_DEBUG( EFalse, EBadAsynchronousCall ); break; } @@ -259,14 +255,14 @@ TInt CUsbObexClassController::RunError(TInt aError) { LOG_FUNC - LOGTEXT2(_L8("CUsbObexClassController::RunError aError=%d"), aError); + LOG1("CUsbObexClassController::RunError aError=%d", aError); return KErrNone; } void CUsbObexClassController::MosmError(TInt aError) { LOG_FUNC - LOGTEXT2(_L8("CUsbObexClassController::MosmError aError=%d"), aError); + LOG1("CUsbObexClassController::MosmError aError=%d", aError); Owner().UccnError(aError); } diff -r 7d710eb9330d -r acbdfeb56752 usbclasses/usbobexclasscontroller/src/obexsmwatcher.cpp --- a/usbclasses/usbobexclasscontroller/src/obexsmwatcher.cpp Tue Jul 13 00:03:51 2010 +0300 +++ b/usbclasses/usbobexclasscontroller/src/obexsmwatcher.cpp Tue Jul 13 00:13:42 2010 +0300 @@ -18,18 +18,15 @@ #include "obexsmwatcher.h" #include #include -#include +#include "debug.h" -#ifdef __FLOG_ACTIVE -_LIT8(KLogComponent, "UsbObexCcSMW"); -#endif /** * @since S60 V5.2 */ CObexSMWatcher* CObexSMWatcher::NewL(MObexSMObserver& aObserver) { - LOG_STATIC_FUNC_ENTRY + LOG_FUNC CObexSMWatcher* self = new (ELeave) CObexSMWatcher(aObserver); CleanupStack::PushL( self); @@ -79,7 +76,7 @@ { LOG_FUNC - LOGTEXT2(_L8(">>CObexSMWatcher::RunL [iStatus=%d]"), iStatus.Int()); + LOG1("iStatus=%d", iStatus.Int()); iObexSMPostInit.Subscribe( iStatus ); SetActive(); @@ -89,9 +86,8 @@ if (err == KErrNone && value != KErrNone) { iObserver.MosmError(value); - } - - LOGTEXT(_L8("<ImplementationUid()); CUsbCMHandler* handler = (reinterpret_cast(REComSession::CreateImplementationL (uid, _FOFF(CUsbCMHandler, iPrivateEComUID)))); - iHandlers.Append(handler); + iHandlers.AppendL(handler); } implementations.Close(); // cleanup diff -r 7d710eb9330d -r acbdfeb56752 usbengines/usblocodplugin/group/usblocodplugin.mmp --- a/usbengines/usblocodplugin/group/usblocodplugin.mmp Tue Jul 13 00:03:51 2010 +0300 +++ b/usbengines/usblocodplugin/group/usblocodplugin.mmp Tue Jul 13 00:13:42 2010 +0300 @@ -48,4 +48,3 @@ LIBRARY ECom.lib // ECOM framework API LIBRARY usbman.lib // RUSB API (USB Manager) -#include diff -r 7d710eb9330d -r acbdfeb56752 usbengines/usblocodplugin/inc/debug.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/usbengines/usblocodplugin/inc/debug.h Tue Jul 13 00:13:42 2010 +0300 @@ -0,0 +1,173 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Debug macros and declarations. +* +*/ + + +#ifndef DEBUG_H +#define DEBUG_H + +////////////////////////////////////////////////////////////////////////////// +// Here are parameters need to be modified. +// Component name +#define MODULE_NAME "USBLcdPlugin" +////////////////////////////////////////////////////////////////////////////// + + +// For handling unicode strings as L##MACRO is interpreted as LMACRO +#define WIDEN2( x ) L##x +#define WIDEN( x ) WIDEN2( x ) + +_LIT( KUsbPanicModule, ""WIDEN( MODULE_NAME ) ); + +#ifdef _DEBUG + +// Comment this line out if using real-time debugging +//#define LOG_TO_FILE +// =========================================================================== +#if defined ( LOG_TO_FILE ) +// =========================================================================== +// Add corresponding libabry in mmp file +// LIBRARY flogger.lib +// The log file is located at +// c:\logs\usb\MODULE_NAME.txt + +#include + +#define DESC( x ) TPtrC( ( const TText* ) ( x ) ) +#define DESC8( x ) TPtrC8( ( const TUint8* ) ( x ) ) +_LIT( KUsbLogDir, "USB" ); +_LIT( KUsbLogFile, ""WIDEN(MODULE_NAME)L".txt" ); + +// s: c string. +#define LOG(s) RFileLogger::WriteFormat( KUsbLogDir, \ + KUsbLogFile, EFileLoggingModeAppend, \ + DESC8( "["MODULE_NAME"] "##s ) ) + +// s: c string contains "%x" +// v: varaible corresponding to %x +#define LOG1(s, v) RFileLogger::WriteFormat( KUsbLogDir, \ + KUsbLogFile, EFileLoggingModeAppend, \ + DESC8( "["MODULE_NAME"] "##s ), v) +// s: c string contains "%x%y" +// v1: varaible corresponding to %x +// v2: varaible corresponding to %y +#define LOG2(s, v1, v2) RFileLogger::WriteFormat( KUsbLogDir, \ + KUsbLogFile, EFileLoggingModeAppend, \ + DESC8( "["MODULE_NAME"] "##s ), v1, v2) + +// s: c string contains "%x%y%z" +// v1: varaible corresponding to %x +// v2: varaible corresponding to %y +// v3: varaible corresponding to %z +#define LOG3(s, v1, v2, v3) RFileLogger::WriteFormat( KUsbLogDir, \ + KUsbLogFile, EFileLoggingModeAppend, \ + DESC8( "["MODULE_NAME"] "##s ), v1, v2, v3 ) + +class TFuncLogger + { +public: + TFuncLogger(const TDesC8& aFuncName) + { + iFuncName.Set( aFuncName ); + RFileLogger::WriteFormat( KUsbLogDir, KUsbLogFile, EFileLoggingModeAppend, + DESC8( "["MODULE_NAME"] >>%s" ), iFuncName.Ptr() ); + } + ~TFuncLogger() + { + RFileLogger::WriteFormat( KUsbLogDir, KUsbLogFile, + EFileLoggingModeAppend, + DESC8( "["MODULE_NAME"] <<%s" ), iFuncName.Ptr() ); + } +private: + TPtrC8 iFuncName; + }; +// =========================================================================== +#else //LOG_TO_FILE not defined +// =========================================================================== +#include + +// Paramters same as above. +#define LOG( str ) { RDebug::Printf( "["MODULE_NAME"] %s", str ); } + +#define LOG1( s, v ) { RDebug::Printf( "["MODULE_NAME"] "##s , v ); } + +#define LOG2( s, v1,v2 ) { RDebug::Printf( "["MODULE_NAME"] "##s , v1, v2 ); } + +#define LOG3( s, v1, v2, v3 ) { RDebug::Printf( "["MODULE_NAME"] "##s , \ + v1, v2, v3); } + +inline void LogBuf(const TDesC8& aBuf8) + { + LOG1("Buffer length = %d Buffer content:", aBuf8.Length()); + + TInt len(aBuf8.Length()); + for (TInt i(0); i < len; ++i) + RDebug::Print(_L("Buffer[%d] = 0x%x"), i, aBuf8[i]); + } + +class TFuncLogger + { +public: + TFuncLogger(const TPtrC8& aFuncName) : iFuncName( aFuncName ) + { + RDebug::Printf( "["MODULE_NAME"] >>%s", iFuncName.Ptr()); + } + ~TFuncLogger() + { + RDebug::Printf( "["MODULE_NAME"] <<%s", iFuncName.Ptr()); + } +private: + TPtrC8 iFuncName; + }; +#endif // LOG_TO_FILE + +#define LEAVE( exp ) {volatile TInt err_ = exp; \ + LOG3( "LEAVE(%d) @file: %s, line: %d", err_, __FILE__, __LINE__ );\ + User::Leave( err_ );} + +#define LEAVEIFERROR( exp ) {volatile TInt err__ = exp; \ + if(err__ < 0) LEAVE(err__);} + +#define PANIC( exp ) {volatile TInt err_ = exp; \ + LOG3( "PANIC(%d) @file: %s, line: %d", err_, __FILE__, __LINE__ );\ + User::Panic( KUsbPanicModule, err_ );} + +#define LOG_FUNC TFuncLogger __instrument(TPtrC8((TUint8*)__PRETTY_FUNCTION__)); + +#define ASSERT_DEBUG( exp, code ) {if(!(exp)) PANIC(code)} + +#else // _DEBUG not defined +// =========================================================================== + +#define LOG( s ) +#define LOG1( s, v ) +#define LOG2( s, v1, v2 ) +#define LOG3( s, v1, v2, v3 ) +#define LOG_FUNC_ENTRY +#define LOG_FUNC_EXIT +#define LEAVE( exp ) User::Leave( exp ); +#define LEAVEIFERROR( exp ) User::LeaveIfError( exp ); +#define PANIC( err ) // in non-debug builds PANICs are silent +#define LOG_FUNC +#define ASSERT_DEBUG( exp, code ) +inline void LogBuf(const TDesC8& /*aBuf8*/) + {} +// =========================================================================== +#endif // _DEBUG +// =========================================================================== +#endif // DEBUG_H + +// End of File diff -r 7d710eb9330d -r acbdfeb56752 usbengines/usblocodplugin/inc/usblcdactive.h --- a/usbengines/usblocodplugin/inc/usblcdactive.h Tue Jul 13 00:03:51 2010 +0300 +++ b/usbengines/usblocodplugin/inc/usblcdactive.h Tue Jul 13 00:13:42 2010 +0300 @@ -21,7 +21,7 @@ #define USBLCDACTIVE_H #include -#include + /** * Base Active Object class diff -r 7d710eb9330d -r acbdfeb56752 usbengines/usblocodplugin/inc/usblcdplugin.h --- a/usbengines/usblocodplugin/inc/usblcdplugin.h Tue Jul 13 00:03:51 2010 +0300 +++ b/usbengines/usblocodplugin/inc/usblcdplugin.h Tue Jul 13 00:13:42 2010 +0300 @@ -22,7 +22,7 @@ #include #include #include "usblcdactive.h" -#include + /** * Class of EComm interface implementation diff -r 7d710eb9330d -r acbdfeb56752 usbengines/usblocodplugin/src/usblcdactive.cpp --- a/usbengines/usblocodplugin/src/usblcdactive.cpp Tue Jul 13 00:03:51 2010 +0300 +++ b/usbengines/usblocodplugin/src/usblcdactive.cpp Tue Jul 13 00:13:42 2010 +0300 @@ -20,10 +20,8 @@ #include "usblcdactive.h" #include #include +#include "debug.h" -#ifdef __FLOG_ACTIVE -_LIT8(KLogComponent, "USBLcdPlugin"); -#endif // ======== MEMBER FUNCTIONS ======== @@ -33,7 +31,7 @@ // CUsbLcdActive* CUsbLcdActive::NewL(MLocodBearerPluginObserver& aObserver) { - LOG_STATIC_FUNC_ENTRY + LOG_FUNC CUsbLcdActive* self = new (ELeave) CUsbLcdActive(aObserver); CleanupStack::PushL(self); self->ConstructL(); @@ -74,13 +72,13 @@ if( iStatus != KErrNone ) { - LOGTEXT2(_L8("CUsbLcdActive::RunL() error = %d"),iStatus.Int()); + LOG1("CUsbLcdActive::RunL() iStatus = %d",iStatus.Int()); } else { TInt ret = iProperty.Get( value ); - LOGTEXT3(_L8("Personality: %d, ret: %d"), value, ret); + LOG2("Personality: %d, ret: %d", value, ret); iProperty.Subscribe(iStatus); SetActive(); if (ret == KErrNone) @@ -152,7 +150,7 @@ void CUsbLcdActive::HandleUsbPersonalityChange( TInt aNewPersonalityId ) { LOG_FUNC - LOGTEXT2( _L8( "aNewPersonalityId: %d"), aNewPersonalityId ); + LOG1( "aNewPersonalityId: %d", aNewPersonalityId ); TBool isPcSuiteActive( EFalse ); if ( ( aNewPersonalityId == KUsbPersonalityIdPCSuite ) || ( aNewPersonalityId == KUsbPersonalityIdPCSuiteMTP ) ) diff -r 7d710eb9330d -r acbdfeb56752 usbengines/usblocodplugin/src/usblcdplugin.cpp --- a/usbengines/usblocodplugin/src/usblcdplugin.cpp Tue Jul 13 00:03:51 2010 +0300 +++ b/usbengines/usblocodplugin/src/usblcdplugin.cpp Tue Jul 13 00:13:42 2010 +0300 @@ -18,14 +18,12 @@ #include "usblcdplugin.h" +#include "debug.h" -#ifdef __FLOG_ACTIVE -_LIT8(KLogComponent, "USBLcdPlugin"); -#endif CUsbLcdPlugin* CUsbLcdPlugin::NewL(TLocodBearerPluginParams& aParams) { - LOG_STATIC_FUNC_ENTRY + LOG_FUNC CUsbLcdPlugin* self = new (ELeave) CUsbLcdPlugin(aParams); CleanupStack::PushL(self); self->ConstructL(); diff -r 7d710eb9330d -r acbdfeb56752 usbengines/usbremotepersonality/src/cremotepersonalityhandler.cpp --- a/usbengines/usbremotepersonality/src/cremotepersonalityhandler.cpp Tue Jul 13 00:03:51 2010 +0300 +++ b/usbengines/usbremotepersonality/src/cremotepersonalityhandler.cpp Tue Jul 13 00:13:42 2010 +0300 @@ -361,7 +361,7 @@ p.iIndex = KStringDescriptorsBase - i; // iPersonalities is a dynamic array, no error handling is needed on Append - iPersonalities.Append(p); + iPersonalities.AppendL(p); FTRACE(FPrint( _L("[USBREMOTEPERSONALITY]\tCRemotePersonalityHandler::ReadPersonalities Personality id = %d Index = %d" ), iPersonalities[i].iId, iPersonalities[i].iIndex)); diff -r 7d710eb9330d -r acbdfeb56752 usbengines/usbwatcher/conf/usbwatcher.confml Binary file usbengines/usbwatcher/conf/usbwatcher.confml has changed diff -r 7d710eb9330d -r acbdfeb56752 usbengines/usbwatcher/group/bld.inf --- a/usbengines/usbwatcher/group/bld.inf Tue Jul 13 00:03:51 2010 +0300 +++ b/usbengines/usbwatcher/group/bld.inf Tue Jul 13 00:13:42 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -34,12 +34,6 @@ backup_registration.xml /epoc32/release/winscw/urel/z/private/101F9696/backup_registration.xml ../rom/usbwatcher.iby CORE_MW_LAYER_IBY_EXPORT_PATH(usbwatcher.iby) -// This file contains actual personality rss data -../rom/usbwatcher_resources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(usbwatcher_resources.iby) - -//Usbmanrsc.iby is included by Symbian usbman.iby. -// For l10n reaon it is not used but just to overwrite possible existing one -../rom/usbmanrsc.iby CORE_MW_LAYER_IBY_EXPORT_PATH(usbmanrsc.iby) ../conf/usbwatcher.confml MW_LAYER_CONFML(usbwatcher.confml) ../conf/usbwatcher_101F8801.crml MW_LAYER_CRML(usbwatcher_101F8801.crml) diff -r 7d710eb9330d -r acbdfeb56752 usbengines/usbwatcher/group/usbwatcherserver.mmp --- a/usbengines/usbwatcher/group/usbwatcherserver.mmp Tue Jul 13 00:03:51 2010 +0300 +++ b/usbengines/usbwatcher/group/usbwatcherserver.mmp Tue Jul 13 00:13:42 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -47,36 +47,6 @@ SYSTEMINCLUDE /epoc32/include/usb SYSTEMINCLUDE /epoc32/include/mw/hb/hbcore - -START RESOURCE usbman_pcsmtp.rss -TARGET usbman_pcsmtp -TARGETPATH /private/101fe1db -HEADER -LANGUAGE_IDS -END - -START RESOURCE usbman_pcs.rss -TARGET usbman_pcs -TARGETPATH /private/101fe1db -HEADER -LANGUAGE_IDS -END - -START RESOURCE usbman_pcspam.rss -TARGET usbman_pcspam -TARGETPATH /private/101fe1db -HEADER -LANGUAGE_IDS -END - -START RESOURCE usbman_pcsmtppam.rss -TARGET usbman_pcsmtppam -TARGETPATH /private/101fe1db -HEADER -LANGUAGE_IDS -END - - LIBRARY euser.lib // Kernel API LIBRARY usbman.lib // RUsb API (i.e. USB Manager's client API) LIBRARY etel.lib etelmm.lib // Multimode Etel API diff -r 7d710eb9330d -r acbdfeb56752 usbengines/usbwatcher/rom/usbmanrsc.iby --- a/usbengines/usbwatcher/rom/usbmanrsc.iby Tue Jul 13 00:03:51 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: USB Manager resource IBY dummy -* -*/ - - -#ifndef __USBMANRSC_IBY__ -#define __USBMANRSC_IBY__ - -//This file replaces the Symbian usbmanrsc.iby. - -#endif // __USBMANRSC_IBY__ diff -r 7d710eb9330d -r acbdfeb56752 usbengines/usbwatcher/rom/usbwatcher_resources.iby --- a/usbengines/usbwatcher/rom/usbwatcher_resources.iby Tue Jul 13 00:03:51 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: personality resources for UsbMan. -* -*/ -#ifndef __USBWATCHERRESOURCES_IBY__ -#define __USBWATCHERRESOURCES_IBY__ - -#ifdef __USB - -#ifdef __MEDIA_TRANSFER_PROTOCOL - -#ifdef FF_USB_MODEM -data=DATAZ_\private\101fe1db\usbman_pcsmtppam.rsc \private\101fe1db\usbman.rsc -#else // !FF_USB_MODEM -data=DATAZ_\private\101fe1db\usbman_pcsmtp.rsc \private\101fe1db\usbman.rsc -#endif // FF_USB_MODEM - -#else // !__MEDIA_TRANSFER_PROTOCOL - -#ifdef FF_USB_MODEM -data=DATAZ_\private\101fe1db\usbman_pcspam.rsc \private\101fe1db\usbman.rsc -#else // !FF_USB_MODEM -data=DATAZ_\private\101fe1db\usbman_pcs.rsc \private\101fe1db\usbman.rsc -#endif // FF_USB_MODEM - -#endif // __MEDIA_TRANSFER_PROTOCOL - -#endif // __USB - -#endif // __USBWATCHERRESOURCES_IBY__ \ No newline at end of file diff -r 7d710eb9330d -r acbdfeb56752 usbengines/usbwatcher/src/cusbpersonalitynotifier.cpp --- a/usbengines/usbwatcher/src/cusbpersonalitynotifier.cpp Tue Jul 13 00:03:51 2010 +0300 +++ b/usbengines/usbwatcher/src/cusbpersonalitynotifier.cpp Tue Jul 13 00:13:42 2010 +0300 @@ -198,7 +198,11 @@ return KErrGeneral; } - iNotifierClient.Append(ptr); + if( (ret = iNotifierClient.Append(ptr)) != KErrNone) + { + LOG( "append error"); + } + } return ret; @@ -231,7 +235,10 @@ return KErrGeneral; } - iNotifierClient.Append( ptr ); + if( ( ret = iNotifierClient.Append( ptr ) ) != KErrNone) + { + LOG( "append error"); + } } return ret; @@ -338,7 +345,11 @@ //Remove all but the 1st TNotifierClient* ptr = iNotifierClient[0]; iNotifierClient.Reset(); - iNotifierClient.Append( ptr ); + TInt ret = iNotifierClient.Append( ptr ); + if (ret != KErrNone) + { + LOG("append error"); + } } } diff -r 7d710eb9330d -r acbdfeb56752 usbengines/usbwatcher/src/usbman_pcs.rss --- a/usbengines/usbwatcher/src/usbman_pcs.rss Tue Jul 13 00:03:51 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,101 +0,0 @@ -/* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Resource file for usbman configuration. -* -*/ - - -NAME USBM - -#include -#include -#include -#include "usbman.rh" -#include "usbvariation.rh" - -RESOURCE BA_RSS_SIGNATURE - { - signature = 3; - } - -RESOURCE usb_configuration usb_config - { - } - - -RESOURCE PERSONALITY_ARRAY device_personalities - { - personalities = - { - PERSONALITY - { - bDeviceClass = 0x02; - bDeviceSubClass = 0x00; - protocol = 0x00; - numConfigurations = 0x01; - vendorId = per_vendorId; - productId = per_productId_PCSuite; - bcdDevice = per_bcdDevice; - manufacturer = per_manufacturer; - product = per_product; - id = KUsbPersonalityIdPCSuite; - class_uids = "101fbf22, 101fbf24, 10281F2A, 101FB43A"; - description = "ovi suite"; - detailedDescription = qtn_usb_mode_msg_ovi_suite; - property = 0x00000000; - - - } - , - PERSONALITY - { - bDeviceClass = 0x00; - bDeviceSubClass = 0x00; - protocol = 0x00; - numConfigurations = 0x01; - vendorId = per_vendorId; - productId = per_productId_MassStorage; - bcdDevice = per_bcdDevice; - manufacturer = per_manufacturer; - product = per_product; - id = KUsbPersonalityIdMS; - class_uids = "10204bbc"; - description = "mass storage"; - detailedDescription = qtn_usb_mode_msg_mass_storage; - property = 0x00000000; - - - } - , - PERSONALITY - { - bDeviceClass = 0x02; - bDeviceSubClass = 0x00; - protocol = 0x00; - numConfigurations = 0x01; - vendorId = per_vendorId; - productId = per_productId_RNDIS; - bcdDevice = per_bcdDevice; - manufacturer = per_manufacturer; - product = per_product; - id = KUsbPersonalityIdRNDIS; - class_uids = "20013d2f"; - description = qtn_usb_mode_rndis; - detailedDescription = qtn_usb_mode_msg_rndis; - property = 0x00000001; - } - }; - } - -// End of file diff -r 7d710eb9330d -r acbdfeb56752 usbengines/usbwatcher/src/usbman_pcsmtp.rss --- a/usbengines/usbwatcher/src/usbman_pcsmtp.rss Tue Jul 13 00:03:51 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,117 +0,0 @@ -/* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Resource file for usbman configuration. -* -*/ - - -NAME USBM - -#include -#include -#include -#include "usbman.rh" -#include "usbvariation.rh" - - - -RESOURCE BA_RSS_SIGNATURE - { - signature = 3; - } - -RESOURCE usb_configuration usb_config - { - } - - -RESOURCE PERSONALITY_ARRAY device_personalities - { - personalities = - { - PERSONALITY - { - bDeviceClass = 0x02; - bDeviceSubClass = 0x00; - protocol = 0x00; - numConfigurations = 0x01; - vendorId = per_vendorId; - productId = per_productId_PCSuiteMTP; - bcdDevice = per_bcdDevice; - manufacturer = per_manufacturer; - product = per_product; - id = KUsbPersonalityIdPCSuiteMTP; - class_uids = "102827B3, 101fbf22, 101fbf24, 10281F2A, 101FB43A"; - description = "ovi suite"; - detailedDescription = qtn_usb_mode_msg_ovi_suite; - property = 0x00000000; - } - , - PERSONALITY - { - bDeviceClass = 0x00; - bDeviceSubClass = 0x00; - protocol = 0x00; - numConfigurations = 0x01; - vendorId = per_vendorId; - productId = per_productId_MassStorage; - bcdDevice = per_bcdDevice; - manufacturer = per_manufacturer; - product = per_product; - id = KUsbPersonalityIdMS; - class_uids = "10204bbc"; - description = "mass storage"; - detailedDescription = qtn_usb_mode_msg_mass_storage; - property = 0x00000000; - } - , - PERSONALITY - { - bDeviceClass = 0x00; - bDeviceSubClass = 0x00; - protocol = 0x00; - numConfigurations = 0x01; - vendorId = per_vendorId; - productId = per_productId_MediaTransfer; - bcdDevice = per_bcdDevice; - manufacturer = per_manufacturer; - product = per_product; - id = KUsbPersonalityIdMTP; - class_uids = "102827B3"; - description = "media transfer"; - detailedDescription = qtn_usb_mode_msg_mtp; - property = 0x00000000; - } - , - PERSONALITY - { - bDeviceClass = 0x02; - bDeviceSubClass = 0x00; - protocol = 0x00; - numConfigurations = 0x01; - vendorId = per_vendorId; - productId = per_productId_RNDIS; - bcdDevice = per_bcdDevice; - manufacturer = per_manufacturer; - product = per_product; - id = KUsbPersonalityIdRNDIS; - class_uids = "20013d2f"; - description = qtn_usb_mode_rndis; - detailedDescription = qtn_usb_mode_msg_rndis; - property = 0x00000001; - } - }; - } - -// End o file diff -r 7d710eb9330d -r acbdfeb56752 usbengines/usbwatcher/src/usbman_pcsmtppam.rss --- a/usbengines/usbwatcher/src/usbman_pcsmtppam.rss Tue Jul 13 00:03:51 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,162 +0,0 @@ -/* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Resource file for usbman configuration. -* -*/ - - -NAME USBM - -#include -#include -#include -#include "usbman.rh" -#include "usbvariation.rh" - - -RESOURCE BA_RSS_SIGNATURE - { - signature = 3; - } - -RESOURCE usb_configuration usb_config - { - } - - -RESOURCE PERSONALITY_ARRAY device_personalities - { - personalities = - { - PERSONALITY - { - bDeviceClass = 0x02; - bDeviceSubClass = 0x00; - protocol = 0x00; - numConfigurations = 0x01; - vendorId = per_vendorId; - productId = per_productId_PCSuiteMTP; - bcdDevice = per_bcdDevice; - manufacturer = per_manufacturer; - product = per_product; - id = KUsbPersonalityIdPCSuiteMTP; - class_uids = "102827B3, 101fbf22, 101fbf24, 10281F2A, 101FB43A"; - description = "ovi suite"; - detailedDescription = qtn_usb_mode_msg_ovi_suite; - property = 0x00000000; - - - } - , - PERSONALITY - { - bDeviceClass = 0x00; - bDeviceSubClass = 0x00; - protocol = 0x00; - numConfigurations = 0x01; - vendorId = per_vendorId; - productId = per_productId_MassStorage; - bcdDevice = per_bcdDevice; - manufacturer = per_manufacturer; - product = per_product; - id = KUsbPersonalityIdMS; - class_uids = "10204bbc"; - description = "mass storage"; - detailedDescription = qtn_usb_mode_msg_mass_storage; - property = 0x00000000; - - - } -#ifdef __USB_PTP - , - PERSONALITY - { - bDeviceClass = 0x00; - bDeviceSubClass = 0x00; - protocol = 0x00; - numConfigurations = 0x01; - vendorId = per_vendorId; - productId = per_productId_PTP; - bcdDevice = per_bcdDevice; - manufacturer = per_manufacturer; - product = per_product; - id = KUsbPersonalityIdPTP; - class_uids = "1020df81"; - description = qtn_usb_mode_ptp; - detailedDescription = qtn_usb_mode_msg_ptp; - property = 0x00000000; - - - } -#endif // __USB_PTP - , - PERSONALITY - { - bDeviceClass = 0x00; - bDeviceSubClass = 0x00; - protocol = 0x00; - numConfigurations = 0x01; - vendorId = per_vendorId; - productId = per_productId_MediaTransfer; - bcdDevice = per_bcdDevice; - manufacturer = per_manufacturer; - product = per_product; - id = KUsbPersonalityIdMTP; - class_uids = "102827B3"; - description = "media transfer"; - detailedDescription = qtn_usb_mode_msg_mtp; - property = 0x00000000; - - - } - , - PERSONALITY - { - bDeviceClass = 0x00; - bDeviceSubClass = 0x00; - protocol = 0x00; - numConfigurations = 0x01; - vendorId = per_vendorId; - productId = per_productId_ModemInstall; - bcdDevice = per_bcdDevice; - manufacturer = per_manufacturer; - product = per_product; - id = KUsbPersonalityIdModemInst; - class_uids = "2000FDA9"; - description = "phone as modem"; - detailedDescription = qtn_usb_mode_msg_pam; - property = 0x00000000; - } - , - PERSONALITY - { - bDeviceClass = 0x02; - bDeviceSubClass = 0x00; - protocol = 0x00; - numConfigurations = 0x01; - vendorId = per_vendorId; - productId = per_productId_RNDIS; - bcdDevice = per_bcdDevice; - manufacturer = per_manufacturer; - product = per_product; - id = KUsbPersonalityIdRNDIS; - class_uids = "20013d2f"; - description = qtn_usb_mode_rndis; - detailedDescription = qtn_usb_mode_msg_rndis; - property = 0x00000001; - } - }; - } - -// End o file diff -r 7d710eb9330d -r acbdfeb56752 usbengines/usbwatcher/src/usbman_pcspam.rss --- a/usbengines/usbwatcher/src/usbman_pcspam.rss Tue Jul 13 00:03:51 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,141 +0,0 @@ -/* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Resource file for usbman configuration. -* -*/ - - -NAME USBM - -#include -#include -#include -#include "usbman.rh" -#include "usbvariation.rh" - -RESOURCE BA_RSS_SIGNATURE - { - signature = 3; - } - -RESOURCE usb_configuration usb_config - { - } - - -RESOURCE PERSONALITY_ARRAY device_personalities - { - personalities = - { - PERSONALITY - { - bDeviceClass = 0x02; - bDeviceSubClass = 0x00; - protocol = 0x00; - numConfigurations = 0x01; - vendorId = per_vendorId; - productId = per_productId_PCSuite; - bcdDevice = per_bcdDevice; - manufacturer = per_manufacturer; - product = per_product; - id = KUsbPersonalityIdPCSuite; - class_uids = "101fbf22, 101fbf24, 10281F2A, 101FB43A"; - description = "ovi suite"; - detailedDescription = qtn_usb_mode_msg_ovi_suite; - property = 0x00000000; - - - } - , - PERSONALITY - { - bDeviceClass = 0x00; - bDeviceSubClass = 0x00; - protocol = 0x00; - numConfigurations = 0x01; - vendorId = per_vendorId; - productId = per_productId_MassStorage; - bcdDevice = per_bcdDevice; - manufacturer = per_manufacturer; - product = per_product; - id = KUsbPersonalityIdMS; - class_uids = "10204bbc"; - description = "mass storage"; - detailedDescription = qtn_usb_mode_msg_mass_storage; - property = 0x00000000; - - - } -#ifdef __USB_PTP - , - PERSONALITY - { - bDeviceClass = 0x00; - bDeviceSubClass = 0x00; - protocol = 0x00; - numConfigurations = 0x01; - vendorId = per_vendorId; - productId = per_productId_PTP; - bcdDevice = per_bcdDevice; - manufacturer = per_manufacturer; - product = per_product; - id = KUsbPersonalityIdPTP; - class_uids = "1020df81"; - description = qtn_usb_mode_ptp; - detailedDescription = qtn_usb_mode_msg_ptp; - property = 0x00000000; - - - } -#endif // __USB_PTP - , - PERSONALITY - { - bDeviceClass = 0x00; - bDeviceSubClass = 0x00; - protocol = 0x00; - numConfigurations = 0x01; - vendorId = per_vendorId; - productId = per_productId_ModemInstall; - bcdDevice = per_bcdDevice; - manufacturer = per_manufacturer; - product = per_product; - id = KUsbPersonalityIdModemInst; - class_uids = "2000FDA9"; - description = "phone as modem"; - detailedDescription = qtn_usb_mode_msg_pam; - property = 0x00000000; - } - , - PERSONALITY - { - bDeviceClass = 0x02; - bDeviceSubClass = 0x00; - protocol = 0x00; - numConfigurations = 0x01; - vendorId = per_vendorId; - productId = per_productId_RNDIS; - bcdDevice = per_bcdDevice; - manufacturer = per_manufacturer; - product = per_product; - id = KUsbPersonalityIdRNDIS; - class_uids = "20013d2f"; - description = qtn_usb_mode_rndis; - detailedDescription = qtn_usb_mode_msg_rndis; - property = 0x00000001; - } - }; - } - -// End of file diff -r 7d710eb9330d -r acbdfeb56752 usbuis/imageprintui/inc/capabilitymanager.h --- a/usbuis/imageprintui/inc/capabilitymanager.h Tue Jul 13 00:03:51 2010 +0300 +++ b/usbuis/imageprintui/inc/capabilitymanager.h Tue Jul 13 00:13:42 2010 +0300 @@ -93,7 +93,7 @@ * Return certain type list of Capabilities * @param aCapability the Capabilities type requested */ - RArray& GetCapabilities(TInt aCapability); + RArray& GetCapabilitiesL(TInt aCapability); /** * Stores value choosed by user diff -r 7d710eb9330d -r acbdfeb56752 usbuis/imageprintui/src/capabilitymanager.cpp --- a/usbuis/imageprintui/src/capabilitymanager.cpp Tue Jul 13 00:03:51 2010 +0300 +++ b/usbuis/imageprintui/src/capabilitymanager.cpp Tue Jul 13 00:13:42 2010 +0300 @@ -277,7 +277,7 @@ // // --------------------------------------------------------------------------- // -RArray& CCapabilityManager::GetCapabilities(TInt aCapabilities) +RArray& CCapabilityManager::GetCapabilitiesL(TInt aCapabilities) { FLOG(_L("[IMAGEPRINTUI]<<NotifyError(); iCurrentQualities.Reset(); - iCurrentQualities.Append(EDpsPrintQualityDefault); + iCurrentQualities.AppendL(EDpsPrintQualityDefault); AskLayoutL(); } @@ -600,7 +608,7 @@ // if fails add default value; iAppUi->NotifyError(); iCurrentPaperSizes.Reset(); - iCurrentPaperSizes.Append(EDpsPaperSizeDefault); + iCurrentPaperSizes.AppendL(EDpsPaperSizeDefault); AskQualityL(); } @@ -624,7 +632,7 @@ //if fails add default value iAppUi->NotifyError(); iCurrentLayouts.Reset(); - iCurrentLayouts.Append(EDpsLayoutDefault); + iCurrentLayouts.AppendL(EDpsLayoutDefault); // complete even if not succesfull, UI must activate iAppUi->CapabilitiesReady(); } @@ -666,19 +674,19 @@ for (TInt i = 0; i < qualityCount; i++) { - iPhoneSuppQuality.Append(reader.ReadUint16()); + iPhoneSuppQuality.AppendL(reader.ReadUint16()); } FLOG(_L("[IMAGEPRINTUI]>>> CImagePrintUi:CCapabilityManager, quality readed")); for (TInt i = 0; i < papersizeCount; i++) { - iPhoneSuppPaperSize.Append(reader.ReadUint16()); + iPhoneSuppPaperSize.AppendL(reader.ReadUint16()); } FLOG(_L("[IMAGEPRINTUI]>>> CImagePrintUi:CCapabilityManager, papersize readed")); for (TInt i = 0; i < layoutCount; i++) { - iPhoneSuppLayout.Append(reader.ReadUint16()); + iPhoneSuppLayout.AppendL(reader.ReadUint16()); } FLOG(_L("[IMAGEPRINTUI]>>> CImagePrintUi:CCapabilityManager, layout readed")); diff -r 7d710eb9330d -r acbdfeb56752 usbuis/imageprintui/src/requestmanager.cpp --- a/usbuis/imageprintui/src/requestmanager.cpp Tue Jul 13 00:03:51 2010 +0300 +++ b/usbuis/imageprintui/src/requestmanager.cpp Tue Jul 13 00:13:42 2010 +0300 @@ -225,15 +225,15 @@ req_quality.iElement = EDpsArgQuality; req_quality.iContent = quality; - iStart.iReqParam.iJobConfig.Append(req_quality); + iStart.iReqParam.iJobConfig.AppendL(req_quality); req_papersize.iElement = EDpsArgPaperSize; req_papersize.iContent = paperSize; - iStart.iReqParam.iJobConfig.Append(req_papersize); + iStart.iReqParam.iJobConfig.AppendL(req_papersize); req_layout.iElement = EDpsArgLayout; req_layout.iContent = layout; - iStart.iReqParam.iJobConfig.Append(req_layout); + iStart.iReqParam.iJobConfig.AppendL(req_layout); // retrieve images @@ -256,7 +256,7 @@ { FLOG(_L("[IMAGEPRINTUI]<<< CRequestManager, Start job, file exist")); helpTDpsPrintInfo[i].iFile.Copy(iImageArrayFlat->operator[](i)); - iStart.iReqParam.iPrintInfo.Append(helpTDpsPrintInfo[i]); + iStart.iReqParam.iPrintInfo.AppendL(helpTDpsPrintInfo[i]); } } diff -r 7d710eb9330d -r acbdfeb56752 usbuis/imageprintui/src/settingsitems.cpp --- a/usbuis/imageprintui/src/settingsitems.cpp Tue Jul 13 00:03:51 2010 +0300 +++ b/usbuis/imageprintui/src/settingsitems.cpp Tue Jul 13 00:13:42 2010 +0300 @@ -245,7 +245,8 @@ { HBufC* item; FLOG(_L("[IMAGEPRINTUI]\t CSettingsItems::HandleEvent START")); - RArray capabilityArray = iCapabilityManager->GetCapabilities(aCapability); + RArray capabilityArray = iCapabilityManager->GetCapabilitiesL(aCapability); + TInt currentItemIndex(0); CDesCArrayFlat* items = new ( ELeave ) CDesCArrayFlat( KDefaultArrayValue ); CleanupStack::PushL(items); diff -r 7d710eb9330d -r acbdfeb56752 usbuis/usbsettingsapp/USBSettingsApp.pro --- a/usbuis/usbsettingsapp/USBSettingsApp.pro Tue Jul 13 00:03:51 2010 +0300 +++ b/usbuis/usbsettingsapp/USBSettingsApp.pro Tue Jul 13 00:13:42 2010 +0300 @@ -2,6 +2,7 @@ TARGET = USBSettingsApp QT += core \ gui +CONFIG += no_icon HEADERS += inc/usbsettingsapp.h \ inc/usbuimodelactive.h \ inc/usbuisettingmodel.h @@ -20,7 +21,6 @@ symbian: { TARGET.UID3 = 0x2002E70C TARGET.CAPABILITY = LocalServices WriteDeviceData - RSS_RULES = "hidden = KAppIsHidden;" } BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include " \