Search code examples
c++xmlintrospectiondbusgdbus

multiple complete types in GDBus introspection xml


How can I pass give multiple complete types in gdbus introspection xml. Example,

<method name="Frobate">
          <arg name="foo" type="ii" direction="in"/> 
          <annotation name="org.freedesktop.DBus.Deprecated" value="true"/>
</method>

When I tried this format, I am getting the error as

Error org.freedesktop.DBus.Error.InvalidArgs: Type of message, '(ii)', does not match expected type '(null)'

when I am using

<method name="Frobate">
          <arg name="foo" type="(ii)" direction="in"/> 
          <annotation name="org.freedesktop.DBus.Deprecated" value="true"/>
</method>

the error becomes,

Error org.freedesktop.DBus.Error.InvalidArgs: Type of message, '(ii)', does not match expected type '((ii))'


Solution

  • By this way you can give multiple complete types,

     <method name='YourMethod'>"
      <arg type='i' name='name1' direction='in'/>"
      <arg type='i' name='name2' direction='in'/>"
     </method>