/**
Imports the Obex header list from the attachment. The header list is retrieved and
stored in this object. Any existing header data is over-written with the headers from
the attachment. If the headers have not been set, this obex list will still be
over written and result in zero headers.
@param aAttachment The attachment to retieve the header list from.
@leave System-wide error codes.
*/	
EXPORT_C void CObexHeaderList::ImportFromAttachmentL(CMsvAttachment& aAttachment)
	{
	TPtrC8 headerData;
	if( aAttachment.GetDesC8Attribute(KUidObexHeaders, headerData) == KErrNone )
		{
		// header data exists, attempt to import it
		RDesReadStream readStream(headerData);
		readStream.PushL();
		readStream >> *this;	
		CleanupStack::PopAndDestroy(&readStream);
		}