diff options
author | Andreas Schneider <mail@cynapses.org> | 2009-07-28 14:13:22 +0200 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2009-07-28 14:13:22 +0200 |
commit | b4111c5c187cf9212eba0ae459edb630dbddb656 (patch) | |
tree | 0a8351dffea74df590633c85bc76fde4c0f4c6b0 /include/libssh/sftp.h | |
parent | b9b7174d858faa070e66db9b7710c384756f90fc (diff) | |
download | libssh-b4111c5c187cf9212eba0ae459edb630dbddb656.tar.gz libssh-b4111c5c187cf9212eba0ae459edb630dbddb656.tar.xz libssh-b4111c5c187cf9212eba0ae459edb630dbddb656.zip |
Add functions to get the extension count, name and data.
Diffstat (limited to 'include/libssh/sftp.h')
-rw-r--r-- | include/libssh/sftp.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/include/libssh/sftp.h b/include/libssh/sftp.h index 4b23c1e4..a41681b8 100644 --- a/include/libssh/sftp.h +++ b/include/libssh/sftp.h @@ -202,6 +202,40 @@ int sftp_init(SFTP_SESSION *sftp); int sftp_get_error(SFTP_SESSION *sftp); /** + * @brief Get the count of extensions provided by the server. + * + * @param sftp The sftp session to use. + * + * @return The count of extensions provided by the server, 0 on error or + * not available. + */ +unsigned int sftp_extensions_get_count(SFTP_SESSION *sftp); + +/** + * @brief Get the name of the extension provided by the server. + * + * @param sftp The sftp session to use. + * + * @param index The index number of the extension name you want. + * + * @return The name of the extension. + */ +const char *sftp_extensions_get_name(SFTP_SESSION *sftp, unsigned int index); + +/** + * @brief Get the data of the extension provided by the server. + * + * This is normally the version number of the extension. + * + * @param sftp The sftp session to use. + * + * @param index The index number of the extension data you want. + * + * @return The data of the extension. + */ +const char *sftp_extensions_get_data(SFTP_SESSION *sftp, unsigned int index); + +/** * @brief Open a directory used to obtain directory entries. * * @param session The sftp session handle to open the directory. |