Skip to content

Problem using methods that returns tuples #4

Description

@larsdunemark

In ManagerInterface there is some methods that returns a Tuples

Ex: EnableUnitFiles, ReenableUnitFiles, PresetUnitFiles etc.

This doesn't work in current version and throws an exception when trying to map the result back to List
There exists a similar function reenableUnitFiles that returns List but that also fails to run.

@DBusMemberName(value = "EnableUnitFiles")
List<UnitFileChange> enableUnitFiles(List<String> names, boolean runtime, boolean force);

The return signature for this functions is ba(sss) so it should probably be changed to something like:

PairTuplet<Boolean, List<UnitFileChange>> enableUnitFiles(List<String> names, boolean runtime, boolean force);

Where PairTuplet extends Tuplet.
For some reason it seems only to work when using parameterized typed class otherwise it would probably only need to change to:

UnitFileInstallChange enableUnitFiles(List<String> names, boolean runtime, boolean force);

And that UnitFileInstallChange holds an List of UnitFileChanges instead of only one UnitFileChanges as it is today. But we didn't get that one to work.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions