1 #ifndef DOS_NOTIFY_H
    2 #define DOS_NOTIFY_H
    3 
    4 /*
    5 	dos notification definitions
    6 
    7 	Copyright © 2002 The MorphOS Development Team, All Rights Reserved.
    8 */
    9 
   10 #ifndef EXEC_TYPES_H
   11 # include <exec/types.h>
   12 #endif
   13 
   14 #ifndef EXEC_PORTS_H
   15 # include <exec/ports.h>
   16 #endif
   17 
   18 #ifndef EXEC_TASKS_H
   19 # include <exec/tasks.h>
   20 #endif
   21 
   22 #pragma pack(2)
   23 
   24 
   25 #define NOTIFY_CLASS  0x40000000
   26 #define NOTIFY_CODE   0x1234
   27 
   28 
   29 struct NotifyMessage
   30 {
   31 	struct Message        nm_ExecMessage;
   32 	ULONG                 nm_Class;
   33 	UWORD                 nm_Code;
   34 	struct NotifyRequest *nm_NReq;
   35 	ULONG                 nm_DoNotTouch;
   36 	ULONG                 nm_DoNotTouch2;
   37 };
   38 
   39 struct NotifyRequest
   40 {
   41 	UBYTE          *nr_Name;
   42 	UBYTE          *nr_FullName;
   43 	ULONG           nr_UserData;
   44 	ULONG           nr_Flags;
   45 
   46 	union
   47 	{
   48 		struct
   49 		{
   50 			struct MsgPort *nr_Port;
   51 		} nr_Msg;
   52 
   53 		struct
   54 		{
   55 			struct Task *nr_Task;
   56 			UBYTE        nr_SignalNum;
   57 			UBYTE        nr_pad[3];
   58 		} nr_Signal;
   59 	}               nr_stuff;
   60 
   61 	ULONG           nr_Reserved[4];
   62 
   63 	ULONG           nr_MsgCount;
   64 	struct MsgPort *nr_Handler;
   65 };
   66 
   67 
   68 #define NRB_SEND_MESSAGE    0
   69 #define NRB_SEND_SIGNAL     1
   70 #define NRB_WAIT_REPLY      3
   71 #define NRB_NOTIFY_INITIAL  4
   72 
   73 #define NRB_MAGIC           31
   74 
   75 #define NRF_SEND_MESSAGE    (1<<NRB_SEND_MESSAGE)
   76 #define NRF_SEND_SIGNAL     (1<<NRB_SEND_SIGNAL)
   77 #define NRF_WAIT_REPLY      (1<<NRB_WAIT_REPLY)
   78 #define NRF_NOTIFY_INITIAL  (1<<NRB_NOTIFY_INITIAL)
   79 
   80 #define NRF_MAGIC           (1<<NRB_MAGIC)
   81 
   82 
   83 #define NR_HANDLER_FLAGS  0xffff0000
   84 
   85 
   86 #pragma pack()
   87 
   88 #endif /* DOS_NOTIFY_H */