home *** CD-ROM | disk | FTP | other *** search
- /*
- halt.h --- halt library definitions.
-
- (c) Copyright 1995 SHW Wabnitz
- Written by Bernhard Fastenrath (fasten@shw.com)
-
- This file may be distributed under the terms
- of the GNU General Public License.
- */
-
- #ifndef HALT_H
- #define HALT_H
-
- /* definitions for the sm_Status field:
- SHUTDOWN_WARN: system might go down
- SHUTDOWN_INFO: check sm_Info field
- SHUTDOWN_ABORT: shutdown cancelled
- SHUTDOWN_NOW: system is going down in a few seconds
- SHUTDOWN_UMOUNT: accessing files is pointless from now on
- SHUTDOWN_HALT: the system is down
- */
- #define SHUTDOWN_WARN 0x01
- #define SHUTDOWN_INFO 0x02
- #define SHUTDOWN_ABORT 0x04
- #define SHUTDOWN_NOW 0x08
- #define SHUTDOWN_UMOUNT 0x10
- #define SHUTDOWN_HALT 0x20
-
- /* definitions for the sm_Info field:
- SDMI_UPS_MONITOR: UPS monitor report (sm_Extra points to struct UpsInfo)
- SDMI_TIME_CHANGE: Shutdown has been speed up or delayed.
- */
- #define SDMI_UPS_MONITOR 0x01
- #define SDMI_TIME_CHANGE 0x02
-
- /* definitions for the sm_Flags field (version 1.1):
- SDMF_ABORTABLE: set by master to allow clients to cancel the shutdown
- SDMF_CANCEL: set by client to cancel shutdown
- SDMF_CTRL_C: CTRL-C received, set together with SDMF_CANCEL
- SDMF_SIG_MASK: A signal set in sm_Mask was received
- */
- #define SDMF_ABORTABLE 0x01
- #define SDMF_CANCEL 0x02
- #define SDMF_CTRL_C 0x04
- #define SDMF_SIG_MASK 0x08
-
- typedef struct { /* version 2.0 */
- ULONG sc_Mask;
- ULONG sc_rMask;
- struct MsgPort *sc_Port;
- ULONG sc_TimeOuts;
- struct List sc_List;
- ULONG sc_Reserved[8];
- } ShutdownContext;
-
- typedef struct {
- struct Message sm_Msg;
- ULONG sm_Status;
- ULONG sm_TimeLeft;
- ULONG sm_Info;
- void *sm_Extra;
- ULONG sm_Flags; /* v1.1 */
- ShutdownContext *sm_Context; /* v2.0 */
- ULONG sm_Reserved[2];
- } ShutdownMessage;
-
- typedef struct {
- struct MinNode sn_MinNode;
- ShutdownMessage sn_Msg;
- } ShutdownNode;
-
- #endif /* HALT_H */
-