Commit graph

16 commits

Author SHA1 Message Date
Zhu, Yongsheng
d32026ead2 config: add 'calendar+todo' source for nokia configs (MBC#2101)
Templates for Nokia phones all have the same problem we stated
in bug#2101. So change them all by adding the source.
2010-05-18 14:19:44 +08:00
Zhu, Yongsheng
b5903618be config: add 'calendar+todo' source for nokia7210c config (MBC#2101)
sync-ui can't create correct config for nokia s40 series phone
because config.ini doesn't include 'calendar+todo' source.
Add it now and then the config is correctly used to sync.
2010-05-18 12:45:10 +08:00
Patrick Ohly
29e0b8eac1 templates: use single-file format (MBC #1208)
This patch switches reading of templates on disk from the previous,
one file per .ini file format to the single-file format produced
by the syncevo-phone-config utility. This makes creating templates
much easier, also when using just an editor instead of the tool.

The existing Cmdline tests cover this code pretty well, as demonstrated
by the number of fixes that were necessary in the previous patches
when running the tests. Therefore it should be safe to use this in
SyncEvolution 1.0.
2010-05-04 09:39:20 +02:00
Patrick Ohly
4d5a1ba273 RetryInterval: 0 for Funambol, 2M for everyone else (MB #10451)
A user reported that the default 1 minute resend interval did not work
for him with his own Funambol server installation. The Funambol
developers are notified, but won't be able to do much about this
in the near future.

Therefore this patch disables message resend in the Funambol server
template. Existing configurations have to be updated manually, both
to suppress the resending and to enable it again later.

The default resend interval is also increased from 1 minute to 2
minutes, to help other slow servers which might have problems handling
resends when they arrive to quickly.
2010-04-19 14:06:55 +02:00
Jussi Kukkonen
9259c9e193 templates: add N85 (Nokia S60) template 2010-04-14 13:58:45 +02:00
Jussi Kukkonen
cd65c118c6 templates: set N900 as consumerReady (MB #10336)
We want the N900 template to show up in the UI
2010-04-09 14:55:44 +03:00
Chen Congwu
b89d85e5f3 Config Templates: Add 'templateName' optional property (MB10406)
'templateName' property is introduced to present the 'device class'
for a matching device.
The property is optional. There might be templates which only
match one specific model or where the class is so obscure that
showing it is useless.

There are 'template id' and 'template name' concepts inside the core,
'template id' is the handle of the template, user can later use it
to uniquely retrieve the corresponding template, 'template name' on
the other hand is an explict property 'templateName' inside the
template metadata, describing the class of the devices for UI.

'template id' is only used by Cmdline and it use the first entry of
the fingerprint.
2010-03-26 10:23:01 +01:00
Patrick Ohly
e3399289ab templates: keep fingerPrint a list of models
We decided against "abusing" the first entry in the
fingerPrint list as the name of the device family/class.
The reason is that there might be templates which have
no such class, which would be impossible to determine
if only "fingerPrint" is available.

Instead the plan is to introduce a separate "templateName"
property.

Note that the sync-ui currently still assumes that the first
fingerPrint entry can be shown to the user. To avoid confusion
(device is called "Nokia N85", shown as "Nokia 7210c") we have
to keep one template per model.
2010-03-24 10:23:20 +01:00
Chen Congwu
bafde8080f Configuration template: fingerprint changes
The first entry in the fingerprint is used to uniqely identify the template
(a.k.a template name), it was formulated like 'nokia_7210c' which is not
friendly to user. This patch changed the naming to 'Nokia 7210c', other existing
templates is also updated accordingly.
2010-03-24 08:58:06 +01:00
Chen Congwu
e1d8e4108f Configuration template: reuse 'peerIsClient' in config.ini (mb#10224)
'peerIsClient' was duplicated in config.ini and template.ini, this
patch reused this field.
The patch also removed the 'default' template for server side, that is not
needed and broken.
2010-03-18 18:40:48 +01:00
Chen Congwu
c854be6236 Configuration Template: Add Nokia N900 template (MB#10224) 2010-03-18 18:40:48 +01:00
Chen Congwu
d3b362b643 SyncEvolutionClient template: do not match "SyncEvolution"
Change the fingerprint to not match "SyncEvolution", this is no
longer correct because "SyncEvolution" is used to match client side
templates (once identified by "SyncEvolutionServer").
2010-03-01 08:22:25 +01:00
Chen Congwu
bc1aba2c37 Configuration template: more teaks
1) .template.ini renamed to template.ini
2) removed duplicated configuration templates in the test directory, we will use
the real templates for testing.
3) change default template for Nokia phones to Nokia_7210c
2010-01-20 14:09:02 +01:00
Patrick Ohly
53e0c61e2b resolved template merge bug
Somehow after merging, src/templates/Funambol and src/templates/ScheduleWorld
came back. The WebURL change for ScheduleWorld did not make it into all
the right places on master.
2010-01-19 19:17:31 +01:00
Chen Congwu
d71aa7b2ac Configuration templates matching: match templates based on metadata
Introduced TemplateConfig to abstracting the template configuration structure,
the template metadata used for matching is also parsed here.
The fields introduced in the metadata are:
PeerIsClient: identify whether this is a server side configuration or a client
side configuration.
Fingerprint: the matching string for this template, it is a comma separated string
with each string modeled as: "Manufacture_Model". The first substring is also
used as the name to identify this template so that user can select the template
by this name.
eg:
Nokia 7210c: Nokia_7210c
SyncEvolution server: SyncEvolutionServer, SyncEvolution
ScheduleWorld: ScheduleWorld,default
SyncEvolution client: SyncEvolutionClient, SyncEvolution

Description: this is a just a descriptive string not used for matching.

GetServerTemplates is changed to add another "devices" parameter to identify
it is asking for templates for a list of "devices". Each device is a tuple
<matchstring (devicename), matchMode (server/client/all)>.
TemplateList as the return type, which is a list of class TemplateDescription
so that we can also return enough information for corresponding templates. This
list is sorted by the 3-tuple <finger, rank, name>.

Add MatchServerTemplates method which will iterating all templates inside the
folder and match against the input parameter and finally return a sorted
list of matched templates.

The atcually fuzzy match algorithm is based on a LCS (added in the following
commit).

Cmdline interface is changed accordingly:
--template ? is changed to --template ?[string], so that user use the former
case to match all templates for a tradiontial SyncML client and the latter case
to match templates related to an input string.

SyncConfig API is also renamed (Server -> Peer) because both server/client
configuration/template are handled.

The original configuration template (Funambol and ScheduleWorld) has been moved
to the new template structure (under servers), they also have a .template.ini
file added so that they can be matched and picked up. All templates for
supported servers still have built-in template support in the code as before.
Templates for SyncEvolution based server is also added.

Server side templates are added (Nokia default, Nokia_7210c and SyncEvolutionServer).

Add unit test for the new template match use case.
2010-01-19 18:06:20 +01:00
Patrick Ohly
0944e3eda5 installation: templates now in $(datadir)/syncevolution/templates (MB #7808)
The previous location was /usr/etc/syncevolution. It should have been
/etc/syncevolution in our debs, with proper declaration as system
config files. The intention was that system admins can add or modify
templates.

Not particularly likely, so now template files are only searched in
/usr/share/syncevolution/templates (or whatever was chosen with
configure --datadir).

Also added a README to that directory, warning that copying these
files will lead to incomplete configs. Each main config.ini carries
a similar comment, for those who miss the README.
2009-11-27 14:43:22 +01:00