15
// move this include to cpp once struct ftpparse isn't exposed anymore
21
// initialize/cleanup SYSTEMWIDE library with life of this static.
22
class InstallMgr_init {
38
InstallSource(const char *type, const char *confEnt = 0);
39
virtual ~InstallSource();
41
return caption +"|" + source + "|" + directory;
53
typedef std::map < SWBuf, InstallSource * >InstallSourceMap;
59
// probably change to group these ftp functions into some kind of FTPSession
60
// class, and open/close functions become c_tor/d_tor.
62
SWConfig *installConf;
63
InstallSourceMap sources;
64
void *FTPOpenSession();
65
void FTPCloseSession(void *session);
66
char FTPURLGetFile(void *session, const char *dest, const char *sourceurl);
68
// probably change to not expose struct ftpparse. We probably need our
69
// own FTPFile class or something that contains things like file name,
70
// size, type (dir, file, special). Then change to vector of this class
71
// instead of ftpparse
72
std::vector<struct ftpparse> FTPURLGetDir(void *session, const char *dirurl);
76
InstallMgr(const char *privatePath = "./");
77
virtual ~InstallMgr();
80
virtual int removeModule(SWMgr *manager, const char *modName);
81
virtual int FTPCopy(InstallSource *is, const char *src, const char *dest, bool dirTransfer = false, const char *suffix = "");
82
virtual int installModule(SWMgr *destMgr, const char *fromLocation, const char *modName, InstallSource *is = 0);
83
virtual int copyFileToSWORDInstall(SWMgr *manager, const char *sourceDir, const char *fName);
84
virtual void refreshRemoteSource(InstallSource *is);
85
virtual void statusUpdate(double dltotal, double dlnow);
86
virtual void preDownloadStatus(long totalBytes, long completedBytes, const char *message);
87
virtual bool getCipherCode(const char *modName, SWConfig *config);