home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 20.8 KB | 1,005 lines |
- Last update: 17/9/96
-
- The following errors may be returned: (numbers given as offsets from the SWI
- chunk base)
-
- +0 Unable to open base
- +1 Unable to read record
- +2 Base is opened for exclusive access
- +3 Record is locked
- +4 Record is deleted
- +5 Invalid block size
- +6 Invalid record number
- +7 Base not opened
- +8 Invalid pointer
- +9 Unable to open file
- +10 Not a file area
-
- NewsFlash server SWI's
-
- ===================================================================
-
- NewsFlashServer_Version
-
- On exit:
-
- R0 = Pointer to version string
- R1 = Version word (&RRRRHHLL)
-
- ===================================================================
-
- NewsFlashServer_InitialiseLine
-
- On entry:
-
- R0 = Requested line number or -1
-
- On exit:
-
- R0 = Assigned line number or -1
- R1 = RMA work block assigned or pointer to error string
-
- Use:
-
- This returns the RMA work block for this line and your assigned line number.
-
- ===================================================================
-
- NewsFlashServer_CloseDownLine
-
- On entry:
-
- R0 = Line number or -1 for all
-
- ===================================================================
-
- NewsFlashServer_RMAPointer
-
- On entry:
-
- R0 = Line number
-
- On exit:
-
- R0 = Pointer to RMA workspace or 0 for none
-
- ===================================================================
-
- NewsFlashServer_AvailableLines
-
- On exit:
-
- R0 = Number of available lines
-
- ===================================================================
-
- NewsFlashServer_GenerateEvent
-
- On entry:
-
- R0 = Line number (or -1 for general)
- R1 = Event code
-
- Use:
-
- The call is used to generate an event on any one of the lines.
-
- Line event codes:
-
- 0 User has logged off
- 1 User details have changed (User name or action)
- 2 User has logged on (read name)
- 3 File transfer has started
- 4 File transfer has finished
-
- General event codes:
-
- 0 File areas have changed
- 1 Message areas have changed
- 2 File bases have changed
- 3 Message bases have changed
- 4 Line info has changed
-
- ===================================================================
-
- NewsFlashServer_GetEvent
-
- On entry:
-
- R0 = Line number or -1
- R1 = Event mask
-
- On exit:
-
- R0 = Event code or -1 for none
-
- Use:
-
- This call is used to read events. It should only be called by the
- main application.
-
- ===================================================================
-
- NewsFlashServer_OpenFileBase
-
- On entry:
-
- R0 = 0 to open for shared read/write access
- = 1 to open for shared read access
- = 2 to open for deny write to other applications (read/write)
- = 3 to open for deny access to other applications (exclusive)
-
- Use:
-
- This call will open all file base related files
-
- ===================================================================
-
- NewsFlashServer_CloseFileBase
-
- Use:
-
- This call will close all file base related files
-
- ===================================================================
-
- NewsFlashServer_ReadFileBase
-
- On entry:
-
- R0 = File base number (1-32)
- R1 = Block to fill
- R2 = Size of block (must be 64)
-
- On exit:
-
- Block is filled as follows
-
- &00 File base name
- &38 User level required to 'know about it'
- &3C User level required to access
-
- ===================================================================
-
- NewsFlashServer_AmendFileBase
-
- On entry:
-
- R0 = File base number (1-32)
- R1 = File base block
- R2 = Size of block (must be 64)
-
- Block should be filled as follows
-
- &00 File base name
- &38 User level required to 'know about it'
- &3C User level required to access
-
- ===================================================================
-
- NewsFlashServer_NumberOfFileAreas
-
- On exit:
-
- R0 = Number of file areas
-
- Use:
-
- This call will return the number of file areas
-
- ===================================================================
-
- NewsFlashServer_CreateFileArea
-
- On entry:
-
- R0 = Pointer to 48 byte block for file area details
- R1 = Size of block (must be 48)
-
- On entry:
-
- Block is filled as follows:
-
- &00 Min user level required to 'know about it'
- &04 Min user level required to view files
- &08 Min user level required to upload
- &0C Min user level required to download
- &10 File area name (nul terminated)
-
- &30 Parent object (Optional)
-
- On exit:
-
- R0 = File area number allocated to that area
-
- Use:
-
- This call will create a new file area.
-
- ===================================================================
-
- NewsFlashServer_ReadFileArea
-
- On entry:
-
- R0 = File area
- R1 = Pointer to 64 byte block for file area details
- R2 = Size of block (must be 64)
-
- On exit:
-
- Block is filled as follows:
-
- &00 Min user level required to 'know about it'
- &04 Min user level required to view files
- &08 Min user level required to upload
- &0C Min user level required to download
- &10 File area name (nul terminated)
- &30 # of files in file area
- &34 # of bytes in file area
- &38 First file number in this area (0 if no files)
- &3C Last file number in this area (0 if no files)
-
- Use:
-
- This will return the details of the specified file area.
-
- ===================================================================
-
- NewsFlashServer_AmendFileArea
-
- On entry:
-
- R0 = File area
- R1 = Pointer to 48 byte block for file area details
- R2 = Size of block (must be 48)
-
- On exit:
-
- Block is filled as follows:
-
- &00 Min user level required to 'know about it'
- &04 Min user level required to view files
- &08 Min user level required to upload
- &0C Min user level required to download
- &10 File area name (nul terminated)
-
- Use:
-
- This will set the details of the specified file area.
-
- ===================================================================
-
- NewsFlashServer_DeleteFileArea
-
- On entry:
-
- R0 = File area to delete
- R1 = Flags:
-
- bit 0 - Reorganise file base
-
- ===================================================================
-
- NewsFlashServer_FileNameFromNumber
-
- On entry:
-
- R0 = File number (from 1)
- R1 = Buffer for filename
- R2 = Size of buffer (must be 16)
-
- On exit:
-
- Buffer is filled
-
- Use:
-
- This call is used by file transfer doors. This call will return the
- file name of any file from it's file number.
-
- ===================================================================
-
- NewsFlashServer_FileRealNameFromNumber
-
- On entry:
-
- R0 = File number (from 1)
- R1 = Pointer to buffer for name
- R2 = Size of buffer (must be 256)
-
- On exit:
-
- R0 = Pointer to buffer start (R1 on entry)
- R1 = Pointer to terminating null
- R2 = Bytes remaining in buffer
-
- buffer is filled
-
- Use:
-
- This call is used by file transfer doors. This call will return the
- real filename of any file from it's file number. e.g.:
-
- File number = &00231C01
-
- File name = <NewsFlash$BBS>BBS.FileBase.Files.23.1C.01
-
-
- ===================================================================
-
- NewsFlashServer_OpenFile
-
- On entry:
-
- R0 = File number (from 1)
-
- On exit:
-
- R0 = File handle
- R1 = Size of file in bytes
-
- Use:
-
- This call is used by file transfer doors. It will open a file ready
- for download
-
- ===================================================================
-
- NewsFlashServer_FileInfo
-
- On entry:
-
- R0 = File number
- R1 = 64 byte Buffer for info
- R2 = Size of block (must be 64)
-
- On Exit the buffer is filled as follows:
-
- R1+&00 : File name
- R1+&10 : Filecode
- R1+&14 : Offset pointer to short description of file
- R1+&18 : Offset pointer to long description of file
- R1+&1C : Size of file in bytes
- R1+&20 : Number of user who uploaded it
- R1+&24 : 5 byte time when uploaded
- R1+&29 : File flags
-
- Bit 0 - For sysop only
- Bit 1 - Deleted (virtual)
- Bit 2 - File has been deleted (actual)
- Bit 3 - Is file area (see &2B)
-
- R1+&2B : File area type (0 - File area, 1 File base, 2 - File)
- R1+&2C : File area of file
- R1+&30 : Number of times downloaded
- R1+&34 : Previous file in this file area (0 for none)
- R1+&38 : Next file in this file area (0 for none)
- R1+&3C : NewsFlash file type
-
- Use:
-
- This call will return information on a BBS file.
-
- ===================================================================
-
- NewsFlashServer_CreateFile
-
- On entry:
-
- R0 = stage
-
- For R0 = 0..
-
- On exit:
-
- R0 = File handle of new file (0 if unable to create)
- R1 = File code for new file
-
- For R0 = 1..
-
- On entry:
-
- R1 = Pointer to info buffer:
-
- R1+0 = File code of new file
- R1+4 = Size of file
- R1+8 = User number of uploader (0 for sysop)
- R1+12 = Pointer of short file description (-1 for none)
- R1+16 = Pointer of long file description (-1 for none)
- R1+20 = File area for file
- R1+24 = Filename
-
- R2 = Size of info buffer (must be 40)
-
- On exit:
-
- R0 = File number of new file (0 if unable to create)
-
- This call is used by file transfer doors. This will create a new
- BBS file and open it for output (ready for upload).
-
- ===================================================================
-
- NewsFlashServer_AmendFile
-
- On entry:
-
- R0 = Number of file
- R1 = Pointer to info buffer:
-
- R1+&00 : File name
- R1+&14 : Offset pointer to short description of file
- R1+&18 : Offset pointer to long description of file
- R1+&1C : Size of file in bytes
- R1+&20 : Number of user who uploaded it
- R1+&24 : 5 byte time when uploaded
- R1+&29 : File flags
- R1+&2C : File area of file
- R1+&30 : Number of times downloaded
-
- R2 = Size of buffer (must be 52)
-
- On exit:
-
- R0 = 0 if unable to amend, -1 otherwise
-
- This call will alter the details of a file.
-
- ===================================================================
-
- NewsFlashServer_FileOp
-
- On entry:
-
- R0 = File number
- R1 = Op code :
-
- R1 = 0 - File has been downloaded
-
- R1 = 1 - Set short file description
- R2 = Pointer to description
- R3 = Length of description
-
- R1 = 2 - Set long file description
- R2 = Pointer to description
- R3 = Length of description
-
- R1 = 3 - Delete file (undeleteable)
- R1 = 4 - Delete file
- R1 = 5 - Undelete file
-
- R1 = 6 - Move file
- R2 = New file base
-
- Use:
-
- Perform operations on a file
-
- ===================================================================
-
- NewsFlashServer_LoadFileDescription
-
- On entry:
-
- R0 = Pointer to description
- R1 = Pointer to buffer for description (or 0 to find out size)
- R2 = Size of buffer (0=16K)
-
- On exit:
-
- R0 = Size of description
-
- ===================================================================
-
- NewsFlashServer_MakeFileDescription
-
- On entry:
-
- R0 = Pointer to buffer for description
- R1 = Length of description
-
- On exit:
-
- R0 = Pointer of description
-
- ===================================================================
-
- NewsFlashServer_OpenUserBase
-
- On exit:
-
- R0 = 0 if opened succesfully, -1 otherwise.
-
- ===================================================================
-
- NewsFlashServer_CloseUserBase
-
- ===================================================================
-
- NewsFlashServer_UpdateUserBase
-
- This will save all the users stored in RAM to the user base file.
-
- ===================================================================
-
- NewsFlashServer_GetUserBase
-
- On exit:
-
- R0 = Number of users in user base
- R1 = File handle of user base
- R2 = Size of user base
-
- ===================================================================
-
- NewsFlashServer_GetUserPointer
-
- On entry:
-
- R0 = User number
-
- On exit:
-
- R0 = Pointer to user details (0 if unknown)
-
- Note: This SWI must be re-called after a WIMP poll if you wish to
- use the pointer again.
-
- ===================================================================
-
- NewsFlashServer_CreateUser
-
- On entry:
-
- R0 = Pointer to user details block
- R1 = Size of block (must be 256)
-
- On exit:
-
- R0 = Allocated user number or 0 for none
-
- ===================================================================
-
- NewsFlashServer_OpenMessageBase
-
- On entry:
-
- R0 = 0 to open for shared read/write access
- = 1 to open for shared read access
- = 2 to open for deny write to other applications (read/write)
- = 3 to open for deny access to other applications (exclusive)
-
- Use:
-
- Opens all message base related files.
-
- ===================================================================
-
- NewsFlashServer_CloseMessageBase
-
- Use:
-
- Closes all message base related files
-
- ===================================================================
-
- NewsFlashServer_ReadMessageBase
-
- On entry:
-
- R0 = Message base number (1-32)
- R1 = Block to fill
- R2 = Size of block (must be 64)
-
- On exit:
-
- Block is filled as follows
-
- &00 Message base name
- &38 User level required to 'know about it'
- &3C User level required to access
-
- ===================================================================
-
- NewsFlashServer_AmendMessageBase
-
- On entry:
-
- R0 = Message base number (1-32)
- R1 = Block
- R2 = Size of block (must be 64)
-
- Block should be filled as follows
-
- &00 Message base name
- &38 User level required to 'know about it'
- &3C User level required to access
-
- ===================================================================
-
- NewsFlashServer_CreateMessageArea
-
- On entry:
-
- R0 = Pointer to message area block (112 bytes)
- R1 = Size of block (must be 112)
-
- Block is filled as follows:
-
- &00 Min user level required to 'know about it'
- &04 Min user level required to view messages
- &08 Min user level required to write messages
- &0C Reserved..
- &10 Message area name (nul terminated)
- &30 Message area type:
-
- 0 - Local private
- 1 - Netmail
- 2 - Echo
- 3 - Local echo
-
- &34 Message area data:
-
- For echo area:
-
- Nul terminated echo name
-
- On exit:
-
- R0 = Allocated message area number
-
- ===================================================================
-
- NewsFlashServer_ReadMessageArea
-
- On entry:
-
- R0 = Message area number
- R1 = Pointer to block for details (128 bytes)
- R2 = Size of block (must be 128)
-
- On exit the block is filled as follows:
-
- &00 Min user level required to 'know about it'
- &04 Min user level required to view messages
- &08 Min user level required to write messages
- &0C Reserved..
- &10 Message area name (nul terminated)
- &30 Message area type:
-
- 0 - Local private
- 1 - Netmail
- 2 - Echo
- 3 - Local echo
-
- &34 Message area data:
-
- For echo area:
-
- Nul terminated echo name
-
- &70 # of messages in message area
- &74 # of bytes in message area
- &78 First message number in this area (0 if no messages)
- &7C Last message number in this area (0 if no messages)
-
- ===================================================================
-
- NewsFlashServer_AmendMessageArea
-
- On entry:
-
- R0 = Message area number
- R1 = Pointer to block for details
- R2 = Size of block (must be 128)
-
- Block is filled as follows:
-
- &00 Min user level required to 'know about it'
- &04 Min user level required to view messages
- &08 Min user level required to write messages
- &0C Reserved..
- &10 Message area name (nul terminated)
- &30 Message area type:
-
- 0 - Local private
- 1 - Netmail
- 2 - Echo
- 3 - Local echo
-
- &34 Message area data:
-
- For echo area:
-
- Nul terminated echo name
-
- &70 # of messages in message area
- &74 # of bytes in message area
- &78 First message number in this area (0 if no messages)
- &7C Last message number in this area (0 if no messages)
-
- ===================================================================
-
- NewsFlashServer_DeleteMessageArea
-
- On entry:
-
- R0 = Message area number
- R1 = Flags:
-
- bit 0 - Reorganise message base
-
- ===================================================================
-
- NewsFlashServer_CreateMessage
-
- On entry:
-
- R0 = Pointer to message (or 0 to return file handle to copy message to and close)
- R1 = Pointer to information block
- R2 = Size of block (must be 28)
-
- R1 + 0 = Size of message
- R1 + 4 = Message area
- R1 + 8 = Pointer to subject
-
- For local e-mail:
-
- R1 + 12 = User number of sender
- R1 + 16 = User number of receiver
-
- For netmail:
-
- R1 + 12 = Pointer to user name of sender
- R1 + 16 = Pointer to user name of recipient
- R1 + 20 = Pointer to address of sender
- R1 + 24 = Pointer to address of recipient
-
- For echo mail:
-
- R1 + 12 = Pointer to user name of sender
- R1 + 16 = Pointer to user name of recipient
- R1 + 20 = Pointer to address of sender
-
- For local echo mail:
-
- R1 + 12 = User number of sender
- R1 + 16 = User number of receiver
-
- On exit:
-
- R0 = Allocated message number (or 0 if unable to create)
- R1 = File handle to copy message to (do not adjust pointer)
-
- ===================================================================
-
- NewsFlashServer_ReadMessage
-
- On entry:
-
- R0 = Message number
- R1 = Buffer for message info (or 0 not to fill)
- R2 = Buffer for message (or -1 to return file handle, 0 not fill)
- R3 = Size of buffer at R1 (must be 128 bytes)
- R4 = Size of buffer for message (must be 16K)
-
- block in R1 is filled as follows:
-
- &00 Previous message in this message area (0 for none)
- &04 Next message in this message area (0 for none)
- &08 Message code
- &0C Length of message
- &10 5-byte Time from 1900 when written
- &15 Flags:
-
- Bit 0 - File attached
- Bit 1 - Deleted (virtual)
- Bit 2 - Message has been deleted (actual)
- Bit 3 - Unread
- Bit 4 - Downloaded
-
- &16 16 bit word.. # of times read..
-
- &18 Message area
- &1C Message type:
-
- 0 - Local private
- 1 - Netmail
- 2 - Echo
- 3 - Local echo
-
- &20 Message data - depends on message type (&1C):
-
- For 'Local private', type 0..
-
- &20 User number of author
- &24 User number of recipient
- &28 File # of file attached (if any)
- &2C Reserved..
- &30 Subject (80 bytes)
-
- For 'Netmail', type 1
-
- &20 User name of author (20 bytes)
- &34 Name of recipient (20 bytes)
- &48 Subject (20 bytes)
- &5C Sender address (in ASCII).. (16 bytes)
- &6C Destination address (in ASCII).. (16 bytes)
- &7C File # of file attached (if any)
-
- For 'Echo', type 2
-
- &20 User name of author (24 bytes)
- &38 Name of recipient (24 bytes)
- &50 Subject (32 bytes)
- &70 Sender address (16 bytes)
-
- For 'Local Echo', type 3
-
- &20 User number of author
- &24 User number of recipient
- &28 Reserved..
- &2C Reserved..
- &30 Subject (80 bytes)
-
- On exit:
-
- R0 = File handle if R2 = -1 on entry (must be closed when finished with)
-
- ===================================================================
-
- NewsFlashServer_AmendMessage
-
- On entry:
-
- R0 = Message number
- R1 = Pointer to message info (0 not to alter)
- R2 = Pointer to message (or -1 to copy from file, 0 not to alter)
- R3 = File handle if R2 = -1 (wont close)
- R4 = Size of block for message info (must be 128)
-
- See above for R1 block
-
- ===================================================================
-
- NewsFlashServer_MessageOp
-
- On entry:
-
- R0 = Message number
- R1 = Message Op
-
- R1 = 0 - Message has been read
-
- R1 = 1 - Message has been read by recipient
-
- R1 = 2 - Attach file to message
- R2 = File number (0 to clear)
- R3 = Flags:
-
- bit 0 - Force attach
-
- R1 = 3 - Delete message (undeleteable)
- R1 = 4 - Delete message
- R1 = 5 - Undelete message
- R1 = 6 - Message has been scanned
-
- R1 = 7 - Move message
- R2 = New message base number
-
-
- Use:
-
- Perform operations on a message
-
- ===================================================================
-
- NewsFlashServer_KeyName
-
- On entry:
-
- R0 = Key number (from 1)
- R1 = Pointer to new key name (or <=0 for read)
-
- On exit:
-
- R1 = Pointer to key name (must not be overwritten)
-
- ===================================================================
-
- NewsFlashServer_FindKey
-
- On entry:
-
- R0 = Pointer to key name to match
-
- On exit:
-
- R0 = Key number (from 1), 0 if not found
-
- ===================================================================
-
- NewsFlashServer_KeyMenu
-
- On entry:
-
- R0 = Word containing keys to 'tick'
-
- On exit:
-
- R1 = Pointer to WIMP menu of keys (suitable for Wimp_CreateMenu)
-
- ===================================================================
-
- NewsFlashServer_ResolveObject
-
- On entry:
-
- R0 = Object parent (0 for root), must be a file area ID
- R1 = Pointer to object name (e.g. "User files/Chris/work")
- R2 = Desired object type:
-
- 0 - File
- 1 - File area (directory)
- 2 - File or File area (File has priority)
- 3 - File area or File (File area has priority)
-
- R3 = User access level
- R4 = User keys
- R5 = ID of last returned object (of type R2) or 0 for start
-
- On exit:
-
- R0 = Object ID (0 for root)
- R1 = Object type (0 - file, 1 - file area, -1 - not found)
-
- File area ID's are of the form:
-
- &TNNNNNNN
-
- Where T = Type, N = Number T
-
- Types:
-
- 0 = Standard file area
- 1 = File base
- 2 = Virtual file area (file)
-
- File ID's are simply file numbers
-
- Special object names:
-
- ".." - Return parent of R0
- "." - Return R0
- "/" or "" - Return root (0)
-
- ===================================================================
-
- NewsFlashServer_InitialiseVMM
-
- On entry:
-
- R0 = Pointer to VMM data path
-
- ===================================================================
-
- NewsFlashServer_CloseDownVMM
-
- ===================================================================
-
- NewsFlashServer_VMMBlock
-
- On exit:
-
- R0 = Pointer to VMM block (may be used by any NewsFlash application)
-
- An error will be generated if there is no VMM block
-
- ===================================================================
-
- by Chris Davis
-
- e-mail : Fidonet # 2:253/417.6
- Internet chris@armadilo.demon.co.uk
-