如何在gdbus introspection xml中传递给出多个完整类型。例如,
<method name="Frobate">
<arg name="foo" type="ii" direction="in"/>
<annotation name="org.freedesktop.DBus.Deprecated" value="true"/>
</method>
当我尝试这种格式时,我收到错误
错误org.freedesktop.DBus.Error.InvalidArgs:消息类型'(ii)', 与预期类型'(null)'
不匹配
我正在使用
<method name="Frobate">
<arg name="foo" type="(ii)" direction="in"/>
<annotation name="org.freedesktop.DBus.Deprecated" value="true"/>
</method>
错误变为,
错误org.freedesktop.DBus.Error.InvalidArgs:消息类型'(ii)', 不符合预期类型'((ii))'
答案 0 :(得分:1)
通过这种方式,您可以提供多种完整类型,
<method name='YourMethod'>"
<arg type='i' name='name1' direction='in'/>"
<arg type='i' name='name2' direction='in'/>"
</method>