Tcl DBus Interface

Check-in [6eedce8d1b]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:- Properly handle complex signatures for properties.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | master
Files: files | file ages | folders
SHA3-256:6eedce8d1b26d6844b722200026a03b108ae5643197ce99c170db7bdade7b7c1
User & Date: schelte 2016-12-06 21:00:09
Context
2017-06-10
12:51
- Adapt the code to changes in dbus-tcl - Add a 'dbif pave' command for creating a path without any specific methods or signals. This may be useful for paths that only contain universal methods and/or signals. - Add a -single option to 'dbif delete' to only delete the specified path and leave the underlying structure in place. - Change the error code for unknown properties from InvalidArgs to the more apt UnknownProperty. - Undefine methods by specifying an empty body. - Pass the msgid to the property body code. - Improve error reporting when property variables are set to a value that doesn't match the signature. - Simplify the generation of xml data for introspection. - Bump version to 1.3 check-in: 78cd7df89f user: schelte tags: trunk, master
2016-12-06
21:00
- Properly handle complex signatures for properties. check-in: 6eedce8d1b user: schelte tags: trunk, master
2016-07-03
20:41
Switch to a different separator that won't appear in a bus specification check-in: 3d85a506c8 user: schelte tags: trunk, master
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to dbif.tcl.

758
759
760
761
762
763
764

765



766
767
768
769
770
771
772
    set interp [dict get $dbif($bus|$path|$intf) properties $name interp]
    set var [dict get $dbif($bus|$path|$intf) properties $name variable]
    if {[interp eval $interp [list uplevel #0 [list info exists $var]]]} {
	set sig [dict get $dbif($bus|$path|$intf) properties $name signature]
	set dest [dict get $data sender]
	set serial [dict get $data serial]
	set value [interp eval $interp [list uplevel #0 [list set $var]]]

	dbus return $bus -signature $sig $dest $serial $value



    } else {
	dbuserr propunset $bus $path $intf $name
    }
    return -async 1
}

# Handle a property getall request







>
|
>
>
>







758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
    set interp [dict get $dbif($bus|$path|$intf) properties $name interp]
    set var [dict get $dbif($bus|$path|$intf) properties $name variable]
    if {[interp eval $interp [list uplevel #0 [list info exists $var]]]} {
	set sig [dict get $dbif($bus|$path|$intf) properties $name signature]
	set dest [dict get $data sender]
	set serial [dict get $data serial]
	set value [interp eval $interp [list uplevel #0 [list set $var]]]
	if {[argcount [list value $sig]] == 1} {
	    dbus return $bus -signature $sig $dest $serial $value
	} else {
	    dbus return $bus -signature $sig $dest $serial {*}$value
	}
    } else {
	dbuserr propunset $bus $path $intf $name
    }
    return -async 1
}

# Handle a property getall request