aboutsummaryrefslogtreecommitdiffstats
path: root/include/installmgr.h
diff options
context:
space:
mode:
authordanglassey <danglassey>2002-10-11 17:01:59 +0000
committerdanglassey <danglassey>2002-10-11 17:01:59 +0000
commit59e4f0dff82f8c851fce309df6ad3e2674c8918f (patch)
tree4f8fe55422ef48f5beca3c77cffb664193827d20 /include/installmgr.h
parente59732cebdaf9f69f6c33206115df326de1133f3 (diff)
downloadsword-sf-cvs-59e4f0dff82f8c851fce309df6ad3e2674c8918f.tar.gz
catch up on some of the files that have been added to crosswire recently
Diffstat (limited to 'include/installmgr.h')
-rw-r--r--include/installmgr.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/include/installmgr.h b/include/installmgr.h
new file mode 100644
index 0000000..8491fdf
--- /dev/null
+++ b/include/installmgr.h
@@ -0,0 +1,51 @@
+#ifndef INSTALLMGR_H
+#define INSTALLMGR_H
+
+#include <stdio.h>
+#include <vector>
+#include <defs.h>
+
+SWORD_NAMESPACE_START
+
+
+// move this include to cpp once struct ftpparse isn't exposed anymore
+extern "C" {
+#include <ftpparse.h>
+}
+
+
+// initialize/cleanup SYSTEMWIDE library with life of this static.
+class InstallMgr_init {
+public:
+ InstallMgr_init();
+ ~InstallMgr_init();
+};
+
+
+struct FtpFile {
+ const char *filename;
+ FILE *stream;
+};
+
+int my_fwrite(void *buffer, size_t size, size_t nmemb, void *stream);
+int my_fprogress(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow);
+
+//public stuff
+
+
+// probably change to group these ftp functions into some kind of FTPSession
+// class, and open/close functions become c_tor/d_tor.
+
+void *FTPOpenSession();
+void FTPCloseSession(void *session);
+char FTPURLGetFile(void *session, const char *dest, const char *sourceurl, bool passive = true, void (*status_callback)(double dltotal, double dlnow)=0);
+
+// probably change to not expose struct ftpparse. We probably need our
+// own FTPFile class or something that contains things like file name,
+// size, type (dir, file, special). Then change to vector of this class
+// instead of ftpparse
+std::vector<struct ftpparse> FTPURLGetDir(void *session, const char *dirurl, bool passive = true);
+
+SWORD_NAMESPACE_END
+
+#endif