Commit c681e15
Rafael Gago
ldbus: Allow specifying variant types for args
On the ldbus backend the function dbus.new_variant has been added.
This allows overriding the variant type autodetection for types not
expressable as arguments on the LUA type system, e.g. 'o', which gets
translated to string.
Note that this function gets available as dbus.raw.new_variant
Example usage:
local variant = dbus.raw.new_variant
myvariant = {
'v',
variant('aa{sv}', {
{ k1 = 'v1' }, --val is string variant (autodetected)
{ k2 = variant ('o', '/some/dbus/path')}
})
}1 parent 657f3d8 commit c681e15
1 file changed
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
183 | 190 | | |
184 | 191 | | |
185 | 192 | | |
| |||
230 | 237 | | |
231 | 238 | | |
232 | 239 | | |
233 | | - | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
234 | 249 | | |
235 | 250 | | |
236 | 251 | | |
| |||
0 commit comments