Diffusion C API
6.2.9
|
Topic update control feature. More...
Data Structures | |
struct | svc_update_registration_response_s |
Structure describing the response to a topic update registration request. More... | |
struct | update_source_registration_handlers_s |
struct | update_source_registration_params_s |
Structure passed when registering an update source. More... | |
struct | update_source_deregistration_handlers_s |
struct | update_source_deregistration_params_s |
Structure passed when deregistering an update source. More... | |
struct | svc_update_response_s |
Structure describing the response to a topic update request. More... | |
struct | update_source_handlers_s |
struct | update_source_params_s |
Structure passed when updating a topic. More... | |
struct | update_value_params_s |
Macros | |
#define | UPDATE_SOURCE_REGISTRATION_HANDLERS |
User-supplied handlers that may be invoked in response to a request to register a topic source. | |
#define | UPDATE_SOURCE_HANDLERS |
User-supplied handlers that are invoked in response to sending an update request to a Diffusion topic. | |
Typedefs | |
typedef struct svc_update_registration_response_s | SVC_UPDATE_REGISTRATION_RESPONSE_T |
Structure describing the response to a topic update registration request. | |
typedef int(* | on_update_source_registration_cb )(SESSION_T *session, const CONVERSATION_ID_T *updater_id, const SVC_UPDATE_REGISTRATION_RESPONSE_T *response, void *context) |
Callback for register_update_source(). More... | |
typedef struct update_source_registration_params_s | UPDATE_SOURCE_REGISTRATION_PARAMS_T |
Structure passed when registering an update source. | |
typedef int(* | on_update_source_deregistration_cb )(SESSION_T *session, const CONVERSATION_ID_T *updater_id, void *context) |
Callback for deregiser_update_source(). More... | |
typedef struct update_source_deregistration_params_s | UPDATE_SOURCE_DEREGISTRATION_PARAMS_T |
Structure passed when deregistering an update source. | |
typedef struct svc_update_response_s | SVC_UPDATE_RESPONSE_T |
Structure describing the response to a topic update request. | |
typedef struct update_source_params_s | UPDATE_SOURCE_PARAMS_T |
Structure passed when updating a topic. | |
Enumerations | |
enum | UPDATE_SOURCE_STATE_T { UPDATE_SOURCE_STATE_INIT, UPDATE_SOURCE_STATE_ACTIVE, UPDATE_SOURCE_STATE_CLOSED, UPDATE_SOURCE_STATE_STANDBY } |
Service states that an update source may be in. More... | |
enum | UPDATE_RESPONSE_STATUS_T { UPDATE_RESPONSE_OK, UPDATE_RESPONSE_INCOMPATIBLE_UPDATE, UPDATE_RESPONSE_UPDATE_FAILED, UPDATE_RESPONSE_INVALID_UPDATER, UPDATE_RESPONSE_MISSING_TOPIC, UPDATE_RESPONSE_EXCLUSIVE_UPDATER_CONFLICT, UPDATE_RESPONSE_DELTA_WITHOUT_VALUE, UPDATE_RESPONSE_CLUSTER_REPARTITION, UPDATE_RESPONSE_INCOMPATIBLE_STATE } |
Values indicating the result of an update request. More... | |
Functions | |
DEPRECATED (UPDATE_T *update_create(const UPDATE_ACTION_T action, const UPDATE_TYPE_T type, const CONTENT_T *content)) | |
DEPRECATED (void update_free(UPDATE_T *update)) | |
DEPRECATED (BUF_T *update_marshal(const UPDATE_T *update)) | |
DEPRECATED (char *buf_read_update(const char *data, UPDATE_T **update)) | |
DEPRECATED (UPDATE_T *update_unmarshal(const char *str)) | |
DEPRECATED (UPDATE_T *update_dup(const UPDATE_T *src)) | |
DEPRECATED (CONVERSATION_ID_T *register_update_source(SESSION_T *session, const UPDATE_SOURCE_REGISTRATION_PARAMS_T params)) | |
Register a topic update source. More... | |
DEPRECATED (void deregister_update_source(SESSION_T *session, const UPDATE_SOURCE_DEREGISTRATION_PARAMS_T params)) | |
Deregister a topic update source. More... | |
DEPRECATED (void update(SESSION_T *session, const UPDATE_SOURCE_PARAMS_T params)) | |
Update topic content. More... | |
DEPRECATED (void update_value(SESSION_T *session, const UPDATE_VALUE_PARAMS_T params)) | |
Update topic content. More... | |
DEPRECATED (void update_value_with_datatype(SESSION_T *session, DIFFUSION_DATATYPE datatype, UPDATE_VALUE_PARAMS_T params)) | |
Update topic content. More... | |
Topic update control feature.
typedef int(* on_update_source_deregistration_cb)(SESSION_T *session, const CONVERSATION_ID_T *updater_id, void *context) |
Callback for deregiser_update_source().
session | The current active session. |
response | The deregistration response message from Diffusion. |
context | User-supplied context from the deregistration call. |
typedef int(* on_update_source_registration_cb)(SESSION_T *session, const CONVERSATION_ID_T *updater_id, const SVC_UPDATE_REGISTRATION_RESPONSE_T *response, void *context) |
Callback for register_update_source().
session | The current active session. |
updater_id | The updater_id identifying this updater. |
response | The registration response message from Diffusion. |
context | User-supplied context from the initial registration call. |
Values indicating the result of an update request.
Service states that an update source may be in.
DEPRECATED | ( | UPDATE_T * | update_createconst UPDATE_ACTION_T action, const UPDATE_TYPE_T type, const CONTENT_T *content | ) |
Create a new UPDATE_T structure for updating topic content.
action | The operation that will be performed on the target topic data (refresh, update, match). |
type | The type of update being performed (typically, Content change). |
content | The data to be sent to Diffusion. |
DEPRECATED | ( | void | update_freeUPDATE_T *update | ) |
Free all memory associated with an UPDATE_T.
update | The UPDATE_T to be freed. |
DEPRECATED | ( | BUF_T * | update_marshalconst UPDATE_T *update | ) |
Serialise an UPDATE_T to bytes for transmission to Diffusion.
update | The UPDATE_T to be mashalled. |
DEPRECATED | ( | char * | buf_read_updateconst char *data, UPDATE_T **update | ) |
Read an UPDATE_T structure from a char array.
data | The char array containing the serialised UPDATE_T |
update | The location to store a newly allocated UPDATE_T |
DEPRECATED | ( | UPDATE_T * | update_unmarshalconst char *str | ) |
Deserialise bytes from Diffusion to an UPDATE_T structure.
str | The bytes to be unmarshalled. |
DEPRECATED | ( | UPDATE_T * | update_dupconst UPDATE_T *src | ) |
Create a deep copy of an UPDATE_T structure.
src | The UPDATE_T to copy. |
DEPRECATED | ( | CONVERSATION_ID_T * | register_update_sourceSESSION_T *session, const UPDATE_SOURCE_REGISTRATION_PARAMS_T params | ) |
Register a topic update source.
Registers an update source with Diffusion, requesting responsibility for managing topic state for all topics from a given point and below.
session | The session handle. If NULL, this function returns immediately with a NULL value. |
params | Parameter structure describing the registration request. |
DEPRECATED | ( | void | deregister_update_sourceSESSION_T *session, const UPDATE_SOURCE_DEREGISTRATION_PARAMS_T params | ) |
Deregister a topic update source.
Deregisters an existing update source from Diffusion.
session | The session handle. If NULL, this function returns immediately. |
params | Parameter structure describing the deregistration request. |
DEPRECATED | ( | void | updateSESSION_T *session, const UPDATE_SOURCE_PARAMS_T params | ) |
Update topic content.
Sends new topic content to Diffusion, for transmission to subscribed clients. Where possible, prefer update_value() to update().
session | The session handle. If NULL, this function returns immediately. |
params | Parameter structure describing which topic to update, the new content, how the update is to be applied, and callbacks to handle success or failure notifications. |
DEPRECATED | ( | void | update_valueSESSION_T *session, const UPDATE_VALUE_PARAMS_T params | ) |
Update topic content.
Updates the content of a topic of a certain type (binary, JSON) but unlike update(), this may transparently send delta updates which require less network bandwidth. If possible, prefer this function to update().
session | The session handle. If NULL, this function returns immediately. |
params | Parameter structure describing which topic to update, the value that the topic on the server will contain and callbacks to handle success or failure notifications. |
DEPRECATED | ( | void | update_value_with_datatypeSESSION_T *session, DIFFUSION_DATATYPE datatype, UPDATE_VALUE_PARAMS_T params | ) |
Update topic content.
Updates the content of a topic of a provided datatype. This is the preferred function for updating datatype topics (Binary, JSON, String, Int64, Double and Recordv2)
session | The session handle. If NULL, this function returns immediately. |
datatype | DIFFUSION_DATATYPE of the topic to be updated. |
params | Parameter structure describing which topic to update, the value that the topic on the server will contain and callbacks to handle success or failure notifications. |