Hi Patrik

On 02/05/2014 12:43 PM, Patrik Flykt wrote:
> On Tue, 2014-02-04 at 09:02 +0100, Daniel Wagner wrote:
>> This is just a hack to explain what I mean. Instead introducing a new
>> main.conf flag we allow a policy plugin to enable session mode
>> permemanantly. I don't we have to add this feature to
>> session_policy_local.c. I have for my stuff my own plugin (called
>> session_policy_pold.c and pold stands for policy daemon).
>>
>> We reactive the SessionMode D-Bus flag and allow to be set via a
>> policy plugin.
>>
>> What do you think?
> 
> Good idea! What if we take it a step further out and do something like:
> 
> --- a/include/session.h
> +++ b/include/session.h
> @@ -74,6 +74,7 @@ typedef int (* connman_session_config_func_t) (struct
> connman_session *session,
>  struct connman_session_policy {
>         const char *name;
>         int priority;
> +       bool (*autoconnect)(enum connman_service_connect_reason reason);
>         int (*create)(struct connman_session *session,
>                         connman_session_config_func_t cb,
>                         void *user_data);
> 
> And if there is no autoconnect policy function, all autoconnects are
> fine. In your system you then easily define the behavior via the session
> policy plugin. What can possibly go wrong with this approach...?

Only that only a reason code is not enough. autoconnects a lot more
information.

cheers,
daniel
_______________________________________________
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

Reply via email to