gamemode
gamemode copied to clipboard
What's the game and caller PIDs ordering in DBus API?
Hello. I was was studying GameMode DBus APIs and got myself confused. What is order of game and caller PID arguments in *ByPID
methods?
The dbus call handler method_register_game_by_pid()
suggests it's (caller,game)
:
https://github.com/FeralInteractive/gamemode/blob/4000a32584a9eb3964813b8fdbb279be7beb24cc/daemon/gamemode-dbus.c#L146-L152
But most of rest of the code suggests it's (game,caller)
, e.g. in gamemode_request()
in client, as far as I understand, client sends the target pid first:
https://github.com/FeralInteractive/gamemode/blob/4000a32584a9eb3964813b8fdbb279be7beb24cc/lib/client_impl.c#L307-L315
Also the xdg-desktop-portal implementation has named arguments (target,requester)
, what suggests (game,caller)
, too.
So, which one is correct?