# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1277128167 -10800 # Node ID c00b160ac7eb11a7956475f79575c707136a9461 # Parent 3e3bd14de94eb635e217ffb207618de0ebd564a5 Revision: 201023 Kit: 2010125 diff -r 3e3bd14de94e -r c00b160ac7eb usbclasses/pictbridgeengine/src/dpsoperation.cpp --- a/usbclasses/pictbridgeengine/src/dpsoperation.cpp Wed Jun 09 10:48:05 2010 +0300 +++ b/usbclasses/pictbridgeengine/src/dpsoperation.cpp Mon Jun 21 16:49:27 2010 +0300 @@ -117,9 +117,15 @@ // jobConfig TInt count = iReqParam.iJobConfig.Count(); + TInt ret = KErrNone; + elemsP[0].iElement = EDpsJobConfig; elemsP[0].iNum = count; - aElements.Append(elemsP[0]); + if ( (ret = aElements.Append(elemsP[0])) != KErrNone ) + { + IF_DEBUG(Print(_L("*** append error"))); + return ret; + } for (TInt i = 0; i < count; i++) { argsP[i].iElement = iReqParam.iJobConfig[i].iElement; @@ -127,11 +133,14 @@ argsP[i].iContent.AppendNumUC(iReqParam.iJobConfig[i].iContent, EHex); // we have to append the low bytes (0000) argsP[i].iContent.Append(KDpsLowZero); - aArgs.Append(argsP[i]); + if ( (ret = aArgs.Append(argsP[i])) != KErrNone ) + { + IF_DEBUG(Print(_L("*** append error"))); + return ret; + } IF_DEBUG(Print(_L("the element is %d"), argsP[i].iElement)); IF_DEBUG(Print(_L("the content is %S"), &(argsP[i].iContent))); } - // printInfo for (TInt j = 0; j < imageCount; j++) { @@ -141,7 +150,12 @@ argsP[count].iElement = EDpsArgFileID; argsP[count].iContent.AppendNumFixedWidth(objectHandles[j], EHex, KFullWordWidth); - aArgs.Append(argsP[count]); + if ( (ret = aArgs.Append(argsP[count])) != KErrNone ) + { + IF_DEBUG(Print(_L("*** append error"))); + return ret; + } + IF_DEBUG(Print(_L("the element is %d"), argsP[count].iElement)); IF_DEBUG(Print(_L("the content is %S"), &(argsP[count].iContent))); @@ -152,7 +166,11 @@ { argsP[count].iElement = EDpsArgFileName; argsP[count].iContent.Copy(iReqParam.iPrintInfo[j].iFile); - aArgs.Append(argsP[count]); + if ( (ret = aArgs.Append(argsP[count])) != KErrNone) + { + IF_DEBUG(Print(_L("*** append error"))); + return ret; + } IF_DEBUG(Print(_L("the element is %d"), argsP[count].iElement)); IF_DEBUG(Print(_L("the content is %S"), &(argsP[count].iContent))); @@ -164,7 +182,11 @@ { argsP[count].iElement = EDpsArgDate; argsP[count].iContent.Copy(iReqParam.iPrintInfo[j].iDate); - aArgs.Append(argsP[count]); + if ( (ret = aArgs.Append(argsP[count])) != KErrNone) + { + IF_DEBUG(Print(_L("*** append error"))); + return ret; + } IF_DEBUG(Print(_L("the element is %d"), argsP[count].iElement)); IF_DEBUG(Print(_L("the content is %S"), &(argsP[count].iContent))); k++; count++; @@ -174,7 +196,11 @@ argsP[count].iElement = EDpsArgCopies; argsP[count].iContent.AppendNumFixedWidthUC( iReqParam.iPrintInfo[j].iCopies, EDecimal, KCopyFileWidth); - aArgs.Append(argsP[count]); + if ( (ret = aArgs.Append(argsP[count])) != KErrNone) + { + IF_DEBUG(Print(_L("*** append error"))); + return ret; + } IF_DEBUG(Print(_L("the element is %d"), argsP[count].iElement)); IF_DEBUG(Print(_L("the content is %S"), &(argsP[count].iContent))); k++; count++; @@ -183,7 +209,11 @@ { argsP[count].iElement = EDpsArgPrtPID; argsP[count].iContent.AppendNumUC(iReqParam.iPrintInfo[j].iPrtPID); - aArgs.Append(argsP[count]); + if ( (ret = aArgs.Append(argsP[count])) != KErrNone) + { + IF_DEBUG(Print(_L("*** append error"))); + return ret; + } IF_DEBUG(Print(_L("the element is %d"), argsP[count].iElement)); IF_DEBUG(Print(_L("the content is %S"), &(argsP[count].iContent))); k++; count++; @@ -192,14 +222,22 @@ { argsP[count].iElement = EDpsArgCopyID; argsP[count].iContent.AppendNumUC(iReqParam.iPrintInfo[j].iCopyID); - aArgs.Append(argsP[count]); + if ( (ret = aArgs.Append(argsP[count])) != KErrNone) + { + IF_DEBUG(Print(_L("*** append error"))); + return ret; + } IF_DEBUG(Print(_L("the element is %d"), argsP[count].iElement)); IF_DEBUG(Print(_L("the content is %S"), &(argsP[count].iContent))); k++; count++; } elemsP[j + 1].iNum = k; - aElements.Append(elemsP[j + 1]); + if ( (ret = aElements.Append(elemsP[j + 1])) != KErrNone) + { + IF_DEBUG(Print(_L("*** append error"))); + return ret; + } } delete[] objectHandles; @@ -257,9 +295,13 @@ arg.iElement = EDpsArgAbortStyle; arg.iContent.AppendNumUC(iReqParam.iAbortStyle, EHex); arg.iContent.Append(KDpsLowZero); - aArgs.Append(arg); + TInt ret = aArgs.Append(arg); + if (ret != KErrNone) + { + IF_DEBUG(Print(_L("*** append error"))); + } IF_DEBUG(Print(_L("<<>>TDpsGetCapability::FillRepArgs"))); CDpsXmlParser* XmlPar = aTrader->Parser(); + TInt ret = KErrNone; + if (aArgs.Count()) { if (EDpsArgPaperTypes == aArgs[0].iElement || @@ -428,12 +488,18 @@ { TDpsAttribute attrib; XmlPar->GetAttribute(attrib); - iRepParam.iContent.Append(attrib); + ret = iRepParam.iContent.Append(attrib); } else { - iRepParam.iContent.Append(0); - } + ret = iRepParam.iContent.Append(0); + } + + if (ret != KErrNone) + { + IF_DEBUG(Print(_L("*** append error"))); + return ret; + } } TUint32 value; TLex8 converter; @@ -466,16 +532,21 @@ TInt major = value >> KShiftLength; paperType.iMajor = (TDpsPaperTypeMajor)major; paperType.iMinor = (TDpsPaperTypeMinor)(value & KDpsMinorMask); - iRepParam.iPaperType.Append(paperType); + ret = iRepParam.iPaperType.Append(paperType); } else { // remove the extra zeros value = value >> KShiftLength; - iRepParam.iContent.Append(value); + ret = iRepParam.iContent.Append(value); IF_DEBUG(Print(_L("the value is %x"), value)); } + if (ret != KErrNone) + { + IF_DEBUG(Print(_L("*** append error"))); + return ret; + } } iRepParam.iCap = aArgs[0].iElement; @@ -543,7 +614,12 @@ { return error; } - iRepParam.iDpsVersions.Append(version); + error = iRepParam.iDpsVersions.Append(version); + if (error != KErrNone) + { + IF_DEBUG(Print(_L("*** append error"))); + return error; + } } break; diff -r 3e3bd14de94e -r c00b160ac7eb usbclasses/pictbridgeengine/src/dpsxmlparser.cpp --- a/usbclasses/pictbridgeengine/src/dpsxmlparser.cpp Wed Jun 09 10:48:05 2010 +0300 +++ b/usbclasses/pictbridgeengine/src/dpsxmlparser.cpp Mon Jun 21 16:49:27 2010 +0300 @@ -195,7 +195,7 @@ TDpsArg arg; arg.iElement = (TDpsArgument)i; arg.iContent.Copy(_L("")); - iDpsArgs.Append(arg); + iDpsArgs.AppendL(arg); break; } } diff -r 3e3bd14de94e -r c00b160ac7eb usbclasses/pictbridgeengine/src/pictbridge.cpp --- a/usbclasses/pictbridgeengine/src/pictbridge.cpp Wed Jun 09 10:48:05 2010 +0300 +++ b/usbclasses/pictbridgeengine/src/pictbridge.cpp Mon Jun 21 16:49:27 2010 +0300 @@ -293,7 +293,7 @@ TDpsVersion version; version.iMajor = static_cast(reader.ReadUint8()); version.iMinor = static_cast(reader.ReadUint8()); - aConfig.iDpsVersions.Append(version); + aConfig.iDpsVersions.AppendL(version); } TPtrC vendorString = reader.ReadTPtrC(); aConfig.iVendorName.Copy(vendorString); diff -r 3e3bd14de94e -r c00b160ac7eb usbengines/usbdevcon/src/crequestshandler.cpp --- a/usbengines/usbdevcon/src/crequestshandler.cpp Wed Jun 09 10:48:05 2010 +0300 +++ b/usbengines/usbdevcon/src/crequestshandler.cpp Mon Jun 21 16:49:27 2010 +0300 @@ -62,7 +62,7 @@ TUid uid(implementations[i]->ImplementationUid()); CUsbCMHandler* handler = (reinterpret_cast(REComSession::CreateImplementationL (uid, _FOFF(CUsbCMHandler, iPrivateEComUID)))); - iHandlers.Append(handler); + iHandlers.AppendL(handler); } implementations.Close(); // cleanup diff -r 3e3bd14de94e -r c00b160ac7eb usbengines/usbremotepersonality/src/cremotepersonalityhandler.cpp --- a/usbengines/usbremotepersonality/src/cremotepersonalityhandler.cpp Wed Jun 09 10:48:05 2010 +0300 +++ b/usbengines/usbremotepersonality/src/cremotepersonalityhandler.cpp Mon Jun 21 16:49:27 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 3e3bd14de94e -r c00b160ac7eb usbengines/usbwatcher/src/cusbpersonalitynotifier.cpp --- a/usbengines/usbwatcher/src/cusbpersonalitynotifier.cpp Wed Jun 09 10:48:05 2010 +0300 +++ b/usbengines/usbwatcher/src/cusbpersonalitynotifier.cpp Mon Jun 21 16:49:27 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 3e3bd14de94e -r c00b160ac7eb usbuis/imageprintui/inc/capabilitymanager.h --- a/usbuis/imageprintui/inc/capabilitymanager.h Wed Jun 09 10:48:05 2010 +0300 +++ b/usbuis/imageprintui/inc/capabilitymanager.h Mon Jun 21 16:49:27 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 3e3bd14de94e -r c00b160ac7eb usbuis/imageprintui/src/capabilitymanager.cpp --- a/usbuis/imageprintui/src/capabilitymanager.cpp Wed Jun 09 10:48:05 2010 +0300 +++ b/usbuis/imageprintui/src/capabilitymanager.cpp Mon Jun 21 16:49:27 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 3e3bd14de94e -r c00b160ac7eb usbuis/imageprintui/src/requestmanager.cpp --- a/usbuis/imageprintui/src/requestmanager.cpp Wed Jun 09 10:48:05 2010 +0300 +++ b/usbuis/imageprintui/src/requestmanager.cpp Mon Jun 21 16:49:27 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 3e3bd14de94e -r c00b160ac7eb usbuis/imageprintui/src/settingsitems.cpp --- a/usbuis/imageprintui/src/settingsitems.cpp Wed Jun 09 10:48:05 2010 +0300 +++ b/usbuis/imageprintui/src/settingsitems.cpp Mon Jun 21 16:49:27 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 3e3bd14de94e -r c00b160ac7eb usbuis/usbui/USBClassChangeUIPlugin/src/USBClassChangeUIPluginModel.cpp --- a/usbuis/usbui/USBClassChangeUIPlugin/src/USBClassChangeUIPluginModel.cpp Wed Jun 09 10:48:05 2010 +0300 +++ b/usbuis/usbui/USBClassChangeUIPlugin/src/USBClassChangeUIPluginModel.cpp Mon Jun 21 16:49:27 2010 +0300 @@ -362,7 +362,7 @@ { // Add empty value AddIconL (iPersonalityCount, aIconArray); - iUsbModeIndexes.Append(0); + iUsbModeIndexes.AppendL(0); aPopUpItems.AppendL(KNullDesC); aListBox.AppendL(KUSBUIEmptyString); aListBoxDefault.AppendL(KUSBUIEmptyString); @@ -544,7 +544,11 @@ case EDriverLoadPartialSuccess: { // Drivers are loaded more or less successfully - iDeviceIDs.Append(aEventInfo.iDeviceId); + TInt ret = iDeviceIDs.Append(aEventInfo.iDeviceId); + if (ret != KErrNone) + { + FLOG( _L("[CUSBClassChangeUIPlugin]\t CUSBClassChangeUIPluginModel::HostEventNotify *** append error")); + } iObserver->HostEventNotify(aEventInfo); break; }