Fork of Smoothie to port to mbed non-LPC targets.

Dependencies:   mbed

Fork of Smoothie by Stéphane Cachat

Revision:
2:1df0b61d3b5a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libs/Network/uip/sftp/sftpd.h	Fri Feb 28 18:52:52 2014 -0800
@@ -0,0 +1,39 @@
+#ifndef __SFTPD_H__
+#define __SFTPD_H__
+
+/*
+ * Implement RFC913  Simple File Transfer
+ */
+
+
+#include <stdio.h>
+extern "C" {
+#include "psock.h"
+}
+
+class Sftpd
+{
+public:
+    Sftpd();
+    virtual ~Sftpd();
+
+    void appcall(void);
+    void init(void);
+
+private:
+    FILE *fd;
+    enum STATES { STATE_NORMAL, STATE_CONNECTED, STATE_GET_LENGTH, STATE_DOWNLOAD, STATE_CLOSE };
+    STATES state;
+    int acked();
+    int handle_command();
+    int handle_download();
+    int senddata();
+
+    struct psock sin;
+    char buf[80];
+    const char *outbuf;
+    unsigned int filesize;
+    char *filename;
+};
+
+#endif /* __sftpd_H__ */