Skip to content

With generator the argument names of method are not exposed on introspection #48

@colazzo

Description

@colazzo

When generating code from this xml:

<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
        "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node name="/sapv2s">
    <interface name="com.example.interface">
        <method name="Login">
            <arg name="UserName" direction="in" type="s"/>
            <arg name="PinCode" direction="in" type="s"/>
        </method>
    </interface>
</node>

I got this code:

class ComExampleInterfaceInterface(
    DbusInterfaceCommonAsync,
    interface_name="com.example.interface",
):
    @dbus_method_async(
        input_signature="ss",
    )
    async def login(
        self,
        user_name: str,
        pin_code: str,
    ) -> None:
        raise NotImplementedError

When doing Introspection on the Service it does not expose the argument names of the method as defined in the xml.

I know you can define the names with "input_args_names" but I would expect that the generator automatically fills in the argument names, or that the underlying implementation exposes the same names from the defined method by default when not custom defined.

Would this be possible to solve in the generator somehow? For example by having "input_args_names" populated with the names?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions