diff --git a/include/libssh/callbacks.h b/include/libssh/callbacks.h index 4bdeb8f5..941478b4 100644 --- a/include/libssh/callbacks.h +++ b/include/libssh/callbacks.h @@ -113,6 +113,17 @@ typedef void (*ssh_status_callback) (ssh_session session, float status, typedef void (*ssh_global_request_callback) (ssh_session session, ssh_message message, void *userdata); +/** + * @brief SSH connect status callback. These are functions that report the + * status of the connection i,e. a function indicating the completed percentage + * of the connection + * steps. + * @param userdata Userdata to be passed to the callback function. + * @param status Percentage of connection status, going from 0.0 to 1.0 + * once connection is done. + */ +typedef void (*ssh_connect_status_callback)(void *userdata, float status); + /** * @brief Handles an SSH new channel open X11 request. This happens when the server * sends back an X11 connection attempt. This is a client-side API @@ -181,7 +192,7 @@ struct ssh_callbacks_struct { * This function gets called during connection time to indicate the * percentage of connection steps completed. */ - void (*connect_status_function)(void *userdata, float status); + ssh_connect_status_callback connect_status_function; /** * This function will be called each time a global request is received. */