home *** CD-ROM | disk | FTP | other *** search
- #ifndef fslock_H
- #define fslock_H
-
- /* C header file for FSLock
- * written by DefMod (Jun 20 1995) on Thu Jun 29 16:57:21 1995
- * Jonathan Coxhead, Acorn Computers Ltd
- */
-
- #ifndef types_H
- #include "types.h"
- #endif
-
- #ifndef os_H
- #include "os.h"
- #endif
-
- #ifndef fileswitch_H
- #include "fileswitch.h"
- #endif
-
- /**********************************
- * SWI names and SWI reason codes *
- **********************************/
- #undef FSLock_Version
- #define FSLock_Version 0x44780
- #undef XFSLock_Version
- #define XFSLock_Version 0x64780
- #undef FSLock_Status
- #define FSLock_Status 0x44781
- #undef XFSLock_Status
- #define XFSLock_Status 0x64781
- #undef FSLock_ChangeStatus
- #define FSLock_ChangeStatus 0x44782
- #undef XFSLock_ChangeStatus
- #define XFSLock_ChangeStatus 0x64782
-
- /********************
- * Type definitions *
- ********************/
- typedef int fslock_lock_status;
-
- /************************
- * Constant definitions *
- ************************/
- #define fslock_STATUS_UNLOCKED ((fslock_lock_status) 0x0u)
- #define fslock_STATUS_PROTECTED ((fslock_lock_status) 0x1u)
- #define fslock_STATUS_LOCKED ((fslock_lock_status) 0x2u)
- #define error_FS_LOCK_UNKNOWN_SWI 0x806500u
- #define error_FS_LOCK_LOCKED 0x806501u
- #define error_FS_LOCK_UNKNOWN_FS 0x806502u
- #define error_FS_LOCK_FS_NOT_LOCKABLE 0x806503u
- #define error_FS_LOCK_NO_LOCKED_FS 0x806504u
- #define error_FS_LOCK_PROTECTED_DISC 0x806505u
- #define error_FS_LOCK_KILLED 0x806506u
-
- /*************************
- * Function declarations *
- *************************/
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- /* ------------------------------------------------------------------------
- * Function: fslock_version()
- *
- * Description: Returns information describing the FSLock module - RISC O
- * S 3.5+
- *
- * Output: version - value of R0 on exit (X version only)
- * workspace - value of R1 on exit
- *
- * Returns: R0 (non-X version only)
- *
- * Other notes: Calls SWI 0x44780.
- */
-
- extern os_error *xfslock_version (int *version,
- void **workspace);
- extern int fslock_version (void **workspace);
-
- /* ------------------------------------------------------------------------
- * Function: fslock_status()
- *
- * Description: Returns the current lock status, and the locked filing
- * system's number - RISC O S 3.5+
- *
- * Output: lock_status - value of R0 on exit (X version only)
- * fs_no - value of R1 on exit
- *
- * Returns: R0 (non-X version only)
- *
- * Other notes: Calls SWI 0x44781.
- */
-
- extern os_error *xfslock_status (fslock_lock_status *lock_status,
- fileswitch_fs_no *fs_no);
- extern fslock_lock_status fslock_status (fileswitch_fs_no *fs_no);
-
- /* ------------------------------------------------------------------------
- * Function: fslock_change_status()
- *
- * Description: Changes one or more of the lock status, the password and
- * the locked filing system - RISC O S 3.5+
- *
- * Input: new_lock_status - value of R0 on entry
- * password - value of R1 on entry
- * new_password - value of R2 on entry
- * new_fs_no - value of R3 on entry
- *
- * Other notes: Calls SWI 0x44782.
- */
-
- extern os_error *xfslock_change_status (fslock_lock_status new_lock_status,
- char const *password,
- char const *new_password,
- fileswitch_fs_no new_fs_no);
- __swi (0x44782) void fslock_change_status (fslock_lock_status new_lock_status,
- char const *password,
- char const *new_password,
- fileswitch_fs_no new_fs_no);
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif
-