home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.wwiv.com
/
ftp.wwiv.com.zip
/
ftp.wwiv.com
/
pub
/
MISC
/
PBAPI10.ZIP
/
APIDOCS.ZIP
/
MCONF.DOC
< prev
next >
Wrap
Text File
|
1998-02-21
|
14KB
|
358 lines
Author....... : Gary Price
Copyrighted by: Freejack's Software 1997-98
MCONF_DAT API for TriBBS v10.x/11.x written in PowerBasic v3.5
---------------------------------------------------------------------------
The MCONF_DAT unit is used to manipulate data in the MCONF.DAT data file
found in node 1's MWORK directory. The MCONF_DAT unit is declared in
PBAPI10.INC as follows:
NetworkBit.bit1 & NetworkBit.bit2 BIT Assignments:
TriBBS allows a sysop to add up to 16 different Networks.
Depending on the bit position 0 or 1, means that a certain Message
Conference belongs to a certain network.
NetworkBit.bit1 BIT Assignment:
0 = Points to network name defined in Network.dat 0 = No, 1 = Yes
1 = Points to network name defined in Network.dat 0 = No, 1 = Yes
2 = Points to network name defined in Network.dat 0 = No, 1 = Yes
3 = Points to network name defined in Network.dat 0 = No, 1 = Yes
4 = Points to network name defined in Network.dat 0 = No, 1 = Yes
5 = Points to network name defined in Network.dat 0 = No, 1 = Yes
6 = Points to network name defined in Network.dat 0 = No, 1 = Yes
7 = Points to network name defined in Network.dat 0 = No, 1 = Yes
NetworkBit.bit2 BIT Assignment:
0 = Points to network name defined in Network.dat 0 = No, 1 = Yes
1 = Points to network name defined in Network.dat 0 = No, 1 = Yes
2 = Points to network name defined in Network.dat 0 = No, 1 = Yes
3 = Points to network name defined in Network.dat 0 = No, 1 = Yes
4 = Points to network name defined in Network.dat 0 = No, 1 = Yes
5 = Points to network name defined in Network.dat 0 = No, 1 = Yes
6 = Points to network name defined in Network.dat 0 = No, 1 = Yes
7 = Points to network name defined in Network.dat 0 = No, 1 = Yes
Sub Type Structure for Network Flag BitFields
TYPE NetworkBit
bit1 AS BYTE
bit2 AS BYTE
END TYPE
---------------------------------------------------------------------------
Mconf.dat BitFields Breakdown
MconfBit.bit1 BIT Assignment
0 = NetworkedConferenceFlag 0 = No, 1 = Yes
1 = PrivateConferenceFlag 0 = No, 1 = Yes
2 = FidoStyleNetMailFlag 0 = No, 1 = Yes
3 = AliasConferenceFlag 0 = No, 1 = Yes
4 = UserDeleteFlag 0 = Not Allowed, 1 = Allowed
5 = TriPackBackupFlag 0 = No, 1 = Yes
6 = DisablePrivateMessagesFlag 0 = Yes, 1 = No
7 = DisablePublicMessagesFlag 0 = Yes, 1 = No
NOTE!
MconfBit.bit6 & MconfBit.bit7 both can be set to Yes, but only one may be
set to No, with the other set to Yes.
MconfBit.bit2 to MconfBit.bit10 - All bits are set to 0 (Reserved)
Sub Type Structure for 10 byte BitFields
TYPE MconfBit
bit1 AS BYTE
bit2 AS BYTE
bit3 AS BYTE
bit4 AS BYTE
bit5 AS BYTE
bit6 AS BYTE
bit7 AS BYTE
bit8 AS BYTE
bit9 AS BYTE
bit10 AS BYTE
END TYPE
---------------------------------------------------------------------------
File Name: "MCONF.DAT"
TYPE MCONF
ConfName AS STRING * 41
ReadSecurityLevel AS INTEGER
PostSecurityLevel AS INTEGER
TriPackNumberOfDaysToSave AS INTEGER
HighestMessageNumber AS LONG
NetworkBitFields AS NetworkBit
MconfBitFields AS MconfBit
ReservedDataArea AS STRING * 961
END TYPE
DIM MconfBit AS MconfBit
DIM MCONF AS SHARED MCONF
DIM mc AS SHARED MCONF PTR
mc = VARPTR32(MCONF)
LSET MCONF = MCONF
---------------------------------------------------------------------------
FUNCTION's below are from the MCONF.PBU Unit and DECLAREd in PBAPI10.INC.
FUNCTION MCONF_DAT_OPEN()
FUNCTION MCONF_DAT_CLOSE()
FUNCTION MCONF_DAT_READ(n AS INTEGER)
FUNCTION MCONF_DAT_WRITE(n AS INTEGER)
FUNCTION MCONF_DAT_Length() AS LONG
FUNCTION MCONF_DAT_OpenRead(n AS INTEGER)
FUNCTION MCONF_DAT_WriteClose(n AS INTEGER)
FUNCTION MCONF_DAT_OpenReadClose(n AS INTEGER)
FUNCTION MCONF_DAT_OpenWriteClose(n AS INTEGER)
FUNCTION MCONF_DAT_Clearit(n AS INTEGER)
FUNCTION MCONF_DAT_GetMCN() AS STRING
FUNCTION MCONF_DAT_PutMCN(s AS STRING)
FUNCTION MCONF_DAT_GetNWCN() AS STRING
FUNCTION MCONF_DAT_GetRSL() AS INTEGER
FUNCTION MCONF_DAT_PutRSL(n AS INTEGER)
FUNCTION MCONF_DAT_GetPSL() AS INTEGER
FUNCTION MCONF_DAT_PutPSL(n AS INTEGER)
FUNCTION MCONF_DAT_GetTPNODTS() AS INTEGER
FUNCTION MCONF_DAT_PutTPNODTS(n AS INTEGER)
FUNCTION MCONF_DAT_GetHMN() AS LONG
FUNCTION MCONF_DAT_PutHMN(n AS LONG)
FUNCTION MCONF_DAT_GetNWF(nw AS INTEGER) AS INTEGER
FUNCTION MCONF_DAT_PutNWF(nw AS INTEGER, n AS INTEGER)
FUNCTION MCONF_DAT_GetNWCF() AS INTEGER
FUNCTION MCONF_DAT_PutNWCF(n AS INTEGER)
FUNCTION MCONF_DAT_GetPCF() AS INTEGER
FUNCTION MCONF_DAT_PutPCF(n AS INTEGER)
FUNCTION MCONF_DAT_GetFSNM() AS INTEGER
FUNCTION MCONF_DAT_PutFSNM(n AS INTEGER)
FUNCTION MCONF_DAT_GetACF() AS INTEGER
FUNCTION MCONF_DAT_PutACF(n AS INTEGER)
FUNCTION MCONF_DAT_GetUDF() AS INTEGER
FUNCTION MCONF_DAT_PutUDF(n AS INTEGER)
FUNCTION MCONF_DAT_GetTPBF() AS INTEGER
FUNCTION MCONF_DAT_PutTPBF(n AS INTEGER)
FUNCTION MCONF_DAT_GetDPriM() AS INTEGER
FUNCTION MCONF_DAT_PutDPriM(n AS INTEGER)
FUNCTION MCONF_DAT_GetDPubM() AS INTEGER
FUNCTION MCONF_DAT_PutDPubM(n AS INTEGER)
---------------------------------------------------------------------------
IMPORTANT: TBNode1sMainDirectory must be set to node 1's main directory
before calling to any Function with the "OPEN" command in it.
MCONF_DAT_Open
The MCONF_DAT_Open Function opens the MCONF.DAT data file in node 1's MWORK
directory.
MCONF_DAT_Close
The MCONF_DAT_Close Function closes the MCONF.DAT data file in node 1's MWORK
directory.
MCONF_DAT_Read(n AS INTEGER)
The MCONF_DAT_Read Function reads the record for message conference "n" into
memory.
MCONF_DAT_Write(n AS INTEGER)
The MCONF_DAT_Write Function updates the record for message conference "n"
from memory.
MCONF_DAT_Length() AS LONG
The MCONF_DAT_Length Function returns the number of records in the MCONF.DAT
file.
MCONF_DAT_OpenRead(n AS INTEGER)
The MCONF_DAT_OpenRead Function provides the Functionality of the
MCONF_DAT_Open and MCONF_DAT_Read Functions in a single Function call.
MCONF_DAT_WriteClose(n AS INTEGER)
The MCONF_DAT_WriteClose Function provides the Functionality of the
MCONF_DAT_Write and MCONF_DAT_Close Functions in a single Function call.
MCONF_DAT_OpenReadClose(n AS INTEGER)
The MCONF_DAT_OpenReadClose Function provides the Functionality of the
MCONF_DAT_Open, MCONF_DAT_Read, and MCONF_DAT_Close Functions in a single
Function call.
MCONF_DAT_OpenWriteClose(n AS INTEGER)
The MCONF_DAT_OpenWriteClose Function provides the Functionality of the
MCONF_DAT_Open, MCONF_DAT_Write, and MCONF_DAT_Close Functions in a single
Function call.
MCONF_DAT_ClearIt(n AS INTEGER)
The MCONF_DAT_ClearIt Function sets the entire MCONF_DAT data record to all
zeros for record 'n', leaving the data record in place, but empty.
-----------------------------------------------------------------------------
POINTERS Uses a hidden variable I use called "@mc". Any reference to this is
only for your information for discussion in this doc file. You will not need
to concern yourself trying to use this.. All calls are handled in the main
MCONF.PBU Unit by my routines automatically. In other words, I am trying to
keep Pointers as easy as possible for your use. :)
Also, all calls to any Functions which gets data with the string routines
will auto-trim each string's extra spaces and the null terminator, CHR$(0),
off so printing will be easier for you to manipulate. When calling the string
routines to put data back into the string space, all string data will be
resized to fit the MCONF.dat type structure and will add the null terminator
back to the end of the string. Just remember, when working the data in memory
with the pointer calls, you still have to write the data back to the MCONF.dat
in order for the changes to become permanent.
-----------------------------------------------------------------------------
MCONF_DAT_GetMCN() AS STRING
This form of the MCONF_DAT_GetMCN function returns a pointer to the
conference's name string.
MCONF_DAT_PutMCN(s AS STRING)
This form of the MCONF_DAT_PutMCN function sets the conferences's name string
to the string pointed to by "s". Note that the string pointed to by "s" can
be no more than 40 characters in length.
MCONF_DAT_GetNWCN() AS STRING
This form of the MCONF_DAT_GetNWCN function returns a pointer to the
conference's Network name string. NOTE: If the message conference belongs to
multiple Networks, then it will return a string with all network names that
this conference belongs to as in this Example: Fidonet, WME, Rime
MCONF_DAT_GetRSL() AS INTEGER
This form of the MCONF_DAT_GetRSL function returns the conference's read
security level.
MCONF_DAT_PutRSL(n AS INTEGER)
This form of the MCONF_DAT_PutRSL function sets the conference's read
security level to "n". "n" must be in the range of 0 to 9999.
MCONF_DAT_GetPSL() AS INTEGER
This form of the MCONF_DAT_GetPSL function returns the conference's post
security level.
MCONF_DAT_PutPSL(n AS INTEGER)
This form of the MCONF_DAT_PutPSL function sets the conference's post
security level to "n". "n" must be in the range of 0 to 9999.
MCONF_DAT_GetTPNODTS() AS INTEGER
This form of the MCONF_DAT_GetTPNODTS function returns the conference's
number of days to save messages for TriPack.
MCONF_DAT_PutTPNODTS(n AS INTEGER)
This form of the MCONF_DAT_PutTPNODTS function sets the conference's number
of days to save message for TriPack to "n".
MCONF_DAT_GetHMN() AS LONG
This form of the MCONF_DAT_GetHMN function returns the conference's highest
message number.
MCONF_DAT_PutHMN(n AS LONG)
This form of the MCONF_DAT_PutHMN function sets the conference's highest
message number to "n".
MCONF_DAT_GetNWF(nw AS INTEGER) AS INTEGER
This form of the MCONF_DAT_GetNWF function returns the conference's network
flag for network "nw". "nw" represents Message Conference Record.
MCONF_DAT_PutNWF(nw AS INTEGER, n AS INTEGER)
This form of the MCONF_DAT_PutNWF function sets the conference's network
flag for network "nw" to "n". "n" must be in the range of 0 to 1 as follows:
For "nw" = 1 to 9999
For "n" = 0 or 1:
0 = The conference does not belong to the network.
1 = The conference belongs to the network.
-----------------------------------------------------------------------------
All BIT Fields below have been converted to Integers to allow easier access
and handling.
-----------------------------------------------------------------------------
MCONF_DAT_GetNWCF() AS INTEGER
This form of the MCONF_DAT_GetNWCF function returns the conference's
networked conference flag.
MCONF_DAT_PutNWCF(n AS INTEGER)
This form of the MCONF_DAT_PutNWCF function sets the conference's networked
conference flag to "n". "n" must be in the range of 0 to 1 as follows:
0 = The conference isn't a networked conference.
1 = The conference is a networked conference.
MCONF_DAT_GetPCF() AS INTEGER
This form of the MCONF_DAT_GetPCF function returns the conference's private
conference flag.
MCONF_DAT_PutPCF(n AS INTEGER)
This form of the MCONF_DAT_PutPCF function sets the conference's private
conference flag to "n". "n" must be in the range of 0 to 1 as follows:
0 = The conference isn't a private conference.
1 = The conference is a private conference.
MCONF_DAT_GetFSNM() AS INTEGER
This form of the MCONF_DAT_GetFSNM function returns the conference's
Fido-style netmail flag.
MCONF_DAT_PutFSNM(n AS INTEGER)
This form of the MCONF_DAT_PutFSNM function sets the conference's Fido-style
netmail flag to "n". "n" must be in the range of 0 to 1 as follows:
0 = The conference isn't a Fido-style netmail conference.
1 = The conference is a Fido-style netmail conference.
MCONF_DAT_GetACF() AS INTEGER
This form of the MCONF_DAT_GetACF function returns the conference's alias
conference flag.
MCONF_DAT_PutACF(n AS INTEGER)
This form of the MCONF_DAT_PutACF function sets the conference's alias
conference flag to "n". "n" must be in the range of 0 to 1 as follows:
0 = The conference isn't an alias conference.
1 = The conference is an alias conference.
MCONF_DAT_GetUDF() AS INTEGER
This form of the MCONF_DAT_GetUDF function returns the conference's user
delete flag.
MCONF_DAT_PutUDF(n AS INTEGER)
This form of the MCONF_DAT_PutUDF function sets the conference's user delete
flag to "n". "n" must be in the range of 0 to 1 as follows:
0 = Users are not allowed to delete messages.
1 = Users can deleted messages.
MCONF_DAT_GetTPBF() AS INTEGER
This form of the MCONF_DAT_GetTPBF function returns the conference's TriPack
backup flag.
MCONF_DAT_PutTPBF(n AS INTEGER)
This form of the MCONF_DAT_PutTPBF function sets the conference's TriPack
backup flag to "n". "n" must be in the range of 0 to 1 as follows:
0 = Do not save backup files while packing the message base.
1 = Save backup files while packing the message base.
MCONF_DAT_GetDPriM() AS INTEGER
This form of the MCONF_DAT_GetDPriM function returns the conference's disable
private messages flag.
MCONF_DAT_PutDPriM(n AS INTEGER)
This form of the MCONF_DAT_PutDPriM function sets the conference's disable
private messages flag to "n". "n" must be in the range of 0 to 1 as follows:
0 = Do not disable private messages.
1 = Disable private messages.
MCONF_DAT_GetDPubM() AS INTEGER
This form of the MCONF_DAT_GetDPubM function returns the conference's disable
public message flag.
MCONF_DAT_PutDPubM(n AS INTEGER)
This form of the MCONF_DAT_PutDPubM function sets the conference's disable
public message flag to "n". "n" must be in the range of 0 to 1 as follows:
0 = Do not disable public messages.
1 = Disable public messages.