home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / Fax / AVMN199D.LHA / avminstall / rexx / broadcast.avm < prev    next >
Encoding:
Text File  |  1995-07-26  |  2.4 KB  |  89 lines

  1. /* to broadcast to interested parties about changes in mailboxes */
  2.  
  3. /* action = 'addtomailbox', 'deletefrommailbox', 'refreshmailbox', 'refreshmailboxentry' */
  4.  
  5. parse arg action mailbox magiccookie .
  6.  
  7. call addlib("rexxsupport.library", 0, -30, 0)
  8.  
  9. /* who are interested?  AVMCALLNOTIFIER, AVMLOGVIEW.#? */
  10.  
  11. ports = upper(show('p'))
  12. numports = words(ports)
  13.  
  14. if action = 'addtomailbox' | action = 'deletefrommailbox' then do
  15.     if showlist('p', 'AVMCALLNOTIFIER') then
  16.         address 'AVMCALLNOTIFIER' action mailbox magiccookie
  17.  
  18.     if showlist('p', 'AVMUSERINTERFACE') then
  19.         address 'AVMUSERINTERFACE' action mailbox magiccookie
  20.  
  21.         do i = 1 to numports
  22.           cport = word(ports, i)
  23.           if pos('AVMLOGVIEW', cport) > 0 then do
  24.             address value cport
  25.             ''action mailbox magiccookie
  26.           end
  27.  
  28.           if pos('AVMSCHEDULER.', cport) > 0 then do
  29.             address value cport
  30.             ''action mailbox magiccookie
  31.           end
  32.  
  33.           if pos('AVMSCHEDULERVIEW', cport) > 0 then do
  34.             address value cport
  35.             ''action mailbox magiccookie
  36.           end
  37.         end
  38. end
  39.  
  40. if action = 'refreshmailbox' then do
  41.     if showlist('p', 'AVMCALLNOTIFIER') then
  42.         address 'AVMCALLNOTIFIER' action mailbox
  43.  
  44.     if showlist('p', 'AVMUSERINTERFACE') then
  45.         address 'AVMUSERINTERFACE' action mailbox
  46.  
  47.         do i = 1 to numports
  48.           cport = word(ports, i)
  49.           if pos('AVMLOGVIEW', cport) > 0 then do
  50.             address value cport
  51.             ''action mailbox
  52.           end
  53.  
  54.           if pos('AVMSCHEDULER.', cport) > 0 then do
  55.             address value cport
  56.             ''action mailbox
  57.           end
  58.  
  59.           if pos('AVMSCHEDULERVIEW', cport) > 0 then do
  60.             address value cport
  61.             ''action mailbox
  62.           end
  63.         end
  64. end
  65.  
  66. if action = 'refreshmailboxentry' then do
  67.     if showlist('p', 'AVMUSERINTERFACE') then
  68.         address 'AVMUSERINTERFACE' action mailbox magiccookie
  69.  
  70.         do i = 1 to numports
  71.           cport = word(ports, i)
  72.  
  73.           if pos('AVMLOGVIEW', cport) > 0 then do
  74.             address value cport
  75.             ''action mailbox magiccookie
  76.           end
  77.  
  78.           if pos('AVMSCHEDULER.', cport) > 0 then do
  79.             address value cport
  80.             ''action mailbox magiccookie
  81.           end
  82.  
  83.           if pos('AVMSCHEDULERVIEW', cport) > 0 then do
  84.             address value cport
  85.             ''action mailbox magiccookie
  86.           end
  87.         end
  88. end
  89.