dbus

Compile 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.add_dbus_file(self, filename, prefix, mode)[source]

Task generator method

Add 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]

Process 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]

Bases: waflib.Task.Task

Compile a dbus file

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

Detect the program dbus-binding-tool and set the conf.env.DBUS_BINDING_TOOL

waflib.Tools.dbus.before_method(*k)

Decorator: register a 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.taskgen_method(func)

Decorator: register a 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

Previous topic

flex

Next topic

vala

This Page