-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmail.h
180 lines (146 loc) · 4.09 KB
/
mail.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
// LoraBBS Version 2.99 Free Edition
// Copyright (C) 1987-98 Marco Maccaferri
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "collect.h"
#include "lora_api.h"
#include "msgbase.h"
#ifndef _MAILER_H
#define _MAILER_H
typedef struct {
USHORT Zone;
USHORT Net;
USHORT Node;
USHORT Point;
} KLUDGES;
class TKludges
{
public:
TKludges (void);
~TKludges (void);
USHORT Sort, KeepPoint;
USHORT Zone, Net, Node, Point;
CHAR Address[32], ShortAddress[32];
USHORT Add (VOID);
USHORT AddString (PSZ pszString);
USHORT Check (PSZ pszName);
VOID Clear (VOID);
VOID Delete (VOID);
USHORT First (VOID);
VOID New (VOID);
USHORT Next (VOID);
private:
class TCollection Data;
};
// ----------------------------------------------------------------------
class TMail
{
public:
TMail (void);
~TMail (void);
USHORT Packets;
CHAR Inbound[128];
ULONG MsgTossed, Duplicate, Bad, NetMail;
ULONG MsgSent;
class TConfig *Cfg;
class TLog *Log;
VOID Export (VOID);
VOID ExportNetMail (VOID);
VOID Import (VOID);
USHORT IsArcmail (VOID);
USHORT IsMail (VOID);
USHORT UnpackArcmail (VOID);
private:
USHORT IsAreasBBS;
CHAR LastTag[64], PktName[32];
CHAR Temp[128], Outbound[128];
struct stat statbuf;
class TMsgBase *Msg;
class PACKET *Packet;
class TMsgData *Data;
class TEchoLink *Forward;
class TKludges *SeenBy, *Path;
class TNodes *Nodes;
class TDupes *Dupes;
USHORT ExportEchoMail (ULONG Number, PSZ pszEchoTag);
ULONG ImportEchoMail (VOID);
USHORT OpenNextPacket (VOID);
USHORT OpenArea (PSZ pszEchoTag);
};
// --------------------------------------------------------------------------
class TRoute
{
public:
TRoute (void);
~TRoute (void);
class TConfig *Cfg;
class TLog *Log;
VOID Run (PSZ pszFile = "route.cfg");
private:
CHAR Line[512], Temp[128], Name[128];
CHAR ArcMailName[128], Outbound[64];
class TPacker *Packer;
VOID MakeArcMailName (PSZ pszAddress, CHAR Flag);
VOID RouteTo (VOID);
VOID SendTo (VOID);
};
// --------------------------------------------------------------------------
class TAreaMgr
{
public:
TAreaMgr (void);
~TAreaMgr (void);
class TConfig *Cfg;
class TLog *Log;
class TMsgBase *Msg;
VOID MsgFooter (VOID);
VOID MsgHeader (VOID);
VOID Process (VOID);
VOID Rescan (PSZ pszEchoTag, PSZ pszAddress);
USHORT SetPacker (PSZ Cmd);
VOID UpdateAreasBBS (VOID);
private:
class TNodes *Nodes;
class TEchoLink *EchoLink;
class TMsgData *Data;
class TCollection Text;
};
// --------------------------------------------------------------------------
class TTic
{
public:
TTic (void);
~TTic (void);
CHAR Inbound[128];
CHAR Area[64], Name[32], Complete[128];
CHAR Password[32];
ULONG Size, Crc;
class TConfig *Cfg;
class TCollection *Description;
class TCollection *SeenBy, *Path;
class TAddress From;
class TAddress Origin;
USHORT Check (VOID);
VOID Delete (VOID);
VOID Hatch (class TAddress *Dest);
VOID Hatch (class TAddress &Dest);
USHORT Import (VOID);
USHORT Open (PSZ pszFile);
USHORT OpenNext (VOID);
private:
CHAR PktName[32];
CHAR CurrentFile[128];
};
#endif