Diffusion C API  5.9.24
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
svc-update.h File Reference

Functions for registering an update source and providing updates to topics. More...

Data Structures

struct  svc_update_registration_request_s
 Structure describing a request to register a topic update source. More...
 
struct  svc_update_registration_response_s
 Structure describing the response to a topic update registration request. More...
 
struct  svc_update_deregistration_request_s
 Structure describing a request to deregister a topic update source. More...
 
struct  svc_update_deregistration_response_s
 Structure describing the response to a topic update deregistration request. More...
 
struct  svc_update_request_s
 Structure describing a request to update a topic. More...
 
struct  svc_update_response_s
 Structure describing the response to a topic update request. More...
 
struct  svc_update_source_state_request_s
 Structure describing a request to change an updater's state. More...
 
struct  svc_update_source_state_response_s
 Structure for responding to a request to change and updater's state. 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  update_source_handlers_s
 
struct  update_source_params_s
 Structure passed when updating a topic. More...
 
struct  update_source_state_handlers_s
 
struct  update_source_state_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_request_s 
SVC_UPDATE_REGISTRATION_REQUEST_T
 Structure describing a request to register a topic update source.
 
typedef struct
svc_update_registration_response_s 
SVC_UPDATE_REGISTRATION_RESPONSE_T
 Structure describing the response to a topic update registration request.
 
typedef struct
svc_update_deregistration_request_s 
SVC_UPDATE_DEREGISTRATION_REQUEST_T
 Structure describing a request to deregister a topic update source.
 
typedef struct
svc_update_deregistration_response_s 
SVC_UPDATE_DEREGISTRATION_RESPONSE_T
 Structure describing the response to a topic update deregistration request.
 
typedef struct svc_update_request_s SVC_UPDATE_REQUEST_T
 Structure describing a request to update a topic.
 
typedef struct
svc_update_response_s 
SVC_UPDATE_RESPONSE_T
 Structure describing the response to a topic update request.
 
typedef struct
svc_update_source_state_request_s 
SVC_UPDATE_SOURCE_STATE_REQUEST_T
 Structure describing a request to change an updater's state.
 
typedef struct
svc_update_source_state_response_s 
SVC_UPDATE_SOURCE_STATE_RESPONSE_T
 Structure for responding to a request to change and updater's state.
 
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
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_ERROR }
 Values indicating the result of an update request. More...
 
enum  UPDATE_RESPONSE_ERROR_T {
  UPDATE_RESPONSE_ERROR_SEND_FAILURE, UPDATE_RESPONSE_INVALID_TOPIC, UPDATE_RESPONSE_INVALID_CONTENT, UPDATE_RESPONSE_INVALID_UPDATER,
  UPDATE_RESPONSE_TOPIC_DOES_NOT_EXIST
}
 These values indicate the nature of an update failure. More...
 

Functions

CONVERSATION_ID_Tregister_update_source (SESSION_T *session, const UPDATE_SOURCE_REGISTRATION_PARAMS_T params)
 Register a topic update source. More...
 
void deregister_update_source (SESSION_T *session, const UPDATE_SOURCE_DEREGISTRATION_PARAMS_T params)
 Deregister a topic update source. More...
 
void update (SESSION_T *session, const UPDATE_SOURCE_PARAMS_T params)
 Update topic content. More...
 

Detailed Description

Functions for registering an update source and providing updates to topics.

Typedef Documentation

typedef int(* on_update_source_deregistration_cb)(SESSION_T *session, const CONVERSATION_ID_T *updater_id, void *context)

Callback for deregiser_update_source().

Parameters
sessionThe current active session.
responseThe deregistration response message from Diffusion.
contextUser-supplied context from the deregistration call.
Returns
HANDLER_SUCCESS or HANDLER_FAILURE.
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().

Parameters
sessionThe current active session.
updater_idThe updater_id identifying this updater.
responseThe registration response message from Diffusion.
contextUser-supplied context from the initial registration call.
Returns
HANDLER_SUCCESS or HANDLER_FAILURE.

Enumeration Type Documentation

These values indicate the nature of an update failure.

Enumerator
UPDATE_RESPONSE_ERROR_SEND_FAILURE 

Error sending the response.

UPDATE_RESPONSE_INVALID_TOPIC 

Not registered to update this topic.

UPDATE_RESPONSE_INVALID_CONTENT 

Invalid content for this topic.

UPDATE_RESPONSE_INVALID_UPDATER 

The updater is not valid for this topic.

UPDATE_RESPONSE_TOPIC_DOES_NOT_EXIST 

The topic being updated does not exist.

Values indicating the result of an update request.

Enumerator
UPDATE_RESPONSE_OK 

The update request has been processed successfully.

UPDATE_RESPONSE_ERROR 

An error occurred while processing the update request.

Service states that an update source may be in.

Remarks
Updates should only be performed when the registered source is an ACTIVE state.
Enumerator
UPDATE_SOURCE_STATE_INIT 

Initial source state, before state is received from the server.

UPDATE_SOURCE_STATE_ACTIVE 

Active state - the topic may be updated by this source.

UPDATE_SOURCE_STATE_CLOSED 

Terminal state; no further state changes may take place.

UPDATE_SOURCE_STATE_STANDBY 

Inactive state that permits being set to Active or Closed.