Scope of recent changes.
This commit is contained in:
@@ -81,7 +81,7 @@ public:
|
||||
int areaid() const { return cfg.areaid; }
|
||||
int groupid() const { return cfg.groupid; }
|
||||
uint type() const { return cfg.type; }
|
||||
uint msgbase() const { return cfg.msgbase; }
|
||||
const char *basetype() const { return cfg.basetype; }
|
||||
uint board() const { return cfg.board; }
|
||||
const ftn_addr& aka() const { return cfg.aka; }
|
||||
int originno() const { return cfg.originno; }
|
||||
@@ -103,7 +103,7 @@ public:
|
||||
void set_areaid(int a) { cfg.areaid = a; }
|
||||
void set_groupid(int g) { cfg.groupid = g; }
|
||||
void set_type(uint t) { cfg.type = t; }
|
||||
void set_msgbase(uint m) { cfg.msgbase = m; }
|
||||
void set_basetype(const char *m) { cfg.basetype = m; }
|
||||
void set_board(uint b) { cfg.board = b; }
|
||||
void set_aka(ftn_addr& a) { cfg.aka = a; }
|
||||
void set_originno(int o) { cfg.originno = o; }
|
||||
@@ -125,19 +125,17 @@ public:
|
||||
// ----------------------------------------------------------------
|
||||
// Determine msgbase format
|
||||
|
||||
int isfts1() const;
|
||||
int isopus() const;
|
||||
int isezycom() const;
|
||||
int isfido() const;
|
||||
int isgoldbase() const;
|
||||
int ishudson() const;
|
||||
int isjam() const;
|
||||
int ispcboard() const;
|
||||
int issquish() const;
|
||||
int issmb() const;
|
||||
int iswildcat() const;
|
||||
int isadeptxbbs() const;
|
||||
int isseparator() const;
|
||||
bool isseparator() const;
|
||||
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
// Determine area features
|
||||
|
||||
virtual bool issoftdelete() const { return false; }
|
||||
virtual bool havearrivedstamp() const { return true; }
|
||||
virtual bool havereceivedstamp() const { return true; }
|
||||
virtual bool requirehardterm() const { return false; }
|
||||
virtual bool requiresoftterm() const { return false; }
|
||||
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
@@ -198,19 +196,7 @@ protected:
|
||||
// ------------------------------------------------------------------
|
||||
// Inline implementations
|
||||
|
||||
inline int gmo_area::isfts1() const { return cfg.isfts1(); }
|
||||
inline int gmo_area::isopus() const { return cfg.isopus(); }
|
||||
inline int gmo_area::isezycom() const { return cfg.isezycom(); }
|
||||
inline int gmo_area::isfido() const { return cfg.isfido(); }
|
||||
inline int gmo_area::isgoldbase() const { return cfg.isgoldbase(); }
|
||||
inline int gmo_area::ishudson() const { return cfg.ishudson(); }
|
||||
inline int gmo_area::isjam() const { return cfg.isjam(); }
|
||||
inline int gmo_area::ispcboard() const { return cfg.ispcboard(); }
|
||||
inline int gmo_area::issquish() const { return cfg.issquish(); }
|
||||
inline int gmo_area::issmb() const { return cfg.issmb(); }
|
||||
inline int gmo_area::iswildcat() const { return cfg.iswildcat(); }
|
||||
inline int gmo_area::isadeptxbbs() const { return cfg.isadeptxbbs(); }
|
||||
inline int gmo_area::isseparator() const { return cfg.isseparator(); }
|
||||
inline bool gmo_area::isseparator() const { return cfg.isseparator(); }
|
||||
|
||||
inline int gmo_area::isnet() const { return cfg.isnet(); }
|
||||
inline int gmo_area::isecho() const { return cfg.isecho(); }
|
||||
|
@@ -209,6 +209,9 @@ public:
|
||||
EzycomArea() { wide = NULL; data = NULL; }
|
||||
virtual ~EzycomArea() {}
|
||||
|
||||
virtual bool havereceivedstamp() const { return false; }
|
||||
virtual bool requiresoftterm() const { return true; }
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
// Messagebase member functions
|
||||
|
||||
|
@@ -139,6 +139,8 @@ protected:
|
||||
FidoWide* wide;
|
||||
FidoData* data;
|
||||
|
||||
inline bool isopus() const { return streql(cfg.basetype, "OPUS"); }
|
||||
|
||||
void data_open();
|
||||
void data_close();
|
||||
|
||||
@@ -154,6 +156,9 @@ public:
|
||||
FidoArea() { wide = NULL; data = NULL; }
|
||||
virtual ~FidoArea() {}
|
||||
|
||||
virtual bool havearrivedstamp() const { return isopus() ? true : false; }
|
||||
virtual bool havereceivedstamp() const { return false; }
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
// Messagebase member functions
|
||||
|
||||
|
@@ -65,29 +65,27 @@ int FidoArea::load_message(int __mode, gmsg* __msg, FidoHdr& __hdr) {
|
||||
strxcpy(__msg->to, __hdr.to, 36);
|
||||
strxcpy(__msg->re, __hdr.re, 72);
|
||||
|
||||
__msg->orig.zone = __msg->oorig.zone = __hdr.ftsc.origzone;
|
||||
__msg->orig.net = __msg->oorig.net = __hdr.orignet;
|
||||
__msg->orig.node = __msg->oorig.node = __hdr.orignode;
|
||||
__msg->orig.point = __msg->oorig.point = __hdr.ftsc.origpoint;
|
||||
|
||||
__msg->dest.zone = __msg->odest.zone = __hdr.ftsc.destzone;
|
||||
__msg->dest.net = __msg->odest.net = __hdr.destnet;
|
||||
__msg->dest.node = __msg->odest.node = __hdr.destnode;
|
||||
__msg->dest.point = __msg->odest.point = __hdr.ftsc.destpoint;
|
||||
|
||||
if(isopus()) {
|
||||
__msg->orig.zone = __msg->oorig.zone =
|
||||
__msg->dest.zone = __msg->odest.zone =
|
||||
__msg->orig.point = __msg->oorig.point =
|
||||
__msg->dest.point = __msg->odest.point = 0;
|
||||
}
|
||||
|
||||
// Convert datetime
|
||||
if(isopus()) {
|
||||
// Convert datetime
|
||||
__msg->written = FTimeToTime(&__hdr.opus.written);
|
||||
__msg->arrived = FTimeToTime(&__hdr.opus.arrived);
|
||||
}
|
||||
else {
|
||||
__msg->orig.zone = __msg->oorig.zone = __hdr.ftsc.origzone;
|
||||
__msg->orig.net = __msg->oorig.net = __hdr.orignet;
|
||||
__msg->orig.node = __msg->oorig.node = __hdr.orignode;
|
||||
__msg->orig.point = __msg->oorig.point = __hdr.ftsc.origpoint;
|
||||
|
||||
__msg->dest.zone = __msg->odest.zone = __hdr.ftsc.destzone;
|
||||
__msg->dest.net = __msg->odest.net = __hdr.destnet;
|
||||
__msg->dest.node = __msg->odest.node = __hdr.destnode;
|
||||
__msg->dest.point = __msg->odest.point = __hdr.ftsc.destpoint;
|
||||
|
||||
__msg->written = __msg->arrived = 0;
|
||||
}
|
||||
__msg->written = __msg->written ? __msg->written : FidoTimeToUnix(__hdr.datetime);
|
||||
|
@@ -292,6 +292,9 @@ public:
|
||||
_HudsArea() { wide = NULL; }
|
||||
virtual ~_HudsArea() {}
|
||||
|
||||
virtual bool havearrivedstamp() const { return false; }
|
||||
virtual bool havereceivedstamp() const { return false; }
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
// Messagebase member functions
|
||||
|
||||
|
@@ -214,7 +214,7 @@ struct JamSubField {
|
||||
struct JamIndex {
|
||||
|
||||
dword usercrc; // CRC-32 of destination username
|
||||
ulong hdroffset; // Offset of header in .JHR file
|
||||
ulong hdroffset; // Offset of header in .JHR file
|
||||
};
|
||||
|
||||
|
||||
@@ -302,6 +302,8 @@ public:
|
||||
JamArea() { wide = NULL; data = NULL; just_scanning = false; }
|
||||
virtual ~JamArea() {}
|
||||
|
||||
virtual bool issoftdelete() const { return (wide != NULL) ? not wide->harddelete : true; }
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
// Messagebase member functions
|
||||
|
||||
|
@@ -190,6 +190,10 @@ public:
|
||||
PcbArea() { wide = NULL; data = NULL; just_scanning = false; }
|
||||
virtual ~PcbArea() {}
|
||||
|
||||
virtual bool havearrivedstamp() const { return false; }
|
||||
virtual bool havereceivedstamp() const { return false; }
|
||||
virtual bool requirehardterm() const { return true; }
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
// Messagebase member functions
|
||||
|
||||
|
@@ -35,9 +35,6 @@
|
||||
void EzycomInit(const char* msgbasepath, const char* userbasepath, int userno);
|
||||
void EzycomExit();
|
||||
|
||||
void EzycomWideOpen();
|
||||
void EzycomWideClose();
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
@@ -45,9 +42,6 @@ void FidoInit(const char* fidolastread, int fidohwmarks, int fidonullfix, int fi
|
||||
void FidoExit();
|
||||
void FidoRenumberProgress(const char* s);
|
||||
|
||||
void FidoWideOpen();
|
||||
void FidoWideClose();
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
@@ -75,9 +69,6 @@ void HGWarnRebuild();
|
||||
void JamInit(const char* jampath, int harddelete, int smapihw);
|
||||
void JamExit();
|
||||
|
||||
void JamWideOpen();
|
||||
void JamWideClose();
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
@@ -106,18 +97,12 @@ void SMBExit();
|
||||
void WCatInit(int userno);
|
||||
void WCatExit();
|
||||
|
||||
void WCatWideOpen();
|
||||
void WCatWideClose();
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
void XbbsInit(const char* path, int userno);
|
||||
void XbbsExit();
|
||||
|
||||
void XbbsWideOpen();
|
||||
void XbbsWideClose();
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
|
@@ -54,6 +54,8 @@ public:
|
||||
SMBArea() { data = NULL; }
|
||||
virtual ~SMBArea() {}
|
||||
|
||||
virtual bool issoftdelete() const { return true; }
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
// Messagebase member functions
|
||||
|
||||
|
@@ -615,17 +615,17 @@ void SMBArea::save_hdr(int mode, gmsg* msg)
|
||||
smb_hfield(&smsg, SENDER, strlen(msg->by), msg->by);
|
||||
strcpy(buf, msg->by);
|
||||
strlwr(buf);
|
||||
smsg.idx.from = strCrc16(buf);
|
||||
smsg.idx.from = strCrc16c(buf);
|
||||
|
||||
smb_hfield(&smsg, RECIPIENT, strlen(msg->to), msg->to);
|
||||
strcpy(buf, msg->to);
|
||||
strlwr(buf);
|
||||
smsg.idx.to = strCrc16(buf);
|
||||
smsg.idx.to = strCrc16c(buf);
|
||||
|
||||
smb_hfield(&smsg, SUBJECT, strlen(msg->re), msg->re);
|
||||
strcpy(buf, msg->re);
|
||||
strlwr(buf);
|
||||
smsg.idx.subj = strCrc16(buf);
|
||||
smsg.idx.subj = strCrc16c(buf);
|
||||
|
||||
// calculate maximum possible size of sbody/stail
|
||||
for(l = 0, fbuf = msg->txt; *fbuf != NUL; l++, fbuf++)
|
||||
|
@@ -195,6 +195,9 @@ public:
|
||||
WCatArea() { wide = NULL; data = NULL; }
|
||||
virtual ~WCatArea() {}
|
||||
|
||||
virtual bool issoftdelete() const { return true; }
|
||||
virtual bool requirehardterm() const { return true; }
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
// Messagebase member functions
|
||||
|
||||
|
@@ -52,30 +52,6 @@ void XbbsArea::refresh() {
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
void XbbsWideOpen() {
|
||||
|
||||
GFTRK("XbbsWideOpen");
|
||||
|
||||
// Open the personal mail index
|
||||
|
||||
GFTRK(NULL);
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
void XbbsWideClose() {
|
||||
|
||||
GFTRK("XbbsWideClose");
|
||||
|
||||
// Close the personal mail index
|
||||
|
||||
GFTRK(NULL);
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
void XbbsArea::raw_scan(int __keep_index, int __scanpm) {
|
||||
|
Reference in New Issue
Block a user