如何通过 D-Bus 发送 Vala ArrayList?



尝试将数据从服务器发送到客户端并收到此错误:

error: GVariant serialization of type `Gee.ArrayList' is not supported
public abstract ArrayList<EventData?> get_event_list () throws IOError;

你需要使用一个普通数组。显示映射到 Vala 类型的 D-Bus 类型的一个很好的资源是 Vala D-Bus 示例中的类型表。

对于EventData,您应该考虑变体,结构或ObjectPath

最新更新