Skip to content

ei-scanner: Expose `interface_arg`, and also provide `interface_arg_for`

Peter Hutterer requested to merge whot/libei:wip/interface_arg into main

Supersedes !219 (closed), cc @ids1024

Same functionality as !219 (closed) but it keeps the temporary state (interface_arg_name in !219 (closed)) in the parser alone. Adds a test too.

@ids1024: I'm still not 100% happy with this though because the "version" argument is still something one just needs to know. I wonder if we need to add an XML tag as well to reference the version in a non-ambiguous manner? Or is that overkill?

 <arg name="object" type="new_id" interface_arg="interface_name" interface_version_arg="version" />  

We should/could add that to all other type="new_id" args too then, I guess.

Original commit message below:


To make this practical to use in a template, we want relations in both directions. And at least for consistency with other things, these fields should contain the Argument instead of just its name string.

So we need to do this after are the arguments in the message have been initially parsed. Adding these fields when parsing the request/event close tag seems to work well enough.

Merge request reports