Diffusion C API  6.10.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Management of topic views.

Functions

char * diffusion_topic_view_get_name (const DIFFUSION_TOPIC_VIEW_T *topic_view)
 Return a memory allocated copy of the topic view's name. More...
 
char * diffusion_topic_view_get_specification (const DIFFUSION_TOPIC_VIEW_T *topic_view)
 Return a memory allocated copy of the topic view's specification. More...
 
SET_Tdiffusion_topic_view_get_roles (const DIFFUSION_TOPIC_VIEW_T *topic_view)
 Return a memory allocated SET_T of the topic view's roles. More...
 
DIFFUSION_TOPIC_VIEW_Tdiffusion_topic_view_dup (const DIFFUSION_TOPIC_VIEW_T *topic_view)
 Returns a memory allocated copy of a DIFFUSION_TOPIC_VIEW_T. More...
 
void diffusion_topic_view_free (DIFFUSION_TOPIC_VIEW_T *topic_view)
 Free a memory allocated DIFFUSION_TOPIC_VIEW_T More...
 
bool diffusion_topic_views_create_topic_view (SESSION_T *session, const DIFFUSION_CREATE_TOPIC_VIEW_PARAMS_T params, DIFFUSION_API_ERROR *api_error)
 Create a new named topic view. More...
 
bool diffusion_topic_views_list_topic_views (SESSION_T *session, const DIFFUSION_TOPIC_VIEWS_LIST_PARAMS_T params, DIFFUSION_API_ERROR *api_error)
 List all the topic views that have been created. More...
 
bool diffusion_topic_views_remove_topic_view (SESSION_T *session, const DIFFUSION_REMOVE_TOPIC_VIEW_PARAMS_T params, DIFFUSION_API_ERROR *api_error)
 Remove a named topic view if it exists. More...
 
bool diffusion_topic_views_get_topic_view (SESSION_T *session, const DIFFUSION_GET_TOPIC_VIEW_PARAMS_T params, DIFFUSION_API_ERROR *api_error)
 Get a named Topic View. More...
 

Detailed Description

Function Documentation

DIFFUSION_TOPIC_VIEW_T* diffusion_topic_view_dup ( const DIFFUSION_TOPIC_VIEW_T topic_view)

Returns a memory allocated copy of a DIFFUSION_TOPIC_VIEW_T.

diffusion_topic_view_free should be called on this pointer when no longer needed.

Parameters
topic_viewthe topic_view to be copied.
Returns
a copy of a DIFFUSION_TOPIC_VIEW_T. NULL, if event is NULL.
void diffusion_topic_view_free ( DIFFUSION_TOPIC_VIEW_T topic_view)

Free a memory allocated DIFFUSION_TOPIC_VIEW_T

Parameters
topic_viewthe DIFFUSION_TOPIC_VIEW_T to be freed.
char* diffusion_topic_view_get_name ( const DIFFUSION_TOPIC_VIEW_T topic_view)

Return a memory allocated copy of the topic view's name.

free should be called on this pointer when no longer needed.

Parameters
topic_viewthe topic view
Returns
the topic view's name.
SET_T* diffusion_topic_view_get_roles ( const DIFFUSION_TOPIC_VIEW_T topic_view)

Return a memory allocated SET_T of the topic view's roles.

set_free should be called on this pointer when no longer needed.

Parameters
topic_viewthe topic view
Returns
the topic view's roles used when evaluating permissions.
char* diffusion_topic_view_get_specification ( const DIFFUSION_TOPIC_VIEW_T topic_view)

Return a memory allocated copy of the topic view's specification.

free should be called on this pointer when no longer needed.

Parameters
topic_viewthe topic view
Returns
the topic view's specification.
bool diffusion_topic_views_create_topic_view ( SESSION_T session,
const DIFFUSION_CREATE_TOPIC_VIEW_PARAMS_T  params,
DIFFUSION_API_ERROR api_error 
)

Create a new named topic view.

If a view with the same name already exists the new view will replace the existing view.

Parameters
sessionThe current session. If NULL, this function returns immediately.
paramsParameters defining the diffusion_topic_views_create_topic_view request and callbacks.
api_errorPopulated on API error. Can be NULL.
Returns
true if the operation was successful. False, otherwise. In this case, if a non-NULL api_error pointer has been provided, this will be populated with the error information and should be freed with diffusion_api_error_free.
bool diffusion_topic_views_get_topic_view ( SESSION_T session,
const DIFFUSION_GET_TOPIC_VIEW_PARAMS_T  params,
DIFFUSION_API_ERROR api_error 
)

Get a named Topic View.

If the named view does not exist the handler on_topic_view will complete successfully with a NULL topic_view.

Parameters
sessionThe current session. If NULL, this function returns immediately.
paramsParameters defining the diffusion_topic_views_get_topic_view request and callbacks.
api_errorPopulated on API error. Can be NULL.
Returns
true if the operation was successful. False, otherwise. In this case, if a non-NULL api_error pointer has been provided, this will be populated with the error information and should be freed with diffusion_api_error_free.
bool diffusion_topic_views_list_topic_views ( SESSION_T session,
const DIFFUSION_TOPIC_VIEWS_LIST_PARAMS_T  params,
DIFFUSION_API_ERROR api_error 
)

List all the topic views that have been created.

Parameters
sessionThe current session. If NULL, this function returns immediately.
paramsParameters defining the diffusion_topic_views_list_topic_views request and callbacks.
api_errorPopulated on API error. Can be NULL.
Returns
true if the operation was successful. False, otherwise. In this case, if a non-NULL api_error pointer has been provided, this will be populated with the error information and should be freed with diffusion_api_error_free.
bool diffusion_topic_views_remove_topic_view ( SESSION_T session,
const DIFFUSION_REMOVE_TOPIC_VIEW_PARAMS_T  params,
DIFFUSION_API_ERROR api_error 
)

Remove a named topic view if it exists.

If the named view does not exist the handler on_topic_view_removed will complete successfully.

Parameters
sessionThe current session. If NULL, this function returns immediately.
paramsParameters defining the diffusion_topic_views_remove_topic_view request and callbacks.
api_errorPopulated on API error. Can be NULL.
Returns
true if the operation was successful. False, otherwise. In this case, if a non-NULL api_error pointer has been provided, this will be populated with the error information and should be freed with diffusion_api_error_free.