home *** CD-ROM | disk | FTP | other *** search
/ PC World 2002 May / PCWorld_2002-05_cd.bin / Komunik / sambar / sambar51p.exe / samples / include / login.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-02-13  |  3.9 KB  |  130 lines

  1. /*
  2. ** LOGIN.H
  3. **
  4. **      This header file contains the public HTTP interfaces used by the
  5. **        Sambar Server for interfacing with User Login/Logout/Profile
  6. **        Management.
  7. **
  8. **        Confidential Property of Tod Sambar
  9. **        (c) Copyright Tod Sambar 1996-1997
  10. **        All rights reserved.
  11. **
  12. **
  13. ** History:
  14. ** Chg#    Date    Description                                                Resp
  15. ** ----    -------    -------------------------------------------------------    ----
  16. **        27JAN97    Created                                                    sambar
  17. **        25MAR97    Added FTP support                                        sambar
  18. */
  19.  
  20. #if     !defined(__LOGIN_H__)
  21. #define __LOGIN_H__
  22.  
  23. #include    <sambar.h>
  24.  
  25. #ifndef    WIN32
  26. #define    stricmp    strcasecmp
  27. #endif    /* WIN32 */
  28.  
  29. /*
  30. ** Login/Logout/Profile Management Defines
  31. */
  32. #define LOGIN_PROFILE_KEY        "Profile"
  33.  
  34. /*
  35. ** User Profile Structure
  36. */
  37. typedef struct    login__profile
  38. {
  39.     SA_INT        privs;
  40.     SA_PROFILE    *data;
  41.     SA_CHAR        name[SA_MAX_NAME + 1];
  42.     SA_CHAR        group[SA_MAX_NAME + 1];
  43.     SA_CHAR        username[SA_MAX_NAME + 1];
  44.     SA_CHAR        dir[SA_MAX_PATH + 1];
  45.     SA_CHAR        davdir[SA_MAX_PATH + 1];
  46.  
  47. } LOGIN_PROFILE;
  48.  
  49.  
  50. /*
  51. ** Sambar Server/User Login/Logout/Profile DLL Function Prototypes
  52. */
  53. #if defined(__cplusplus)
  54. extern "C" {
  55. #endif /* defined(__cplusplus) */
  56.  
  57. extern SA_RETCODE SA_EXPORT        login_init(SA_CTX *sactx);
  58.  
  59. extern SA_RETCODE SA_EXPORT        user_login(SA_CTX *sactx, SA_CONN *saconn,
  60.                                     SA_CHAR *username, SA_INT usernamelen,
  61.                                     SA_CHAR *password, SA_INT passwordlen,
  62.                                     SA_INT *infop);
  63.  
  64. extern SA_RETCODE SA_EXPORT        user_logout(SA_CTX *sactx, SA_CONN *saconn);
  65.  
  66. extern SA_RETCODE SA_EXPORT        user_profile(SA_CTX *sactx, SA_CONN *saconn,
  67.                                     SA_INT action, SA_CHAR *name, 
  68.                                     SA_INT namelen, SA_VOID *datap);
  69.  
  70. /*
  71. ** User Management
  72. */
  73. extern SA_RETCODE SA_PUBLIC        user_add(SA_CTX *sactx, SA_CONN *saconn,
  74.                                     SA_PARAMS *saparams, SA_INT *infop);
  75. extern SA_RETCODE SA_PUBLIC        user_delete(SA_CTX *sactx, SA_CONN *saconn,
  76.                                     SA_PARAMS *saparams, SA_INT *infop);
  77. extern SA_RETCODE SA_PUBLIC        user_update(SA_CTX *sactx, SA_CONN *saconn,
  78.                                     SA_PARAMS *saparams, SA_INT *infop);
  79. extern SA_RETCODE SA_PUBLIC        user_list(SA_CTX *sactx, SA_CONN *saconn,
  80.                                     SA_PARAMS *saparams, SA_INT *infop);
  81. extern SA_RETCODE SA_PUBLIC        user_select(SA_CTX *sactx, SA_CONN *saconn,
  82.                                     SA_PARAMS *saparams, SA_INT *infop);
  83. extern SA_RETCODE SA_PUBLIC        user_prop(SA_CTX *sactx, SA_CONN *saconn,
  84.                                     SA_PARAMS *saparams, SA_INT *infop);
  85. extern SA_RETCODE SA_PUBLIC        user_passwd(SA_CTX *sactx, SA_CONN *saconn,
  86.                                     SA_PARAMS *saparams, SA_INT *infop);
  87. extern SA_RETCODE SA_PUBLIC        user_maillist(SA_CTX *sactx, SA_CONN *saconn,
  88.                                     SA_PARAMS *saparams, SA_INT *infop);
  89. extern SA_RETCODE SA_PUBLIC        user_mailbox(SA_CTX *sactx, SA_CONN *saconn,
  90.                                     SA_PARAMS *saparams, SA_INT *infop);
  91.  
  92. /*
  93. ** Group Management
  94. */
  95. extern SA_RETCODE SA_PUBLIC        group_add(SA_CTX *sactx, SA_CONN *saconn,
  96.                                     SA_PARAMS *saparams, SA_INT *infop);
  97. extern SA_RETCODE SA_PUBLIC        group_delete(SA_CTX *sactx, SA_CONN *saconn,
  98.                                     SA_PARAMS *saparams, SA_INT *infop);
  99. extern SA_RETCODE SA_PUBLIC        group_list(SA_CTX *sactx, SA_CONN *saconn,
  100.                                     SA_PARAMS *saparams, SA_INT *infop);
  101. extern SA_RETCODE SA_PUBLIC        group_select(SA_CTX *sactx, SA_CONN *saconn,
  102.                                     SA_PARAMS *saparams, SA_INT *infop);
  103.  
  104. /*
  105. ** FTP Connect
  106. */
  107. extern SA_RETCODE SA_EXPORT        ftp_connect(SA_CTX *sactx, SA_CHAR *user,
  108.                                     SA_INT userlen, SA_CHAR *passwd, 
  109.                                     SA_INT passwdlen, SA_FTP *ftpresp);
  110.  
  111. /*
  112. ** MAIL Connect
  113. */
  114. extern SA_RETCODE SA_EXPORT        mail_connect(SA_CTX *sactx, SA_CHAR *user,
  115.                                     SA_INT userlen, SA_CHAR *passwd, 
  116.                                     SA_INT passwdlen);
  117.  
  118. /*
  119. ** Telnet Connect
  120. */
  121. extern SA_RETCODE SA_EXPORT        telnet_connect(SA_CTX *sactx, SA_CHAR *user,
  122.                                     SA_INT userlen, SA_CHAR *passwd, 
  123.                                     SA_INT passwdlen);
  124.  
  125. #if defined(__cplusplus)
  126. }
  127. #endif /* defined(__cplusplus) */
  128.  
  129. #endif /* __LOGIN_H__ */
  130.