// -----------------------------------------------------------------------------
// CWPPushMessage::ExternalizeL
// -----------------------------------------------------------------------------
//
EXPORT_C void CWPPushMessage::ExternalizeL( RWriteStream& aStream ) const
    {
    // Save version
    aStream.WriteInt32L( KProvisioningMsgVersion );

    // Save the header
    aStream.WriteInt32L( iHeader->Response().Length() );
    aStream << iHeader->Response();
    aStream.WriteInt8L( iAuthenticated );
    aStream.WriteInt8L( iSaved );

    // Save the body
    aStream.WriteInt32L( iBody->Length() );
    aStream << *iBody;

    // The sender
    if( iOriginator )
        {
        aStream.WriteInt32L( iOriginator->Length() );
        aStream << *iOriginator;
        }
    else
        {
        aStream.WriteInt32L( KNullDesC8().Length() );
        }

    aStream.CommitL();
    }
//-----------------------------------------------------------------------------
// CCFActionIndicationImpl::ExternalizeL
//-----------------------------------------------------------------------------
//
EXPORT_C void CCFActionIndicationImpl::ExternalizeL( RWriteStream& aStream )
    {
    FUNC_LOG;
    
    // Identifier
    aStream.WriteInt16L( iIdentifier->Length() );
    aStream.WriteL( *iIdentifier );
    
    // Parameters
    TPtrC buf( KNullDesC );
    TInt count = iParameters.Count();
    aStream.WriteInt16L( count );
    for( TInt i = 0; i < count; i++ )
        {
        // Key length and data
        buf.Set( iParameters[i]->Key() );
        aStream.WriteInt16L( buf.Length() );
        aStream.WriteL( buf, buf.Length() );
        
        // Value length and data
        buf.Set( iParameters[i]->Value() );
        aStream.WriteInt16L( buf.Length() );
        aStream.WriteL( buf, buf.Length() );
        }
    
    // Commit stream
    aStream.CommitL();
    }
// ---------------------------------------------------------------------------
// 
// ---------------------------------------------------------------------------
//
void CRequestManager::ExternalizeL(RWriteStream& aStream) const
	{
	FLOG(_L("[IMAGEPRINTUI]<<< CEventManager;ExternalizeL "));	
	aStream << iVendorName;
	aStream << iProductName;
	aStream.CommitL();
	}
// ---------------------------------------------------------------------------
// XIMPApiDataObjFactory::ExternalizeL
// ---------------------------------------------------------------------------
//
EXPORT_C void XIMPApiDataObjFactory::ExternalizeL(
        RWriteStream& aWs,
        const CXIMPApiDataObjBase& aDataObj )
    {
    aWs.WriteInt32L( aDataObj.Base().GetInterfaceId() );
    aDataObj.ExternalizeL( aWs );
    aWs.CommitL();
    }
Esempio n. 5
0
// ---------------------------------------------------------------------------
//
// ---------------------------------------------------------------------------
//
EXPORT_C void RCaIdsArray::ExternalizeL( RWriteStream& aStream ) const
    {
    aStream.WriteInt32L( Count() );
    for( TInt i = 0; i < Count(); i++ )
        {
        aStream.WriteInt32L( operator[]( i ) );
        }
    aStream.CommitL();
    }
//-----------------------------------------------------------------------------
// CCFActionSubscriptionImpl::ExternalizeL
//-----------------------------------------------------------------------------
//
EXPORT_C void CCFActionSubscriptionImpl::ExternalizeL( RWriteStream& aStream )
    {
    FUNC_LOG;
    
    aStream.WriteInt16L( iIdentifier->Length() );
    aStream.WriteL( *iIdentifier, iIdentifier->Length() );

    // Commit stream
    aStream.CommitL();
    }
// ---------------------------------------------------------------------------
// CCaInnerIconDescription::ExternalizeL
// ---------------------------------------------------------------------------
//
void CCaInnerIconDescription::ExternalizeL( RWriteStream& aStream ) const
    {
    aStream.WriteInt32L( iId );
    aStream.WriteUint32L( iFileName.Length() );
    aStream.WriteL( iFileName, iFileName.Length() );
    aStream.WriteUint32L( iSkinId.Length() );
    aStream.WriteL( iSkinId, iSkinId.Length() );
    aStream.WriteUint32L( iApplicationId.Length() );
    aStream.WriteL( iApplicationId, iApplicationId.Length() );
    aStream.CommitL();
    }
//Testing RWriteStream performance.
void StreamWriteTestL(RWriteStream& aStream, TUint32& aWriteFc, TUint32& aCommitFc)
	{
	TUint32 fc = User::FastCounter();
	for(TInt i=0;i<KIterCnt;++i)
		{
		aStream.WriteL(KTestDes);
		}
	TUint32 fc2 = User::FastCounter();
	aStream.CommitL();
	TUint32 fc3 = User::FastCounter();
	
	aWriteFc = CalcTickDiff(fc, fc2);
	aCommitFc = CalcTickDiff(fc2, fc3);
	}
void CSettingsManager::WriteIndexL(RWriteStream& aStream,
								  const TUid& aUid,
								  TStreamId& aStreamId)
	{
	TBool bNewPlugin = aStreamId.Value();
	TUint8 uchExistingPluginCnt = iControllerCnt;
	//write root index
	aStream << iGenSettingsId;
	
	if(bNewPlugin)
		{
		iControllerCnt++;		
		}
	
	aStream.WriteInt8L(iControllerCnt);
	
	//write the uid-streamid for existing plugins
	for(TUint8 i = 0; i < uchExistingPluginCnt; i++)
		{
		aStream.WriteInt32L(iArrUid[i].iUid); //write uid
		aStream << 	iArrStreamId[i];	 //write streamid
		}
	
	if(!bNewPlugin)
		{
		aStream.CommitL();
		return;	
		}
	
	//write uid-streamId for new plugin
	aStream.WriteInt32L(aUid.iUid); //write uid
	aStream << aStreamId;			//write streamid
		
	iArrUid.AppendL(aUid);
	iArrStreamId.AppendL(aStreamId);	
	aStream.CommitL();		
	}
//-----------------------------------------------------------------------------
// CCFContextSubscriptionImpl::ExternalizeL
//-----------------------------------------------------------------------------
//
EXPORT_C void CCFContextSubscriptionImpl::ExternalizeL(
    RWriteStream& aStream )
{
    FUNC_LOG;

    // Context query
    iContextQuery->ExternalizeL( aStream );

    // Indicate only changes flag
    aStream.WriteInt16L( iOnlyChangesIndicated );

    // Enable data object
    aStream.WriteInt16L( iDataObjectEnabled );

    // Commit stream
    aStream.CommitL();
}
Esempio n. 11
0
// ---------------------------------------------------------------------------
//
// ---------------------------------------------------------------------------
//
EXPORT_C void CCaInnerEntry::ExternalizeL( RWriteStream& aStream ) const
    {
    aStream.WriteInt32L( iId );
    aStream.WriteInt32L( iUid );
    aStream.WriteUint32L( iFlags );
    aStream.WriteUint32L( iRole );
    aStream.WriteUint32L( iText.Length() );
    aStream.WriteL( iText, iText.Length() );
    aStream.WriteUint32L( iDescription.Length() );
    aStream.WriteL( iDescription, iDescription.Length() );
    aStream.WriteUint32L( iEntryTypeName.Length() );
    aStream.WriteL( iEntryTypeName, iEntryTypeName.Length() );
    aStream.WriteUint32L( iTextLocalized );
    aStream.WriteUint32L( iDescriptionLocalized );
    iAttributes.ExternalizeL( aStream );
    iIcon->ExternalizeL( aStream );
    aStream.CommitL();
    }
// ---------------------------------------------------------------------------
// XIMPApiDataObjFactory::ExternalizeL
// ---------------------------------------------------------------------------
//
EXPORT_C void XIMPApiDataObjFactory::ExternalizeL( 
            RWriteStream& aWs,
            const RPrReqParamArray& aArray )
    {
    // write array length
    aWs.WriteInt32L( aArray.Count() );

    for ( TInt i = 0; i < aArray.Count(); i++ )
        {
        // trust the type within the param struct
        aWs.WriteInt32L( aArray[ i ].iParamType );

        // write the actual object
        CXIMPApiDataObjBase* theBase = aArray[ i ].iParam;
        theBase->ExternalizeL( aWs );
        }

    aWs.CommitL();
    }
Esempio n. 13
0
void CApaModelDoor::CopyStoreL(const CEmbeddedStore& aSourceStore,RWriteStream& aTargetStream)
// static method
// copies an embedded store containing a doc to aTargetStream
//
	{
	// read the contents of aSourceStore's rootstream (so I can write it out in a mo')
	CStreamDictionary* root=ReadStreamDictionaryLC(aSourceStore,aSourceStore.Root());
	//
	// copy the source store directly
	MStreamBuf* host=aSourceStore.Host();
	TStreamPos pos=aSourceStore.Position(aSourceStore.Root());
	host->SeekL(host->ERead,EStreamBeginning);
	RReadStream stream(host);
	aTargetStream.WriteL(stream,pos.Offset());
	//
	// write the root stream
	aTargetStream<< *root;
	aTargetStream.CommitL();
	CleanupStack::PopAndDestroy(); // root
	}