You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 9, 2018. It is now read-only.
This project has been deprecated in favor
of lua-dbus_proxy. It is
unlikely that this project will be updated in future.
If someone would like to maintain the project, please contact me.
Description
A high level DBus
API for Lua built on top of the
ldbus library.
DBus data representation:
DBus data is typed, this is mapped in a Lua table with the following shape:
dbus_data = {
sig = <DBus signature>,
value = <Lua type>
}
Basic types
Int32 and other numbers
All DBus numeric types map to Lua numbers. For example:
{
sig = ldbus.basic_types.int32, -- i.e. "i"
value = 256
}
Boolean
{
sig = ldbus.basic_types.boolean, -- i.e. "b"
value = false
}
Container types
Variant
{
sig = ldbus.types.variant, -- i.e. "v"
value = <DBus data>
}
example:
{
sig = ldbus.types.variant,
value = {
sig = ldbus.basic_types.uint32,
value = 4294967295
}
}
Array
A DBus array is an homogeneous Lua array, i.e. an array whose
elements are of the same type.
{
sig = ldbus.types.array .. <contents signature>,
value = {<contents>} -- homogeneous array
}
examples:
{
sig = "ai", -- i.e. array of int32
value = {1, 2, 3, 4, 5, 6}
}
{
sig = "aas", -- i.e. array of arrays of strings
value = {{"a", "b"}, {"c", "d"}, {"e"}}
}
{
sig = "(ibs)",
value = { 1, true, "hello Lua!"}
}
{
sig = "(ia{si}s)",
value = {1, {one = 5, two = 6, three = 7}, "hello Lua!"}
}
Generating the documentation
You will need ldoc to generate the documentation.
Once it's installed, you can run ldoc . from the project's directory (i.e. where config.ld is located).
The command will generate HTML documentation in the docs folder.
About
(UNMAINTAINED) An high level DBus API for Lua built on top of ldbus