|
From: Henrik /K. <kaa...@us...> - 2009-10-20 21:26:29
|
Thank you very, very much for the detailed answer!
This helps a lot.
I will try to make it work for mozilla-sync.
Just one follow-up question
The description.xml has much of the same info as the XXX_discover function.
Which is the preferred way of setting this? The xml file or the discover
function?
/Henrik
Daniel Gollub wrote:
> 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
>
>
|