5 Copyright © 1995-2004, The AROS Development Team. All rights reserved.
12 # include <exec/ports.h>
15 # include <exec/tasks.h>
18 # include <exec/types.h>
21 /*** NotifyRequest **********************************************************/
24 General notification structure as passed to StartNotify() and EndNotify().
25 After passing it to StartNotify() the first time, this structure becomes
31 STRPTR nr_Name
; /* Name of the watched file. */
32 STRPTR nr_FullName
; /* Fully qualified name of the watched file. This is
34 IPTR nr_UserData
; /* Fill in with your own data. */
35 ULONG nr_Flags
; /* see below */
38 The following union specified the way to notify the application, if
39 the watched file changes. IF NRF_SEND_MESSAGE is set, nr_Msg is used,
40 when NRF_SEND_SIGNAL is set, nr_Signal is used.
46 struct MsgPort
* nr_Port
; /* Port to send message to. */
50 struct Task
* nr_Task
; /* Task to notify. */
51 UBYTE nr_SignalNum
; /* Signal number to set. */
52 UBYTE nr_pad
[3]; /* PRIVATE */
56 ULONG nr_Reserved
[4]; /* PRIVATE! Set to 0 for now. */
58 /* The following fields are for PRIVATE use by handlers. */
59 ULONG nr_MsgCount
; /* Number of unreplied messages. */
61 /* This used to be struct MsgPort *nr_Handler but as AROS filesystems
62 are different and this is a PRIVATE field anyway no Amiga programs
63 should use it, so I changed it -- SDuvan */
64 struct Device
*nr_Device
;
68 /* The two following flags specify by which means the watching task is to be
70 #define NRB_SEND_MESSAGE 0 /* Send a message to the specified message port. */
71 #define NRB_SEND_SIGNAL 1 /* Set a signal of the specified task. */
72 #define NRB_WAIT_REPLY 3 /* Wait for a reply by the application before
73 going on with watching? */
74 #define NRB_NOTIFY_INITIAL 4 /* Notify if the file/directory exists when
75 the notification request is posted */
77 #define NRF_SEND_MESSAGE (1L<<NRB_SEND_MESSAGE)
78 #define NRF_SEND_SIGNAL (1L<<NRB_SEND_SIGNAL)
79 #define NRF_WAIT_REPLY (1L<<NRB_WAIT_REPLY)
80 #define NRF_NOTIFY_INITIAL (1L<<NRB_NOTIFY_INITIAL)
82 /* The following flags are for use by handlers only! */
83 #define NR_HANDLER_FLAGS 0xffff0000
85 #define NRF_MAGIC (1L<<31)
87 /**********************************************************************
88 **************************** NotifyMessage ***************************
89 **********************************************************************/
91 /* The NotifyMessage if send to the message port specified in
92 NotifyRequest->nr_Msg->nr_Port, if NRF_SEND_MESSAGE was set in
93 NotifyRequest->nr_Flags and the watched file changes. */
96 /* Embedded message structure as defined in <exec/ports.h>. */
97 struct Message nm_ExecMessage
;
99 ULONG nm_Class
; /* see below */
100 UWORD nm_Code
; /* see below */
101 /* The notify structure that was passed to StartNotify(). */
102 struct NotifyRequest
* nm_NReq
;
104 /* The following two fields are for PRIVATE use by handlers. */
109 /* nm_Class. Do not use, yet. */
110 #define NOTIFY_CLASS 0x40000000
112 /* nm_Code. Do not use, yet. */
113 #define NOTIFY_CODE 0x1234
115 #endif /* DOS_NOTIFY_H */