MySQL 9.1.0
Source Code Documentation
xcom_input_request.h File Reference
#include "xcom/pax_msg.h"

Go to the source code of this file.

Typedefs

typedef struct xcom_input_requestxcom_input_request_ptr
 
typedef void(* xcom_input_reply_function_ptr) (void *reply_arg, pax_msg *payload)
 The function type that XCom will use to reply to a request. More...
 

Functions

xcom_input_request_ptr xcom_input_request_new (app_data_ptr a, xcom_input_reply_function_ptr reply_function, void *reply_arg)
 Creates a new XCom request. More...
 
void xcom_input_request_free (xcom_input_request_ptr request)
 Frees the given request and its payload. More...
 
void xcom_input_request_set_next (xcom_input_request_ptr request, xcom_input_request_ptr next)
 Links request to the list of requests next. More...
 
xcom_input_request_ptr xcom_input_request_extract_next (xcom_input_request_ptr request)
 Unlinks request from its list. More...
 
app_data_ptr xcom_input_request_extract_app_data (xcom_input_request_ptr request)
 Extract the given request's payload. More...
 
void xcom_input_request_reply (xcom_input_request_ptr request, pax_msg *payload)
 Replies to the request using the strategy chosen by the request's origin. More...
 

Typedef Documentation

◆ xcom_input_reply_function_ptr

typedef void(* xcom_input_reply_function_ptr) (void *reply_arg, pax_msg *payload)

The function type that XCom will use to reply to a request.

◆ xcom_input_request_ptr

Function Documentation

◆ xcom_input_request_extract_app_data()

app_data_ptr xcom_input_request_extract_app_data ( xcom_input_request_ptr  request)

Extract the given request's payload.

Transfers ownership of the result to the caller.

Parameters
requestthe request from which to extract the payload
Returns
the request's app_data payload

◆ xcom_input_request_extract_next()

xcom_input_request_ptr xcom_input_request_extract_next ( xcom_input_request_ptr  request)

Unlinks request from its list.

Parameters
requestthe request to unlink
Returns
the tail of the list the request was unlinked from

◆ xcom_input_request_free()

void xcom_input_request_free ( xcom_input_request_ptr  request)

Frees the given request and its payload.

Parameters
requestthe request to free

◆ xcom_input_request_new()

xcom_input_request_ptr xcom_input_request_new ( app_data_ptr  a,
xcom_input_reply_function_ptr  reply_function,
void *  reply_arg 
)

Creates a new XCom request.

Takes ownership of a.

Parameters
athe request's app_data payload
reply_functionthe function used to reply to the request
reply_argopaque argument to the reply_function
Return values
xcom_input_request_ptrif successful
NULLif unsuccessful

◆ xcom_input_request_reply()

void xcom_input_request_reply ( xcom_input_request_ptr  request,
pax_msg payload 
)

Replies to the request using the strategy chosen by the request's origin.

Parameters
requestthe request to reply to
payloadthe payload of the reply

◆ xcom_input_request_set_next()

void xcom_input_request_set_next ( xcom_input_request_ptr  request,
xcom_input_request_ptr  next 
)

Links request to the list of requests next.

Parameters
requestthe request to link
nextthe list to be linked to