Diffusion C API  6.8.3
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
client-control.h File Reference

Client control feature. 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. More...
 
typedef int(* set_session_properties_cb )(const HASH_T *properties, void *context)
 Callback when a session's session properties have been set. More...
 
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. More...
 
typedef int(* change_roles_with_session_id_cb )(void *context)
 Callback when a session's roles have been successfully changed. More...
 
typedef int(* change_roles_with_filter_cb )(int number_of_matching_sessions, void *context)
 Callback when a session's roles have been successfully changed. More...
 
typedef int(* client_close_with_filter_cb )(int number_of_matching_sessions, void *context)
 Callback when client sessions matching the filter have been closed. More...
 
typedef int(* client_close_with_session_cb )(void *context)
 Callback when client session has been closed. More...
 
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. More...
 
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. 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_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. More...
 
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. More...
 
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. More...
 

Detailed Description

Client control feature.

Typedef Documentation

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.
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.
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.
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.
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.
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.

Parameters
propertiesA map of session properties that have changed.
contextUser supplied context.
Returns
HANDLER_SUCCESS or HANDLER_FAILURE.
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

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.

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.