[sword-cvs] sword/include installmgr.h,1.7,1.8 utf8transliterator.h,1.18,1.19
sword@www.crosswire.org
sword@www.crosswire.org
Sun, 6 Jul 2003 17:26:01 -0700
- Previous message: [sword-cvs] sword/src/modules/filters swoptfilter.cpp,1.1,1.2
- Next message: [sword-cvs] sword/apps/windoze/CBuilder5/InstallMgr MainFrm.cpp,1.19,1.20 MainFrm.h,1.8,1.9 StatusFrm.cpp,1.16,1.17 StatusFrm.h,1.10,1.11
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /usr/local/cvsroot/sword/include
In directory www:/tmp/cvs-serv20766/include
Modified Files:
installmgr.h utf8transliterator.h
Log Message:
More install code into engine
Index: installmgr.h
===================================================================
RCS file: /usr/local/cvsroot/sword/include/installmgr.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** installmgr.h 27 Jun 2003 02:21:05 -0000 1.7
--- installmgr.h 7 Jul 2003 00:25:59 -0000 1.8
***************
*** 6,9 ****
--- 6,11 ----
#include <defs.h>
#include <swbuf.h>
+ #include <swconfig.h>
+ #include <map>
SWORD_NAMESPACE_START
***************
*** 42,72 ****
SWBuf directory;
SWBuf caption;
SWMgr *mgr;
};
! 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);
! int removeModule(SWMgr *manager, const char *modName);
! int installModule(const char *fromLocation, const char *modName, InstallSource *is);
! int copyFileToSWORDInstall(SWMgr *manager, const char *sourceDir, const char *fName);
--- 44,86 ----
SWBuf directory;
SWBuf caption;
+ SWBuf localShadow;
SWMgr *mgr;
+ void *userData;
};
+ typedef std::map < SWBuf, InstallSource * >InstallSourceMap;
+ class InstallMgr {
+ protected:
+ char *privatePath;
+ // probably change to group these ftp functions into some kind of FTPSession
+ // class, and open/close functions become c_tor/d_tor.
+ public:
+ SWConfig *installConf;
+ InstallSourceMap sources;
+ void *FTPOpenSession();
+ void FTPCloseSession(void *session);
+ char FTPURLGetFile(void *session, const char *dest, const char *sourceurl);
! // 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);
! public:
! InstallMgr(const char *privatePath = "./");
! virtual ~InstallMgr();
! bool passive;
! bool terminate;
! virtual int removeModule(SWMgr *manager, const char *modName);
! virtual int FTPCopy(InstallSource *is, const char *src, const char *dest, bool dirTransfer = false, const char *suffix = "");
! virtual int installModule(SWMgr *destMgr, const char *fromLocation, const char *modName, InstallSource *is = 0);
! virtual int copyFileToSWORDInstall(SWMgr *manager, const char *sourceDir, const char *fName);
! virtual void statusUpdate(double dltotal, double dlnow);
! virtual void preDownloadStatus(long totalBytes, long completedBytes, const char *message);
! };
Index: utf8transliterator.h
===================================================================
RCS file: /usr/local/cvsroot/sword/include/utf8transliterator.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** utf8transliterator.h 20 Feb 2003 07:25:20 -0000 1.18
--- utf8transliterator.h 7 Jul 2003 00:25:59 -0000 1.19
***************
*** 71,75 ****
static const char SW_RB_RULE[];
static const char SW_RESDATA[];
! OptionsList options;
static SWTransMap transMap;
UErrorCode utf8status;
--- 71,75 ----
static const char SW_RB_RULE[];
static const char SW_RESDATA[];
! StringList options;
static SWTransMap transMap;
UErrorCode utf8status;
***************
*** 87,91 ****
virtual void setOptionValue(const char *ival);
virtual const char *getOptionValue();
! virtual OptionsList getOptionValues() { return options; }
};
--- 87,91 ----
virtual void setOptionValue(const char *ival);
virtual const char *getOptionValue();
! virtual StringList getOptionValues() { return options; }
};
- Previous message: [sword-cvs] sword/src/modules/filters swoptfilter.cpp,1.1,1.2
- Next message: [sword-cvs] sword/apps/windoze/CBuilder5/InstallMgr MainFrm.cpp,1.19,1.20 MainFrm.h,1.8,1.9 StatusFrm.cpp,1.16,1.17 StatusFrm.h,1.10,1.11
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]