Description: DBus Generator is static dbus binding tool for multipble languages.
Currently, it support QDBus target and golang target with pkg.deepin.io/lib/dbus.
- go >= 1.1
- pkg.linuxdeepin.com/lib/dbus (This will be removed when the branch feature/qt completed)
- pkg.linuxdeepin.com/lib/dbus/introspect (This will be removed when the branch feature/qt completed)
go get pkg.linuxdeepin.com/lib/dbus
go get pkg.linuxdeepin.com/lib/dbus/introspect
go get pkg.deepin.io/dbus-generator
Usage of dbus-generator:
-in="dbus.in.json": the config file path
-out="": output directory
-target="": the target language to generate binding for [QML|PyQt|GoLang]
the dbus.in.json format looks like
{
"Config": {
"OutputDir": ".", # which directory to save the generated code.
"InputDir": "../xml", # where to find the dbus introspect xml file.
"BusType": "System", # Session Bus or System Bus
"DestName": "com.deepin.api.Device" # the DBus Service name
},
"Interfaces": [
{
"Interface": "com.deepin.api.Device",
"OutFile": "device",
"XMLFile": "com.deepin.api.Device.xml",
"ObjectName": "Device"
}
]
}
DBus Factory is the real example to show how to use dbus generator.
The pyqt target is no longger maintained by deepin team due to lack of application using it. The golang and qml target will be maintained and it has been verified by deepin team in many projects.
- Remove the build dependencies of pkg.deepin.io/lib/dbus
- Write more test code.
- Make the test.qml support user input.
- Refactor code for easier adding new target and make code more readable.
Any usage issues can ask for help via
We encourage you to report issues and contribute changes
DBus Geneator is licensed under GPLv3.