home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / oslib / oslib_1 / OSLib / Computer / h / nfs < prev    next >
Encoding:
Text File  |  1995-07-12  |  5.6 KB  |  202 lines

  1. #ifndef nfs_H
  2. #define nfs_H
  3.  
  4. /* C header file for NFS
  5.  * written by DefMod (Jul  7 1995) on Wed Jul 12 15:21:50 1995
  6.  * Jonathan Coxhead, Acorn Computers Ltd
  7.  */
  8.  
  9. #ifndef types_H
  10. #include "types.h"
  11. #endif
  12.  
  13. #ifndef os_H
  14. #include "os.h"
  15. #endif
  16.  
  17. /**********************************
  18.  * SWI names and SWI reason codes *
  19.  **********************************/
  20. #undef  NFS_Mount
  21. #define NFS_Mount                               0x410C0
  22. #undef  XNFS_Mount
  23. #define XNFS_Mount                              0x610C0
  24. #undef  NFS_MountList
  25. #define NFS_MountList                           0x410C1
  26. #undef  XNFS_MountList
  27. #define XNFS_MountList                          0x610C1
  28. #undef  NFS_SetUser
  29. #define NFS_SetUser                             0x410C2
  30. #undef  XNFS_SetUser
  31. #define XNFS_SetUser                            0x610C2
  32. #undef  NFS_Dismount
  33. #define NFS_Dismount                            0x410C3
  34. #undef  XNFS_Dismount
  35. #define XNFS_Dismount                           0x610C3
  36. #undef  NFS_MountInfo
  37. #define NFS_MountInfo                           0x410C4
  38. #undef  XNFS_MountInfo
  39. #define XNFS_MountInfo                          0x610C4
  40. #undef  NFS_FreeSpace
  41. #define NFS_FreeSpace                           0x410C5
  42. #undef  XNFS_FreeSpace
  43. #define XNFS_FreeSpace                          0x610C5
  44. #undef  Service_NFS
  45. #define Service_NFS                             0x61
  46.  
  47. /************************
  48.  * Constant definitions *
  49.  ************************/
  50. #define nfs_NOBODY_ID                           32767
  51. #define nfs_NOBODY_GROUP                        9999
  52.  
  53. /*************************
  54.  * Function declarations *
  55.  *************************/
  56.  
  57. #ifdef __cplusplus
  58.    extern "C" {
  59. #endif
  60.  
  61. /* ------------------------------------------------------------------------
  62.  * Function:      nfs_mount()
  63.  *
  64.  * Description:   Mounts a directory
  65.  *
  66.  * Input:         file_server - value of R0 on entry
  67.  *                mount_name - value of R1 on entry
  68.  *                path - value of R2 on entry
  69.  *
  70.  * Other notes:   Calls SWI 0x410C0.
  71.  */
  72.  
  73. extern os_error *xnfs_mount (char const *file_server,
  74.       char const *mount_name,
  75.       char const *path);
  76. __swi (0x410C0) void nfs_mount (char const *file_server,
  77.       char const *mount_name,
  78.       char const *path);
  79.  
  80. /* ------------------------------------------------------------------------
  81.  * Function:      nfs_mount_list()
  82.  *
  83.  * Description:   Lists current mount points
  84.  *
  85.  * Input:         file_server - value of R0 on entry
  86.  *                context - value of R1 on entry
  87.  *
  88.  * Output:        context_out - value of R1 on exit (X version only)
  89.  *
  90.  * Returns:       R1 (non-X version only)
  91.  *
  92.  * Other notes:   Calls SWI 0x410C1.
  93.  */
  94.  
  95. extern os_error *xnfs_mount_list (char const *file_server,
  96.       char *context,
  97.       char **context_out);
  98. extern char *nfs_mount_list (char const *file_server,
  99.       char *context);
  100.  
  101. /* ------------------------------------------------------------------------
  102.  * Function:      nfs_set_user()
  103.  *
  104.  * Description:   Sets the current user
  105.  *
  106.  * Input:         name_server - value of R0 on entry
  107.  *                user_name - value of R1 on entry
  108.  *                password - value of R2 on entry
  109.  *
  110.  * Other notes:   Calls SWI 0x410C2.
  111.  */
  112.  
  113. extern os_error *xnfs_set_user (char const *name_server,
  114.       char const *user_name,
  115.       char const *password);
  116. __swi (0x410C2) void nfs_set_user (char const *name_server,
  117.       char const *user_name,
  118.       char const *password);
  119.  
  120. /* ------------------------------------------------------------------------
  121.  * Function:      nfs_dismount()
  122.  *
  123.  * Description:   Dismounts a directory
  124.  *
  125.  * Input:         file_server - value of R0 on entry
  126.  *                mount_name - value of R1 on entry
  127.  *
  128.  * Other notes:   Calls SWI 0x410C3.
  129.  */
  130.  
  131. extern os_error *xnfs_dismount (char const *file_server,
  132.       char const *mount_name);
  133. __swi (0x410C3) void nfs_dismount (char const *file_server,
  134.       char const *mount_name);
  135.  
  136. /* ------------------------------------------------------------------------
  137.  * Function:      nfs_mount_info()
  138.  *
  139.  * Description:   Provides information about a given mount
  140.  *
  141.  * Input:         mount_name - value of R1 on entry
  142.  *
  143.  * Output:        file_server - value of R0 on exit
  144.  *                path - value of R2 on exit
  145.  *                user_name - value of R3 on exit
  146.  *                name_server - value of R4 on exit
  147.  *
  148.  * Other notes:   Calls SWI 0x410C4.
  149.  */
  150.  
  151. extern os_error *xnfs_mount_info (char const *mount_name,
  152.       char **file_server,
  153.       char **path,
  154.       char **user_name,
  155.       char **name_server);
  156. extern void nfs_mount_info (char const *mount_name,
  157.       char **file_server,
  158.       char **path,
  159.       char **user_name,
  160.       char **name_server);
  161.  
  162. /* ------------------------------------------------------------------------
  163.  * Function:      nfs_free_space()
  164.  *
  165.  * Description:   Provides free-space information about a mount
  166.  *
  167.  * Input:         mount_name - value of R1 on entry
  168.  *
  169.  * Output:        free - value of R0 on exit (X version only)
  170.  *                size - value of R2 on exit
  171.  *                unused - value of R3 on exit
  172.  *
  173.  * Returns:       R0 (non-X version only)
  174.  *
  175.  * Other notes:   Calls SWI 0x410C5.
  176.  */
  177.  
  178. extern os_error *xnfs_free_space (char const *mount_name,
  179.       int *free,
  180.       int *size,
  181.       int *unused);
  182. extern int nfs_free_space (char const *mount_name,
  183.       int *size,
  184.       int *unused);
  185.  
  186. /* ------------------------------------------------------------------------
  187.  * Function:      service_nfs()
  188.  *
  189.  * Description:   An N F S mount or dismount has occurred
  190.  *
  191.  * Other notes:   Calls SWI 0x30 with R1 = 0x61.
  192.  */
  193.  
  194. extern os_error *xservice_nfs (void);
  195. extern void service_nfs (void);
  196.  
  197. #ifdef __cplusplus
  198.    }
  199. #endif
  200.  
  201. #endif
  202.