Patrick wrote:
>On Wed, 2009-12-16 at 08:13 +0000, Chen, Congwu wrote:
>> Patrick wrote:
>> >Nokia/default/
>> >   config.ini   - main config template file
>> >   internal.ini - matching criteria, only (?) used by code which
>> >                  searches for a template
>> >   sources/     - sub-directory with source part of template
>> >
>> >How to define and the matching criteria is the key problem that we need
>> >to discuss - is that moved into the front-ends?
>> Do you mean each configuration template have a 'internal.ini' to identify 
>> it's
>> matching criteria?
>
>Yes.
>
>> Maybe better to record them as a global index file? The templates is
>intended
>> to be read only,
>
>But this internal.ini is read-only - okay, except when creating that
>specific template, of course. Do you see a reason to write into this
>internal.ini file at runtime of SyncEvolution?
No, I mean the whole templates is intended to be read only, distributed during 
installation. 
This is why I prefer also distributing a central index file for searching. 
We have slightly different usage scenario with the below examples, it's the 
*template*, 
user will never need to modify the templates, he will/can edit his own 
configuration generated
from the template. 
A central index file is indeed harder to maintain, but should be unlikely. And 
maybe a script can
do that for help.
>>  so a index file looks more reasonable. It may looks like this:
>> index.ini
>> server: templates/server/default
>> client: templates/client/default
>>   SyncEvolution : templates/client/SyncEvolution/default
>>   Phone: templates/client/phone/default
>>      Nokia: templates/client/phone/nokia/default
>
>I see several drawbacks with that:
>- not a simple key/value format
Yes, the index file is more like a tree based structure, cannot reuse current
code.

>Not having a central index file comes with a slight performance cost,
>but because the whole list of templates is only needed infrequently
>(basically only when the user wants to configure a new device), this can
>be ignored.
Ok, agree so far.
--
Best Regards,
Congwu
_______________________________________________
SyncEvolution mailing list
[email protected]
http://lists.syncevolution.org/listinfo/syncevolution

Reply via email to