hi..

i want to download mp3 file over http. i am new to symbian

i am refering the example

http://wiki.forum.nokia.com/index.ph..._on_the_device

in that example, what is iResponseBuffer? i am getting error there

what is the purpose of that?

thanks in advance

HTML Code:
case THTTPEvent::EGotResponseBodyData:
 
// Get text of response body
MHTTPDataSupplier* dataSupplier = aTransaction.Response().Body();
TPtrC8 ptr;
dataSupplier->GetNextDataPart(ptr);
 
TInt aPos=0;
iRFileObj.Seek(ESeekCurrent, aPos);
iRFileObj.Write(ptr); //save the file being downloaded
 
HBufC* buf = HBufC::NewLC(ptr.Length());
buf->Des().Copy(ptr);
 
if (!iResponseBuffer)
{
iResponseBuffer = buf->AllocL();
}
else
{
iResponseBuffer = iResponseBuffer->ReAllocL(iResponseBuffer->Length()+buf->Length());
iResponseBuffer->Des().Copy(*buf);
}
 
// Release buf
CleanupStack::PopAndDestroy(buf);
 
// Release the body data
dataSupplier->ReleaseData();