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

Add topic feature (topic control). More...

Data Structures

struct  svc_add_topic_request_s
 Structure describing an "add topic" request. More...
 
struct  svc_add_topic_response_s
 Structure describing an "add topic" response. More...
 
struct  add_topic_handlers_s
 
struct  add_topic_params_s
 Structure passed when adding a topic. More...
 

Macros

#define ADD_TOPIC_HANDLERS
 User-specified callbacks that may be invoked in response to issuing an "add topic" request to Diffusion.
 

Typedefs

typedef struct
svc_add_topic_request_s 
SVC_ADD_TOPIC_REQUEST_T
 Structure describing an "add topic" request.
 
typedef struct
svc_add_topic_response_s 
SVC_ADD_TOPIC_RESPONSE_T
 Structure describing an "add topic" response.
 
typedef int(* on_add_topic_cb )(SESSION_T *session, const SVC_ADD_TOPIC_RESPONSE_T *response, void *context)
 Callback for add_topic(). More...
 
typedef struct add_topic_params_s ADD_TOPIC_PARAMS_T
 Structure passed when adding a topic.
 

Enumerations

enum  SVC_ADD_TOPIC_RESPONSE_CODE_T { ADD_TOPIC_RESPONSE_OK, ADD_TOPIC_RESPONSE_OK_CACHED, ADD_TOPIC_RESPONSE_FAIL, ADD_TOPIC_RESPONSE_CACHE_FAILURE }
 Possible values indicating the success or failure reasons in response to a topic add request. More...
 
enum  SVC_ADD_TOPIC_FAILURE_REASON_T {
  ADD_TOPIC_FAILURE_REASON_SUCCESS, ADD_TOPIC_FAILURE_REASON_EXISTS, ADD_TOPIC_FAILURE_REASON_EXISTS_MISMATCH, ADD_TOPIC_FAILURE_REASON_INVALID_NAME,
  ADD_TOPIC_FAILURE_REASON_INVALID_DETAILS, ADD_TOPIC_FAILURE_REASON_USER_CODE_ERROR, ADD_TOPIC_FAILURE_REASON_TOPIC_NOT_FOUND, ADD_TOPIC_FAILURE_REASON_PERMISSIONS_FAILURE,
  ADD_TOPIC_FAILURE_REASON_INITIALISE_ERROR, ADD_TOPIC_FAILURE_REASON_UNEXPECTED_ERROR
}
 

Functions

void add_topic (SESSION_T *session, const ADD_TOPIC_PARAMS_T params)
 Add a topic to Diffusion. More...
 

Detailed Description

Add topic feature (topic control).

Typedef Documentation

typedef int(* on_add_topic_cb)(SESSION_T *session, const SVC_ADD_TOPIC_RESPONSE_T *response, void *context)

Callback for add_topic().

Parameters
sessionThe current active session.
responseThe response message from Diffusion.
contextUser-supplied context from the initial add_topic() call.
Returns
HANDLER_SUCCESS or HANDLER_FAILURE.

Enumeration Type Documentation

Enumerator
ADD_TOPIC_FAILURE_REASON_SUCCESS 

No error while adding topic.

ADD_TOPIC_FAILURE_REASON_EXISTS 

Topic already existed with exactly the same details.

ADD_TOPIC_FAILURE_REASON_EXISTS_MISMATCH 

Topic already exists with the same name but different details.

ADD_TOPIC_FAILURE_REASON_INVALID_NAME 

The name of the topic was found to be invalid.

ADD_TOPIC_FAILURE_REASON_INVALID_DETAILS 

Some aspect of the details failed validation.

ADD_TOPIC_FAILURE_REASON_USER_CODE_ERROR 

A user supplied class could either not be found or could not be instantiated at the server.

ADD_TOPIC_FAILURE_REASON_TOPIC_NOT_FOUND 

A referenced toic was not found or was not of the correct type.

ADD_TOPIC_FAILURE_REASON_PERMISSIONS_FAILURE 

The client was denied permission to add a topic of the specified type a the given point in the topic hierarchy.

ADD_TOPIC_FAILURE_REASON_INITIALISE_ERROR 

Initialisation of topic with the supplied content failed, possibly because it was of the wrong format.

ADD_TOPIC_FAILURE_REASON_UNEXPECTED_ERROR 

An unexpected error occurred whilst attempting to create the topic.

Possible values indicating the success or failure reasons in response to a topic add request.

Enumerator
ADD_TOPIC_RESPONSE_OK 

Topic added OK - details not cached.

ADD_TOPIC_RESPONSE_OK_CACHED 

Topic added OK and details cached.

ADD_TOPIC_RESPONSE_FAIL 

Topic add failed for supplied reason.

ADD_TOPIC_RESPONSE_CACHE_FAILURE 

Requested details not found in server side cache - send again.