home *** CD-ROM | disk | FTP | other *** search
- Last update: 5/1/96
-
- This file gives the NewsFlash Utility file format/structure and explains the
- NewsFlash Utility protocol.
-
- The structure of WIMP messages mentioned here can be found in
- Developers.Messages.
-
- ----------------------------------------------------------
-
- Utility file format
- ===================
-
- &00 = "NFUT"
- &04 = Utility flags:
-
- bit 0 - Allow only one instantiation
-
- &08 = Utility ID
- &0C = 8 bit utility version low
- &0D = 8 bit utility version high
- &0E = 16 bit release number
-
- &10 = Offset to utilty code (will become the current task at &8000)
- &14 = Size of utility code
-
- &18 = Offset to utilty help text
- &1C = Size of utility help text
-
- &20 = 32 byte null terminated utility name
- &40 = 32 byte null terminated utility author name
-
- &60 = Size of initial workspace required.
-
- ----------------------------------------------------------
-
- Utility Protocol
- ================
-
- The Utility system provides and easy way for applications to perform common
- BBS orientated tasks without having to write a lot of code. The task can make
- use of utilities which have been written to perform the operation whilst
- multitasking.
-
- The utilities can also be upgraded/added seperately without the task having
- to change.
-
- Each utility has a unique 1 word (32 bit/4 byte) ID which is used by calling
- tasks to identify it. For example the local upload utility's ID is "UPLD".
- However, as tasks may wish to keep track of utilities they have called then
- the task can use a seperate word ID of it's own choosing, as well as the
- utility ID itself.
-
- When a utility is run it is started by utility mananger. The code at the
- offset specified at (&10) in the utility code is then loaded in at &8000 and
- called with a WIMP slot of (&14)+(&60) bytes. If the utility wishes to use more
- memory than this then it must call Wimp_SlotSize itself.
-
- Once the utility has been run Utility Manager will pass it the paramaters
- from the original UtilityManager_StartUtility message using a
- UtilityManager_Paramaters. This message will contain the utility ID, which
- should be checked for security.
-
- Once the utility has received it's paramters it should not act straight away.
- All other utilities of the same ID will be sent a UtilityManager_Verify
- message containing the paramaters sent to a new instance.
-
- If a new instance has the same or similar paramaters to another instance it
- may request a new instance to quit by sending UtilityManager_Abort.
-
- Therefore, if a new instance receives a UtilityManager_Abort message at *any*
- time during it's life then it should quit straight away (sending an
- appropiate message to Utility Manager).
-
- A new instance should wait for a short while (several WIMP polls) to allow
- any UtilityManager_Abort messages to get through to it before assuming it can
- start.
-
- If a utility does start then it should send a UtilityManager_UtilityStarting
- message to Utility Manager (note: this does not have to contain the
- reference ID or the task handle of initiator). A similar message will be
- relayed to the initiating task.
-
- If a utility fails to start (for any reason) then it should send a
- UtilityManager_StartFailed to Utility Manager (note: this does not have to
- contain the reference ID or the task handle of initiator). A similar message
- will be relayed to the initiating task. This message *must not* be sent if
- the instance has already sent a UtilityManager_UtilityStarting.
-
- Contacting me
- -------------
-
- If anyone wishes to contact me please send e-mail to:
-
- Chris Davis..
-
- Fidonet 2:253/417.6 or 2:257/501.7
- Internet chris@armadilo.demon.co.uk
- Highlander BBS 01452 384557/384702
-