How to Pass a structure as a parameter in a dbus signal?

北慕城南 提交于 2019-12-01 14:26:42

Firstly, you need to work out how to represent that structure as a D-Bus value. Its most likely representation would be as a value of type (uu) where the first u is the mode (using some well-defined and stable mapping of C enum values to integers) and the second u is the type.

Secondly, you need to work out how to write that on the command line. However, dbus-send doesn’t currently support structs, so it’s not possible using dbus-send. I suggest using gdbus instead, as per this StackOverflow question.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!