Diffusion C API 6.11.5
Loading...
Searching...
No Matches
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.
 
char * diffusion_topic_view_get_specification (const DIFFUSION_TOPIC_VIEW_T *topic_view)
 Return a memory allocated copy of the topic view's specification.
 
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.
 
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.
 
void diffusion_topic_view_free (DIFFUSION_TOPIC_VIEW_T *topic_view)
 Free a memory allocated DIFFUSION_TOPIC_VIEW_T
 
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.
 
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.
 
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.
 
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.
 

Detailed Description

Function Documentation

◆ diffusion_topic_view_dup()

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.

◆ diffusion_topic_view_free()

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.

◆ diffusion_topic_view_get_name()

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.

◆ diffusion_topic_view_get_roles()

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.

◆ diffusion_topic_view_get_specification()

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.

◆ diffusion_topic_views_create_topic_view()

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.

◆ diffusion_topic_views_get_topic_view()

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.

◆ diffusion_topic_views_list_topic_views()

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.

◆ diffusion_topic_views_remove_topic_view()

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.