<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 24 Sep 2019 at 09:30, Kevin Smith <<a href="mailto:kevin.smith@isode.com">kevin.smith@isode.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 24 Sep 2019, at 09:20, Dave Cridland <<a href="mailto:dave@cridland.net" target="_blank">dave@cridland.net</a>> wrote:<br>
> <br>
> Is there interest amongst the developer community to provide a generalised, interoperable facility for the exchange of simple, arbitrary data between consenting entities? I'm calling this SADEX, but I'm really, really, not wed to this name.<br>
> <br>
> The key here would be the API - you'd want to provide the equivalent of a function call such as:<br>
> <br>
> void sadex_message(JID to, String type, String data)<br>
> <br>
> You'd also need a callback for when you receive some, and perhaps an IQ form.<br>
<br>
It’d depend how wed you are to exactly what you describe there. Swiften’s API would make more sense to do message->setSadexType(…) and message->setSadexData(), and a callback wouldn’t make much sense, you’d just message->getSadexType and message->getSadexData() (or maybe message->getSadex()->(get|set)(Data|Type)(). Not what you describe, but still equivalent to how subject/body work in the API, and I don’t see a problem with adding it.<br></blockquote><div><br></div><div>I think we're looking at a type (something morally equivalent to an XML namespace) and payload, and we want to ensure both are set or neither.</div><div><br></div><div>But you're absolutely right that whatever API is used should fit the existing APIs of the library.</div><div><br></div><div>But ultimately, I'm most interested in a low-friction way of exchanging application-specific data that will guide people away from doing worse things. The constraints here would seem to be "easy to use", "obvious", and probably "in the core/default download".</div><div><br></div><div>Dave. </div></div></div>