void TWordUiData::ExternalizeL(RWriteStream& aStream) const { const TCardinality version=KVersionAppConfigurationData; version.ExternalizeL(aStream); aStream.WriteUint8L((TUint8)iNpcVisibility); aStream.WriteUint8L((TUint8)iPicturePrefs); aStream.WriteInt8L(iToolbandVisibility); aStream.WriteInt8L(iToolbarVisibility); aStream.WriteInt8L(iWysiwygOn); aStream.WriteInt32L(iCursorPos); aStream.WriteInt32L(iZoomFactor); }
void TWordUiData::InternalizeL(RReadStream& aStream) { TCardinality version; version.InternalizeL(aStream); if (version!=KVersionAppConfigurationData) User::Leave(KErrCorrupt); // !! need better error iNpcVisibility=0; iNpcVisibility=aStream.ReadUint8L(); iPicturePrefs=0; iPicturePrefs=aStream.ReadUint8L(); iToolbandVisibility=(TBool)aStream.ReadInt8L(); iToolbarVisibility=(TBool)aStream.ReadInt8L(); iWysiwygOn=(TBool)aStream.ReadInt8L(); iCursorPos=aStream.ReadInt32L(); iZoomFactor=aStream.ReadInt32L(); }
void CApaAppListServer::InternalizeNonNativeApplicationTypeArrayL() { RFile file; CleanupClosePushL(file); const TInt error=file.Open(iFs, iNonNativeApplicationTypeRegistry, EFileShareReadersOnly|EFileStream|EFileRead); if (error==KErrNone) // don't leave if the file can't be opened (because it doesn't exist, or because the directory we're looking for it in doesn't exist) { RFileReadStream sourceStream; sourceStream.Attach(file); // file gets closed by this call, but that's okay, we don't need it any more (sourceStream has its own copy of this RFile object that it owns) CleanupClosePushL(sourceStream); TCardinality arrayCount; arrayCount.InternalizeL(sourceStream); for (TInt i=0; i<TInt(arrayCount); ++i) { SNonNativeApplicationType nonNativeApplicationType; nonNativeApplicationType.iTypeUid.iUid=sourceStream.ReadUint32L(); nonNativeApplicationType.iNativeExecutable=HBufC::NewLC(sourceStream, KMaxFileName); iNonNativeApplicationTypeArray.AppendL(nonNativeApplicationType); CleanupStack::Pop(nonNativeApplicationType.iNativeExecutable); } CleanupStack::PopAndDestroy(&sourceStream); } CleanupStack::PopAndDestroy(&file); }