コード例 #1
0
ファイル: intent.cpp プロジェクト: cdaffara/symbiandump-mw2
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);
		}
	}
コード例 #2
0
// -----------------------------------------------------------------------------
// 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 );
            }
        }
    }
コード例 #3
0
/** 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);
	}
コード例 #4
0
// ---------------------------------------------------------
// 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 );
		}
	}
コード例 #5
0
ファイル: cntitemdef.cpp プロジェクト: Esclapion/qt-mobility
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());
		
	}
コード例 #6
0
ファイル: mpxuser.cpp プロジェクト: cdaffara/symbiandump-mw2
// ----------------------------------------------------------------------------
// 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);
        }
    }
コード例 #7
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 );
        }
コード例 #8
0
// ---------------------------------------------------------------------------
// 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;
        }        
    }
コード例 #9
0
// -----------------------------------------------------------------------------
// 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);    
    
    };
コード例 #10
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;	
	}
コード例 #11
0
// ---------------------------------------------------------------------------
// ?implementation_description
// ---------------------------------------------------------------------------
//
void TNcdSendableProgress::InternalizeL( RReadStream& aStream )
    {
    iState = aStream.ReadUint32L();
    iOperationId = aStream.ReadInt32L();
    iProgress = aStream.ReadInt32L();
    iMaxProgress = aStream.ReadInt32L();
    }
コード例 #12
0
// -----------------------------------------------------------------------------
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 );                       
        }      
    } 
コード例 #13
0
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);
			
		}
	}
コード例 #14
0
// -----------------------------------------------------------------------------
// 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();
	}
コード例 #15
0
// ---------------------------------------------------------
// 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();
    }
コード例 #16
0
void CClassA::InternalizeL(RReadStream& aStream)
	{
	TInt maxlen;
	maxlen     = aStream.ReadInt32L();
	iVarBuffer = HBufC::NewL(aStream,maxlen);
	iIntValue  = aStream.ReadInt32L();
	iUintValue = aStream.ReadUint32L();
	}  
コード例 #17
0
ファイル: x520ava.cpp プロジェクト: cdaffara/symbiandump-os2
void CX520AttributeTypeAndValue::InternalizeL(RReadStream& aStream)
	{
	TInt maxlen;
	maxlen = aStream.ReadInt32L();
	iType = HBufC::NewL(aStream,maxlen);
	maxlen = aStream.ReadInt32L();
	iValue = HBufC8::NewL(aStream,maxlen);
	}
コード例 #18
0
// ---------------------------------------------------------------------------
//
// ---------------------------------------------------------------------------
//
EXPORT_C void RCaIdsArray::InternalizeL( RReadStream& aStream )
    {
    Reset();
    TInt count = aStream.ReadInt32L();
    for( TInt i = 0; i < count; i++ )
        {
        AppendL( aStream.ReadInt32L() );
        }
    }
コード例 #19
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() );
    }
}
コード例 #20
0
ファイル: atcparam.cpp プロジェクト: cdaffara/symbiandump-mw1
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());
        }
コード例 #21
0
// ---------------------------------------------------------------------------
// 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;
    }
コード例 #22
0
ファイル: BASSND.CPP プロジェクト: cdaffara/symbiandump-os2
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();
	}
コード例 #23
0
// -----------------------------------------------------------------------------
// 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 );
    }
コード例 #24
0
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"));
    }
コード例 #25
0
ファイル: DRMXOma.cpp プロジェクト: kuailexs/symbiandump-mw1
// -----------------------------------------------------------------------------
// 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();               
    };   
コード例 #26
0
ファイル: PlayerInfo.cpp プロジェクト: jinhuafeng/RS-MAN
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 );
    }
コード例 #28
0
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);
		}
	}
コード例 #29
0
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);
        }
    }
コード例 #30
0
ファイル: mm_list.cpp プロジェクト: cdaffara/symbiandump-os1
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);
	}