go-dbus-generator

command module
v0.0.0-...-ace6ac0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2016 License: GPL-3.0 Imports: 13 Imported by: 0

README

DBus Generator

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.

Dependencies

Build Dependencies
  • 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)

Installation

go get pkg.linuxdeepin.com/lib/dbus
go get pkg.linuxdeepin.com/lib/dbus/introspect
go get pkg.deepin.io/dbus-generator

Usage

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.

Known issues

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.

TODO

  • 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.

Getting help

Any usage issues can ask for help via

Getting involved

We encourage you to report issues and contribute changes

License

DBus Geneator is licensed under GPLv3.

Documentation

Overview

*

  • Copyright (C) 2015 Deepin Technology Co., Ltd. *
  • This program is free software; you can redistribute it and/or modify
  • it under the terms of the GNU General Public License as published by
  • the Free Software Foundation; either version 3 of the License, or
  • (at your option) any later version. *

*

  • Copyright (C) 2015 Deepin Technology Co., Ltd. *
  • This program is free software; you can redistribute it and/or modify
  • it under the terms of the GNU General Public License as published by
  • the Free Software Foundation; either version 3 of the License, or
  • (at your option) any later version. *

*

  • Copyright (C) 2015 Deepin Technology Co., Ltd. *
  • This program is free software; you can redistribute it and/or modify
  • it under the terms of the GNU General Public License as published by
  • the Free Software Foundation; either version 3 of the License, or
  • (at your option) any later version. *

*

  • Copyright (C) 2015 Deepin Technology Co., Ltd. *
  • This program is free software; you can redistribute it and/or modify
  • it under the terms of the GNU General Public License as published by
  • the Free Software Foundation; either version 3 of the License, or
  • (at your option) any later version. *

*

  • Copyright (C) 2015 Deepin Technology Co., Ltd. *
  • This program is free software; you can redistribute it and/or modify
  • it under the terms of the GNU General Public License as published by
  • the Free Software Foundation; either version 3 of the License, or
  • (at your option) any later version. *

*

  • Copyright (C) 2015 Deepin Technology Co., Ltd. *
  • This program is free software; you can redistribute it and/or modify
  • it under the terms of the GNU General Public License as published by
  • the Free Software Foundation; either version 3 of the License, or
  • (at your option) any later version. *

*

  • Copyright (C) 2015 Deepin Technology Co., Ltd. *
  • This program is free software; you can redistribute it and/or modify
  • it under the terms of the GNU General Public License as published by
  • the Free Software Foundation; either version 3 of the License, or
  • (at your option) any later version. *

*

  • Copyright (C) 2015 Deepin Technology Co., Ltd. *
  • This program is free software; you can redistribute it and/or modify
  • it under the terms of the GNU General Public License as published by
  • the Free Software Foundation; either version 3 of the License, or
  • (at your option) any later version. *

build +ignore

*

  • Copyright (C) 2015 Deepin Technology Co., Ltd. *
  • This program is free software; you can redistribute it and/or modify
  • it under the terms of the GNU General Public License as published by
  • the Free Software Foundation; either version 3 of the License, or
  • (at your option) any later version. *

*

  • Copyright (C) 2015 Deepin Technology Co., Ltd. *
  • This program is free software; you can redistribute it and/or modify
  • it under the terms of the GNU General Public License as published by
  • the Free Software Foundation; either version 3 of the License, or
  • (at your option) any later version. *

*

  • Copyright (C) 2015 Deepin Technology Co., Ltd. *
  • This program is free software; you can redistribute it and/or modify
  • it under the terms of the GNU General Public License as published by
  • the Free Software Foundation; either version 3 of the License, or
  • (at your option) any later version. *

*

  • Copyright (C) 2015 Deepin Technology Co., Ltd. *
  • This program is free software; you can redistribute it and/or modify
  • it under the terms of the GNU General Public License as published by
  • the Free Software Foundation; either version 3 of the License, or
  • (at your option) any later version. *

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL