home *** CD-ROM | disk | FTP | other *** search
/ Acorn User 3 / AUCD3.iso / airport / demos / callerdemo / TechInfo / ProgInfo < prev   
Text File  |  1996-12-05  |  3KB  |  77 lines

  1.  
  2.                   PROGRAMMER'S INFORMATION FOR CALLER ID
  3.                    
  4.                 Paul Skirrow, Octopus Systems, October 1996
  5.  
  6.  
  7. CallerID has been written to interact with other applications and
  8. utilities to make it as useful as possible. This information is intended
  9. for programmers who may wish to make their application respond to incoming
  10. calls.
  11.  
  12. When a new call is received the CallerID application performs the following
  13. actions:
  14.  
  15.   1. Look up number in the internal names directory
  16.   2. Display new call window with number (and name if available)
  17.   3. Execute the NewCall file (if it exists) in !CallerID.Files
  18.   4. Execute the file associated with the number (if there is one)
  19.   5. Broadcast the Wimp message &4DEC0
  20.  
  21.  
  22. NewCall File
  23. ------------
  24. The NewCall file can be a BASIC program, an Obey file, or any other
  25. executable file. If you wish to perform several dsitinct actions when a call
  26. is received you can create an Obey file which itself runs several
  27. other programs. For example, to stop the audio CD and display a price list
  28. you could use something like this in an Obey file:
  29.  
  30.        Filer_Run ADFS::HardDisc4.docs.Pricelist
  31.        CDFS:stop
  32.  
  33. The following parameters are passed to the NewCall application when
  34. it starts:
  35.  
  36.        flags "number" "name"
  37.  
  38. The flags are explained below. The number is simply the caller's
  39. number (which may be blank if withheld), and the name is the 
  40. caller's name from the CallerID directory. The name and number will
  41. be exactly as displayed in the new call window and will be passed
  42. in quotation marks.
  43.  
  44. Further paramters may be passed in future releases, so it is important
  45. that you ignore any extra parameters that exist.
  46.  
  47. WIMP Message
  48. ------------
  49. The Wimp message is intended to be picked up by other applications that
  50. are already loaded, and may be used for other apps to open customer
  51. records or display particular information. It is used to pass the
  52. caller's number to Prophet and to other applications.
  53.  
  54. When a call is received the CallerID program broadcasts WimpMessage
  55. &4DEC0 and sends the following data in the message block:
  56.  
  57.     4 bytes    Flags
  58.     n bytes    number (ASCII text, null terminated)
  59.     m bytes    name (ASCII text, null terminated)
  60.  
  61. It would be reasonable to allocate fixe sized buffers and we would suggest
  62. 40 chars for the number (which may include other status information) and 50
  63. chars for the name (but don't assume that longer strings will not be
  64. broadcast).
  65.  
  66. Each bit in the flags word is allocated a specific meaning by Octopus
  67. Systems. Allocations so far, include:
  68.  
  69.    Bit 0      0 if call  is incoming. 
  70.               1 if call is outgoing (not yet availablefla).
  71.    Bit 1      Alert Prophet (ie if this bit is set, Prophet should
  72.               search for the number in the supplier and customer lists
  73.               and if found open the relevant record)
  74.  
  75. If an application sees a telephone number that it doesn't recognize it
  76. should do nothing. It must not generate an error.
  77.