dbus

Compiles dbus files with dbus-binding-tool

Typical usage:

def options(opt):
        opt.load('compiler_c dbus')
def configure(conf):
        conf.load('compiler_c dbus')
def build(bld):
        tg = bld.program(
                includes = '.',
                source = bld.path.ant_glob('*.c'),
                target = 'gnome-hello')
        tg.add_dbus_file('test.xml', 'test_prefix', 'glib-server')
waflib.Tools.dbus.taskgen_method(func)

Decorator that registers method as a task generator method. The function must accept a task generator as first parameter:

from waflib.TaskGen import taskgen_method
@taskgen_method
def mymethod(self):
        pass
Parameters

func (function) – task generator method to add

Return type

function

waflib.Tools.dbus.before_method(*k)[source]

Decorator that registera task generator method which will be executed before the functions of given name(s):

from waflib.TaskGen import feature, before
@feature('myfeature')
@before_method('fun2')
def fun1(self):
        print('feature 1!')
@feature('myfeature')
def fun2(self):
        print('feature 2!')
def build(bld):
        bld(features='myfeature')
Parameters

k (list of string) – method names

waflib.Tools.dbus.add_dbus_file(self, filename, prefix, mode)[source]

Task generator method

Adds a dbus file to the list of dbus files to process. Store them in the attribute dbus_lst.

Parameters
  • filename (string) – xml file to compile

  • prefix (string) – dbus binding tool prefix (–prefix=prefix)

  • mode (string) – dbus binding tool mode (–mode=mode)

waflib.Tools.dbus.process_dbus(self)[source]

Processes the dbus files stored in the attribute dbus_lst to create waflib.Tools.dbus.dbus_binding_tool instances.

class waflib.Tools.dbus.dbus_binding_tool(*k, **kw)[source]

Compiles a dbus file

color = 'BLUE'

Color for the console display, see waflib.Logs.colors_lst

ext_out = ['.h']

File extensions that objects of this task class may create

shell = True

Execute the command with the shell (class attribute)

hasrun
generator
env

waflib.ConfigSet.ConfigSet object (make sure to provide one)

inputs

List of input nodes, which represent the files used by the task instance

outputs

List of output nodes, which represent the files created by the task instance

dep_nodes

List of additional nodes to depend on

run_after

Set of tasks that must be executed before this one

hcode = b'${DBUS_BINDING_TOOL} --prefix=${DBUS_BINDING_TOOL_PREFIX} --mode=${DBUS_BINDING_TOOL_MODE} --output=${TGT} ${SRC}'

String representing an additional hash for the class representation

orig_run_str = '${DBUS_BINDING_TOOL} --prefix=${DBUS_BINDING_TOOL_PREFIX} --mode=${DBUS_BINDING_TOOL_MODE} --output=${TGT} ${SRC}'
vars = ['DBUS_BINDING_TOOL', 'DBUS_BINDING_TOOL_MODE', 'DBUS_BINDING_TOOL_PREFIX']

ConfigSet variables that should trigger a rebuild (class attribute used for waflib.Task.Task.sig_vars())

waflib.Tools.dbus.configure(conf)[source]

Detects the program dbus-binding-tool and sets conf.env.DBUS_BINDING_TOOL