home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 9
/
MEDIASHARE_09.ISO
/
os2
/
bbss10b2.zip
/
API
/
TYPES.PAS
< prev
Wrap
Pascal/Delphi Source File
|
1994-02-28
|
23KB
|
495 lines
{$I B&BSYS.DEF}
Unit Types;
INTERFACE
Type
{ Max arrays }
TByteMax = Array[0..65519] Of Byte;
TWordMax = Array[0..32759] Of Word;
TLongIntMax = Array[0..16379] Of LongInt;
{ Message text buffer }
PMsgBuffer = ^TMsgBuffer;
TMsgBuffer = Array[0..65519] Of Char;
{ Type orginally defined in the DOS unit }
PathStr = String[79];
DirStr = String[67];
{ String types }
Str4 = String[4];
Str6 = String[6];
Str10 = String[10];
Str12 = String[12];
Str16 = String[16];
Str30 = String[30];
Str40 = String[40];
Str46 = String[46];
Str60 = String[60];
{ Date and time types }
DateT = Record
Year : Word;
Month,
Day : Byte;
End;
TimeT = Record
Hour,
Minute : Byte;
End;
DateTimeT = Record
Date : DateT;
Time : TimeT;
End;
{ Password types }
PasswordT = Record
Pwd : Str12;
Date : DateT;
End;
{ System text type }
NewTxtT = Record
Pnt : Array[0..799] Of Record
Pos : Word;
Len : Char;
End;
Text : Array[0..49151] Of Byte;
End;
{ System meny types }
MenuKey = Record
Func : String[25];
MinKey : Byte;
End;
MenusT = Array[0..99] Of MenuKey;
{ Various type used }
AccessT = (ReadMsg,WriteMsg,UploadFile,DownloadFile,
OpenDoor,AreaOp,SysOp);
Access = Set Of AccessT;
AreaT = (AllowresignA);
AreaSet = Set Of AreaT;
GraphT = (IBM,ANSI);
Graph = Set Of GraphT;
ClearScrT = (ClrMenu,ClrMsg,ClrBullet);
ClearScr = Set Of ClearScrT;
ANSIUseT = (ANSMenu,ANSMsg,ANSBullet);
ANSIUseS = Set Of ANSIUseT;
ArcT = (None,ZIP,ARC,LZH,ARJ);
AreaMarkT = Array[1..32767] Of Word;
ConnectT = Record
Speed : Word;
MNP : Boolean;
End;
Days_Typ = (Mon,Tue,Wed,Thu,Fri,Sat,Sun);
Days_Set = Set Of Days_Typ;
EventT = Record
FHour : ShortInt;
FMin : Byte;
LHour : Byte;
LMin : Byte;
Days : Days_Set;
LastDay : Byte;
End;
NodeIDT = Record
Case Word Of
0: (Country, Region, Node : Word);
1: (Buf : Real);
End;
{----------------------------------------------------------------------------
Fileformat for B&BSYS.CFG file - main configuration file
MAIN\B&BMODEM.CFG - node configuration file
MAIN\B&BAREAS.CFG - area configuration file
----------------------------------------------------------------------------}
Type
SysCfgT = Record
Version : String[19]; { 1- 20= 20}
BoardName : Str30; { 21- 51= 31}
__Country1 : Str4; { 52- 56= 5}
__Region1 : Word; { 57- 58= 2}
__Node1 : Word; { 59- 60= 2}
__Board1 : Str10; { 61- 71= 11}
SysOpName : Str30; { 72- 102= 31}
SysOpPassword : PasswordT; { 103- 119= 17}
FileDescrName : Str12; { 120- 132= 13}
BNetReqUser : Str30; { 133- 163= 31}
Location : Str30; { 164- 194= 31}
GiveBackMS : Byte; { 195- 195= 1}
NU1 : Array[196..199] Of Byte;
NewUserTime : Word; { 200- 201= 2}
NewLevel : Byte; { 202 = 1}
NU2 : Byte; { 203 = 1}
ScratchPad : PathStr; { 204- 283= 80}
PKUNZIPPath : PathStr; { 284- 363= 80}
PKZIPPath : PathStr; { 364- 443= 80}
MainPhone : Str16; { 444- 460= 17}
NU3 : Array[461..603] Of Byte;
RAMDisk : DirStr; { 604- 671= 68}
Inactivity : Word; { 672- 673= 2}
NU4 : Array[674..873] Of Byte;
Events : Array[1..10] Of EventT;
{ 874- 933= 60}
NU5 : Array[934..1013] Of Byte;
PkArcPath : PathStr; {1014-1093= 80}
PkXArcPath : PathStr; {1094-1173= 80}
LHAPath : PathStr; {1174-1253= 80}
ARJPath : PathStr; {1254-1333= 80}
NU6 : Array[1334..1413] Of Byte;
CDROM : Array[1..10] Of Char;
{1414-1423= 10}
RFU : Array[1424..4092] Of Byte;
{1424-4092}
RecPos : LongInt; {4093-4096}
End; { Type SYSCfgT }
ModCfgT = Record
ComPort : Integer; { 2/ 2 * 1..4 = COM1..4
5 = use specified dev. }
NU1 : LongInt; { 4/ 6 * }
InitSpeed : Word; { 2/ 8 * Init baudrate }
LockedSpeed : Boolean; { 1/ 9 * Locked speed node? }
ConnectType : (DirectCOM, DirectLOCAL, WaitForRING, WaitForDCD);
InitStr : Str60; { 61/ 71 * Init string }
AnswerStr : Str30; { 31/102 * Answer string }
OnHookStr : Str30; { 31/133 * Onhook string }
OffHookStr : Str30; { 31/164 * Offhook string }
SysOpAvail : Boolean; { 1/165 * SysOp available? }
UseInactivity : Boolean; { 1/166 * Inactivity disconnect here }
RingB4Answer : Byte; { 1/167 * Number of "RING" before
answering }
IODevice : Str16; { 17/184 * IO-Device used if ComPort
is 5 }
RFU : Array[185..252] Of Byte;
{ /252 * RFU }
RecPos : LongInt; { 4/256 * }
End; { Type ModCfgT }
Area_Directory_Record = Record
DirNo : Word; { 2/ 2 * Internal number of
directory }
DirName : Str30; { 31/ 33 * Name of directory }
DiskDir : DirStr; { 68/101 * Assigned disk directory }
Flags : Set Of (ShowUploader, UploadDir);
{ 1/102 * Directory flags }
FirstRec,
NextRec : LongInt; { 8/110 * Internal pointers to .DIR }
RFU : Array[111..124] Of Byte;
RecPos : LongInt; { 4/128 * }
End;
Area_Flags_Type = Set Of (New_User_Member,
Allow_Resign,
Public_Messages,
Private_Messages,
BNet_Member,
NU1,
External_Area);
Area_Config_Record = Record
AreaName : Str30; { 31/ 31 * Name of area showed to user}
AreaCode : Str4; { 5/ 36 * Code used for AREAxxxx files
and bNet }
FileCode : Str4; { 5/ 41 * }
DoorCode : Str4; { 5/ 46 * }
BullCode : Str4; { 5/ 51 * }
NU1 : Word;
ReadOldMsg : Word; { 2/ 55 * }
AreaFlags : Area_Flags_Type; { 1/ 56 * }
HostNodeID : NodeIDT; { 6/ 62 * }
AccessLevel : Array[0..15] Of Access;
{ 15/ 78 * }
RFU : Array[79..124] Of Byte;
{ /124 * RFU }
RecPos : LongInt; { 4/128 * }
End; { Area_Config_Record }
Link_Cfg_Flags = Set Of (ActiveLink,
AcceptRequest,
AcceptResign);
Link_Cfg_Record = Record
LinkFlags : Link_Cfg_Flags; { 1/ 1 * bNet link flags }
LastMsgXfer : LongInt; { 4/ 5 * Last message transfered }
TempMsgXfer : LongInt; { 4/ 9 * Temp message pointer }
RFU : Array[10..28] Of Byte;
RecPos : LongInt; { 4/ 32 * }
End; { Area_Net_Type }
{----------------------------------------------------------------------------
Fileformat for MAIN\LOCUSERS.REG file - The local user database
----------------------------------------------------------------------------}
Type
LocUsers = Record
UserName : Str30; { 31/ 31 * Navnet på lokal bruker }
UserAddress : Str30; { 31/ 62 * Adressen }
UserPostCode : Str30; { 31/ 93 * PostAdressen }
City : Str12; { 13/106 * Bostedsby }
Password : PasswordT; { 17/123 * Passord og seneste dato
for forandring }
HomePhone : Str16; { 17/140 * Telefonnummer privat }
WorkPhone : Str16; { 17/157 * Telefonnummer arbeid }
FirstOn : DateTimeT; { 6/163 * Tidspunkt for registrering }
TimesOn : LongInt; { 4/167 * Antall ganger på }
MsgWritten : Word; { 4/171 * }
MsgRead : Word; { * }
LastOn : DateTimeT; { 6/177 * Siste gang på }
NetNumber : Byte; { 1/178 * Brukere en node nummer ... }
Flags : Set Of (Available,Xpert,Killed,Background,FreeForUse);
{ 1/179 * }
Downloads : Word; { 2/181 * Filer downloadet }
DownloadKB : Word; { 2/183 * KB downloadet }
Uploads : Word; { 2/185 * Filer uploadet }
UploadKB : Word; { 2/187 * KB uploadet }
Protocol : Char; { 1/188 * Overf¢ringsprotokol }
Graphics : Graph; { 1/189 * Graphics }
AccessLevel : Byte; { 1/190 * Xpert modus }
TimeAllowed : Word; { 2/192 * Maks online tid/dag }
TimeLeft : Word; { 2/194 * Tid igjen i dag }
TimeTotal : LongInt; { 4/198 * Tid brukt totalt }
ANSIClear : ClearScr; { 1/199 * Hvor skal skjermen blankes }
ScreenLines : Byte; { 1/200 * Hvor lang er skjermen din? }
Language : Char; { 1/201 * Språkvalg }
ANSIUse : ANSIUseS; { 1/202 * Hvor skal ANSI brukes }
LastScan : DateTimeT; { 6/208 * Last New-files scan }
Packing : ArcT; { 1/209 * Pakkemåte }
Toggles : Set Of (DisplayStatus, ShowAddress);
RFU : Array[211..252] Of Byte;
{ /252 * RFU }
RecPos : LongInt; { 4/256 * }
End; { Type LocUsers }
{----------------------------------------------------------------------------
Fileformat for MAIN\NETUSERS.REG file - bNet user database
----------------------------------------------------------------------------}
Type
NetUsers = Record
UserName : Str30; {31/31 * Name of remote-user (nicecase}
NodeID : NodeIDT; { 6/37 * Address of remote-node }
RFU : Array[38..128] Of Byte;
End; { Type NetUsers }
{----------------------------------------------------------------------------
Fileformat for AREAxxxx.REG files
----------------------------------------------------------------------------}
Type
Area_Flags = Set Of (Member);
AREA_Reg = Record
LastRead : LongInt; {4/ 4 * Last message read in area }
Access : Access; {1/ 5 * Additional access for this area
access should primary be taken
from the B&BAREAS.CFG file }
LastScan : DateTimeT; {6/11 * Last new files scan in area,
this one is saved only for file
areas }
Flags : Area_Flags; {1/12 * Users area flags }
RFU : Array[13..32] Of Byte;
{ /8 * RFU }
End; { Type AREA_Reg }
{----------------------------------------------------------------------------
Filformat for AREAxxxx.MHD filene - filene som innholder headere for
meldingene i AREAxxxx.MTX filene.
----------------------------------------------------------------------------}
Type
MsgSecT = (ActiveM,PublicM,PrivateM,ReadM,FileM,ReqM);
MsgSec = Set Of MsgSecT;
NetRegT = (ToLocal,FromLocal,Echo);
NetReg = Set Of NetRegT;
AREA_Mhd = Record
FromUser : LongInt; { 4/ 4 * Peker til xxxUSERS.REG }
ToUser : LongInt; { 4/ 8 * }
NetUsers : NetReg; { 1/ 9 * }
Security : MsgSec; { 1/ 10 * }
Subject : Str60; {61/ 71 * Emne på meldingen }
MsgPointer : LongInt; { 4/ 75 * Peker til AREAxxxx.MTX }
MsgNumber : LongInt; { 4/ 79 * Nummeret på meldingen }
ReplyTo : LongInt; { 4/ 83 * Denne er svar på xxx }
FirstReply : LongInt; { 4/ 87 * F¢rste svar til denne er }
Lines : Word; { 2/ 89 * Linjer i meldingen }
DateEntered : DateTimeT; { 6/ 95 * Dato meldingen er skrevet }
ONumber : LongInt; { 4/ 99 * Orginal meldingens nummer }
RNumber : LongInt; { 4/103 * Denne er svar til }
NextInThread : LongInt; { 4/107 * Neste melding i denne tråden}
ReceivedFrom : NodeIDT; { 6/113 * }
NU1 : Array[114..118] Of Byte;
MsgBufLen : LongInt; { 4/122 * }
EnteredAt : NodeIDT; { 6/128 * }
RFU : Array[129..252] Of Byte;
{ /252 * RFU }
RecPos : LongInt; { 4/256 * }
End; { Type AREA_Mhd }
{----------------------------------------------------------------------------
Record format for the MAIN\AREA\AREA*.DIR files - Board file databases
----------------------------------------------------------------------------}
Type
AREA_Dir = Record
FileName : String[16]; { 17/ 17 * Name of file shown to user }
Description1 : String[55]; { 56/ 73 * First line of description }
RFU1 : Array[74..78] Of Byte;
Description2 : String[55]; { 56/134 * Second line of description }
RFU2 : Array[135..139] Of Byte;
FTXPointer : LongInt; { 4/143 * Pointer to extended info }
Date : DateTimeT; { 6/149 * Date of install/upload }
Size : LongInt; { 4/153 * Size of file in bytes }
DirNo : LongInt; { 4/157 * DirNo belonging to }
UploadedBy : LongInt; { 4/161 * Uploaded by Ptr to user db }
Downloads : LongInt; { 4/165 * Number of downloads }
CDROM : Byte; { 1/166 * CD-ROM# or 0 for normal }
CDPath : String[60]; { 61/227 * CD-ROM path }
FileFlags : Set Of (KilledFile);
{ 1/228 * File record flags }
TBU : Array[229..252] Of Byte;
RecPos : LongInt; { 4/256 * }
End; { Type AREA_Dir }
{----------------------------------------------------------------------------
Filformat for MAIN\NODESTAT filen - filen som inneholder node-aktivitet
post tilsvarer nodenummer, 0=0, 1=1 osv.
----------------------------------------------------------------------------}
Type
ActivityS = Set Of (WrittenMessage,
ReadMessage,
UploadedFile,
DownloadedFile,
OpenedDoor);
NodeStat = Record
NodeNo : Byte; { 1/ 1 * Node nummer }
Activity : Word; { 0=Down, 1=Event, 2=Wait,
3=Recycling, 4=Picking up call,
5=Loggin in, 6=bNet
10=Active,11=Enter, 12=D/l,
13=Upload,14=OpenD, 15=SysOpChat,
16=BiTran,
500..755=Chatting with node }
ComPort : Integer; { 2/ 5 * 0 = Local, 1/2, 3=Base+Irq }
NU2 : LongInt;
BaudRate : Word; { 2/ 11 * Init bps-rate }
DoneWhat : ActivityS; { 1/ 12 * }
NU1 : Byte; { 1/ 13 * }
LockedSpeed : Boolean; { 1/ 14 * Kj¢res fast hastighet?
dvs. bruk initrate? }
UserName : Str30; { 31/ 45 * Navnet på lokal bruker }
UserAddress : Str30; { 31/ 76 * Adressen }
UserPostCode : Str30; { 31/107 * PostAdressen }
City : Str12; { 13/120 * Bostedsby }
Downloads : Word; { 2/122 * Filer downloadet }
DownloadKB : Word; { 2/124 * KB downloadet }
Uploads : Word; { 2/126 * Filer uploadet }
UploadKB : Word; { 2/128 * KB uploadet }
Protocol : Char; { 1/129 * Overf¢ringsprotokol }
TimeAllowed : Word; { 2/131 * Maks online tid/dag }
TimeLeft : Word; { 2/133 * Tid igjen i dag }
Connected : LongInt; { 4/137 * Innloggingstid }
Graphics : Graph; { 1/138 * Grafikk }
ConnectSpeed : ConnectT; { 3/141 * Connected speed }
Avail : Boolean; { 1/142 * }
RFU : Array[143..256] Of Byte;
{ /256 * RFU }
End; { Type NodeStat }
{----------------------------------------------------------------------------
Filformat for MAIN/NODEMSG.* filene - filene inneholder meldinger mellom
nodene.
----------------------------------------------------------------------------}
Type
NodeMsg = Record
FromNode : Byte; { 1/ 1 * Sendt fra node }
FromUser : LongInt; { 4/ 5 * Sendt av bruker }
ToNode : Byte; { 1/ 6 }
ToUser : LongInt; { 4/ 10 }
Flags : Set Of (nmRead, nmInBuffer);
{ 1/ 11 }
RFU : Array[12..47] Of Byte;
{ / 47 * RFU }
SystemMsg : Byte; { 1/ 48 }
Messy : String[79]; { 80/128 * Melding }
End; { Type NodeMsg }
{----------------------------------------------------------------------------
Fileformat for the MAIN\B&BLINKS.CFG file - Network link config
----------------------------------------------------------------------------}
Type
Net_Config_Record = Record
LinkType : (BnetHost, { 1/ 1 * Remote system is ... }
BnetNode,
BnetHome);
NodeAddr : Str30; {31/ 32 * Remote system ID }
LastBullDate : Word; { 2/ 34 * Last bulletin exchange date }
LinkSysOp : Str30; {31/ 65 * Remote SysOp name }
LinkPassword : Str12; {13/ 78 * Password to access link }
LinkPhone : Str16; {17/ 95 * Link phone number }
LinkSystem : Str30; {31/126 * Remote system name }
NodeID : NodeIDT; { 6/132 * }
RFU : Array[133..254] Of Byte;
LinkLocalPos : Word; { 2/256 * Temp pointer to this record,
only internal use }
End; { Record Net_Config_Record }
{----------------------------------------------------------------------------
Fileformat for the MAIN\B&BPROT.CFG file - The file protocol config file
----------------------------------------------------------------------------}
Type
ProtTypeType = Set Of (Batch, BiDirectional, Auto);
Protocol_Config_Record = Record
Letter : Char; { 1/ 1 * Letter used to select prot. }
Name : Str16; {17/ 18 * Name of protocol }
UploadCommand : Str60; {61/ 79 * Receive command }
DownloadCommand: Str60; {61/140 * Send command }
ProgramPath : Str60; {61/201 * Program path }
OkErrorLevel : ShortInt; { 1/203 * Error level returned if OK }
ProtType : ProtTypeType; { 1/204 * Protocol capabilities }
AutoReceive : Str16; {17/220 * Auto receive string }
RFU : Array[221..253] Of Byte;
ProtLocalPos : Word; { 2/256 * Temp pointer to this record,
only internal use }
End; { Record Protocol_Config_Record }
IMPLEMENTATION
End. { Unit Types }