Document the callback structure correctly.
Этот коммит содержится в:
родитель
0c992ece3b
Коммит
7500b0564c
@ -91,23 +91,34 @@ typedef void (*ssh_log_callback) (ssh_session session, int priority,
|
|||||||
typedef void (*ssh_status_callback) (ssh_session session, float status,
|
typedef void (*ssh_status_callback) (ssh_session session, float status,
|
||||||
void *userdata);
|
void *userdata);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The structure to replace libssh functions with appropriate callbacks.
|
||||||
|
*/
|
||||||
struct ssh_callbacks_struct {
|
struct ssh_callbacks_struct {
|
||||||
/** size of this structure. internal, shoud be set with ssh_callbacks_init()*/
|
/** DON'T SET THIS use ssh_callbacks_init() instead. */
|
||||||
size_t size;
|
size_t size;
|
||||||
/** User-provided data. User is free to set anything he wants here */
|
/**
|
||||||
void *userdata;
|
* User-provided data. User is free to set anything he wants here
|
||||||
/** this functions will be called if e.g. a keyphrase is needed. */
|
*/
|
||||||
ssh_auth_callback auth_function;
|
void *userdata;
|
||||||
/** this function will be called each time a loggable event happens. */
|
/**
|
||||||
ssh_log_callback log_function;
|
* This functions will be called if e.g. a keyphrase is needed.
|
||||||
/** this function gets called during connection time to indicate the percentage
|
*/
|
||||||
* of connection steps completed.
|
ssh_auth_callback auth_function;
|
||||||
*/
|
/**
|
||||||
|
* This function will be called each time a loggable event happens.
|
||||||
|
*/
|
||||||
|
ssh_log_callback log_function;
|
||||||
|
/**
|
||||||
|
* This function gets called during connection time to indicate the
|
||||||
|
* percentage of connection steps completed.
|
||||||
|
*/
|
||||||
void (*connect_status_function)(void *userdata, float status);
|
void (*connect_status_function)(void *userdata, float status);
|
||||||
};
|
};
|
||||||
typedef struct ssh_callbacks_struct *ssh_callbacks;
|
typedef struct ssh_callbacks_struct *ssh_callbacks;
|
||||||
|
|
||||||
/** These are the callbacks exported by the socket structure
|
/**
|
||||||
|
* These are the callbacks exported by the socket structure
|
||||||
* They are called by the socket module when a socket event appears
|
* They are called by the socket module when a socket event appears
|
||||||
*/
|
*/
|
||||||
struct ssh_socket_callbacks_struct {
|
struct ssh_socket_callbacks_struct {
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user