home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / hrxpass.zip / HRxPass.txt < prev   
Text File  |  1996-06-13  |  5KB  |  182 lines

  1. HRxPass
  2.  
  3. A Rexx Dll interface to Inet.Mail
  4.  
  5. // ------------------------------------------------------------------
  6.  
  7. For many functions, a standard format for infomration is used. A
  8. stem variable is used to pass information to the function and to
  9. return it from others:
  10.  
  11. stem.realname   -- The user's real name
  12. stem.username   -- The username
  13. stem.password   -- The password
  14. stem.emaildir   -- The email directory
  15. stem.passtype   -- The type of password (value either APOP or PASS)
  16. stem.forward    -- Flag for forwarding mail (TRUE or FALSE)
  17. stem.foraddr    -- The forwarding address
  18. stem.localproc  -- Flag for local processing (TRUE or FALSE)
  19. stem.procname   -- The full pathname of the local process
  20. stem.ccmail     -- Flag to cc mail (TRUE or FALSE)
  21. stem.ccaddr     -- The cc mail address
  22.  
  23. The stem name may be any valid rexx variable. The field names are
  24. required as shown. This is considered the "passinfo" variable type
  25. as used in the function descriptions.
  26.  
  27. // ------------------------------------------------------------------
  28.  
  29. Function:  HCreateUser
  30. Syntax:    HCreateUser( <passfile>, <passinfo>)
  31.  
  32. Description:
  33.  
  34. <passfile> -- The name (or pathname) to the password file
  35. <passinfo> -- Information as above
  36.  
  37. This function will create a new user if one by the given name
  38. does not exist. If the user exists, it will update that user
  39. with the new information. All fields should be filled in for
  40. updating.
  41.  
  42. Return values:
  43.  
  44. "Error 1. Wrong Number of Arguments."
  45. "Error 2. Semaphore unavailable."
  46. "Error 3. Cannot create/update user."
  47. "OK. User created/updated."
  48.  
  49. // ------------------------------------------------------------------
  50.  
  51. Function:  HDeleteUser
  52. Syntax:    HDeleteUser(<passfile>, <username>)
  53.  
  54. Description:
  55.  
  56. <passfile> -- The name (or pathname) to the password file.
  57. <username> -- The user to delete.
  58.  
  59. This function will delete the named user.
  60.  
  61. Return values:
  62.  
  63. "Error 1. Wrong Number of Arguments."
  64. "Error 2. Semaphore unavailable."
  65. "Error 4. Cannot delete user."
  66. "OK. User deleted."
  67.  
  68. // ------------------------------------------------------------------
  69.  
  70. Function:  HQueryUser
  71. Syntax:    HQueryUser(<passfile>, <username>)
  72.  
  73. Description:
  74.  
  75. <passfile> -- The name (or pathname) to the password file.
  76. <username> -- The user to query for.
  77.  
  78. This function will return TRUE if the given user exists.
  79.  
  80. Return values:
  81.  
  82. "Error 1. Wrong Number of Arguments."
  83. "Error 2. Semaphore unavailable."
  84. "Error 5. User does not exist."
  85. "OK. User exists."
  86.  
  87. // ------------------------------------------------------------------
  88.  
  89. Function:  HListUsers
  90. Syntax:    HListUsers(<passfile>, <username>)
  91.  
  92. Description:
  93.  
  94. <passfile> -- The name (or pathname) to the password file.
  95. <username> -- A stem variable holding all the usernames. username.0 holds
  96.               the number of users.
  97.  
  98. This function will return a list of usernames.
  99.  
  100. Return values:
  101.  
  102. "Error 1. Wrong Number of Arguments."
  103. "Error 2. Semaphore unavailable."
  104. "Error 6. Stem variable not present."
  105. "Error 7. User list not available."
  106. "Error 8. Error storing stem variable."
  107. "OK. Users listed."
  108.  
  109. // ------------------------------------------------------------------
  110.  
  111. Function:  HUserInfo
  112. Syntax:    HUserInfo( <passfile>, <passinfo>)
  113.  
  114. Description:
  115.  
  116. <passfile> -- The name (or pathname) to the password file
  117. <passinfo> -- Information as above
  118.  
  119. This function will return the user information for the user
  120. listed in passinfo.username. Previous information will be
  121. overwritten.
  122.  
  123. Return values:
  124.  
  125. "Error 1. Wrong Number of Arguments."
  126. "Error 2. Semaphore unavailable."
  127. "Error 9. User info not available."
  128. "OK. User info available."
  129.  
  130. // ------------------------------------------------------------------
  131.  
  132. Function:  HCheckUser
  133. Syntax:    HCheckUser( <passfile>, <passinfo>)
  134.  
  135. Description:
  136.  
  137. <passfile> -- The name (or pathname) to the password file
  138. <passinfo> -- Information as above
  139.  
  140. This function will check whether the given username and password
  141. are valid.
  142.  
  143. Return values:
  144.  
  145. "Error 1. Wrong Number of Arguments."
  146. "Error 2. Semaphore unavailable."
  147. "Error 10. User not ok."
  148. "OK. User ok."
  149.  
  150. // ------------------------------------------------------------------
  151.  
  152. Function Name:  HPassLoadFuncs
  153. Syntax:         HPassLoadFuncs()
  154.  
  155. Description:
  156.  
  157. This functions loads all functions.
  158.  
  159. Return Values:
  160.  
  161. "Error 1. Wrong Number of Arguments."
  162. "OK. Functions loaded."
  163.  
  164. // ------------------------------------------------------------------
  165.  
  166. Function Name:  HPassDropFuncs
  167. Syntax:         HPassDropFuncs()
  168.  
  169. Description:
  170.  
  171. This functions unloads all functions.
  172.  
  173. Return Values:
  174.  
  175. "Error 1. Wrong Number of Arguments."
  176. "OK. Functions dropped."
  177.  
  178. // ------------------------------------------------------------------
  179.  
  180.  
  181.  
  182.