[reSIProcate] Getting access to raw Contents
Derek MacDonald
derek.macdonald at gmail.com
Sat May 15 12:06:12 CDT 2010
If you are using your own parser/generator for pidf you should take
PidfContents our of the build and use your own directly.
On Fri, May 14, 2010 at 6:59 AM, Francis Joanis <francis.joanis at gmail.com>wrote:
> Hi again,
>
> To answer my own question:
>
> 1) There is a Contents::encodeFromHeaderFieldValue method that is
> defined. It looks like it would have worked but it hasn't been
> implemented yet.
>
> 2) I can achieve what I said by using Contents::getHeaderField() and
> then by calling HeaderFieldValue::encode.
>
> For example:
>
> Data encodedContents;
> DataStream stream(encodedContents);
>
> HeaderFieldValue hfv = pContents->getHeaderField();
>
> hfv.encode(stream);
> stream.flush();
>
> Seems to work fine.
>
> Thanks :)
>
> On Fri, May 14, 2010 at 8:29 AM, Francis Joanis
> <francis.joanis at gmail.com> wrote:
> > Hi guys,
> >
> > I've been experimenting with an extended version of the pidf+xml
> > content type (by extended I mean there are a few more fields to it).
> > Since pidf+xml is already registered to the Pidf contents class
> > (through the content factory), every time I try to read it out of a
> > SipMessage instance it ends up dropping the additional fields since
> > Pidf::encode re-encodes the XML payload from its cached data.
> >
> > I was wondering if there's a way to get the raw data of a content
> > instance, something like Data Contents::getRaw() or
> > Contents::encodeRaw?
> >
> > If there is no way of currently doing this, I'll try to implement it
> > and let you know of the result.
> >
> > Thanks,
> > Francis
> >
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel at resiprocate.org
> https://list.resiprocate.org/mailman/listinfo/resiprocate-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20100515/83393019/attachment.htm>
More information about the resiprocate-devel
mailing list