Diffusion C API
6.4.8
|
Functions | |
void | session_properties_listener_register (SESSION_T *session, const SESSION_PROPERTIES_REGISTRATION_PARAMS_T params) |
Register a listener for changes to other clients' properties. More... | |
void | get_session_properties (SESSION_T *session, const GET_SESSION_PROPERTIES_PARAMS_T params) |
Request properties of a connected client. More... | |
bool | diffusion_set_session_properties (SESSION_T *session, const DIFFUSION_SET_SESSION_PROPERTIES_PARAMS_T params, DIFFUSION_API_ERROR *api_error) |
Send a request to the server to change the user-defined session properties for a session. More... | |
bool | diffusion_set_session_properties_filter (SESSION_T *session, const DIFFUSION_SET_SESSION_PROPERTIES_FILTER_PARAMS_T params, DIFFUSION_API_ERROR *api_error) |
Send a request to the server to set all sessions that satisfy a session filter with the new user-defined session properties. More... | |
bool | diffusion_change_roles_with_session_id (SESSION_T *session, const DIFFUSION_CHANGE_ROLES_WITH_SESSION_ID_PARAMS_T params, DIFFUSION_API_ERROR *api_error) |
Changes the assigned roles of another session. More... | |
bool | diffusion_change_roles_with_filter (SESSION_T *session, const DIFFUSION_CHANGE_ROLES_WITH_FILTER_PARAMS_T params, DIFFUSION_API_ERROR *api_error) |
Allows a session to change the assigned roles of all sessions that satisfy a given session filter. More... | |
bool diffusion_change_roles_with_filter | ( | SESSION_T * | session, |
const DIFFUSION_CHANGE_ROLES_WITH_FILTER_PARAMS_T | params, | ||
DIFFUSION_API_ERROR * | api_error | ||
) |
Allows a session to change the assigned roles of all sessions that satisfy a given session filter.
Initially a session has a set of roles assigned during authentication. A current roles set can be obtained from the $Roles
session property.
When a set of session roles changes, its $Roles
property changes accordingly. As a role can constrain 'topic' permissions, session subscriptions are re-evaluated based on the new roles set.
The same role must not occur in both params.roles_to_remove
and params.roles_to_add
sets. Either set can be an empty (or NULL
) set but not both.
session | The current session. If NULL, this function returns immediately. |
params | Parameter structure describing which client and properties we're interested in, and the callbacks to be invoked. |
api_error | Populated on API error. Can be NULL. |
api_error
pointer has been provided, this will be populated with the error information and should be freed with diffusion_api_error_free
. bool diffusion_change_roles_with_session_id | ( | SESSION_T * | session, |
const DIFFUSION_CHANGE_ROLES_WITH_SESSION_ID_PARAMS_T | params, | ||
DIFFUSION_API_ERROR * | api_error | ||
) |
Changes the assigned roles of another session.
Initially a session has a set of roles assigned during authentication. The set of assigned roles can be obtained from the session's $Roles
session property.
When a session's assigned roles change, its $Roles
property changes accordingly. Changing the assigned roles can change the READ_TOPIC
permissions granted to the session. The session's subscriptions will be updated accordingly.
The same role must not occur in both params.roles_to_remove
and params.roles_to_add
sets. Either set can be an empty (or NULL
) set but not both.
session | The current session. If NULL, this function returns immediately. |
params | Parameter structure describing which client and properties we're interested in, and the callbacks to be invoked. |
api_error | Populated on API error. Can be NULL. |
api_error
pointer has been provided, this will be populated with the error information and should be freed with diffusion_api_error_free
. bool diffusion_set_session_properties | ( | SESSION_T * | session, |
const DIFFUSION_SET_SESSION_PROPERTIES_PARAMS_T | params, | ||
DIFFUSION_API_ERROR * | api_error | ||
) |
Send a request to the server to change the user-defined session properties for a session.
session | The current session. If NULL, this function returns immediately. |
params | Parameters defining the diffusion_set_session_properties request and callbacks. |
api_error | Populated on API error. Can be NULL. |
api_error
pointer has been provided, this will be populated with the error information and should be freed with diffusion_api_error_free
. bool diffusion_set_session_properties_filter | ( | SESSION_T * | session, |
const DIFFUSION_SET_SESSION_PROPERTIES_FILTER_PARAMS_T | params, | ||
DIFFUSION_API_ERROR * | api_error | ||
) |
Send a request to the server to set all sessions that satisfy a session filter with the new user-defined session properties.
session | The current session. If NULL, this function returns immediately. |
params | Parameters defining the diffusion_set_session_properties_filter request and callbacks. |
api_error | Populated on API error. Can be NULL. |
api_error
pointer has been provided, this will be populated with the error information and should be freed with diffusion_api_error_free
. void get_session_properties | ( | SESSION_T * | session, |
const GET_SESSION_PROPERTIES_PARAMS_T | params | ||
) |
Request properties of a connected client.
session | The current session. If NULL, this function returns immediately. |
params | Parameter structure describing which client and properties we're interested in, and the callbacks to be invoked. |
void session_properties_listener_register | ( | SESSION_T * | session, |
const SESSION_PROPERTIES_REGISTRATION_PARAMS_T | params | ||
) |
Register a listener for changes to other clients' properties.
session | The current session. If NULL, this function returns immediately. |
params | Parameter structure describing which properties should be reported, and the callbacks to be invoked. |