> > As far as I know, Qt D-Bus needs annotations to define the corresponding
> > local types. How do you intend to add them to the installed files?
> 
> Uhm, currently I added those locally. I agree, we'd have to parse those XML
> files and add corresponding annotations. Maybe someone already wrote a tool
> for that. As an alternative, we could simply add those annotations to the
> provided files as they shouldn't hurt.

Seems like dbus-binding-tool doesn't allow annotations in XML files altough 
they're in the DTD. So I'm attaching my (resulting) files for reference as 
well as the patch for the original files (won't work though).

Also I had to change the parameter name 'template' of the GetConfig() and 
GetConfigs() methods of the session and server definition as this is a keyword 
in C++ and won't compile. I simply changed it to 'templates'  (patch 
attached).
-- 
Sascha Peilicke
http://saschpe.wordpress.com
diff --git a/src/dbus/interfaces/syncevo-server-full.xml b/src/dbus/interfaces/syncevo-server-full.xml
index 3bf2cea..07e4990 100644
--- a/src/dbus/interfaces/syncevo-server-full.xml
+++ b/src/dbus/interfaces/syncevo-server-full.xml
@@ -103,7 +103,7 @@
         Together with these changes, a property value is changed: 'syncURL' in the
         configuration is replaced with the mac address of the device.
       </doc:description></doc:doc>
-      <arg type="b" name="template" direction="in">
+      <arg type="b" name="templates" direction="in">
         <doc:doc><doc:summary>
           if TRUE, will return template names, otherwise will return 
           configured servers
@@ -123,7 +123,7 @@
       <arg type="s" name="server" direction="in">
         <doc:doc><doc:summary>server name</doc:summary></doc:doc>
       </arg>
-      <arg type="b" name="template" direction="in">
+      <arg type="b" name="templates" direction="in">
         <doc:doc><doc:summary>
           if TRUE, will return a matching template configuration, otherwise
           will return a matching server configuration
diff --git a/src/dbus/interfaces/syncevo-session-full.xml b/src/dbus/interfaces/syncevo-session-full.xml
index 19d8784..92bdf70 100644
--- a/src/dbus/interfaces/syncevo-session-full.xml
+++ b/src/dbus/interfaces/syncevo-session-full.xml
@@ -8,7 +8,7 @@
 
     <method name="GetConfig">
       <doc:doc><doc:description>Get the configuration of the server</doc:description></doc:doc>
-      <arg type="b" name="template" direction="in">
+      <arg type="b" name="templates" direction="in">
         <doc:doc><doc:summary>if TRUE, will return a matching template configuration, otherwise will return a matching server configuration</doc:summary></doc:doc>
       </arg>
       <arg type="a{sa{ss}}" name="configuration" direction="out">

Attachment: org.syncevolution.Connection.xml
Description: XML document

Attachment: org.syncevolution.Server.xml
Description: XML document

Attachment: org.syncevolution.Session.xml
Description: XML document

diff --git a/src/dbus/interfaces/syncevo-connection-full.xml b/src/dbus/interfaces/syncevo-connection-full.xml
index b6b4c13..b55ca1e 100644
--- a/src/dbus/interfaces/syncevo-connection-full.xml
+++ b/src/dbus/interfaces/syncevo-connection-full.xml
@@ -95,6 +95,7 @@
         </doc:doc>
       </arg>
 
+      <annotation name="com.trolltech.QtDBus.QtTypeName.In2" value="QMap&lt;QString, QString&gt;"/>
       <arg type="a{ss}" name="meta">
         <doc:doc>
           <doc:summary>
diff --git a/src/dbus/interfaces/syncevo-server-full.xml b/src/dbus/interfaces/syncevo-server-full.xml
index 3bf2cea..061fcfa 100644
--- a/src/dbus/interfaces/syncevo-server-full.xml
+++ b/src/dbus/interfaces/syncevo-server-full.xml
@@ -103,7 +103,7 @@
         Together with these changes, a property value is changed: 'syncURL' in the
         configuration is replaced with the mac address of the device.
       </doc:description></doc:doc>
-      <arg type="b" name="template" direction="in">
+      <arg type="b" name="templates" direction="in">
         <doc:doc><doc:summary>
           if TRUE, will return template names, otherwise will return 
           configured servers
@@ -123,12 +123,14 @@
       <arg type="s" name="server" direction="in">
         <doc:doc><doc:summary>server name</doc:summary></doc:doc>
       </arg>
-      <arg type="b" name="template" direction="in">
+      <arg type="b" name="templates" direction="in">
         <doc:doc><doc:summary>
           if TRUE, will return a matching template configuration, otherwise
           will return a matching server configuration
         </doc:summary></doc:doc>
       </arg>
+
+      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QMap&lt;QString, QMap&lt;String, QString&gt; &gt;"/>
       <arg type="a{sa{ss}}" name="configuration" direction="out">
         <doc:doc><doc:summary>
           server (or template) configuration
@@ -196,6 +198,7 @@
           maximum number of returned reports
         </doc:summary></doc:doc>
       </arg>
+      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QList&lt;QMap&lt;QString, QString&gt; &gt;"/>
       <arg type="aa{ss}" name="reports" direction="out">
         <doc:doc><doc:summary>synchronization reports</doc:summary></doc:doc>
         <doc:doc><doc:description>The array contains report dictionaries. The dictionary keys can be defined by below BNFs:
@@ -336,6 +339,7 @@
           </doc:para>
         </doc:description>
       </doc:doc>
+      <annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QMap&lt;QString, QString&gt;"/>
       <arg type="a{ss}" name="peer" direction="in">
         <doc:doc>
           <doc:summary>
@@ -554,6 +558,7 @@
         </doc:doc>
       </arg>
 
+      <annotation name="com.trolltech.QtDBus.QtTypeName.In5" value="QMap&lt;QString, QString&gt;"/>
       <arg type="a{ss}" name="parameters">
         <doc:doc>
           <doc:summary>
@@ -588,6 +593,7 @@
         </doc:doc>
       </arg>
 
+      <annotation name="com.trolltech.QtDBus.QtTypeName.In2" value="QMap&lt;QString, QString&gt;"/>
       <arg type="a{ss}" name="response">
         <doc:doc>
           <doc:summary>
diff --git a/src/dbus/interfaces/syncevo-session-full.xml b/src/dbus/interfaces/syncevo-session-full.xml
index 19d8784..f8028ef 100644
--- a/src/dbus/interfaces/syncevo-session-full.xml
+++ b/src/dbus/interfaces/syncevo-session-full.xml
@@ -8,9 +8,10 @@
 
     <method name="GetConfig">
       <doc:doc><doc:description>Get the configuration of the server</doc:description></doc:doc>
-      <arg type="b" name="template" direction="in">
+      <arg type="b" name="templates" direction="in">
         <doc:doc><doc:summary>if TRUE, will return a matching template configuration, otherwise will return a matching server configuration</doc:summary></doc:doc>
       </arg>
+      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QMap&lt;QString, QMap&lt;String, QString&gt; &gt;"/>
       <arg type="a{sa{ss}}" name="configuration" direction="out">
         <doc:doc><doc:summary>server configuration</doc:summary></doc:doc>
         <doc:doc><doc:description>See Server.GetConfig() for dictionary description.</doc:description></doc:doc>
@@ -57,6 +58,7 @@
             do not affect getting or setting permanent configurations.
         </doc:summary></doc:doc>
       </arg>
+      <annotation name="com.trolltech.QtDBus.QtTypeName.In2" value="QMap&lt;QString, QMap&lt;String, QString&gt; &gt;"/>
       <arg type="a{sa{ss}}" name="configuration" direction="in">
         <doc:doc><doc:summary>server configuration</doc:summary></doc:doc>
         <doc:doc><doc:description>See Server.GetConfig() for dictionary description.</doc:description></doc:doc>
@@ -149,6 +151,7 @@
         <doc:doc><doc:summary>synchronization mode</doc:summary></doc:doc>
         <doc:doc><doc:description>Valid values are all synchronization modes used in syncevolution server configuration files and the empty string.</doc:description></doc:doc>
       </arg>
+      <annotation name="com.trolltech.QtDBus.QtTypeName.In1" value="QMap&lt;QString, QString&gt;"/>
       <arg type="a{ss}" name="sources" direction="in">
         <doc:doc><doc:summary>synchronization source modes</doc:summary></doc:doc>
         <doc:doc><doc:description>Source modes to override the 'mode' variable for specific sources. The dictionary key is source name, value is synchronization mode. Valid synchronization modes are all synchronization modes used in syncevolution server configuration files and the empty string.</doc:description></doc:doc>
@@ -235,6 +238,7 @@
       <arg type="as" name="args" direction="in">
         <doc:doc><doc:summary>Command line arguments</doc:summary></doc:doc>
       </arg>
+      <annotation name="com.trolltech.QtDBus.QtTypeName.In1" value="QMap&lt;QString, QString&gt;"/>
       <arg type="a{ss}" name="vars" direction="in">
         <doc:doc><doc:summary>Environment variables in clients</doc:summary></doc:doc>
       </arg>

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
SyncEvolution mailing list
[email protected]
http://lists.syncevolution.org/listinfo/syncevolution

Reply via email to