Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add and expose Timestamp and Requester properties for GameModeClient #161

Closed
wants to merge 5 commits into from

Conversation

@gicmo
Copy link
Contributor

commented Jul 14, 2019

Record the timestamp a client was created and who requested it and expose them as Timestamp and Requester properties of the com.feralinteractive.GameMode.Game interface. I am thinking of creating a small gamemodeclt command line tool to show the current status, and list all the clients and all the information we got about them. Maybe also a gamemodectl -p <pid> to request GameMode on behalf of pid. What do you guys think?

gicmo added 5 commits Jul 14, 2019
We show the status for examples & daemon, also show it for 'util'.
Record the time a client was created, i.e. registered, in the
GameModeClient struct and add a getter for it.
Expose the timestamp that a client was created as 'Timestamp'
property of the com.feralinteractive.GameMode.Game interface.
Record the requester process id in the GameModeClient struct and
add a getter for it.
Expose the requeter process identifier as 'Requester' property
of the com.feralinteractive.GameMode.Game interface.
@@ -69,6 +70,11 @@ pid_t game_mode_client_get_pid(GameModeClient *client);
*/
const char *game_mode_client_get_executable(GameModeClient *client);

/**
* The path to the executable of client.

This comment has been minimized.

Copy link
@aejsmith

aejsmith Jul 16, 2019

Contributor

Wrong comment.

@@ -714,6 +726,15 @@ const char *game_mode_client_get_executable(GameModeClient *client)
return client->executable;
}

/**
* The path to the executable of client.

This comment has been minimized.

Copy link
@aejsmith

aejsmith Jul 16, 2019

Contributor

Wrong comment.

@aejsmith

This comment has been minimized.

Copy link
Contributor

commented Jul 16, 2019

Just a couple of incorrect function comments, otherwise looks good to me. I'll fix these up and merge.

As for gamemodectl, I like the idea. Note that you can already use gamemoded to request game mode, either by making the request from that process and waiting until interrupted, or on behalf of another process. However, if a separate gamemodectl tool is added, I think that'd be a better place for that functionality to live.

@aejsmith aejsmith closed this Jul 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.