// ---------------------------------------------------------------------------
// ?implementation_description
// ---------------------------------------------------------------------------
//
void TNcdSendableProgress::InternalizeL( RReadStream& aStream )
    {
    iState = aStream.ReadUint32L();
    iOperationId = aStream.ReadInt32L();
    iProgress = aStream.ReadInt32L();
    iMaxProgress = aStream.ReadInt32L();
    }
Esempio n. 2
0
EXPORT_C void CX509Certificate::InternalizeL(RReadStream& aStream)
	{
	if (iIssuerName != NULL) //just to check cert is uninitialised
		{
		User::Leave(KErrArgument);
		}
	iKeyFactory = new(ELeave) TX509KeyFactory;
	
	TInt len = aStream.ReadInt32L(); //Read the length of the streamed encoding
	HBufC8* temp= HBufC8::NewLC(len);	
	TPtr8 ptr=temp->Des();
	aStream.ReadL(ptr,len);
	iEncoding=temp->AllocL();
	CleanupStack::PopAndDestroy(); // temp

	TASN1DecSequence encSeq;
	TInt pos = 0;
	CArrayPtrFlat<TASN1DecGeneric>* seq = encSeq.DecodeDERLC(*iEncoding, pos, 3, 3);	
	TASN1DecGeneric* encSigAlg = seq->At(1);
	iSigningAlgorithm = CX509SigningAlgorithmIdentifier::NewL(encSigAlg->Encoding());
	TASN1DecBitString encBS;
	iSignature = encBS.ExtractOctetStringL(*(seq->At(2)));
	CleanupStack::PopAndDestroy();//seq	

	CSHA1* hash = CSHA1::NewL();
	CleanupStack::PushL(hash);
	iFingerprint = hash->Final(Encoding()).AllocL();
	CleanupStack::PopAndDestroy();//hash

	ConstructCertL();
	}
Esempio n. 3
0
// ----------------------------------------------------------------------------
// CSdpMediaField::DoInternalizeL
// ----------------------------------------------------------------------------
//
void CSdpMediaField::DoInternalizeL(RReadStream& aStream)
{
    RStringF media = iPool.OpenFStringL(GetTokenFromStreamL(aStream));
    CleanupClosePushL(media);
    SetMediaL(media);
    CleanupStack::Pop();//media
    media.Close();
    TUint32 port = aStream.ReadUint32L();
    //SetPortL(aStream.ReadUint32L());
    TUint flag = aStream.ReadUint8L();
    if(flag)
    {
        SetPortCountL(aStream.ReadUint32L());
    }
    RStringF protocol =iPool.OpenFStringL(GetTokenFromStreamL(aStream));
    CleanupClosePushL(protocol);
    SetProtocolL(protocol);
    CleanupStack::Pop();//protocol
    protocol.Close();
    SetPortL(port);
    SetFormatListL(GetTokenFromStreamL(aStream));
    SetInfoL(GetTokenFromStreamL(aStream));
    SdpCodecTemplate<CSdpConnectionField>::InternalizeArrayL(*iConnectionFields,
            aStream);
    SdpCodecTemplate<CSdpBandwidthField>::InternalizeArrayL(*iBandwidthFields,
            aStream);
    if(aStream.ReadUint8L())
    {
        SetKey(CSdpKeyField::InternalizeL(aStream));
    }
    SdpCodecTemplate<CSdpAttributeField>::InternalizeArrayL(*iAttributeFields,
            aStream);
    SdpCodecTemplate<CSdpFmtAttributeField>::InternalizeArrayL(*iFmtAttrFields,
            aStream);
}
Esempio n. 4
0
EXPORT_C void CHeaderFooter::InternalizeL(RReadStream& aStream)
/** Internalises this object's text content and global format layers from a read 
stream. 

The presence of this function means that the standard templated operator>>() 
(defined in s32strm.h) is available to internalise objects of this class.

This function does not restore any fields, pictures or rich text-specific 
formatting, so may need to be accompanied by a call to RestoreComponentsL().

@param aStream Stream from which the object should be internalised. */
	{
	TUint flags = aStream.ReadInt8L();
	iFirstPageToPrintTo = aStream.ReadInt32L();
	if (flags & ETextExists)
		{
		delete iText;
		iText = NULL;
		CreateFormatLayersL();
		aStream>> *iParaLayer;
		aStream>> *iCharLayer;
		iText = CRichText::NewL(iParaLayer,iCharLayer);
		iText->SetFieldFactory(this);
		aStream>> *iText;
		}
// -----------------------------------------------------------------------------
// XIMPRBuf16Helper::InternalizeL()
// -----------------------------------------------------------------------------
//
EXPORT_C void XIMPRBuf16Helper::InternalizeL( RBuf16& aBuf,
                                              RReadStream& aStream )
    {
    TInt length = aStream.ReadInt32L();
    GrowIfNeededL( aBuf, length );
    aStream.ReadL( aBuf, length );
    }
EXPORT_C void CPromptData::InternalizeL(RReadStream& aStream)
/**
 Internalizes the prompt data from the specified stream/
 @param aStream The read stream
*/
	{
	Reset();
	iClientName.CreateL(aStream, KMaskDesLength16);
	iVendorName.CreateL(aStream, KMaskDesLength16);
	aStream >> iClientSid.iId;
	aStream >> iServerSid.iId;
	aStream >> iServiceId.iUid;
	iDestination.CreateL(aStream, KMaskDesLength16);
	iOpaqueData.CreateL(aStream, KMaskDesLength8);
	
	TInt32 count = aStream.ReadUint32L();
		
	for (TInt i = 0; i < count; ++i)
		{
		TInt32 l = aStream.ReadInt32L();
		HBufC* d = HBufC::NewMaxLC(l);
		TPtr wptr = d->Des();
		aStream.ReadL(wptr, l);
		iDescriptions.AppendL(d);
		CleanupStack::Pop(d);
		}
	aStream >> iOptions;
	aStream >> iFlags;
	}
// -----------------------------------------------------------------------------
// 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();
	}
void TBidirectionalEndOfLineContext::InternalizeL(RReadStream& aSource)
	{
	iFirstCategory = static_cast<TChar::TBdCategory>(aSource.ReadInt8L());
	iFirstStrongCategory = static_cast<TChar::TBdCategory>(aSource.ReadInt8L());
	iPositionOfLastStrongCategory = 0;
	iStartPosOfThisLine = 0;
	}
// --------------------------------------------------------------------------- --
// CDRMEventModify::Internalize
// Reads the data of the object from the given stream
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
EXPORT_C void CDRMEventModify::InternalizeL(
    RReadStream& aInput) 
    {
    TInt inputLength = 0;

    MDRMEvent::InternalizeL(aInput);

    // Read the length of the HBufC8*
    inputLength = aInput.ReadInt32L();

    // Reserve the HBufC8*
    if( !iContentID )
        {
        iContentID = HBufC8::NewL(inputLength);
        }
    else 
        {
        iContentID->ReAllocL(inputLength);
        }

    // Read the HBufC8*
    TPtr8 inRead(iContentID->Des());
    aInput.ReadL(inRead,inputLength); 

    // this implementation may need to be changed if the size of the enum changes
    iUniqueID = aInput.ReadUint32L();
    };
Esempio n. 10
0
/**
Initialise this object with the contents of RReadStream aStream
The descriptor contains an externalised version of an object.
This method is typically used to obtain a CProcessInfo object from 
the core dump server.
Any modifications to this method should be synchronised with ExternalizeL().
Also note that the methods used from RReadStream (>> or ReadUint32L) 
can behave differently, especially for descriptors.
@param aStream Stream with streamed object
@see ExternalizeL
@see RReadStream
@pre Call Externalise to obtain the stream containing an externalised 
version of this object.
*/
EXPORT_C void CProcessInfo::InternalizeL( RReadStream & aStream )
	{

	TUint32 idLow = aStream.ReadUint32L(); 

	TUint32 idHigh = aStream.ReadUint32L(); 
	iId = MAKE_TUINT64( idHigh, idLow );

	// Read the number of character elements in the name. 
	TUint32 nameLength = aStream.ReadUint32L(); 

	if( NULL != iName )
		{
		LOG_MSG( " iName != NULL\n" );
		delete iName;
		iName = NULL;
		}

	if ( nameLength > 0 )
		{
		iName  = HBufC::NewL( aStream, nameLength ); 
		}
	else
		{
		iName  = NULL;
		}

	iObserved = static_cast<TBool>(aStream.ReadUint32L());

	iSize = aStream.ReadUint32L() ;
	}
Esempio n. 11
0
// ---------------------------------------------------------------------------
// CLbtTriggerInfo::SetTriggerEntry()
//
// (other items were commented in a header).
// ---------------------------------------------------------------------------
//  
EXPORT_C void CLbtTriggerInfo::InternalizeL( RReadStream& aStream )
    {	
	TInt trigType=aStream.ReadInt8L();
	if(trigType==1)	
	    {
		iEntry=CLbtSessionTrigger::NewL();
		iEntry->InternalizeL(aStream);
	    }
	else 
	    {
		iEntry=CLbtStartupTrigger::NewL();
		iEntry->InternalizeL(aStream);
	    }
	
    TInt trigValidity=aStream.ReadInt8L();
	
	if(iDynInfo !=NULL)
	    {
	    delete iDynInfo;
	    iDynInfo=NULL;
	    }
	
	iDynInfo=new TLbtTriggerDynamicInfo;
	
	switch(trigValidity)
	    {
		case 1: iDynInfo->iValidity=TLbtTriggerDynamicInfo::EInvalid;
						break;
		case 2: iDynInfo->iValidity=TLbtTriggerDynamicInfo::EValid;
						break;
		}
	
	iDynInfo->iDistanceToLatestLocation=aStream.ReadReal32L()	;
    }
/** 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);
	}
// -----------------------------------------------------------------------------
// CDRMEventAddRemove::Internalize
// Reads the data of the object from the given stream
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
EXPORT_C void CDRMEventAddRemove::InternalizeL(
    RReadStream& aInput) 
    {
    TInt inputLength = 0;

    MDRMEvent::InternalizeL(aInput);

    // Read the length of the HBufC8*
    inputLength = aInput.ReadInt32L();

    // Reserve the HBufC8*
    if( !iContentID )
        {
        iContentID = HBufC8::NewL(inputLength);
        }
    else
        {
        iContentID->ReAllocL(inputLength);
        }

    TPtr8 inRead(iContentID->Des());

    // Read the HBufC8*
    aInput.ReadL(inRead, inputLength); 

    // this implementation may need to be changed if the size of the enum changes
    iStatus = static_cast<TAddRemoveEventStatus>(aInput.ReadInt8L());
    };
Esempio n. 14
0
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 );
        }
Esempio n. 15
0
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());
		
	}
// -----------------------------------------------------------------------------
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 );                       
        }      
    } 
Esempio n. 17
0
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;	
	}
// ---------------------------------------------------------------------------
// 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;
        }        
    }
// -----------------------------------------------------------------------------
// TExtensionIntParam::InternalizeL
// -----------------------------------------------------------------------------
//
TExtensionIntParam TExtensionIntParam::InternalizeL(RReadStream& aReadStream)
	{
	TUint32 id = aReadStream.ReadUint32L();
	TUint32 value = aReadStream.ReadUint32L();

	return TExtensionIntParam(id, value);
	}
Esempio n. 20
0
// ----------------------------------------------------------------------------
// 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);
        }
    }
// -----------------------------------------------------------------------------
// 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);    
    
    };
Esempio n. 22
0
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);
		}
	}
Esempio n. 23
0
// ---------------------------------------------------------------------------
// CLbtGeoHybrid::DoInternalizeL()
//
// (other items were commented in a header).
// ---------------------------------------------------------------------------
//
void CLbtGeoHybrid::DoInternalizeL( RReadStream& aStream ) 
    {
    TInt count = aStream.ReadInt8L();
    for( TInt i=0;i<count;i++ )
        {
        TInt areaType = aStream.ReadInt8L();
        if( areaType == 1 )
            {
            CLbtGeoCircle* area= CLbtGeoCircle::NewL();
            area->InternalizeL(aStream);
            iHybridArea.Append( area );
            }
        else if( areaType == 2 )
            {
            CLbtGeoRect* area= CLbtGeoRect::NewL();
            area->InternalizeL(aStream);
            iHybridArea.Append( area );
            }
        else if( areaType == 3 )
            {
            CLbtGeoCell* area= CLbtGeoCell::NewL();
            area->InternalizeL(aStream);
            iHybridArea.Append( area );
            }
        }
    }     
Esempio n. 24
0
void CClassA::InternalizeL(RReadStream& aStream)
	{
	TInt maxlen;
	maxlen     = aStream.ReadInt32L();
	iVarBuffer = HBufC::NewL(aStream,maxlen);
	iIntValue  = aStream.ReadInt32L();
	iUintValue = aStream.ReadUint32L();
	}  
Esempio n. 25
0
void CX520AttributeTypeAndValue::InternalizeL(RReadStream& aStream)
	{
	TInt maxlen;
	maxlen = aStream.ReadInt32L();
	iType = HBufC::NewL(aStream,maxlen);
	maxlen = aStream.ReadInt32L();
	iValue = HBufC8::NewL(aStream,maxlen);
	}
// -----------------------------------------------------------------------------
// CSmlActiveContactSuiteProgressCallback::NotifyProgressL()
// Reads progress event related data and notifies observer.
// -----------------------------------------------------------------------------
//
void CSmlActiveContactSuiteProgressCallback::NotifyProgressL( RReadStream& aStream ) const
    {
    TInt8 status = aStream.ReadInt8L();
    TInt32 info1 = aStream.ReadInt32L();
    TInt32 info2 = aStream.ReadInt32L();
    
    iObserver->OnSyncMLSyncProgress( (MSyncMLProgressObserver::TStatus)status, info1, info2 );
    }
void CDeploymentComponentData::ConstructLoadL(RReadStream &aStream)
    {
    TUint32 len(aStream.ReadUint32L() );
    aStream.ReadL(iDataFileName, len);

    len = aStream.ReadUint32L();
    aStream.ReadL(iMimeType, len);
    }
// ---------------------------------------------------------
// 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();
    }
Esempio n. 29
0
// ---------------------------------------------------------------------------
//
// ---------------------------------------------------------------------------
//
EXPORT_C void RCaIdsArray::InternalizeL( RReadStream& aStream )
    {
    Reset();
    TInt count = aStream.ReadInt32L();
    for( TInt i = 0; i < count; i++ )
        {
        AppendL( aStream.ReadInt32L() );
        }
    }
Esempio n. 30
0
// ---------------------------------------------------------
// 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() );
    }
}