|
From: Daniel G. <go...@b1...> - 2009-10-20 21:16:27
|
On Tuesday 20 October 2009 06:47:00 pm Henrik /KaarPoSoft wrote:
> If I want to provide a static xml file with capabilities for my plugin
> instead of using osync_capability_new in code, what do I call the file
> and where do I put it?
$datadir/libopensync1/capabilities/
e.g. /usr/local/share/libopensync1/capabilities/
There is also a CMake variable you use to install to the correct path:
${OPENSYNC_CAPABILITIESDIR}
e.g. ${OPENSYNC_CAPABILITIESDIR}/mozilla-sync.xml
Beside this capabilities file, you need also to write a "description" file
which points/refers the filename of your capabilities file (e.g. mozilla-
sync.xml)
Example of such a descriptino file is:
trunk/misc/descriptions/syncml-nokia.xml
-----8<-----
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<versions version="0.1">
<version>
<PlugIn>SyncML</PlugIn>
<Priority>100</Priority>
<Vendor>Nokia</Vendor>
<ModelVersion>7650</ModelVersion>
<FirmwareVersion></FirmwareVersion>
<SoftwareVersion></SoftwareVersion>
<HardwareVersion></HardwareVersion>
<Identifier>syncml-nokia-7650.xml</Identifier>
</version>
</versions>
----->8-----
In your case:
-----8<-----
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<versions version="0.1">
<version>
<PlugIn>mozilla-sync</PlugIn>
<Priority>100</Priority>
<Vendor>Nokia</Vendor>
<ModelVersion></ModelVersion>
<FirmwareVersion></FirmwareVersion>
<SoftwareVersion></SoftwareVersion>
<HardwareVersion></HardwareVersion>
<Identifier>mozilla-sync.xml</Identifier>
</version>
</versions>
------>8----
Note that <Identifier> needs to be the filename (not the path!) of the
capabilities xml file.
place this as ... (again a cmake variable is available):
${OPENSYNC_DESCRIPTIONSDIR}/mozilla-sync.xml
there are even cmake macros to install the description and capabilites file
OPENSYNC_PLUGIN_DESCRIPTIONS( mozilla-sync-desc.xml )
OPENSYNC_PLUGIN_CAPABILITIES( mozilla-sync-caps.xml )
> Also: is the correct root element in the XML <capabilities> as in
> xmlformat test cases or <Cap> as in the group files ?
[...]
the XML schema for capabities can be found here:
https://svn.opensync.org/trunk/misc/schemas/capabilities.xsd
So its
<Caps><ObjType ...><Cap>...</Cap></ObjType></Caps>
Further questions?
Best Regards,
Daniel
--
Daniel Gollub Geschaeftsfuehrer: Ralph Dehner
FOSS Developer Unternehmenssitz: Vohburg
B1 Systems GmbH Amtsgericht: Ingolstadt
Mobil: +49-(0)-160 47 73 970 Handelsregister: HRB 3537
EMail: go...@b1... http://www.b1-systems.de
Adresse: B1 Systems GmbH, Osterfeldstraße 7, 85088 Vohburg
http://pgpkeys.pca.dfn.de/pks/lookup?op=get&search=0xED14B95C2F8CA78D
|