|
MySQL 5.6.14 Source Code Document
|
Typedefs | |
| typedef void(* | cb_responder )(responder_ctx *responder_data, protocol_binary_response_header *hdr, char *data, size_t data_len) |
| typedef int | connection_id |
| typedef enum plugin_cb_result(* | plugin_cb )(void *userdata, connection_id conn_id, cb_responder responder, responder_ctx *responder_data, protocol_binary_response_header *hdr, char *data, size_t data_len) |
| typedef void(* | plugin_conn_observer )(void *userdata, enum plugin_cb_state state, connection_id conn_id) |
Enumerations | |
| enum | plugin_cb_result { cb_done, cb_defer, cb_hangup } |
| enum | plugin_cb_state { cb_connected, cb_disconnected } |
Functions | |
| void | plugin_register_callback (uint8_t cmd_id, plugin_cb callback, void *userdata) |
| void | plugin_get_callback (int8_t cmd_id, plugin_cb *current_callback, void **current_userdata) |
| void | plugin_register_conn_observer (void *userdata, plugin_conn_observer obs) |
| void | plugin_unregister_conn_observer (plugin_conn_observer obs) |
| typedef void(* cb_responder)(responder_ctx *responder_data, protocol_binary_response_header *hdr, char *data, size_t data_len) |
Response transmission function.
| responder_data | context data for the responder |
| hdr | response header |
| data | response data |
| data_len | length of the response data |
Definition at line 21 of file protocol_plugin.h.
| typedef int connection_id |
Unique connection identifier.
Definition at line 29 of file protocol_plugin.h.
| typedef enum plugin_cb_result(* plugin_cb)(void *userdata, connection_id conn_id, cb_responder responder, responder_ctx *responder_data, protocol_binary_response_header *hdr, char *data, size_t data_len) |
Callback fired when a message is completely received.
| userdata | user data included during registration |
| connection_id | connection identifier |
| responder | responder for transmitting a result |
| responder_data | responder's context data |
| hdr | the request header |
| data | the request data |
| the | length of the request data |
Definition at line 53 of file protocol_plugin.h.
| typedef void(* plugin_conn_observer)(void *userdata, enum plugin_cb_state state, connection_id conn_id) |
Callback fired when a connection changes state.
| userdata | private user data |
| state | the state being observed |
| conn_id | the ID of the connection that changed the state |
Definition at line 76 of file protocol_plugin.h.
| enum plugin_cb_result |
Plugin callback responses.
| cb_done |
Indicate this command has completed. |
| cb_defer |
Indicate this command requires further processing. |
| cb_hangup |
Disconnect this connection. |
Definition at line 34 of file protocol_plugin.h.
| enum plugin_cb_state |
Type of state change being observed.
| cb_connected |
Indicating a connection has been established. |
| cb_disconnected |
Indicating a connection has been lost. |
Definition at line 64 of file protocol_plugin.h.
| void plugin_get_callback | ( | int8_t | cmd_id, |
| plugin_cb * | current_callback, | ||
| void ** | current_userdata | ||
| ) |
Retrieve the current callback info for the given command.
| cmd_id | the command whose callback info we'd like to retrieve |
| current_callback | the current callback function (may be NULL) |
| current_userdata | the current callback's user data (may be NULL) |
| void plugin_register_callback | ( | uint8_t | cmd_id, |
| plugin_cb | callback, | ||
| void * | userdata | ||
| ) |
Register a callback for the given command.
| cmd_id | the ID of the command to handle |
| callback | the callback to handle this command |
| userdata | user data to be supplied to the callback |
| void plugin_register_conn_observer | ( | void * | userdata, |
| plugin_conn_observer | obs | ||
| ) |
Register a connection observer.
| userdata | observation parameters |
| obs | the observer |
| void plugin_unregister_conn_observer | ( | plugin_conn_observer | obs | ) |
Unregister a connection observer.
| obs | the observer |