Skip to content

Commit

Permalink
Merge pull request #440 from rhbvkleef/439-annotations-on-interfaces-…
Browse files Browse the repository at this point in the history
…not-shown

Show annotations for interfaces in introspection
  • Loading branch information
diwic committed Jun 17, 2023
2 parents 321a6ee + 1e8d8fa commit 1580702
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dbus-crossroads/src/ifacedesc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ impl Registry {
r += &format!(">\n{} </property>\n", x.annotations.introspect(" "));
}
}
desc.annotations.introspect(" ");
r += &desc.annotations.introspect(" ");
r += " </interface>\n";
};
r
Expand Down
2 changes: 2 additions & 0 deletions dbus-crossroads/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ const INTROSPECT: &str = r###"<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS O
<arg name="new_value" type="b"/>
</signal>
<property name="Bar" type="y" access="readwrite"/>
<annotation name="com.example.SampleAnnotation" value="TestValue"/>
</interface>
<interface name="org.freedesktop.DBus.Introspectable">
<method name="Introspect">
Expand Down Expand Up @@ -163,6 +164,7 @@ fn introspect() {
});
b.signal::<(bool,), _>("Changed", ("new_value",));
b.property("Bar").get(|_,_| Ok(0u8)).set(|_,_,_| Ok(None));
b.annotate("com.example.SampleAnnotation", "TestValue");
});
cr.insert("/com/example/sample_object0", &[token], ());
cr.insert("/com/example/sample_object0/child_of_sample_object", &[], ());
Expand Down

0 comments on commit 1580702

Please sign in to comment.