Re: [Yxa-devel] [patch] Customizable application config defaults

2010-04-11 Thread Fredrik Thulin
On Sun, 2010-04-11 at 21:45 +0200, Mikael Magnusson wrote:
...
> I have renamed the macros as you proposed, and pushed it to my config
> branch. Let me know if you want me to merge it with the previous commit
> with rebase.

Ok, merged and pushed. No need to rebase, I'm not a perfectionist and as
I see it the two commits actually represents the evolution of the
feature.

I didn't even know it was possible to 'change history' when you had
already shown commits to the outside world, so thanks for the pointer
should I ever need it =).

/Fredrik


___
Yxa-devel mailing list
Yxa-devel@lists.su.se
https://lists.su.se/mailman/listinfo/yxa-devel


Re: [Yxa-devel] [patch] Customizable application config defaults

2010-04-11 Thread Fredrik Thulin
On Sun, 2010-04-11 at 10:53 +0200, Fredrik Thulin wrote:
...
> The idea sounds good to me, but I'd say there is precedent (hope I'm
> using that word correctly) to adding a hook to local.erl for doing that
> kind of thing. Was there a reason to add it to the YXA application
> behaviour instead?

After thinking more about it, I realize that if you (or someone else)
writes an application using the YXA SIP stack, you don't want to require
all users of your application to have application defaults in a custom
local.erl.

I'm now fine with your proposed way, so let's just reach agreement on
the define names and I'll merge.

/Fredrik


___
Yxa-devel mailing list
Yxa-devel@lists.su.se
https://lists.su.se/mailman/listinfo/yxa-devel


Re: [Yxa-devel] [patch] Customizable application config defaults

2010-04-11 Thread Fredrik Thulin
On Sat, 2010-04-10 at 23:01 +0200, Mikael Magnusson wrote:
> Customizable application config defaults
> 
> Add config_defaults/0 to the YXA application behaviour, returning the  
> application config defaults as a list of #cfg_entry{}.
> 
> It allows setting application defaults in an (external) YXA application
> without changing core files in the yxa application and rebuilding YXA. 
> For example when making an application which uses the
> presence_packagemodule and therefore needs the
> presence_default_publish_time and other config variables.
> 
>  git fetch git://github.com/mikma/yxa.git config

Thank you for the excellent presentation of the suggested addition =).

The idea sounds good to me, but I'd say there is precedent (hope I'm
using that word correctly) to adding a hook to local.erl for doing that
kind of thing. Was there a reason to add it to the YXA application
behaviour instead?

Also, I do think it is a good idea to break up the ?APPLICATION_DEFAULTS
into smaller defines, but I think they should be
called ?PSTNPROXY_CONFIG_DEFAULTS or similar instead
of ?PSTNPROXY_DEFAULTS in case we figure out something else than user
configuration that should have per-application defaults. Maybe I'm being
too careful here? Is it in fact per definition only configuration that
can have defaults? =)

/Fredrik


___
Yxa-devel mailing list
Yxa-devel@lists.su.se
https://lists.su.se/mailman/listinfo/yxa-devel


[Yxa-devel] [patch] Customizable application config defaults

2010-04-10 Thread Mikael Magnusson
Customizable application config defaults

Add config_defaults/0 to the YXA application behaviour, returning the  
application config defaults as a list of #cfg_entry{}.

It allows setting application defaults in an (external) YXA application
without changing core files in the yxa application and rebuilding YXA. 
For example when making an application which uses the
presence_packagemodule and therefore needs the
presence_default_publish_time and other config variables.

 git fetch git://github.com/mikma/yxa.git config

/Mikael

___
Yxa-devel mailing list
Yxa-devel@lists.su.se
https://lists.su.se/mailman/listinfo/yxa-devel