Add session_get_parameters()
Also add useful comment to session_send_term()
This commit is contained in:
@@ -973,12 +973,22 @@ session_get_start_time(const struct session_data *sd)
|
||||
return (sd == NULL) ? 0 : sd->start_time;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
const struct session_parameters *
|
||||
session_get_parameters(const struct session_data *sd)
|
||||
{
|
||||
return (sd == NULL) ? NULL : &sd->params;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
void
|
||||
session_send_term(struct session_data *sd)
|
||||
{
|
||||
if (sd != NULL && sd->win_mgr > 0)
|
||||
{
|
||||
// Killing the window manager only is appropriate here.
|
||||
// When we process SIGCHLD for the windowe manager, we
|
||||
// will kill other processes as appropriate
|
||||
g_sigterm(sd->win_mgr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,10 +103,23 @@ session_active(const struct session_data *sd);
|
||||
* Returns the start time for an active session
|
||||
*
|
||||
* @param sd session_data for this session
|
||||
* @return session start time
|
||||
*/
|
||||
time_t
|
||||
session_get_start_time(const struct session_data *sd);
|
||||
|
||||
/**
|
||||
* Returns the parameters used to start the session
|
||||
*
|
||||
* @param sd session_data for this session
|
||||
* @return Pointer to parameters
|
||||
*
|
||||
* The pointed-to data returned must not be modified in
|
||||
* any way.
|
||||
*/
|
||||
const struct session_parameters *
|
||||
session_get_parameters(const struct session_data *sd);
|
||||
|
||||
/***
|
||||
* Ask a session to terminate by signalling the window manager
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user