![]() |
Diffusion C API 6.11.5
|
Functions for working with DIFFUSION_RESPONDER_HANDLE_T
to either respond or reject requests.
More...
Typedefs | |
typedef struct DIFFUSION_RESPONDER_HANDLE_T | DIFFUSION_RESPONDER_HANDLE_T |
A handle dispatched on receiving a request. | |
Functions | |
bool | diffusion_responder_get_response_datatype (const DIFFUSION_RESPONDER_HANDLE_T *handle, DIFFUSION_DATATYPE *response_datatype, DIFFUSION_API_ERROR *error) |
Retrieve the responder handle's response datatype. | |
bool | diffusion_respond_to_request (SESSION_T *session, const DIFFUSION_RESPONDER_HANDLE_T *handle, BUF_T *response, DIFFUSION_API_ERROR *error) |
Respond to a request. | |
bool | diffusion_reject_request (SESSION_T *session, const DIFFUSION_RESPONDER_HANDLE_T *handle, const char *message, DIFFUSION_API_ERROR *error) |
Reject a request. | |
DIFFUSION_RESPONDER_HANDLE_T * | diffusion_responder_handle_dup (const DIFFUSION_RESPONDER_HANDLE_T *handle) |
Create a duplicate (copy) of an existing DIFFUSION_RESPONDER_HANDLE_T . | |
void | diffusion_responder_handle_free (DIFFUSION_RESPONDER_HANDLE_T *handle) |
Free memory associated with a DIFFUSION_RESPONDER_HANDLE_T | |
Functions for working with DIFFUSION_RESPONDER_HANDLE_T
to either respond or reject requests.
Copyright © 2018 - 2023 DiffusionData Ltd., All Rights Reserved.
Use is subject to licence terms.
NOTICE: All information contained herein is, and remains the property of DiffusionData. The intellectual and technical concepts contained herein are proprietary to DiffusionData and may be covered by U.S. and Foreign Patents, patents in process, and are protected by trade secret or copyright law.
typedef struct DIFFUSION_RESPONDER_HANDLE_T DIFFUSION_RESPONDER_HANDLE_T |
A handle dispatched on receiving a request.
Each request received has its own unique handle. This handle is required to respond to a request with the function diffusion_respond_to_request
or reject a request with diffusion_reject_request
.
bool diffusion_reject_request | ( | SESSION_T * | session, |
const DIFFUSION_RESPONDER_HANDLE_T * | handle, | ||
const char * | message, | ||
DIFFUSION_API_ERROR * | error | ||
) |
Reject a request.
session | The session handle. If NULL, this function returns immediately. |
handle | The response handle used when dispatching a response. |
message | Context message to be contained in the rejection. Can be NULL. |
error | Populated if an error occurs. Can be NULL. |
DIFFUSION_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_respond_to_request | ( | SESSION_T * | session, |
const DIFFUSION_RESPONDER_HANDLE_T * | handle, | ||
BUF_T * | response, | ||
DIFFUSION_API_ERROR * | error | ||
) |
Respond to a request.
session | The session handle. If NULL, this function returns immediately. |
handle | The response handle used when dispatching a response. |
response | The response to be sent. |
error | Populated if an error occurs. Can be NULL. |
DIFFUSION_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_responder_get_response_datatype | ( | const DIFFUSION_RESPONDER_HANDLE_T * | handle, |
DIFFUSION_DATATYPE * | response_datatype, | ||
DIFFUSION_API_ERROR * | error | ||
) |
Retrieve the responder handle's response datatype.
handle | The response handle used when dispatching a response. |
response_datatype | A pointer to a DIFFUSION_DATATYPE which will have its value set to the responder's response datatype. |
error | Populated if an error occurs. Can be NULL. |
DIFFUSION_API_ERROR
pointer has been provided, this will be populated with the error information and should be freed with diffusion_api_error_free
. DIFFUSION_RESPONDER_HANDLE_T * diffusion_responder_handle_dup | ( | const DIFFUSION_RESPONDER_HANDLE_T * | handle | ) |
Create a duplicate (copy) of an existing DIFFUSION_RESPONDER_HANDLE_T
.
diffusion_responder_handle_free
should be called on the pointer when longer needed.
handle | The responder handle to be duplicated. |
void diffusion_responder_handle_free | ( | DIFFUSION_RESPONDER_HANDLE_T * | handle | ) |
Free memory associated with a DIFFUSION_RESPONDER_HANDLE_T
handle | The responder handle to be freed. |