Diffusion C API 6.11.5
Loading...
Searching...
No Matches
client-control.h File Reference

Allows access to other sessions' properties and related operations for session management. More...

Data Structures

struct  session_properties_event_s
 
struct  session_properties_registration_handlers_s
 
struct  session_properties_registration_params_s
 
struct  svc_get_session_properties_response_s
 
struct  get_session_properties_params_s
 
struct  diffusion_set_session_properties_params_s
 Structure supplied when issuing a diffusion_set_session_properties call. More...
 
struct  diffusion_set_session_properties_filter_params_s
 Structure supplied when issuing a diffusion_set_session_properties_filter call. More...
 
struct  diffusion_change_roles_with_session_id_params_s
 Structure supplied when issuing a diffusion_change_roles_with_session_id call. More...
 
struct  diffusion_change_roles_params_with_filter_s
 Structure supplied when issuing a diffusion_change_roles_with_filter call. More...
 
struct  diffusion_client_close_with_filter_params_s
 Structure supplied when issuing a diffusion_client_close_with_filter call. More...
 
struct  diffusion_client_close_with_session_params_s
 Structure supplied when issuing a diffusion_client_close_with_session call. More...
 
struct  diffusion_client_set_conflated_with_filter_params_s
 Structure supplied when issuing a diffusion_client_set_conflated_with_filter call. More...
 

Typedefs

typedef int(* on_session_properties_event_cb) (SESSION_T *session, const SESSION_PROPERTIES_EVENT_T *event, void *context)
 Callbacks for session open/close and property updates have this function signature.
 
typedef int(* set_session_properties_cb) (const HASH_T *properties, void *context)
 Callback when a session's session properties have been set.
 
typedef int(* set_session_properties_filter_cb) (const int number_of_matching_sessions, void *context)
 Callback when all sessions matching the filter have their session properties set.
 
typedef int(* change_roles_with_session_id_cb) (void *context)
 Callback when a session's roles have been successfully changed.
 
typedef int(* change_roles_with_filter_cb) (int number_of_matching_sessions, void *context)
 Callback when a session's roles have been successfully changed.
 
typedef int(* client_close_with_filter_cb) (int number_of_matching_sessions, void *context)
 Callback when client sessions matching the filter have been closed.
 
typedef int(* client_close_with_session_cb) (void *context)
 Callback when client session has been closed.
 
typedef int(* client_conflated_set_with_filter_cb) (int number_of_matching_sessions, void *context)
 Callback when client sessions matching the filter have had conflation set to true or false.
 
typedef struct diffusion_set_session_properties_params_s DIFFUSION_SET_SESSION_PROPERTIES_PARAMS_T
 Structure supplied when issuing a diffusion_set_session_properties call.
 
typedef struct diffusion_set_session_properties_filter_params_s DIFFUSION_SET_SESSION_PROPERTIES_FILTER_PARAMS_T
 Structure supplied when issuing a diffusion_set_session_properties_filter call.
 
typedef struct diffusion_change_roles_with_session_id_params_s DIFFUSION_CHANGE_ROLES_WITH_SESSION_ID_PARAMS_T
 Structure supplied when issuing a diffusion_change_roles_with_session_id call.
 
typedef struct diffusion_change_roles_params_with_filter_s DIFFUSION_CHANGE_ROLES_WITH_FILTER_PARAMS_T
 Structure supplied when issuing a diffusion_change_roles_with_filter call.
 
typedef struct diffusion_client_close_with_filter_params_s DIFFUSION_CLIENT_CLOSE_WITH_FILTER_PARAMS_T
 Structure supplied when issuing a diffusion_client_close_with_filter call.
 
typedef struct diffusion_client_close_with_session_params_s DIFFUSION_CLIENT_CLOSE_WITH_SESSION_PARAMS_T
 Structure supplied when issuing a diffusion_client_close_with_session call.
 
typedef struct diffusion_client_set_conflated_with_filter_params_s DIFFUSION_CLIENT_SET_CONFLATED_WITH_FILTER_PARAMS_T
 Structure supplied when issuing a diffusion_client_set_conflated_with_filter call.
 

Enumerations

enum  SESSION_PROPERTIES_EVENT_TYPE_T { SESSION_PROPERTIES_EVENT_TYPE_OPEN , SESSION_PROPERTIES_EVENT_TYPE_UPDATE , SESSION_PROPERTIES_EVENT_TYPE_CLOSE , SESSION_PROPERTIES_EVENT_TYPE_DISCONNECTED }
 
enum  SESSION_PROPERTIES_UPDATE_TYPE_T { SESSION_PROPERTIES_UPDATE_TYPE_UPDATED , SESSION_PROPERTIES_UPDATE_TYPE_RECONNECTED , SESSION_PROPERTIES_UPDATE_TYPE_FAILED_OVER , SESSION_PROPERTIES_UPDATE_TYPE_DISCONNECTED }
 

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.
 
void get_session_properties (SESSION_T *session, const GET_SESSION_PROPERTIES_PARAMS_T params)
 Request properties of a connected client.
 
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.
 
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.
 
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.
 
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.
 
bool diffusion_client_close_with_session (SESSION_T *session, const DIFFUSION_CLIENT_CLOSE_WITH_SESSION_PARAMS_T params, DIFFUSION_API_ERROR *api_error)
 Close a client session.
 
bool diffusion_client_close_with_filter (SESSION_T *session, const DIFFUSION_CLIENT_CLOSE_WITH_FILTER_PARAMS_T params, DIFFUSION_API_ERROR *api_error)
 Close all client sessions matching a given session filter.
 
bool diffusion_client_set_conflated_with_filter (SESSION_T *session, const DIFFUSION_CLIENT_SET_CONFLATED_WITH_FILTER_PARAMS_T params, DIFFUSION_API_ERROR *api_error)
 Control client queue conflation.
 

Detailed Description

Allows access to other sessions' properties and related operations for session management.

Typedef Documentation

◆ change_roles_with_filter_cb

typedef int(* change_roles_with_filter_cb) (int number_of_matching_sessions, void *context)

Callback when a session's roles have been successfully changed.

Parameters
number_of_matching_sessionsAn integer value which represents a number of sessions that have matched the filter and for which the specified role changes have been applied.
contextUser supplied context.
Returns
HANDLER_SUCCESS or HANDLER_FAILURE.

◆ change_roles_with_session_id_cb

typedef int(* change_roles_with_session_id_cb) (void *context)

Callback when a session's roles have been successfully changed.

Parameters
contextUser supplied context.
Returns
HANDLER_SUCCESS or HANDLER_FAILURE.

◆ client_close_with_filter_cb

typedef int(* client_close_with_filter_cb) (int number_of_matching_sessions, void *context)

Callback when client sessions matching the filter have been closed.

Parameters
number_of_matching_sessionsAn integer value which represents a number of sessions that have matched the filter and for which sessions have been closed
contextUser supplied context.
Returns
HANDLER_SUCCESS or HANDLER_FAILURE.

◆ client_close_with_session_cb

typedef int(* client_close_with_session_cb) (void *context)

Callback when client session has been closed.

Parameters
contextUser supplied context.
Returns
HANDLER_SUCCESS or HANDLER_FAILURE.

◆ client_conflated_set_with_filter_cb

typedef int(* client_conflated_set_with_filter_cb) (int number_of_matching_sessions, void *context)

Callback when client sessions matching the filter have had conflation set to true or false.

Parameters
number_of_matching_sessionsAn integer value which represents a number of sessions that have matched the filter and all for which sessions conflation has been set to true or false.
contextUser supplied context.
Returns
HANDLER_SUCCESS or HANDLER_FAILURE.

◆ set_session_properties_cb

typedef int(* set_session_properties_cb) (const HASH_T *properties, void *context)

Callback when a session's session properties have been set.

Parameters
propertiesA map of session properties that have changed.
contextUser supplied context.
Returns
HANDLER_SUCCESS or HANDLER_FAILURE.

◆ set_session_properties_filter_cb

typedef int(* set_session_properties_filter_cb) (const int number_of_matching_sessions, void *context)

Callback when all sessions matching the filter have their session properties set.

Parameters
responseThe response from the server
contextUser supplied context.
Returns
HANDLER_SUCCESS or HANDLER_FAILURE.

Enumeration Type Documentation

◆ SESSION_PROPERTIES_EVENT_TYPE_T

Enumerator
SESSION_PROPERTIES_EVENT_TYPE_OPEN 

Indicates a session has been opened (e.g.

new client connection).

SESSION_PROPERTIES_EVENT_TYPE_UPDATE 

Indicates that a session has updated properties.

SESSION_PROPERTIES_EVENT_TYPE_CLOSE 

Indicates that a session has been closed.

SESSION_PROPERTIES_EVENT_TYPE_DISCONNECTED 

Indicates that a session has been disconnected.

◆ SESSION_PROPERTIES_UPDATE_TYPE_T

Enumerator
SESSION_PROPERTIES_UPDATE_TYPE_UPDATED 

The session properties have been updated.

SESSION_PROPERTIES_UPDATE_TYPE_RECONNECTED 

The session properties have been updated due to reconnection with the server.

SESSION_PROPERTIES_UPDATE_TYPE_FAILED_OVER 

The session properties have been updated due to the session failing over to a different host.

SESSION_PROPERTIES_UPDATE_TYPE_DISCONNECTED 

Session has disconnected.