home *** CD-ROM | disk | FTP | other *** search
- #ifndef fslock_H
- #define fslock_H
-
- /* C header file for FSLock
- * written by DefMod (Sep 16 1994) on Fri Sep 30 15:17:57 1994
- * Copyright © Acorn Computers Ltd, 1994
- */
-
- /*************************************************************************
- * This source file was written by Acorn Computers Limited. It is part *
- * of the OSLib library for writing applications for RISC OS. It may be *
- * used freely in the creation of programs for RISC OS. *
- *************************************************************************/
-
- #ifndef types_H
- #include "types.h"
- #endif
-
- #ifndef os_H
- #include "os.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
-
- /************************
- * Constant definitions *
- ************************/
- #define fslock_STATUS_UNLOCKED 0
- #define fslock_STATUS_PROTECTED 1
- #define fslock_STATUS_LOCKED 2
- #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
-
- /*************************************************************
- * NOTE: The following functions provide direct access to *
- * the SWI's noted in the function description. *
- * Please read the relevant PRM section for more *
- * information on their input/output parameters. *
- *************************************************************/
-
- /* ------------------------------------------------------------------------
- * Function: fslock_version()
- *
- * Description: Returns information describing the FSLock module
- *
- * 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
- *
- * 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 (int *lock_status,
- int *fs_no);
- extern int fslock_status (int *fs_no);
-
- /* ------------------------------------------------------------------------
- * Function: fslock_change_status()
- *
- * Description: Changes one or more of the lock status, the password and
- * the locked filing system
- *
- * 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 (int new_lock_status,
- char *password,
- char *new_password,
- int new_fs_no);
- extern void fslock_change_status (int new_lock_status,
- char *password,
- char *new_password,
- int new_fs_no);
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif
-