/* Tests whether Publishing a Service/Device is performing as specified in UPnP specifications. @param aOperationType is reference to a section name in ini file where required parameters needs to be referred for this operation. @return None. */ void CTestRControlChannel::PublishServiceL (const TDesC& aOperationType) { _LIT(KInfoLogFile, "CTestRControlChannel::PublishServiceL ().... \n"); INFO_PRINTF1(KInfoLogFile); CRControlChannelObserver* upnpObserver = CRControlChannelObserver::NewL(this); CleanupStack::PushL( upnpObserver ); iObserverArray.Append(upnpObserver); RPnPParameterBundle pnpBundle ; pnpBundle.Open(); CleanupClosePushL( pnpBundle ); pnpBundle.SetPnPObserver((MPnPObserver*)upnpObserver); RParameterFamily family = pnpBundle.CreateFamilyL(EUPnPServiceRegisterParamSet); CUPnPServiceRegisterParamSet* registerServiceParamSet = CUPnPServiceRegisterParamSet::NewL(family ); _LIT(KParentDeviceUid, "ParentDeviceUid"); TPtrC parentDeviceUid; GetStringFromConfig(aOperationType, KParentDeviceUid, parentDeviceUid); RBuf8 parentDeviceUidBuf; parentDeviceUidBuf.Create(parentDeviceUid.Length()); parentDeviceUidBuf.Copy(parentDeviceUid); registerServiceParamSet->SetDeviceUidL (parentDeviceUidBuf); TPtrC serviceType; GetStringFromConfig(aOperationType, KServiceType, serviceType); RBuf8 serviceTypeBuf; serviceTypeBuf.Create(serviceType.Length()); serviceTypeBuf.Copy(serviceType); registerServiceParamSet->SetUriL ( serviceTypeBuf ); TInt duration; GetIntFromConfig(aOperationType, KCacheControl, duration); registerServiceParamSet->SetCacheControlData (duration); ExtractServiceDescriptionL (aOperationType, *registerServiceParamSet); _LIT8(KInitialMessage, "Initial notification message"); registerServiceParamSet->SetInitialMessageL(KInitialMessage); OpenPublisherL(); iPublisher.Publish( pnpBundle ); CActiveScheduler::Start(); serviceTypeBuf.Close(); parentDeviceUidBuf.Close(); CleanupStack::PopAndDestroy( &pnpBundle ); CleanupStack::Pop( upnpObserver ); InitiateControlL(); _LIT(KInfoLogFile1, "CTestRControlChannel::PublishServiceL () Stop.... \n"); INFO_PRINTF1(KInfoLogFile1); }
/*! Implementation for traverse so always true. */ bool SdFixture::execute(void * objectInstance, QString actionName, QHash<QString, QString> parameters, QString & stdOut) { debug("SdFixture::execute"); bool returnValue = true; #ifdef Q_OS_SYMBIAN const TUid fixtureUid = TUid::Uid(0x20026F7E); THashFunction32<RBuf8> hashFunc( RBufHashFunction ); TIdentityRelation<RBuf8> idFunc( RBufIdentityFunction ); RHashMap<RBuf8, RBuf8> paramPairs( hashFunc, idFunc ); CleanupClosePushL( paramPairs ); debug("SdFixture::execute read params"); QHashIterator<QString, QString> i(parameters); while (i.hasNext()) { i.next(); if(!i.key().isEmpty() && !i.value().isEmpty() && i.key() != OBJECT_TYPE){ debug("parametrit: " + i.key()+";"+ i.value()); debug("SdFixture::execute read key"); RBuf8 keyBuf; RBuf8 valueBuf; TPtrC16 keyStr(reinterpret_cast<const TUint16*>(i.key().utf16())); TPtrC16 valueStr(reinterpret_cast<const TUint16*>(i.value().utf16())); keyBuf.Create(keyStr.Length()); valueBuf.Create(valueStr.Length()); keyBuf.Copy(keyStr); valueBuf.Copy(valueStr); debug("SdFixture::execute insert to hash"); paramPairs.InsertL( keyBuf, valueBuf ); debug("SdFixture::execute pop hbufs"); } } debug("SdFixture::execute make fixture"); CTasFixturePluginInterface* fixture = CTasFixturePluginInterface::NewL( fixtureUid ); CleanupStack::PushL( fixture ); debug("SdFixture::execute conver actionname"); TPtrC16 actionStr(reinterpret_cast<const TUint16*>(actionName.utf16())); RBuf8 actionBuf; actionBuf.Create(actionStr.Length()); CleanupClosePushL( actionBuf ); actionBuf.Copy(actionStr); debug("SdFixture::execute execute fixture"); RBuf8 response; CleanupClosePushL( response ); if(fixture->Execute( NULL, actionBuf, paramPairs, response ) != KErrNone){ returnValue = false; } debug("SdFixture::execute convert response"); stdOut = XQConversions::s60Desc8ToQString(response); CleanupStack::PopAndDestroy( 4 );//response, fixture, paramPairs #endif debug("SdFixture::execute done"); return returnValue; }
EXPORT_C int WstringToRbuf8(const wstring& aSrc, RBuf8& aDes) { int retval = ESuccess; unsigned int wlen = 0; const wchar_t* wcharString = aSrc.c_str(); int minusone = -1; if (L'\0' == wcharString[0]) { return EStringNoData; } wlen = wcslen(aSrc.c_str()); char* buf = new char[wlen*2]; if (!buf) { return EInsufficientSystemMemory; } if(minusone != wcstombs(buf, (const wchar_t*)wcharString, wlen*2)) { aDes.Copy((const unsigned char *)buf, wlen*2); } else { retval = EInvalidWCSSequence; } delete []buf; return retval; }
int main() { int retval =ESuccess; wstring des; __UHEAP_MARK; RBuf8 buf; buf.Create(10); buf.Copy((TUint8 *)"Hello", 5); buf.CleanupClosePushL(); //int size =15; retval = Rbuf8ToWstring(buf, des ); int rbuf_len = buf.Length(); int string_len = des.length(); if (retval ==ESuccess && rbuf_len == string_len && rbuf_len == 5 && string_len == 5) { printf("test rbuf8towstring boundary2 Passed\n"); } else { assert_failed = true; printf("test rbuf8towstring boundary2 Failed\n"); } CleanupStack::PopAndDestroy(1); __UHEAP_MARKEND; testResultXml("test_rbuf8towstring_boundary2"); return 0; }
bool ChatSessionImpl::sendChatData(QString newChatData) { TPtrC16 dataPtr(reinterpret_cast<const TUint16*>(newChatData.utf16())); RBuf8 chatData; chatData.Create(300); chatData.Copy(dataPtr); mMessageSource->SendDataL(chatData); chatData.Close(); return true; }
void UpnpUuid::GenerateUuidL(RBuf8& aUuid) { // uuid generation TUpnpUuid uuid; TUuidString8 uuidString; UpnpUuid::MakeUuid(uuid); TTime now; now.UniversalTime(); TInt64 randSeed = now.Int64(); TInt randomNum = Math::Rand(randSeed); uuid.iTimeLow = static_cast<TUint32>(randomNum); UpnpUuid::UuidToString(uuid, uuidString); aUuid.CreateL(KUuidString.iTypeLength+KUuidStringLen); aUuid.Copy(KUuidString); aUuid.Append(uuidString); }
void TBuildPublishAndRootDeviceInfo::DoL ( ) { if ( iContext.Node ( ).PublishInfo ( ) ) { return; } TUpnpMessage::TRegisterRootDevice& msg = message_cast< TUpnpMessage::TRegisterRootDevice > ( iContext.iMessage ); CUPnPDevice* device = static_cast <CUPnPDevice*> ( msg.iPtr ); CStringPoolManager& stringPoolMgr = iContext.Node ().ConnectionProvider ().StringPoolManager (); RStringPool& sp = stringPoolMgr.StringPool ( ); const TStringTable& upnpTable = stringPoolMgr.GetUPnPTable(); CUPnPPublishInfoElement* publishInfo = CUPnPPublishInfoElement::NewL ( ); CleanupStack::PushL ( publishInfo ); publishInfo->SetKeyL( iContext.Node ().ConnectionProvider ().RootDeviceLocation () ); publishInfo->SetSearchTargetL( KRootDevice ( ) ); //upnp:rootdevice publishInfo->SetCacheControlL( KCacheControl ); const TDesC8& udnPtr = device->Property( sp.String ( UPNPDESCRIPTIONXMLTAGS::EUdn, upnpTable ) ); const TDesC8& deviceTypePtr = device->Property( sp.String(UPNPDESCRIPTIONXMLTAGS::EDeviceType,upnpTable ) ); publishInfo->SetUuidL ( udnPtr ); // Set Usn to udn + devicetype TInt len = udnPtr.Length ( ) + KSeperator.iTypeLength + deviceTypePtr.Length ( ); RBuf8 tempBuf; tempBuf.CreateMaxL ( len ); CleanupClosePushL ( tempBuf ); tempBuf.Copy ( udnPtr ); tempBuf.Append ( KSeperator ( ) ); tempBuf.Append ( deviceTypePtr ); publishInfo->SetUsnL( tempBuf ); iContext.Node ( ).SetPublishInfoL ( publishInfo ); // store deviceType in SCPr node for reference in M-Search Response Activity iContext.Node ( ).SetRootDeviceUrnL ( deviceTypePtr ); CleanupStack::PopAndDestroy ( &tempBuf ); CleanupStack::Pop ( publishInfo ); }
// ========================================================================== // FUNCTION: EncryptAndWriteNextBlockL // ========================================================================== TBool CContainerStoreContentManager::EncryptAndWriteNextBlockL( CBufferedWriter& aBufferedWriter, const TDesC8& aPlaintextBlock ) { __LOG_ENTER_SUPPRESS( "EncryptAndWriteNextBlockL" ) TBool lastBlock = EFalse; TPtr8 nextBlock = aBufferedWriter.NextBlockBufferL(); if( aPlaintextBlock.Length() == iBlockSize ) { iEncryption.EncryptL( aPlaintextBlock, nextBlock ); } else { __LOG_WRITE_INFO( "writing last block" ) lastBlock = ETrue; // Add PKCS5-stype padding to pad to the block size. RBuf8 paddedBuffer; paddedBuffer.CreateL( iBlockSize ); CleanupClosePushL( paddedBuffer ); paddedBuffer.Copy( aPlaintextBlock ); iEncryption.AddPaddingL( paddedBuffer, iBlockSize ); iEncryption.EncryptL( paddedBuffer, nextBlock ); CleanupStack::PopAndDestroy( &paddedBuffer ); } // end if return lastBlock; } // end EncryptAndWriteNextBlockL
// ----------------------------------------------------------------------------- // XIMPRBuf8Helper::SetNewValueL() // ----------------------------------------------------------------------------- // EXPORT_C void XIMPRBuf8Helper::SetNewValueL( RBuf8& aBuf, const TDesC8& aValue ) { GrowIfNeededL( aBuf, aValue.Length() ); aBuf.Copy( aValue ); }
void ScrShotsGenUtils::DumpJsFileL(CScrShotsSettings* scrShotsSettings) { CGetImei* getImei = CGetImei::NewL(); CleanupStack::PushL(getImei); RBuf8 formatBuf; formatBuf.Create(256); formatBuf.CleanupClosePushL(); TFileName infoFile; User::LeaveIfError(CEikonEnv::Static()->FsSession().PrivatePath(infoFile)); infoFile.Append( KDeviceJSFile ); TParsePtrC parse((CEikonEnv::Static()->EikAppUi()->Application())->AppFullName()); infoFile.Insert(0, KCDriveWithColon); RFs fsConn; User::LeaveIfError(fsConn.Connect()); CleanupClosePushL(fsConn); RFile jsFile; if(BaflUtils::FileExists(fsConn, infoFile)){ BaflUtils::DeleteFile(fsConn, infoFile); } //now create the file User::LeaveIfError(jsFile.Create(fsConn, infoFile, EFileWrite)); CleanupClosePushL(jsFile); // User::LeaveIfError(jsFile.Write(KFunctionBlockStart)); RBuf8 values; values.Create(256); for(int i = 0; i < KDeviceParamsCount ; i++){ formatBuf.Zero(); TInt sizeOfItem = User::StringLength((TText8 *)DeviceParams [i]); TPtr8 item((unsigned char*)DeviceParams [i],sizeOfItem ,sizeOfItem ); switch(i){ //device_model case 0:{ CDeviceTypeInformation* devInfo = SysUtil::GetDeviceTypeInfoL(); CleanupStack::PushL(devInfo); TPtrC manufName, modelCode, modelName; devInfo->GetManufacturerName(manufName); devInfo->GetModelCode(modelCode); devInfo->GetModelName(modelName); RBuf8 manufName8, modelName8, modelCode8; manufName8.Create(128); modelName8.Create(128); modelCode8.Create(128); manufName8.CleanupClosePushL(); modelName8.CleanupClosePushL(); modelCode8.CleanupClosePushL(); manufName8.Copy(manufName); modelName8.Copy(modelName); modelCode8.Copy(modelCode); values.Format(KModelNameFormatString, &manufName8, &modelName8, &modelCode8); CleanupStack::PopAndDestroy(4); break; } //firmware_version case 1:{ RBuf swVersion; swVersion.Create(128); SysUtil::GetSWVersion(swVersion); values.Copy(swVersion); TInt pos = 0; while((pos = values.Find(_L8("\n"))) != KErrNotFound){ //values.Delete(pos,1); values.Replace(pos,1,_L8("_")); } swVersion.Close(); break; } //ram_info case 2:{ TInt totalram= 0; HAL::Get(HALData::EMemoryRAM, totalram); totalram /= 1024; values.Num(totalram); break; } //uptime case 3:{ TTimeIntervalMicroSeconds32 iTickPeriod; UserHal::TickPeriod(iTickPeriod); TUint tickCount = User::TickCount(); TUint noOfTicksPerSecond = (1000 * 1000) / iTickPeriod.Int(); TInt noOfSecsSinceStartUp = tickCount / noOfTicksPerSecond;//noOfMicroSecsSinceStartup / (1000 * 1000); values.Num(noOfSecsSinceStartUp); break; } //scrshot count case 4:{ values.Num(scrShotsSettings->TotalScrShotCount()); break; } //symbian version case 5:{ TVersion epocver = User::Version(); values.Copy(epocver.Name()); break; } //series 60 version case 6:{ VersionInfo::TPlatformVersion platformVersion; VersionInfo::GetVersion(platformVersion); TInt aMajor = platformVersion.iMajorVersion; TInt aMinor = platformVersion.iMinorVersion; values.Format(_L8("%d.%d"),aMajor, aMinor); break; } //country code case 7:{ TLocale loc; int code = loc.CountryCode(); values.Num(code); break; } //imei hash case 8:{ TBuf8<256> inputimei; TBuf8<256> outimeihash; if(getImei->IsImeiFetched()){ getImei->GetImei(inputimei); GetWhirlPoolHash(outimeihash,inputimei); values.Copy(outimeihash); } } break; } formatBuf.Format(KStringVariableDeclaration, &item, &values); TRACE_ON(RDebug::Printf((const char*)formatBuf.PtrZ())); jsFile.Write(formatBuf); } values.Close(); CleanupStack::PopAndDestroy(4); //TODO: This code should be commented in final release build #if BRAHMA_DEBUG //code to copy the js file just created to the c:\ so that it can be analyzed _LIT(KTargetFileName, "c:\\device_info.js"); BaflUtils::CopyFile(CEikonEnv::Static()->FsSession(),infoFile, KTargetFileName); #endif }
// --------------------------------------------------------------------------------- // CUpnpTmFilteredAppList::ParseAppFilterStringL // Method parses the descriptor containing the filter string // It parses the comma-separated list of A_ARG_TYPE_AppList schema // elements, attributes and their values // eg: "name="*Audio*",description="*",icon@mimetype="*svg+xml*", remotingInfo@protocolID="*", // appInfo@appCategory="*",audioInfo@audioType="*",resourceStatus="free",signature="*"" // @param aAppFilter Buffer containing application filter string // @param aErr[out] Terminal Mode error code // --------------------------------------------------------------------------------- // void CUpnpTmFilteredAppList::ParseAppFilterStringL( const TDesC8& aAppFilter, TTerminalModeErrorCode& aErr ) { OstTraceFunctionEntry0( CUPNPTMFILTEREDAPPLIST_PARSEAPPFILTERSTRINGL_ENTRY ); // Validate the filter string aErr = ETerminalModeSuccess; TInt quotePos = aAppFilter.Locate( KQuote ); if ( ( quotePos != 0 ) || ( aAppFilter.Find(KDoubleQuote) == KErrNotFound )) { // corrupt filter string aErr = ETerminalModeInvalidArgument; OstTrace1( TRACE_ERROR, DUP2_CUPNPTMFILTEREDAPPLIST_PARSEAPPFILTERSTRINGL, "CUpnpTmFilteredAppList::ParseAppFilterStringL;quotePos=%d", quotePos ); return; } RBuf8 filterBuffer; CleanupClosePushL(filterBuffer); /* Create a buffer having the content of AppFilter buffer but without the leading quote(") */ filterBuffer.CreateL(aAppFilter.Mid(quotePos+1)); TInt equalToQuoteToken; while( ( equalToQuoteToken = filterBuffer.Find(Keq)) != KErrNotFound ) { // Fetch the full key string TPtrC8 key = filterBuffer.Left(equalToQuoteToken); // Check for the presence of sub element by checking the @ in the key string TInt atTokenPos = key.Find(KAtToken); TBool displayInfo(EFalse); if ( atTokenPos != KErrNotFound ) { // @ is found in the key string // Now extract the parent element TPtrC8 parentKey = key.Left(atTokenPos); //Remove any leading and trailing whitespaces in the parent element const TDesC8& parentKeyWithoutSpace = RemoveWhiteSpace(parentKey); // Check if the parent elemet is one of desired element or not. // It should be one of the following : // <1> icon <2> remotingInfo <3> appInfo <4> displayInfo <5> audioInfo if ( ( parentKeyWithoutSpace.Compare(KIconElement) != KErrNone ) && ( parentKeyWithoutSpace.Compare(KRemotingInfo) != KErrNone ) && ( parentKeyWithoutSpace.Compare(KAppInfo) != KErrNone ) && ( parentKeyWithoutSpace.Compare(KDisplayInfo) != KErrNone ) && ( parentKeyWithoutSpace.Compare(KAudioInfo) != KErrNone ) ) { // parent element is not proper aErr = ETerminalModeInvalidArgument; break; } if ( parentKeyWithoutSpace.Compare(KDisplayInfo) == KErrNone ) { // The parent key element is displayInfo displayInfo = ETrue; } // Fetch the actual key name ( child element ) key.Set(key.Mid(atTokenPos+1)); } //Remove any leading and trailing whitespaces in the key const TDesC8& keyWithoutSpace = RemoveWhiteSpace(key); if ( (filterBuffer.Mid(equalToQuoteToken) ).Locate(KQuote) != 1 ) { // Missing quote(") ahead of the value aErr = ETerminalModeInvalidArgument; break; } TPtrC8 bufPtr = filterBuffer.Mid(equalToQuoteToken+2); quotePos = bufPtr.Locate( KQuote ); if ( quotePos == KErrNotFound ) { // missing quote (") at the end of the value aErr = ETerminalModeInvalidArgument; break; } /* Add the filter info as key-value pairs. // Also check if the parent key is display info. If display info flag is true then use the method with non default parameter */ if ( displayInfo ) { iFilterInfo->SetFilterInfoL( keyWithoutSpace, bufPtr.Left(quotePos), aErr, ETrue ); } else { // Use the method with default parameter iFilterInfo->SetFilterInfoL( keyWithoutSpace, bufPtr.Left(quotePos), aErr ); } if ( aErr != ETerminalModeSuccess ) { // Return the error code in case the key element is not as per the schema aErr = ETerminalModeInvalidArgument; break; } // Skip the quote position and set the buffer bufPtr.Set(bufPtr.Mid(quotePos+1)); if ( ( bufPtr.Locate(KCommaSeparator) != 0 ) && ( bufPtr.Locate(KQuote) != 0 ) ) { // missing quote (") or comma (,) following the quote. // Expected to be something of this kind ( ", or "" ) aErr = ETerminalModeInvalidArgument; break; } //Copy the residual content skipping two characters(", or "" ) in the actual buffer filterBuffer.Copy(bufPtr.Mid(UpnpString::KLinefeedLength)); } CleanupStack::PopAndDestroy(&filterBuffer); OstTrace1( TRACE_FLOW, CUPNPTMFILTEREDAPPLIST_PARSEAPPFILTERSTRINGL, "CUpnpTmFilteredAppList::ParseAppFilterStringL;aErr=%d", aErr ); OstTraceFunctionExit0( CUPNPTMFILTEREDAPPLIST_PARSEAPPFILTERSTRINGL_EXIT ); }
void CCmdBtraceout::DoRunL() { if (iStdin) { CTextBuffer* buffer = CTextBuffer::NewLC(512); Stdin().SetReadMode(RIoReadHandle::EOneOrMore); TBuf<256> buf; while (Stdin().Read(buf) == KErrNone) { buffer->AppendL(buf); } RBuf8 data; data.CreateL(buffer->Length()); data.Copy(buffer->Descriptor()); // This will collapse us back to real 8-bit data if (iTruncate) { if (iOptions.IsPresent(&iFilterUid)) { if (iArguments.IsPresent(3)) { PrintWarning(_L("Ignoring 'arg_2' (%u) and all following arguments"), iArg2); } BTraceFilteredN(iCategory, iSubcategory, iFilterUid, iArg1, data.Ptr(), data.Size()); } else { if (iArguments.IsPresent(3)) { PrintWarning(_L("Ignoring 'arg_3' (%u)"), iArg3); } BTraceN(iCategory, iSubcategory, iArg1, iArg2, data.Ptr(), data.Size()); } } else { if (iOptions.IsPresent(&iFilterUid)) { if (iArguments.IsPresent(2)) { PrintWarning(_L("Ignoring 'arg_1' (%u) and all following arguments"), iArg1); } BTraceFilteredBig(iCategory, iSubcategory, iFilterUid, data.Ptr(), data.Size()); } else { if (iArguments.IsPresent(3)) { PrintWarning(_L("Ignoring 'arg_2' (%u) and all following arguments"), iArg2); } BTraceBig(iCategory, iSubcategory, iArg1, data.Ptr(), data.Size()); } } data.Close(); CleanupStack::PopAndDestroy(buffer); } else { if (iArguments.IsPresent(4)) { if (iOptions.IsPresent(&iFilterUid)) { if (iArguments.IsPresent(3)) { PrintWarning(_L("Ignoring 'arg_3' (%u)"), iArg3); } BTraceFiltered12(iCategory, iSubcategory, iFilterUid, iArg1, iArg2); } else { BTrace12(iCategory, iSubcategory, iArg1, iArg2, iArg3); } } else if (iArguments.IsPresent(3)) { if (iOptions.IsPresent(&iFilterUid)) { BTraceFiltered12(iCategory, iSubcategory, iFilterUid, iArg1, iArg2); } else { BTrace8(iCategory, iSubcategory, iArg1, iArg2); } } else if (iArguments.IsPresent(2)) { if (iOptions.IsPresent(&iFilterUid)) { BTraceFiltered8(iCategory, iSubcategory, iFilterUid, iArg1); } else { BTrace4(iCategory, iSubcategory, iArg1); } } else { if (iOptions.IsPresent(&iFilterUid)) { BTraceFiltered4(iCategory, iSubcategory, iFilterUid); } else { BTrace0(iCategory, iSubcategory); } } } }
/** * Write the file to the hard drive. * * @param aFileName * @param aBodyPartArray */ void CMultipartTestContainer::WriteFileL( const TDesC& aFileName, RPointerArray<CBodyPart>& aBodyPartArray ) { RFs fs; fs.Connect(); CleanupClosePushL(fs); RFile output; TInt err = output.Open(fs, aFileName, EFileWrite); if (err == KErrNotFound) { User::LeaveIfError(output.Create(fs, aFileName, EFileWrite)); } // output file TInt size = aBodyPartArray.Count(); TInt i; _LIT8(KEol, "\r\n"); for (i = 0; i < size; i++) { CBodyPart* bodyPart = aBodyPartArray[i]; if( bodyPart->Url().Ptr() ) { output.Write(_L8("***************Ur")); output.Write(KEol); RBuf8 narrow; err = narrow.Create(bodyPart->Url().Length()*2); if (err != KErrNone) { INFO_PRINTF1(_L("Error printing Url to output file; continueing...")); } narrow.Copy(bodyPart->Url()); output.Write(narrow.Left(narrow.Length())); output.Write(KEol); } if( bodyPart->ContentID().Ptr() ) { output.Write(_L8("***************ContentID")); output.Write(KEol); output.Write(bodyPart->ContentID() ); output.Write(KEol); } if( bodyPart->Charset().Ptr() ) { output.Write(_L8("***************Charset")); output.Write(KEol); output.Write( bodyPart->Charset() ); output.Write(KEol); } if( bodyPart->ContentType().Ptr() ) { output.Write(_L8("***************ContentType")); output.Write(KEol); output.Write( bodyPart->ContentType() ); output.Write(KEol); } if( bodyPart->Headers().Ptr() ) { output.Write(_L8("***************Headers")); output.Write(KEol); output.Write(bodyPart->Headers() ); output.Write(KEol); } if( bodyPart->Body().Ptr() ) { output.Write(_L8("***************Body")); output.Write(KEol); output.Write(bodyPart->Body() ); output.Write(KEol); } output.Write(_L8("=========================================part ends")); output.Write(KEol); } // end of loop output.Close(); CleanupStack::PopAndDestroy(1, &fs); fs.Close(); }