[reSIProcate] Retrieving the body in a Message
Scott Godin
slgodin at icescape.com
Thu Nov 23 09:26:25 CST 2006
Try:
Contents *body = message.getContents();
Data bodyData = body->getBodyData();
const char *str = bodyData.c_str();
This will keep the Data object in scope while you access str.
Or
Data bodyData = Data::from(*body);
Scott
From: resiprocate-devel-bounces at list.resiprocate.org
[mailto:resiprocate-devel-bounces at list.resiprocate.org] On Behalf Of Ali
Pey
Sent: Tuesday, November 21, 2006 5:02 PM
To: resiprocate-devel at list.resiprocate.org
Subject: [reSIProcate] Retrieving the body in a Message
Hi All,
I have problem retrieving the text in the body of a Message (The actual
Message message for IM).
I use the following code:
Contents *body = message.getContents();
const char *str = body->getBodyData().c_str();
This works if the text in the body is less than 16 characters and
doesn't work for longer texts.
Am I doing anything wrong?
Is there a bug in Resiprocate?
Is there a better way to retrieve the text in the body?
Thanks,
Ali
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20061123/00453185/attachment.htm>
More information about the resiprocate-devel
mailing list