aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2013-05-30 10:38:47 +0200
committerAndreas Schneider <asn@cryptomilk.org>2013-07-13 15:00:52 +0200
commit7e7910a1ca35c069864bafc200d7ba593a73a1f2 (patch)
tree945714c8b5496b2d3c389b756f21f580b6e59ecd /include
parent55ddc3932ebd0584013fb63f06a600a6a7517a91 (diff)
downloadlibssh-7e7910a1ca35c069864bafc200d7ba593a73a1f2.tar.gz
libssh-7e7910a1ca35c069864bafc200d7ba593a73a1f2.tar.xz
libssh-7e7910a1ca35c069864bafc200d7ba593a73a1f2.zip
sftp: added useful server APIs
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'include')
-rw-r--r--include/libssh/sftp.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/libssh/sftp.h b/include/libssh/sftp.h
index 462e04c5..5a21a959 100644
--- a/include/libssh/sftp.h
+++ b/include/libssh/sftp.h
@@ -132,6 +132,7 @@ struct sftp_client_message_struct {
int attr_num;
ssh_buffer attrbuf; /* used by sftp_reply_attrs */
ssh_string data; /* can be newpath of rename() */
+ ssh_buffer complete_message; /* complete message in case of retransmission*/
};
struct sftp_request_queue_struct {
@@ -824,8 +825,14 @@ int buffer_add_attributes(ssh_buffer buffer, sftp_attributes attr);
sftp_attributes sftp_parse_attr(sftp_session session, ssh_buffer buf,int expectname);
/* sftpserver.c */
-sftp_client_message sftp_get_client_message(sftp_session sftp);
-void sftp_client_message_free(sftp_client_message msg);
+LIBSSH_API sftp_client_message sftp_get_client_message(sftp_session sftp);
+LIBSSH_API void sftp_client_message_free(sftp_client_message msg);
+LIBSSH_API uint8_t sftp_client_message_get_type(sftp_client_message msg);
+LIBSSH_API const char *sftp_client_message_get_filename(sftp_client_message msg);
+LIBSSH_API void sftp_client_message_set_filename(sftp_client_message msg, const char *newname);
+LIBSSH_API char *sftp_client_message_get_data(sftp_client_message msg);
+LIBSSH_API uint32_t sftp_client_message_get_flags(sftp_client_message msg);
+LIBSSH_API int sftp_send_client_message(sftp_session sftp, sftp_client_message msg);
int sftp_reply_name(sftp_client_message msg, const char *name,
sftp_attributes attr);
int sftp_reply_handle(sftp_client_message msg, ssh_string handle);