strophe / libstrophe

A simple, lightweight C library for writing XMPP clients
http://strophe.im/libstrophe
Other
401 stars 163 forks source link

Generic settings api #232

Open sjaeckel opened 8 months ago

sjaeckel commented 8 months ago

Introduce generic xmpp_conn_set_*() API

Instead of having a multitude of setter API functions for configuration options, provide generic ones for the different types we have.

sjaeckel commented 8 months ago

@pasis what do you think of this idea?

pasis commented 8 months ago

@pasis what do you think of this idea?

I like the direction. But JID (and probably password) sounds to me like something more important than just a setting. Not critical, just my preferences.

sjaeckel commented 8 months ago

I like the direction.

Cool! Nice to hear.

But JID (and probably password) sounds to me like something more important than just a setting.

I also thought about whether there's some more important things that deserve a separate API and the JID/password was on that list. I ended up putting everything in there, since if you use SASL-EXTERNAL via client certificates to authenticate, there's no JID (or password) required. You could give a JID, if you want to authenticate as a different user than given in the certificate, but that's just an option.

sjaeckel commented 2 months ago

@singpolyma do you have an opinion on this PR?

singpolyma commented 2 months ago

feels more or less the same to me. a matter of taste