< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

Re: [reSIProcate] generate generic pidf


I found out that it is giving a warning. So can I change the method to return a list reference instead of a const?

2016-07-18 18:04 GMT-03:00 Scott Godin <slgodin@xxxxxxxxx>:
I'm surprised it compiles.

Scott

On Mon, Jul 18, 2016 at 10:09 AM, Mateus Bellomo <mateusbellomo@xxxxxxxxx> wrote:
Hmm...that's weird. I haven't noticed that and I didn't add a non-const version. You can check what I did at [1]. It shouldn't have worked right?


[1] https://github.com/resiprocate/resiprocate/compare/master...MateusBellomo:mateus-presence-text#diff-39230e150779508dd98dd29f3e3c4414R653

2016-07-18 10:45 GMT-03:00 Scott Godin <slgodin@xxxxxxxxx>:
I think that's fine, but getRootNodes returns a const list.  Did you add a non-const version?

Scott

On Fri, Jul 15, 2016 at 11:12 PM, Mateus Bellomo <mateusbellomo@xxxxxxxxx> wrote:
I found a way of doing it but I don't know if it's ideal:

- first I create a GenericPidfContents gPidf;
- then I'm creating a new Node dm and setting the mNamespacePrefix, mTag,... of it;
- then I add this dm node to gPidf node: gPidf.getRootNodes().push_back(dm).

The gPidf is the way I was expecting (the order is not but I think this is not relevant) but I'm doing all this stuff outside of GenericPidfContents class (I'm doing this at resip/recon/UserAgent class to generate a pidf to a PUBLISH sip message). What do you think about it?

2016-07-15 22:32 GMT-03:00 <slgodin@xxxxxxxxx>:
Right - there are only methods for setting simple presence.  You would need to add your own methods.

Scott

Sent from my iPhone

On Jul 15, 2016, at 9:00 PM, Mateus Bellomo <mateusbellomo@xxxxxxxxx> wrote:

Yes, it is at [1]. But the examples are all generated hard coded style: it is created a Data type with the xml passed as string. This is the only way of doing this? I thought I could do this using methods from [2].


[1] https://github.com/resiprocate/resiprocate/blob/master/resip/stack/test/testGenericPidfContents.cxx
[2] https://github.com/resiprocate/resiprocate/blob/master/resip/stack/GenericPidfContents.hxx

2016-07-15 21:56 GMT-03:00 <slgodin@xxxxxxxxx>:
I believe there is a testGenericPidfContents file under resip/test with lots of examples.

Scott

Sent from my iPhone

On Jul 15, 2016, at 8:08 PM, Mateus Bellomo <mateusbellomo@xxxxxxxxx> wrote:

Hello,

I need to generate a pidf with new kind of tuples. In fact I would like to generate a tuple like this:

<dm:person id="p1234">
   <rpid: activities/>
</dm:person>

Using GenericPidfContents [1] I was able to add some namespaces at presence tag, but now I need also to add this extra tuples.

Any help would be greatly appreciated.

Thanks.
_______________________________________________
resiprocate-devel mailing list
resiprocate-devel@xxxxxxxxxxxxxxx
https://list.resiprocate.org/mailman/listinfo/resiprocate-devel