home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 1 / Meeting Pearls Vol 1 (1994).iso / installed_progs / comm / ums / developer.lha / Developer / interfaces / oberon / ums.mod
Encoding:
Text File  |  1993-09-23  |  21.8 KB  |  639 lines

  1. (*(* ------------------------------------------------------------------------
  2.   :Program.       ums
  3.   :Contents.      interface for ums.library
  4.   :Author.        Martin Horneffer [mh]
  5.   :Address.       Snail Mail:              EMail:
  6.   :Address.       Warmweiherstraße 18      UUCP: mh@umshq.adsp.sub.org
  7.   :Address.       D-5100 Aachen            FIDO: 2:242/7.9   MAUS: AC2
  8.   :Address.       GERMANY                  inet: maho@dfv.rwth-aachen.de
  9.   :Remark.        $Id: ums.mod,v 1.7 1993/08/28 18:10:06 mh Exp $
  10.   :Update.        $Log: ums.mod,v $
  11.   :Update.        Revision 1.7  1993/08/28  18:10:06  mh
  12.   :Update.        tagNextVar
  13.   :Update.
  14.   :Update.        Revision 1.7  1993/08/28  18:10:06  mh
  15.   :Update.        tagNextVar
  16.   :Update.
  17.   :Update.        Revision 1.6  1993/08/26  15:27:08  mh
  18.   :Update.        Utility.user vergessen...
  19.   :Update.
  20.   :Update.        Revision 1.5  1993/08/26  14:59:11  mh
  21.   :Update.        tagHide
  22.   :Update.
  23.   :Update.        Revision 1.4  1993/06/29  22:58:07  mh
  24.   :Update.        added some consts
  25.   :Update.
  26.   :Update.        Revision 1.3  1993/06/02  16:08:17  mh
  27.   :Update.        Neues Flag "filtered", neues Feld "folder", korrigiertes tagSelTree.
  28.   :Update.
  29.   :Update.        Revision 1.2  1993/04/06  01:37:23  mh
  30.   :Update.        libVersion auf 10 gesetzt.
  31.   :Update.
  32.   :Update.        Revision 1.1  1993/03/31  20:08:51  mh
  33.   :Update.        Initial revision
  34.   :Update.
  35.   :History.       [mh] 25-Jan-93 added some consts
  36.   :History.       [mh]  6-Oct-92 removed functions for pattern-matching
  37.   :History.       [mh]  2-Jun-93 changed and added some consts
  38.   :Language.      Oberon
  39.   :Translator.    AMIGA OBERON V3.00d
  40. ------------------------------------------------------------------------ *)*)
  41. MODULE ums;
  42.  
  43. IMPORT Utility, Exec, Intuition, SYSTEM;
  44.  
  45. CONST
  46.   libName = "ums.library";
  47.  
  48.   libVersion = 10;
  49.  
  50. VAR
  51.   base * : Exec.LibraryPtr;
  52.  
  53. TYPE
  54.   (* msgs are identified by the following type *)
  55.   NUM *     = LONGINT;
  56.  
  57.   (* general types *)
  58.  
  59. CONST
  60.   MaxMsgs *    = MAX(NUM);
  61.   NumFields *    = 128;
  62.  
  63. TYPE
  64.   APTR *    = Exec.APTR;
  65.   STRPTR* = UNTRACED POINTER TO ARRAY MAX(LONGINT)-1 OF CHAR;
  66.  
  67.   oldMsg *    = ARRAY 16 OF STRPTR;
  68.   oldMsgPtr *    = UNTRACED POINTER TO oldMsg;
  69.  
  70.   MsgTextFields* = ARRAY NumFields OF STRPTR;
  71.   MessageInfo*    = STRUCT
  72.                     hdrLen*    : LONGINT;
  73.                     txtLen*    : LONGINT;
  74.                     date*    : LONGINT;
  75.                     up*, dn*,
  76.                     lt*, rt*    : LONGINT;
  77.                     globalStat*    : LONGSET;
  78.                     userStat*    : LONGSET;
  79.                     loginStat*    : LONGSET;
  80.                     hardLink*    : LONGINT;
  81.                     softLink*    : LONGINT;
  82.                   END;
  83.  
  84. CONST
  85.  
  86.    (* enumeration of fields in an UMS-message *)
  87.  
  88.    msgText *    =  0;
  89.    fromName *    =  1;
  90.    fromAddr *    =  2;
  91.    toName *    =  3;
  92.    toAddr *    =  4;
  93.    msgID *    =  5;
  94.    creationDate*=  6;
  95.    receiveDate*    =  7;
  96.    refID *    =  8;
  97.    group *     =  9;
  98.    subject *     = 10;
  99.    attributes *    = 11;
  100.    comments *    = 12;
  101.    organization*= 13;
  102.    distribution*= 14;
  103.    folder*      = 15;
  104.    fidoID *     = 16;
  105.    mausID *     = 17;
  106.    replyGroup * = 18;
  107.    replyName *  = 19;
  108.    replyAddr *  = 20;
  109.    fidoText *   = 32;
  110.    errorText *  = 33;
  111.    newsreader * = 34;
  112.  
  113.  
  114.   (* user status-bits *)
  115.  
  116.   archive *   = 4;  (* msg should be archived, don't delete *)
  117.   junk *      = 5;  (* negative selection, inheritance suggested *)
  118.   postPoned * = 6;  (* to be read again, (but not now) *)
  119.   selected *  = 7;  (* positive selection, inheritance suggested *)
  120.   filtered *  = 15; (* msg has been processed by filter,
  121.                        'selected' and 'junk' have been properly set *)
  122.  
  123.   Old *        =  8; (* user has already read this Message *)
  124.   Read *    =  Old;
  125.   WriteAccess *    =  9; (* user may change or delete this message *)
  126.   ReadAccess *    = 10; (* user may read this message *)
  127.   ViewAccess *    = 11; (* user may read the header of this message *)
  128.   Owner *    = 12; (* user 'owns' (wrote) this message *)
  129.  
  130.   ProtectedUserFlags*= {WriteAccess,ReadAccess,ViewAccess,Owner};
  131.  
  132.   (* global status-bits *)
  133.  
  134.   Deleted *    = 0; (* msg is really deleted *)
  135.   Expired *    = 1; (* msg has expired and may be deleted *)
  136.   Exported *    = 2; (* msg has been exported *)
  137.   Orphan *    = 3; (* msg could not be exported *)
  138.   Link *    = 4; (* within a ring of linked msgs *)
  139.   HardLink *    = 5; (* link is hardLink *)
  140.  
  141.   ProtectedGlobalFlags*= {Deleted,Exported,Orphan,Link,HardLink};
  142.  
  143. (*** Errors ***)
  144.  
  145. CONST
  146.   ok*        =  0;
  147.   unknown*    =  1;
  148.  
  149.   codeMissing*    = 100;
  150.   forbiddenCode*= 101;
  151.   noWriteAccess*= 102;
  152.   noReader*    = 103;
  153.   noExporter*    = 104;
  154.   badLink*    = 105;
  155.   noWork*    = 106;
  156.   noSysop*    = 107;
  157.   badChange*    = 108;
  158.  
  159.   dupe*        = 200;
  160.   noReadAccess* = 201;
  161.   noViewAccess* = 202;
  162.   msgCorrupted* = 203;
  163.   noHdrSpace*    = 204;
  164.   noSuchMsg*    = 205;
  165.   badName*    = 206;
  166.   badTag*    = 207;
  167.   missingTag*    = 208;
  168.   noSuchUser*    = 209;
  169.   notFound*    = 210;
  170.   autoBounce*    = 211;
  171.   msgDeleted*    = 212;
  172.   noNetAccess*    = 213;
  173.   badPattern*   = 214;
  174.   badVarname*    = 215;
  175.   fsFull*    = 216;
  176.   noMsgMem*     = 217;
  177.   missingIndex* = 218;
  178.  
  179.   serverTerminated*= 300;
  180.   cantWrite*    = 301;
  181.   cantRead*     = 302;
  182.   wrongMsgPtr*  = 303;
  183.   serverNotFree*= 304;
  184.   idCountProb*    = 305;
  185.   noLogin*    = 306;
  186.   wrongServer*    = 307;
  187.   noMem*    = 308;
  188.   wrongTask*    = 309;
  189.  
  190.  
  191.   (* tag-values *)
  192.  
  193.   typeSTRPTR     = 2000H;
  194.   typeVARPAR     = 4000H;
  195.  
  196.  
  197.   (** tags for WriteUMSMsg() **)
  198.  
  199.   (*  add 'typeVARPAR' for ReadUMSMsg()  *)
  200.   (*  no 'typeVARPAR' for WriteUMSMsg()  *)
  201.  
  202.   tagMsgNum *         =  1 + Utility.user;
  203.  
  204.   tagMsgDate *        =  4 + Utility.user;
  205.                                 (* don't usually use when writing!      *)
  206.                                 (* Using tagMsgDate with WriteUMSMsg()  *)
  207.                                 (* has a very special meaning.          *)
  208.   tagChainUp *        =  7 + Utility.user;
  209.   tagHardLink *        = 14 + Utility.user;
  210.   tagSoftLink *        = 15 + Utility.user;
  211.  
  212.   tagAutoBounce *    = 65 + Utility.user;
  213.                                  (* when writing:                *)
  214.                 (* data # 0: server returns error 'autoBounce',    *)
  215.                 (*           but still keeps the Msg and sends    *)
  216.                 (*           it to the sysops.            *)
  217.   tagHdrFill *        = 66 + Utility.user;
  218.                                 (* when writing: how much bytes to be reserved    *)
  219.   tagTxtFill *        = 67 + Utility.user;
  220.                                (*               for header and text        *)
  221.   tagNoUpdate *        = 69 + Utility.user;    
  222.                                 (* data = 0: (default) set 'Old'-Flag when      *)
  223.                 (*           reading or writing            *)
  224.                 (* data = 1: don't touch 'Old'-Flag        *)
  225.   tagHide *             = 70 + Utility.user;   
  226.                                 (* for writing:                                 *)
  227.                                 (* data = 0: default                            *)
  228.                                 (* data = 1: msg only accessible by exporters   *)
  229.                                 (* data = 2: msg only accessible by users       *)
  230.  
  231.   tagMsgText *        =  256 + typeSTRPTR + Utility.user;
  232.   tagFromName *        = tagMsgText + 1;
  233.   tagFromAddr *        = tagMsgText + 2;
  234.   tagToName *        = tagMsgText + 3;
  235.   tagToAddr *        = tagMsgText + 4;
  236.   tagMsgID *        = tagMsgText + 5;
  237.   tagCreationDate *    = tagMsgText + 6;
  238.   tagReceiveDate *    = tagMsgText + 7;
  239.   tagRefID *        = tagMsgText + 8;
  240.   tagGroup *        = tagMsgText + 9;
  241.   tagSubject *        = tagMsgText +10;
  242.   tagAttributes *    = tagMsgText +11;
  243.   tagComments *        = tagMsgText +12;
  244.   tagOrganization *    = tagMsgText +13;
  245.   tagDistribution *    = tagMsgText +14;
  246.   tagFolder *            = tagMsgText +15;
  247.   tagFidoID *        = tagMsgText +16;
  248.   tagMausID *        = tagMsgText +17;
  249.   tagReplyGroup *       = tagMsgText +18;
  250.   tagReplyName *        = tagMsgText +19;
  251.   tagReplyAddr *        = tagMsgText +20;
  252.   tagFidoText *         = tagMsgText +32;
  253.   tagErrorText *        = tagMsgText +33;
  254.   tagNewsreader *       = tagMsgText +34;
  255.  
  256.   (* tagMsgText+15 .. tagMsgText+127 are also usable as text-fields *)
  257.  
  258.   tagTextFields *    = 513 + Utility.user;
  259.                 (* datatype: POINTER TO MsgTextFields *)
  260.  
  261.  
  262.   (** tags for ReadUMSMsg() **)
  263.  
  264.   (*  add 'typeVARPAR' for ReadUMSMsg()  *)
  265.   (*  no 'typeVARPAR' for WriteUMSMsg()  *)
  266.  
  267.   tagRMsgNum *         =  1 + Utility.user;
  268.  
  269.   tagRHdrLength *    =  2 + Utility.user + typeVARPAR;
  270.   tagRTxtLength *    =  3 + Utility.user + typeVARPAR;
  271.   tagRMsgDate *        =  4 + Utility.user + typeVARPAR;
  272.   tagRChainUp *        =  7 + Utility.user + typeVARPAR;
  273.   tagRChainDn *        =  8 + Utility.user + typeVARPAR;
  274.   tagRChainLt *        =  9 + Utility.user + typeVARPAR;
  275.   tagRChainRt *        = 10 + Utility.user + typeVARPAR;
  276.   tagRGlobalFlags *    = 11 + Utility.user + typeVARPAR;
  277.   tagRUserFlags *    = 12 + Utility.user + typeVARPAR;
  278.   tagRLoginFlags *    = 13 + Utility.user + typeVARPAR;
  279.   tagRHardLink *    = 14 + Utility.user + typeVARPAR;
  280.   tagRSoftLink *    = 15 + Utility.user + typeVARPAR;
  281.  
  282.   tagRDateStyle *    = 64 + Utility.user;
  283.                                  (* style for receiveDate when reading:        *)
  284.                 (* data = 0: no receiveDate            *)
  285.                 (* data = 1: emulate old-style receiveDate    *)
  286.   tagRIDStyle *        = 68 + Utility.user;
  287.                                (* style for Message-ID                *)
  288.                  (* data = 0: real Message-ID            *)
  289.                                 (* data = 1: old style dec-number        *)
  290.   tagRNoUpdate *    = 69 + Utility.user;
  291.                               (* data = 0: (default) set 'Old'-Flag when      *)
  292.                 (*           reading or writing            *)
  293.                 (* data = 1: don't touch 'Old'-Flag        *)
  294.  
  295.   tagRMsgText *        =  256 + typeSTRPTR + typeVARPAR + Utility.user;
  296.   tagRFromName *    = tagRMsgText + 1;
  297.   tagRFromAddr *    = tagRMsgText + 2;
  298.   tagRToName *        = tagRMsgText + 3;
  299.   tagRToAddr *        = tagRMsgText + 4;
  300.   tagRMsgID *        = tagRMsgText + 5;
  301.   tagRCreationDate *    = tagRMsgText + 6;
  302.   tagRReceiveDate *    = tagRMsgText + 7;
  303.   tagRRefID *        = tagRMsgText + 8;
  304.   tagRGroup *        = tagRMsgText + 9;
  305.   tagRSubject *        = tagRMsgText +10;
  306.   tagRAttributes *    = tagRMsgText +11;
  307.   tagRComments *    = tagRMsgText +12;
  308.   tagROrganization *    = tagRMsgText +13;
  309.   tagRDistribution *    = tagRMsgText +14;
  310.   tagRFolder *      = tagRMsgText +15;
  311.   tagRFidoID *        = tagRMsgText +16;
  312.   tagRMausID *        = tagRMsgText +17;
  313.   tagRReplyGroup *      = tagRMsgText +18;
  314.   tagRReplyName *       = tagRMsgText +19;
  315.   tagRReplyAddr *       = tagRMsgText +20;
  316.   tagRFidoText *        = tagRMsgText +32;
  317.   tagRErrorText *       = tagRMsgText +33;
  318.   tagRNewsreader *      = tagRMsgText +34;
  319.  
  320.   (* tagRMsgText+15 .. tagRMsgText+127 are also usable as text-fields *)
  321.  
  322.   tagRMsgInfo *        = 512 + Utility.user;
  323.                 (* datatype: POINTER TO MessageInfo *)
  324.   tagRTextFields *    = tagRMsgInfo + 1;
  325.                 (* datatype: POINTER TO MsgTextFields *)
  326.  
  327.   tagRReadHeader *    = tagRMsgInfo + 2;
  328.                 (* read all header-fields *)
  329.   tagRReadAll *        = tagRMsgInfo + 3;
  330.                 (* read all text-fields *)
  331.  
  332.  
  333.   (** tags for UMSSelect()  **)
  334.  
  335.   tagSelSet *        = 1024 + Utility.user;
  336.                 (* flags to set on selected msgs *)
  337.   tagSelUnset *        = tagSelSet + 1;
  338.                 (* flags to clear *)
  339.   tagSelWriteGlobal *    = tagSelSet + 2;
  340.                 (* change global flags, not user-flags *)
  341.   tagSelWriteLocal *    = tagSelSet + 3;
  342.                 (* change login-local flags, not user-flags *)
  343.   tagSelWriteUser *    = tagSelSet + 4+typeSTRPTR;
  344.                 (* change other user's flags *)
  345.  
  346.   tagSelStart *        = tagSelSet + 8;
  347.                 (* process only msgs AFTER this one *)
  348.   tagSelStop *        = tagSelSet + 9;
  349.                 (* process only msgs BEFORE this one *)
  350.  
  351.   (* the following are mutual-exclusiv *)
  352.   (*   use only one of the following operations,   *)
  353.   (*   otherwise unpredictable things may happen!  *)
  354.  
  355.   tagSelReadGlobal *    = tagSelSet +10;
  356.                 (* examine global flags, not user-flags *)
  357.   tagSelReadLocal *    = tagSelSet +11;
  358.                 (* examine login-local flags, not user-flags *)
  359.   tagSelReadUser *    = tagSelSet +12+typeSTRPTR;
  360.                 (* examine other user's flags *)
  361.   tagSelMask *        = tagSelSet +16;
  362.                 (* select msgs, that's flags    *)
  363.   tagSelMatch *        = tagSelSet +17;
  364.                 (*   ANDed with mask equal match *)
  365.   tagSelParent *    = tagSelSet +18;
  366.                 (* examine parent's flags *)
  367.  
  368.   tagSelDate *        = tagSelSet +19;
  369.                 (* select msgs younger than this date *)
  370.  
  371.   tagSelTree *        = tagSelSet +20;
  372.                 (* select whole tree this msg is in *)
  373.  
  374.   tagSelSubTree *    = tagSelSet +21;
  375.                 (* select sub-tree this msg is root of *)
  376.  
  377.   tagSelMsg *        = tagSelSet +22;
  378.                 (* select a msg specified by number *)
  379.  
  380.   tagSelQuick *        = tagSelSet +23;
  381.                 (* quick select enabled *)
  382.   (* tagMsgText .. tagMsgText+127 are also allowed for selecting *)
  383.  
  384.  
  385.   (** tags for UMSSearch() **)
  386.  
  387.   tagSearchLast *    = 2048 + Utility.user;
  388.                 (* number of LAST msg not to search *)
  389.   tagSearchQuick *    = tagSearchLast+ 1;
  390.                 (* quick searches enabled *)
  391.  
  392.   tagSearchGlobal *    = tagSearchLast+ 2;
  393.                 (* examine global flags instead of user-flags*)
  394.   tagSearchLocal *    = tagSearchLast+ 3;
  395.                 (* examine login-local flags, not user-flags *)
  396.   tagSearchUser *    = tagSearchLast+ 4+typeSTRPTR;
  397.                 (* examine other user's flags *)
  398.   tagSearchDirection *    = tagSearchLast+ 5;
  399.                 (* set search direction *)
  400.                 (*  0 = default  *)
  401.                 (*  1 = forward  *)
  402.                 (* -1 = backward *)
  403.   tagSearchPattern *    = tagSearchLast + 6;
  404.                                 (* string in tagMsgText .. tagMsgText+127 is: *)
  405.                                 (* 0: no pattern, just a plain string    *)
  406.                                 (* 1: an AmigaDOS style pattern          *)
  407.                                 (* 2: a pattern, only if it contains     *)
  408.                                 (*    wildcards ('auto-detect patterns') *)
  409.  
  410.   tagSearchMask *    = tagSearchLast+16;
  411.                 (* search a msg, that's flags   *)
  412.   tagSearchMatch *    = tagSearchLast+17;
  413.                 (*   ANDed with mask equal match *)
  414.  
  415.   (* tagMsgText .. tagMsgText+127 are also allowed for searching *)
  416.  
  417.  
  418.   (**  tags for ReadUMSConfig(), WriteUMSConfig()  **)
  419.  
  420.   tagCfgGlobalOnly *    = 3072 + Utility.user;
  421.                                 (* read or write only global config,         *)
  422.                   (* thus must not be combined with tagCfgUser *)
  423.   tagCfgName *        = tagCfgGlobalOnly+ 1 + typeSTRPTR;
  424.                   (* name of config var to read or write       *)
  425.   tagCfgUser *        = tagCfgGlobalOnly+ 2 + typeSTRPTR;
  426.                   (* name of user to read/write locals from/to *)
  427.  
  428.  
  429.   (**  tags for ReadUMSConfig()  **)
  430.  
  431.   tagCfgUserName *    = tagCfgGlobalOnly+ 3 + typeSTRPTR;
  432.                   (* alias to get realname from                *)
  433.   tagCfgNextVar *       = tagCfgGlobalOnly+ 4 + typeSTRPTR;
  434.                                 (* get name of next var                      *)
  435.  
  436.  
  437.   (**  tags for WriteUMSConfig()  **)
  438.  
  439.   tagCfgDump *        = tagCfgGlobalOnly+16 + typeSTRPTR;
  440.                   (* write current settings to a file *)
  441.   tagCfgData *        = tagCfgGlobalOnly+17 + typeSTRPTR;
  442.                 (* data to write to specified var   *)
  443.  
  444.  
  445.  
  446.   (***  functions ***)
  447.  
  448. PROCEDURE Login        *{base,-30}( user{2}    : ARRAY OF CHAR;
  449.                                      passwd{3}    : ARRAY OF CHAR): LONGINT;
  450.  
  451. PROCEDURE Logout    *{base,-36}( account{2}    : LONGINT);
  452.  
  453. (***
  454. PROCEDURE PutUMSMsg    *{base, -42}( account{2}: LONGINT;
  455.                                          Msg{3}    : oldMsgPtr): INTEGER;
  456.  
  457. PROCEDURE GetMsgHdr    *{base, -48}( account{2}: LONGINT;
  458.                                       MsgNum{3}    : NUM): oldMsgPtr;
  459.  
  460. PROCEDURE GetMsgTxt    *{base, -54}( account{2} : LONGINT;
  461.                                       Msg{3}     : oldMsgPtr): INTEGER;
  462.  
  463. PROCEDURE FreeMsg    *{base, -60}( account{2}: LONGINT;
  464.                                       Msg{3}    : oldMsgPtr);
  465.  
  466. PROCEDURE NextNew    *{base, -66}( account{2}: LONGINT;
  467.                                       MsgNum{3}    : NUM): NUM;
  468.  
  469. PROCEDURE SearchID    *{base, -72}( account{2}: LONGINT;
  470.                                       id{3}    : ARRAY OF CHAR): NUM;
  471.  
  472. PROCEDURE ChangeID    *{base, -78}( account{2}: LONGINT;
  473.                                       MsgNum{3}    : NUM;
  474.                                       id{4}    : ARRAY OF CHAR): BOOLEAN;
  475.  
  476. PROCEDURE ChainUp    *{base, -84}( account{2}: LONGINT;
  477.                                       MsgNum{3}    : NUM): NUM;
  478.  
  479. PROCEDURE ChainDn    *{base, -90}( account{2}: LONGINT;
  480.                                       MsgNum{3}    : NUM): NUM;
  481.  
  482. PROCEDURE ChainRt    *{base, -96}( account{2}: LONGINT;
  483.                                       MsgNum{3} : NUM): NUM;
  484.  
  485. PROCEDURE ChainLt    *{base,-102}( account{2}: LONGINT;
  486.                                       MsgNum{3}    : NUM): NUM;
  487.  
  488. PROCEDURE GetGlobal    *{base,-108}( account{2}: LONGINT;
  489.                                       name{3}    : ARRAY OF CHAR;
  490.                       data{4}    : ARRAY OF CHAR);
  491. ***)
  492.  
  493. PROCEDURE DumpConfig    *{base,-114}( account{2}: LONGINT) ;
  494.  
  495. PROCEDURE ErrNum    *{base,-120}( account{2}: LONGINT): INTEGER;
  496.  
  497. PROCEDURE ErrTxt    *{base,-126}( account{2}: LONGINT): STRPTR;
  498.  
  499. PROCEDURE DeleteMsg    *{base,-132}( account{2}: LONGINT;
  500.                                       MsgNum{3}    : NUM): BOOLEAN;
  501.  
  502. PROCEDURE ChangeAttributes*{base,-138}( account{2}: LONGINT;
  503.                                       MsgNum{3} : NUM;
  504.                                       att{4}    : ARRAY OF CHAR): BOOLEAN;
  505.  
  506. PROCEDURE NextStatus    *{base,-144}( account{2}: LONGINT;
  507.                                       from{3}    : NUM;
  508.                                       mask{4}    : SET;
  509.                                       status{5}    : SET): NUM;
  510.  
  511. (*** definetly obsolete
  512. PROCEDURE SelectStatus    *{base,-150}( account{2}: LONGINT;
  513.                                       set{3}    : SET;
  514.                                       mask{4}    : SET;
  515.                                       status{5}    : SET): NUM;
  516.  
  517. PROCEDURE SelectGroup    *{base,-156}( account{2}: LONGINT;
  518.                                       set{3}    : SET;
  519.                                       group{4}    : ARRAY OF CHAR): NUM;
  520. ***)
  521.  
  522. PROCEDURE SetStatus    *{base,-162}( acc{2}    : LONGINT;
  523.                                       MsgNum{3}    : NUM;
  524.                                       unset{4}    : SET;
  525.                                       set{5}: SET);
  526.  
  527. PROCEDURE PrevStatus    *{base,-168}( acc{2}    : LONGINT;
  528.                                       from{3}    : NUM;
  529.                                       mask{4}    : SET;
  530.                                       status{5}    : SET): NUM;
  531.  
  532. PROCEDURE SelStatus    *{base,-174}( acc{2}    : LONGINT;
  533.                                       set{3}    : SET;
  534.                                       unset{4}    : SET;
  535.                                       mask{5}    : SET;
  536.                                       status{6}    : SET): NUM;
  537.  
  538. PROCEDURE SelGroup    *{base,-180}( acc{2}    : LONGINT;
  539.                                       set{3}    : SET;
  540.                                       unset{4}    : SET;
  541.                                       group{5}    : ARRAY OF CHAR): NUM;
  542.  
  543. PROCEDURE GetStatus    *{base,-186}( acc{2}    : LONGINT;
  544.                                       MsgNum{3}    : LONGINT): SET;
  545.  
  546. PROCEDURE FlushUMS    *{base,-192};
  547.  
  548. PROCEDURE CleanMB    *{base,-198}(): INTEGER;
  549.  
  550. PROCEDURE QuitUMS    *{base,-204};
  551.  
  552.  
  553. (*** V8: ***)
  554.  
  555. PROCEDURE UMSARexxQuery    *{base,-210}();
  556.  
  557. (*** V9: ***)
  558.  
  559. (*** Patterns removed 6.10.92
  560.  
  561. PROCEDURE AllocUMSPattern*{base,-216}( pattern{2}: ARRAY OF CHAR;
  562.                                        case{3}    : BOOLEAN): APTR;
  563.  
  564. PROCEDURE FreeUMSPattern*{base,-222}( pHandle{2}: APTR );
  565.  
  566. PROCEDURE MatchUMSPattern*{base,-228}( pHandle{2}: APTR;
  567.                                       string{3}    : ARRAY OF CHAR): BOOLEAN;
  568. ***)
  569.  
  570. PROCEDURE ExportedMsg    *{base,-234}( acc{2}    : LONGINT;
  571.                                       num{3}    : LONGINT);
  572.  
  573. PROCEDURE CannotExport    *{base,-240}( acc{2}    : LONGINT;
  574.                                       num{3}    : LONGINT;
  575.                                       error{4}    : ARRAY OF CHAR): BOOLEAN;
  576.  
  577. PROCEDURE LogUMS    *{base,-246}( acc{2}    : LONGINT;
  578.                                       level{4}    : LONGINT;
  579.                                       format{5}    : ARRAY OF CHAR;
  580.                                       args{6}     : ARRAY OF SYSTEM.BYTE);
  581. PROCEDURE LogUms    *{base,-246}( acc{2}    : LONGINT;
  582.                                       level{4}    : LONGINT;
  583.                                       format{5}    : ARRAY OF CHAR;
  584.                                       args{6}.. : LONGINT);
  585.  
  586. PROCEDURE UMSRLogin    *{base,-252}( server{2}    : ARRAY OF CHAR;
  587.                                       user{3}    : ARRAY OF CHAR;
  588.                                       passwd{4}    : ARRAY OF CHAR): LONGINT;
  589.  
  590. PROCEDURE WriteUMSMsg        *{base,-258}( acc{2}    : LONGINT;
  591.                                              tagItems{3}: ARRAY OF Utility.TagItem): LONGINT;
  592. PROCEDURE WriteUMSMsgTags    *{base,-258}( acc{2}    : LONGINT;
  593.                                           tagItems{3}..: Utility.Tag): LONGINT;
  594.  
  595. PROCEDURE ReadUMSMsg        *{base,-264}( acc{2}    : LONGINT;
  596.                                              tagItems{3}: ARRAY OF Utility.TagItem): BOOLEAN;
  597. PROCEDURE ReadUMSMsgTags    *{base,-264}( acc{2}    : LONGINT;
  598.                                              tagItems{3}..: Utility.Tag): BOOLEAN;
  599.  
  600. PROCEDURE FreeUMSMsg        *{base,-270}( acc{2}    : LONGINT;
  601.                                           msgNum{3}    : LONGINT);
  602.  
  603. PROCEDURE UMSSelect        *{base,-276}( acc{2}    : LONGINT;
  604.                                           tagItems{3}: ARRAY OF Utility.TagItem): LONGINT;
  605. PROCEDURE UMSSelectTags        *{base,-276}( acc{2}    : LONGINT;
  606.                                           tagItems{3}..: Utility.Tag): LONGINT;
  607.  
  608. PROCEDURE UMSSearch        *{base,-282}( acc{2}    : LONGINT;
  609.                                           tagItems{3}: ARRAY OF Utility.TagItem): LONGINT;
  610. PROCEDURE UMSSearchTags        *{base,-282}( acc{2}    : LONGINT;
  611.                                           tagItems{3}..: Utility.Tag): LONGINT;
  612.  
  613. PROCEDURE ReadUMSConfig        *{base,-288}( acc{2}: LONGINT;
  614.                                           tagItems{3}: ARRAY OF Utility.TagItem): STRPTR;
  615. PROCEDURE ReadUMSConfigTags    *{base,-288}( acc{2}: LONGINT;
  616.                                               tagItems{3}..: Utility.Tag): STRPTR;
  617.  
  618. PROCEDURE FreeUMSConfig        *{base,-294}( acc{2}    : LONGINT;
  619.                                               str{3}    : STRPTR);
  620.  
  621. PROCEDURE WriteUMSConfig    *{base,-300}( acc{2}: LONGINT;
  622.                                           tagItems{3}: ARRAY OF Utility.TagItem): BOOLEAN;
  623. PROCEDURE WriteUMSConfigTags    *{base,-300}( acc{2}: LONGINT;
  624.                                               tagItems{3}..: Utility.Tag): BOOLEAN;
  625.  
  626. PROCEDURE PrivateServerCall    *{base,-306}( command{2}: LONGINT;
  627.                                               arg{3}    : APTR): LONGINT;
  628.  
  629. BEGIN
  630.   base := Exec.OpenLibrary( libName, libVersion);
  631.   IF base=NIL THEN
  632.     SYSTEM.SETREG(0,Intuition.DisplayAlert(0,"\x00\x64\x14missing ums.library\o\o",50));
  633.     HALT(0)
  634.   END;
  635.  
  636. CLOSE
  637.   IF base#NIL THEN Exec.CloseLibrary(base) END;
  638. END ums.
  639.