syncmlfw/common/syncagent/src/nsmlstatuscontainer.cpp
changeset 73 ae69c2e8bc34
parent 0 b497e44ab2fc
equal deleted inserted replaced
71:d2517372cc44 73:ae69c2e8bc34
   489 // Created element is not pushed to Cleanup stack
   489 // Created element is not pushed to Cleanup stack
   490 // ---------------------------------------------------------
   490 // ---------------------------------------------------------
   491 void CNSmlStatusContainer::CreatePcdataL( SmlPcdata_t*& aPcdata, const TDesC8& aContent ) const
   491 void CNSmlStatusContainer::CreatePcdataL( SmlPcdata_t*& aPcdata, const TDesC8& aContent ) const
   492 	{
   492 	{
   493 	aPcdata = new( ELeave ) SmlPcdata_t;
   493 	aPcdata = new( ELeave ) SmlPcdata_t;
       
   494 	CleanupStack::PushL( aPcdata);
   494 	aPcdata->SetDataL( aContent );
   495 	aPcdata->SetDataL( aContent );
   495 	aPcdata->contentType = SML_PCDATA_OPAQUE;   
   496 	aPcdata->contentType = SML_PCDATA_OPAQUE;   
   496 	aPcdata->extension = SML_EXT_UNDEFINED; 
   497 	aPcdata->extension = SML_EXT_UNDEFINED; 
       
   498 	CleanupStack::Pop( );
   497 	}
   499 	}
   498 // ---------------------------------------------------------
   500 // ---------------------------------------------------------
   499 // CNSmlStatusContainer::CopyPcdataL()
   501 // CNSmlStatusContainer::CopyPcdataL()
   500 // Deep copy to Pcdata element
   502 // Deep copy to Pcdata element
   501 // Copied element is not pushed to Cleanup stack
   503 // Copied element is not pushed to Cleanup stack
   550 	{
   552 	{
   551 	if ( aFromMetInf )
   553 	if ( aFromMetInf )
   552 		{
   554 		{
   553 		SmlMetInfMetInf_t* fromMetInf = (SmlMetInfMetInf_t*) aFromMetInf;
   555 		SmlMetInfMetInf_t* fromMetInf = (SmlMetInfMetInf_t*) aFromMetInf;
   554 		SmlMetInfMetInf_t* toMetInf = new( ELeave ) SmlMetInfMetInf_t;
   556 		SmlMetInfMetInf_t* toMetInf = new( ELeave ) SmlMetInfMetInf_t;
       
   557 		CleanupStack::PushL( toMetInf );
   555 		if ( fromMetInf->anchor )
   558 		if ( fromMetInf->anchor )
   556 			{
   559 			{
   557 			toMetInf->anchor = new( ELeave ) SmlMetInfAnchor_t;
   560 			toMetInf->anchor = new( ELeave ) SmlMetInfAnchor_t;
   558 			CopyPcdataL( fromMetInf->anchor->next, toMetInf->anchor->next );
   561 			CopyPcdataL( fromMetInf->anchor->next, toMetInf->anchor->next );
   559 			}
   562 			}
       
   563 		CleanupStack::Pop();  //toMetInf 	
   560 		aToMetInf = toMetInf;
   564 		aToMetInf = toMetInf;
   561 		}
   565 		}
   562 	}
   566 	}
   563 // ---------------------------------------------------------
   567 // ---------------------------------------------------------
   564 // CNSmlStatusContainer::CreateTargetOrSourceRefL()
   568 // CNSmlStatusContainer::CreateTargetOrSourceRefL()