Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   Related Pages  

installmgr.h

00001 #ifndef INSTALLMGR_H
00002 #define INSTALLMGR_H
00003 
00004 #include <stdio.h>
00005 #include <vector>
00006 #include <defs.h>
00007 
00008 SWORD_NAMESPACE_START
00009 
00010 
00011 // move this include to cpp once struct ftpparse isn't exposed anymore
00012 extern "C" {
00013 #include <ftpparse.h>
00014 }
00015 
00016 
00017 // initialize/cleanup SYSTEMWIDE library with life of this static.
00018 class InstallMgr_init {
00019 public:
00020         InstallMgr_init();
00021         ~InstallMgr_init();
00022 };
00023 
00024 
00025 struct FtpFile {
00026   const char *filename;
00027   FILE *stream;
00028 };
00029 
00030 int my_fwrite(void *buffer, size_t size, size_t nmemb, void *stream);
00031 int my_fprogress(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow);
00032 
00033 //public stuff
00034 
00035 
00036 // probably change to group these ftp functions into some kind of FTPSession
00037 // class, and open/close functions become c_tor/d_tor.
00038 
00039 void *FTPOpenSession();
00040 void FTPCloseSession(void *session);
00041 char FTPURLGetFile(void *session, const char *dest, const char *sourceurl, bool passive = true, void (*status_callback)(double dltotal, double dlnow)=0);
00042 
00043 // probably change to not expose struct ftpparse.  We probably need our
00044 // own FTPFile class or something that contains things like file name,
00045 // size, type (dir, file, special).  Then change to vector of this class
00046 // instead of ftpparse
00047 std::vector<struct ftpparse> FTPURLGetDir(void *session, const char *dirurl, bool passive = true);
00048 
00049 SWORD_NAMESPACE_END
00050 
00051 #endif

Generated on Fri Feb 28 22:01:38 2003 for The Sword Project by doxygen1.3-rc3