incorrect binding in CreateInterface (from java-binding)
ivan fernandez calvo
ivan.fernandez at sacnet.es
Tue Apr 1 10:50:22 PDT 2008
source file:
<node name="/com/sac/messageDBus">
<interface name="com.sac.messageDBus.One">
<method name="example" >
<arg type="((us)ss)" name="argument1" direction="in" />
<arg type="(u(ss)a(ss))" name="argument1" direction="in" />
</method>
</interface>
</node>
correct dbus-binding-tool binding
IN_argument1,
dbus_g_type_get_struct ("GValueArray",
dbus_g_type_get_struct ("GValueArray",
G_TYPE_UINT,
G_TYPE_STRING,
G_TYPE_INVALID),
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_INVALID),
IN_argument2
dbus_g_type_get_struct ("GValueArray",
G_TYPE_UINT,
dbus_g_type_get_struct ("GValueArray",
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_INVALID),
dbus_g_type_get_collection ("GPtrArray",
dbus_g_type_get_struct ("GValueArray",
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_INVALID))
incorrect binding CreateInterface
package com.sac.messageDBus;
import org.freedesktop.dbus.DBusInterface;
public interface One extends DBusInterface
{
public void example(Struct2 argument1, Struct3 argument2);
}
package com.sac.messageDBus;
import org.freedesktop.dbus.Position;
import org.freedesktop.dbus.Struct;
public final class Struct2 extends Struct
{
@Position(0)
public final Struct4 a;
@Position(1)
public final String b;
/******************ERROR**************/
//here it missing a string property
public Struct2(Struct4 a, String b)
{
this.a = a;
this.b = b;
}
}
package com.sac.messageDBus;
import org.freedesktop.dbus.Position;
import org.freedesktop.dbus.Struct;
import org.freedesktop.dbus.UInt32;
public final class Struct3 extends Struct
{
@Position(0)
public final UInt32 a;
@Position(1)
public final Struct4 b;
@Position(2)
/******************ERROR**************/
public final Struct5 c;//here must been a list<Struct5>
public Struct3(UInt32 a, Struct4 b, Struct5 c)
{
this.a = a;
this.b = b;
this.c = c;
}
}
--
Un Saludo
Ivan Fernandez Calvo
More information about the dbus
mailing list