void CIntent::InternalizeL(RReadStream& aStream) { iIntent = static_cast<TIntent>(aStream.ReadInt32L()); // number of criteria TInt count = aStream.ReadInt32L(); for(TInt i = 0; i < count; i++) { MCriteria* criteria = NULL; // Write criteria type ECriteriaType type = static_cast<ECriteriaType>(aStream.ReadInt32L()); // read criteria object from stream if(type == ECriteriaCount) { criteria = CRightsCriteriaCount::NewL(aStream); } else if(type == ECriteriaExpiry) { criteria = CRightsCriteriaExpiry::NewL(aStream); } // Add criteria object to array of criteria CleanupStack::PushL(criteria); AddCriteriaL(criteria); CleanupStack::Pop(criteria); } }
// ----------------------------------------------------------------------------- // CWPPushMessage::InternalizeL // ----------------------------------------------------------------------------- // EXPORT_C void CWPPushMessage::InternalizeL( RReadStream& aStream ) { // Restore the header TInt version( aStream.ReadInt32L() ); TInt length( aStream.ReadInt32L() ); HBufC8* header = HBufC8::NewLC( aStream, length ); iAuthenticated = aStream.ReadInt8L(); iSaved = aStream.ReadInt8L(); // Restore the body length = aStream.ReadInt32L(); HBufC8* body = HBufC8::NewL( aStream, length ); // Store header and body CleanupStack::Pop(); // header Set( header, body ); if( version == KProvisioningMsgVersion ) { length = aStream.ReadInt32L(); if( length > 0 ) { delete iOriginator; iOriginator = NULL; iOriginator = HBufC8::NewL( aStream, length ); } } }
/** implementation of inherited internalization function */ void CLbsTransmitLocationLogEvent::DoInternalizeL(RReadStream& aReadStream) { iX3PApp = TUid::Uid(aReadStream.ReadInt32L()); TInt32 len = aReadStream.ReadInt32L(); aReadStream.ReadL(iDestination, len); ReadPosInfo(aReadStream, iPosInfo); }
// --------------------------------------------------------- // CSmlAlertInfo::InternalizeL(RReadStream& aStream) // Reads alert info from given stream // --------------------------------------------------------- EXPORT_C void CSmlAlertInfo::InternalizeL(RReadStream& aStream) { iErrorCode = aStream.ReadInt32L(); iJobControl = (CSmlAlertInfo::TJobControl) aStream.ReadInt32L(); iProtocol = (TSmlUsageType) aStream.ReadInt32L(); iSessionId = aStream.ReadInt32L(); iProfile = aStream.ReadInt32L(); iTransport = aStream.ReadInt32L(); TInt vendorLength = aStream.ReadInt32L(); iVendorSpecificInfo = HBufC8::NewL(vendorLength); TPtr8 ptrVendor = iVendorSpecificInfo->Des(); aStream.ReadL( ptrVendor, vendorLength ); TInt count = aStream.ReadInt32L(); for (TInt i = 0; i < count; i++) { TInt id = aStream.ReadInt32L(); iTaskIds.AppendL(id); TSmlSyncType syncType = ( TSmlSyncType )aStream.ReadInt32L(); iTaskSyncTypes.AppendL( syncType ); } }
void CContactTextDef::InternalizeL(RReadStream& aStream) /** Internalises a CContactItem object from a read stream. @param aStream Stream from which the object should be internalised. */ { this->Reset(); TInt count = aStream.ReadInt32L(); TInt separatorLength = 0; for (TInt i=0; i<count; ++i) { TContactTextDefItem textDefItem; textDefItem.iFieldType.iUid = aStream.ReadInt32L(); separatorLength = aStream.ReadInt32L(); if(separatorLength) { aStream>>textDefItem.iSeperator; } this->AppendL(textDefItem); } TFieldType fieldType; fieldType.iUid = aStream.ReadInt32L(); SetFallbackField(fieldType); SetExactMatchOnly(aStream.ReadInt32L()); }
// ---------------------------------------------------------------------------- // Helper internalize a descriptor array from a stream // ---------------------------------------------------------------------------- // EXPORT_C void MPXUser::InternalizeL( CDesCArray*& aArray, RReadStream& aStream) { delete aArray; aArray = NULL; TInt n=aStream.ReadInt32L(); if( n ) { CDesCArray* array=new(ELeave)CDesCArrayFlat(n); CleanupStack::PushL(array); TInt len; for (TInt i=0;i<n;++i) { len=aStream.ReadInt32L(); HBufC* item=HBufC::NewLC(len); TPtr bp = item->Des(); aStream.ReadL(bp,len); array->AppendL(*item); CleanupStack::PopAndDestroy(item); } CleanupStack::Pop(array); aArray = array; } else { // Dummy aArray = new(ELeave)CDesCArrayFlat(1); } }
void CNcdNodeProxy::InternalizeNodeLinkDataL( RReadStream& aStream ) { DLTRACEIN(("")); HBufC* tmpTimeStamp( NULL ); HBufC* tmpCatalogSourceName( NULL ); TBool tmpRemoteFlag( EFalse ); TInt64 tmpExpiredTime( 0 ); CNcdNodeIdentifier* tmpParentIdentifier( NULL ); CNcdNodeIdentifier* tmpRealParentIdentifier( NULL ); // Read the class id of the link TInt tmpInt = aStream.ReadInt32L(); DLINFO(("Classid: %d", tmpInt)); if ( tmpInt != NcdNodeClassIds::ENcdNullObjectClassId ) { InternalizeDesL( tmpTimeStamp, aStream ); CleanupStack::PushL( tmpTimeStamp ); DLINFO(( _L("timestamp: %S"), tmpTimeStamp )); InternalizeDesL( tmpCatalogSourceName, aStream ); CleanupStack::PushL( tmpCatalogSourceName ); DLINFO(( _L("catalogsource: %S"), tmpCatalogSourceName )); tmpRemoteFlag = aStream.ReadInt32L(); DLINFO((_L("remote flag: %d"), tmpRemoteFlag)); aStream >> tmpExpiredTime; DLINFO(("expired time: %d", tmpExpiredTime )); tmpParentIdentifier = CNcdNodeIdentifier::NewLC( aStream ); tmpRealParentIdentifier = CNcdNodeIdentifier::NewLC( aStream ); }
// --------------------------------------------------------------------------- // CXIMPContextEventFilter::InternalizeL() // --------------------------------------------------------------------------- // EXPORT_C void CXIMPContextEventFilter::InternalizeL( RReadStream& aStream ) { TInt count = aStream.ReadInt32L(); if( count ) { //We are internalizing data which we have previously externalized // => Internalized array can be directly set as current array CArrayFix< TInt32 >* events = new (ELeave) CArrayFixFlat< TInt32 >( KXIMPEventListGranurality ); CleanupStack::PushL( events ); for( TInt ix = 0; ix < count; ++ix ) { events->AppendL( aStream.ReadInt32L() ); } delete iAcceptedEvents; iAcceptedEvents = events; CleanupStack::Pop( events ); } else { delete iAcceptedEvents; iAcceptedEvents = NULL; } }
// ----------------------------------------------------------------------------- // CDRMEventTimeChange::Internalize // Reads the data of the object from the given stream // (other items were commented in a header). // ----------------------------------------------------------------------------- // EXPORT_C void CDRMEventTimeChange::InternalizeL( RReadStream& aInput) { TInt8 securityLevel = 0; TInt64 timeData = 0; MDRMEvent::InternalizeL(aInput); // input the old time ReadInt64L( timeData, aInput ); iOldTime = timeData; // input the new time ReadInt64L( timeData, aInput ); iNewTime = timeData; // input the old time zone iOldTimeZone = aInput.ReadInt32L(); // input the new time zone iNewTimeZone = aInput.ReadInt32L(); // input the old security level securityLevel = aInput.ReadInt8L(); iOldSecurityLevel = static_cast<DRMClock::ESecurityLevel>(securityLevel); // input the new security level securityLevel = aInput.ReadInt8L(); iNewSecurityLevel = static_cast<DRMClock::ESecurityLevel>(securityLevel); };
void CCntFilter::InternalizeL(RReadStream& aStream) /** Internalises a CCntFilter object from a read stream. @param aStream Stream from which the object should be internalised. */ { // CContactIdArray* iIds; if (iIds) { delete iIds; iIds = NULL; } //TBool CheckIfExists=aStream.ReadInt32L(); if (aStream.ReadInt32L()) { iIds = CContactIdArray::NewL(); iIds->InternalizeL(aStream); } // TTime iSinceDateTime; TInt64 tempInt64; aStream >> tempInt64; iSinceDateTime = TTime(tempInt64); // TInclude iInclude; iInclude = static_cast<TInclude>(aStream.ReadInt32L()); // TInt32 iContactType; iContactType = aStream.ReadInt32L(); // TAny* iReserved1; // TAny* iReserved2; }
// --------------------------------------------------------------------------- // ?implementation_description // --------------------------------------------------------------------------- // void TNcdSendableProgress::InternalizeL( RReadStream& aStream ) { iState = aStream.ReadUint32L(); iOperationId = aStream.ReadInt32L(); iProgress = aStream.ReadInt32L(); iMaxProgress = aStream.ReadInt32L(); }
// ----------------------------------------------------------------------------- void CPresenceCacheBuddyInfo::InternalizeL( RReadStream& aStream ) { iAvailability = (MPresenceBuddyInfo2::TAvailabilityValues)aStream.ReadInt32L( ); HBufC* temp = InternalizeFieldL( aStream ); iBuddyId = temp; iIds.ResetAndDestroy(); iValues.ResetAndDestroy(); HBufC* key = NULL; HBufC8* value = NULL; // internalize expiry time TUint32 time_high = aStream.ReadUint32L(); TUint32 time_low = aStream.ReadUint32L(); iExpiryTime = MAKE_TINT64( time_high, time_low ); TInt count = aStream.ReadInt32L( ); for ( TInt i=0; i < count; i++ ) { key = InternalizeFieldL( aStream ); CleanupStack::PushL( key ); value = InternalizeField8L( aStream ); CleanupStack::Pop( key ); // This takes ownership anyway. SetAnyFieldPtrL( key, value ); } }
void TTcSettings::doLoadL( RReadStream& aStream ) { // Check that the file is of correct version TInt version = aStream.ReadInt16L(); if( version == KTcSettingsVersion ) { // Read bearer selection iBearerType = aStream.ReadInt32L() ; // Read autoconnect selection iAutoConnect = aStream.ReadInt16L(); // Read TCP port selection iTCPPort = aStream.ReadInt16L(); // Read IAP Id iIAPId = aStream.ReadInt16L(); // Read CSY name iCSYName = aStream.ReadInt32L(); // Read comms port name iCommPort = aStream.ReadInt32L(); // Read baudrate of comms iBaudrate = aStream.ReadInt32L(); // Read first run flag iIsFirstRun = aStream.ReadInt16L(); // Read remote TCP address as string // Read length first TUint16 length = aStream.ReadInt16L(); TBuf<40> buf; aStream.ReadL( buf, length); iTCPRemoteAddr.Input(buf); } }
// ----------------------------------------------------------------------------- // CIAUpdatePendingNodesFile::InternalizeL // // ----------------------------------------------------------------------------- // void CIAUpdatePendingNodesFile::InternalizeL( RReadStream& aStream ) { // If you make changes here, // remember to update ExternalizeL accordingly!!! TInt version( aStream.ReadInt32L() ); // Notice! In the future, some checking maybe required here // to be sure that file version is correct and the data can be // internalized correctly between different versions. if ( version != KVersion ) { // For now, just leave with the corrupt error. User::Leave( KErrCorrupt ); } iPendingNodes.ResetAndDestroy(); TInt count( aStream.ReadInt32L() ); for( TInt i = 0; i < count; ++i ) { CIAUpdaterIdentifier* identifier( CIAUpdaterIdentifier::NewLC() ); identifier->InternalizeL( aStream ); iPendingNodes.AppendL( identifier ); CleanupStack::Pop( identifier ); } iIndex = aStream.ReadInt32L(); }
// --------------------------------------------------------- // CMsgAddressControlEditorField::InternalizeL // // // --------------------------------------------------------- // void CMsgAddressControlEditorField::InternalizeL( RReadStream& aStream ) { iEntryString = HBufC::NewL( aStream, KMsgMaxStringLength ); iName = HBufC::NewL( aStream, KMsgMaxStringLength ); iAddress = HBufC::NewL( aStream, KMsgMaxStringLength ); iVerified = aStream.ReadInt32L(); iValidated = aStream.ReadInt32L(); }
void CClassA::InternalizeL(RReadStream& aStream) { TInt maxlen; maxlen = aStream.ReadInt32L(); iVarBuffer = HBufC::NewL(aStream,maxlen); iIntValue = aStream.ReadInt32L(); iUintValue = aStream.ReadUint32L(); }
void CX520AttributeTypeAndValue::InternalizeL(RReadStream& aStream) { TInt maxlen; maxlen = aStream.ReadInt32L(); iType = HBufC::NewL(aStream,maxlen); maxlen = aStream.ReadInt32L(); iValue = HBufC8::NewL(aStream,maxlen); }
// --------------------------------------------------------------------------- // // --------------------------------------------------------------------------- // EXPORT_C void RCaIdsArray::InternalizeL( RReadStream& aStream ) { Reset(); TInt count = aStream.ReadInt32L(); for( TInt i = 0; i < count; i++ ) { AppendL( aStream.ReadInt32L() ); } }
// --------------------------------------------------------- // FavouritesUtil::InternalizeL // --------------------------------------------------------- // void FavouritesUtil::InternalizeL ( CArrayFix<TInt>& aArray, RReadStream& aStream ) { TInt count = aStream.ReadInt32L(); for ( TInt i = 0; i < count; i++ ) { aArray.AppendL( aStream.ReadInt32L() ); } }
EXPORT_C void TATParam::InternalizeL(RReadStream& aStream) { TInt32 version = aStream.ReadInt32L(); if (version == KStreamVersion1) { aStream >> iValue; iValueInt = aStream.ReadInt32L(); iType = static_cast<TATParamType>(aStream.ReadInt32L()); }
// --------------------------------------------------------------------------- // TMMCScBkupArchiveDriveAndVector::InternalizeL() // // // --------------------------------------------------------------------------- void TMMCScBkupArchiveDriveAndVector::InternalizeL( RReadStream& aStream ) { aStream.ReadInt32L(); // EStreamFormatVersion1 aStream.ReadInt32L(); // spare1 aStream.ReadInt32L(); // spare2 aStream.ReadInt32L(); // spare3 // iDrive = static_cast<TDriveNumber>( aStream.ReadUint8L() ); aStream >> iVector; }
void TBaSystemSoundInfo::TTone::InternalizeL(RReadStream& aStream) /** @internalAll Gets a tone's frequency and duration. @param aStream The stream from which the tone's frequency and duration is read. */ { iFrequency=aStream.ReadInt32L(); iDuration=aStream.ReadInt32L(); }
// ----------------------------------------------------------------------------- // CHttpCacheEntry::InternalizeL // // ----------------------------------------------------------------------------- // void CHttpCacheEntry::InternalizeL( RReadStream& aReadStream, const TDesC& aDirectory ) { // url length TInt len; len = aReadStream.ReadInt32L(); delete iUrl; iUrl=NULL; iUrl = HBufC8::NewL( len ); TPtr8 ptr8( iUrl->Des() ); // url aReadStream.ReadL( ptr8, len ); // calculate full path and filename length // aDirectory/ + "x/xxxxxxxx" : note aDirectory has trailing '/' len = aDirectory.Length() + KSubdirNameLength + KFilenameLength; HBufC* filename = HBufC::NewLC( len ); TPtr ptr( filename->Des() ); // Read max char length of filename. // NOTE: The filename and filename length is calculated by the code in // HttpCacheUtil::GenerateNameLC. The sub directory is the same as the // last char of the filename, e.g. ..\A\0123DCBA TBuf<KFilenameLength> uniqueFilename; aReadStream.ReadL( uniqueFilename , KFilenameLength ); TPtrC uniqueSubDir = uniqueFilename.Right(1); // assemble path and filename ptr.Format(_L("%S%S\\%S"), &aDirectory, &uniqueSubDir, &uniqueFilename); // SetFileNameL( filename->Des() ); // CleanupStack::PopAndDestroy(); // filename // la TReal64 la; la = aReadStream.ReadReal64L(); iLastAccessed = la; // ref iRef = aReadStream.ReadUint32L(); // size iBodySize = aReadStream.ReadUint32L( ); // size iHeaderSize = aReadStream.ReadUint32L( ); // protected iProtected = aReadStream.ReadInt32L(); // header data delete iHeaderBuffer; iHeaderBuffer = NULL; len = aReadStream.ReadInt32L(); iHeaderBuffer = HBufC8::NewL(len); TPtr8 header_ptr( iHeaderBuffer->Des() ); aReadStream.ReadL( header_ptr, len ); // SetState( ECacheComplete ); }
void CNcdExtendedInstallInfo::InternalizeL( RReadStream& aStream ) { DLTRACEIN(("")); CNcdPurchaseInstallInfo::InternalizeL( aStream ); InternalizeDesL( iMimeType, aStream ); iLaunchable = aStream.ReadInt32L(); InternalizeDesL( iParameter, aStream ); InternalizeEnumL( iContentType, aStream ); InternalizeEnumL( iInstalledStatus, aStream ); iUriExists = aStream.ReadInt32L(); DLTRACEOUT(("Internalization successful")); }
// ----------------------------------------------------------------------------- // CDRMXOma::InternalizeL // ----------------------------------------------------------------------------- // void CDRMXOma::InternalizeL( RReadStream& aStream ) { TInt64 timeData = 0; TInt dataLength = 0; HBufC8* dataPart = 0; TPtr8 dataBuffer(NULL,0,0); TPtr16 dataBuffer2(NULL,0,0); // Read the ContentID dataLength = aStream.ReadInt32L(); if( dataLength ) { // Reserve a new buffer: dataPart = HBufC8::NewMaxLC( dataLength ); // Set the read buffer: dataBuffer.Set(const_cast<TUint8*>(dataPart->Ptr()), 0, dataLength); // Read the data: aStream.ReadL( dataBuffer ); // Pop the buffer CleanupStack::Pop(); // dataPart // If an old content identifier exists delete it if( iContentID ) { delete iContentID; iContentID = NULL; } // assign the new content id iContentID = dataPart; } else { // If an old content identifier exists delete it if( iContentID ) { delete iContentID; iContentID = NULL; } } // The Time stamp ReadInt64L( timeData, aStream ); iTimeStamp = timeData; // The time interval iWaitTime = aStream.ReadInt32L(); };
void TPlayer::InternalizeL(RReadStream& aStream) { if (iName != NULL) { delete iName; iName = NULL; } iNo = aStream.ReadInt32L(); TInt32 max; max = aStream.ReadInt32L(); iName = HBufC::NewL(aStream, max); iScore = aStream.ReadInt32L(); }
// ----------------------------------------------------------------------------- // CSmlActiveContactSuiteProgressCallback::NotifyErrorL() // Reads progress error related data and notifies observer. // ----------------------------------------------------------------------------- // void CSmlActiveContactSuiteProgressCallback::NotifyErrorL( RReadStream& aStream ) const { TInt8 errorLevel = aStream.ReadInt8L(); TInt32 error = aStream.ReadInt32L(); TInt32 taskId = aStream.ReadInt32L(); TInt32 info1 = aStream.ReadInt32L(); TInt32 info2 = aStream.ReadInt32L(); TNSmlErrorConversion errorconv( error ); error = errorconv.Convert(); iObserver->OnSyncMLSyncError( (MSyncMLProgressObserver::TErrorLevel)errorLevel, error, taskId, info1, info2 ); }
EXPORT_C void CPrinterProperty::InternalizeL(RReadStream& aStream) { iPrinterId = aStream.ReadInt32L(); iApplicationId = aStream.ReadInt32L(); iPropertyItems.Reset(); TInt count = aStream.ReadInt32L(); for (TInt i=0; i<count; i++) { TDirectPrintPropertyData item; item.InternalizeL(aStream); iPropertyItems.Append(item); } }
void TMMCScBkupArchiveVector::InternalizeL(RReadStream& aStream) { aStream.ReadInt32L(); // stream format version iOffset = aStream.ReadInt32L(); iLength = aStream.ReadInt32L(); aStream.ReadInt32L(); // Spare1 aStream.ReadInt32L(); // Spare2 // if (iOffset < 0 || iLength < 0) { User::Leave(KErrCorrupt); } }
EXPORT_C void CMobilePhoneListBase::InternalizeL(RReadStream& aStream) /** This member function internalizes the list contents from a stream. @param aStream The read stream containing the list. @capability None */ { iMaxNumber = aStream.ReadInt32L(); iList.Reset(); TInt count=aStream.ReadInt32L(); for (TInt ii=0;ii<count;++ii) InternalizeEntryL(iList.ExtendL(),aStream); }