
                             
              ۰    ۰    ۰   ۰    ۰  ۰    ۰ 
                                        
                                      
              ۰    ۰      ۰    ۰    ۰   ߰۰   ۰
                                        
                                        
              ۰    ۰     ۰    ۰    ۰    ۰   ۰
                                 

                            DCTList v0.10 Gamma
                              Development Kit
                             By Dan Traczynski
                           Released May 17, 1998

         Copyright (C) 1996..1998 Dan Traczynski.  All rights reserved.

                                   -=-=-

            The latest version of this and other DCT Productions
                  may be downloaded from the Internet at:

                         http://www.sfu.ca/~dant/
                  http://www.worldnet.net/island/dct.htm



   Table of Contents   


              Contact Information ......................... 1
              LIMITATIONS OF USE .......................... 2
              Overview .................................... 3
              Using the Kit in your Program ............... 4
              BBSObject specifications .................... 5
              PickObject Specifications ................... 6
              Type BBSRec ................................. 7
              Distribution & Disclaimer ................... 8
              History - Notes from the Past ............... 9



   {1} Contact Information   


    E-mail              dant@sfu.ca (best method of contacting the author)
    Netmail             Dan Traczynski, 1:153/757
    FidoNet EchoMail    DCTPROD, RA_UTIL
    WWW                 http://www.sfu.ca/~dant/
                        http://www.worldnet.net/~island/dct.htm
    FTP                 ftp://ftp.canbbs.net/pub/DCT_Productions/
    Mailing List        dctprod@canbbs.net
                        To subscribe:
                          Send a message to <listserv@canbbs.net> with only
                          the text "subscribe dctprod" (sans quotes) in the
                          message text.



   {2} LIMITATIONS OF USE   


   Programs compiled using this kit may not be distributed as shareware or in
any other form in which some form of tender must be paid for full use of the
program.  The following notice must also be placed in both the program's
documentation and the program itself:

Compiled using the DCTList Development Kit, copyright (C) 1998 Dan Traczynski

   Though not required, a plug for the DCT Productions web site would also be
a good idea so that people can find the latest DCTList release.



   {3} Overview   


   In the past, I have occasionally received requests for the file structures
of DCTList's BBS database so that programmers could import their BBS lists
into DCTList.  Since making a generic import utility would be more work than
it's worth (and pretty much impossible considering the infinitely different
ways a BBS list could be formatted), I've released a development kit to allow
you, the programmer, to create a custom import utility for your BBS list.

   You will need to have a reasonable understanding of Turbo Pascal to use
this kit.  Knowledge in OOP (object-oriented programming) is also recommended
though you could probably get by without it if you follow the examples.

   If you use this kit to create a program, please let me know and send me
a copy of the program too!  It may even end up on my web site.  If no one
responds about this kit, then it was a waste of my time putting it together
and I doubt any future releases would include updated kits.



   {4} Using the Kit in your Program   


   The first step in using this kit is to add the unit DCTBLOBJ.TPU to your
program's "uses" statement.  For example,

        Program Import;
        Uses DOS, CRT, DCTBLObj;

   You will also need to declare some variables somewhere in your program.

        Var BBS: ^BBSObject;
            ThemeF,
            SystemF: ^PickObject;

   BBS is declared as a pointer to the object BBSObject and ThemeF and
SystemF are declared as pointers to the object PickObject.  BBS will be the
object you use to access the BBS database.  DCTList employs a picklist system
to let the user select the theme and software of the BBS, so PickObject
provides an easy interface with using the picklist files.

   How DCTList's data files work internally is not important in using this
kit as the objects take care of all file I/O internally.  You simply need to
call certain functions and procedures to add BBSs to the database.

   To see a generic example of how to use this kit, check out EXAMPLE.PAS.



   {5} BBSObject Specifications   


   The following is a detailed description of each public procedure and
function in the object BBSObject.

Type BBSObject = Object

         Constructor Init(Const DatDir: String;     { Directory of database }
                          Var Ret: Boolean);        { Successful?           }
         { This will initialise the object.  DatDir is the directory that   }
         { DCTList's database file DCTLIST.DA1 can be found.  If the file   }
         { doesn't exist, it will be created, but if there is some kind of  }
         { error creating it (ie. directory doesn't exist), Ret will return }
         { FALSE.                                                           }

         Destructor Done;
         { This is to be called when you are finished using the object.     }

         Procedure Add(BBS: BBSRec;        { Record to add                  }
                       Var X: Word;        { Record # assigned to added BBS }
                       Var Suc: Boolean);  { Successful?                    }
         { When you wish to add a BBS record to the list, use this          }
         { procedure.  X will return the number assigned to the added       }
         { record and is probably not important for the purposes of an      }
         { import utility.                                                  }

         Function NameExists(Const S: Str25): Boolean;   { BBS name         }
         { The Add procedure does not do any duplicate checking, so if you  }
         { wish to make sure duplicate BBS names are not added, use this    }
         { function.                                                        }

         Function PhoneExists(Const S: Str14): Boolean;  { Phone number     }
         { The Add procedure does not do any duplicate checking, so if you  }
         { wish to make sure duplicate phone numbers are not added, use     }
         { this function.                                                   }

         Function Num: Word;
         { Number of BBSs in database                                       }

     End; { BBSObject }



   {6} PickObject Specifications   


   The following is a detailed description of each public procedure and
function in the object PickObject.

Type PickObject = Object

         Constructor Init(Const FN: String;
                             { Path/name of picklist (minus .PCK extension) }
                          Const Len: Byte);     { Max length of each string }
         { This will initialise the object.  FN is the path and file name   }
         { of the picklist file, minus the .PCK extension.  Len is a        }
         { constant which specifies what the maximum length of each string  }
         { in the picklist may be.  These have been provided as constants   }
         { ThemePckLen and SystemPckLen for the THEMES.PCK and SYSTEMS.PCK  }
         { files, respectively.  It is advisable not to change these values }
         { or some unpredictable results could occur.  Len is ignored if    }
         { the picklist file already exists as the picklist file would      }
         { already have been initialised to a certain string length.        }

         Destructor Done;
         { Call this when you have finished with the object.                }

         Procedure Search(S: Str25;         { String to find                }
                          Var Ret: Byte);   { Record assigned to string     }
         { This is the procedure you need to use to assign a theme or       }
         { system to a BBS record.  S is the string in the picklist file to }
         { find and Ret will return a number specifying where the string    }
         { is.  If the string does not exist in the picklist file, it will  }
         { be added.  Assuming a variable SystemF has been defined of type  }
         { PickObject and is used to access the SYSTEMS.PCK file, you could }
         { use the following example to assign a value for the BBS software }
         { "RemoteAccess".                                                  }
         {                                                                  }
         {      SystemF.Search('RemoteAccess', System);                     }
         {                                                                  }
         { System, which would have been defined as type BYTE, would now    }
         { specify where to find RemoteAccess in the picklist.  Note that   }
         { the search is case insensitive.                                  }

     End; { PickObject }



   {7} Type BBSRec   


   BBSRec is the type definition of each record in the BBS database.  It is
declared as follows.

Const Baud: Array [1..8] of Word = ( 2400,  9600, 14400, 19200,
                                    28800, 33600, 38400, 57600);
Type Str14 = String[14];
     Str25 = String[25];
     Str72 = String[72];
     CmtArr = Array[1..4] of Str72;
     BBSRec = Record
       Name     : Str25;                   { Name of BBS            }
       Sysop    : String[20];              { SysOp's name           }
       Phone    : Str14;                   { Phone number           }
       Location : String[20];              { City, Province         }
       Baud     : Byte;                    { Maximum baud rate      }
       Hours    : String[12];              { BBS hours              }
       MsgNets  : String[60];              { Networks               }
       AnsiName : LongInt;                 { File name of ANSI ad   }
       AddDate  : LongInt;                 { Date BBS was added     }
       Verified : LongInt;                 { Last verified          }
       Creator  : String[25];              { User who added BBS     }
       WebURL   : String[60];              { Web page for the BBS   }
       Theme    : Byte;                    { BBS theme              }
       System   : Byte;                    { BBS software           }
       Cmt      : CmtArr;                  { BBS comment            }
       Unused1  : Array[1..25] of Byte;
     End; { BBSRec } { 576 bytes }



   {8} Distribution & Disclaimer   


   DCTList and its development kit are copyrighted (C) 1996..1998 by Dan
Traczynski.  All Rights Reserved.  I encourage you to distribute it, but DO
NOT change any of the files within the original archive.  DCTList and its
development kit may not be included on CD-ROM collections.  The kit's archive
should be named BL010DEV.ZIP, preferably kept in its ZIP format.

   The author, Daniel Traczynski, will take no responsibility to anything
that this program may or may not do to your system.  Although the program has
been tested thoroughly, no guarantee can be given that it will do what it was
made to do.  Nevertheless, if anything should happen, the user is totally
responsible and the author will be under no obligations whatsoever.  By using
this program you agree to this disclaimer.



   {9} History   


  + Added a new feature/Something was improved.
  - Removed something.
  * General comment.
  > Bug fix.

 Version 0.10 Gamma -=- May 17, 1998.
   * Initial release.



   {EOF}   

