gdbus-codegen命令 解析
https://www.systutorials.com/docs/linux/man/1-gdbus-codegen/
基于GDBUS 的例子
https://blog.youkuaiyun.com/snakezy1988/article/details/103522742
<?xml version="1.0" encoding="UTF-8" ?>
<node name="/com/yft/hello">
<interface name="com.yft.hello.test">
<method name="setVersion">
<arg name="version" type="s" direction="in" />
</method>
<signal name="testStatus">
<arg name="status" type="i" />
</signal>
</interface>
</node>
gdbus-codegen --generate-c-code=Hello --c-namespace hello --interface-prefix com.yft.hello. hello.xml
–interface-prefix org.project.Prefix.
生成c绑定的typename的时候,去掉这个前缀
com.yft.hello.test 就变为 test
–generate-c-code OUTFILES
生成的文件的名字
–c-namespace YourProject
生成c代码的时候 和前面的test结合,就是 hello_test了
EXECUTE_PROCESS(COMMAND gdbus-codegen --interface-prefix cn.RTplay. --c-namespace RTplay --generate-c-code ${PROJECT_BINARY_DIR}/${NAME_TMP} ${PROJECT_SOURCE_DIR}/gdbus/${XML})