daemon: export game objects on the bus

For each registered game, export an object on the bus under the
path "/com/feralinteractive/GameMode/Games/<pid>" with an dbus
interface of ""com.feralinteractive.GameMode.Game". The interface
currently provides to properties, ProcessId and Executable.
Additionally add the ListGames method and the GameRegistered,
GameUnregistered signals to the com.feralinteractive.GameMode
interface.
This commit is contained in:
Christian Kellner
2019-07-02 17:36:30 +02:00
parent 5949a988ea
commit d2bab2962d
3 changed files with 267 additions and 1 deletions

View File

@ -486,6 +486,7 @@ int game_mode_context_register(GameModeContext *self, pid_t client, pid_t reques
/* Unlock now we're done applying optimisations */
pthread_rwlock_unlock(&self->rwlock);
game_mode_client_registered(client);
game_mode_client_count_changed();
return 0;
@ -586,6 +587,7 @@ int game_mode_context_unregister(GameModeContext *self, pid_t client, pid_t requ
pthread_rwlock_unlock(&self->rwlock);
game_mode_client_count_changed();
game_mode_client_unregistered(client);
return 0;
}