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 ULONG nr_MsgCount
; /* Number of unreplied messages. */
60 struct MsgPort
*nr_Handler
; /* Filesystem task/device. Used by EndNotify() */
64 /* The two following flags specify by which means the watching task is to be
66 #define NRB_SEND_MESSAGE 0 /* Send a message to the specified message port. */
67 #define NRB_SEND_SIGNAL 1 /* Set a signal of the specified task. */
68 #define NRB_WAIT_REPLY 3 /* Wait for a reply by the application before
69 going on with watching? */
70 #define NRB_NOTIFY_INITIAL 4 /* Notify if the file/directory exists when
71 the notification request is posted */
73 #define NRF_SEND_MESSAGE (1L<<NRB_SEND_MESSAGE)
74 #define NRF_SEND_SIGNAL (1L<<NRB_SEND_SIGNAL)
75 #define NRF_WAIT_REPLY (1L<<NRB_WAIT_REPLY)
76 #define NRF_NOTIFY_INITIAL (1L<<NRB_NOTIFY_INITIAL)
78 /* The following flags are for use by handlers only! */
79 #define NR_HANDLER_FLAGS 0xffff0000
81 #define NRF_MAGIC (1L<<31)
83 /**********************************************************************
84 **************************** NotifyMessage ***************************
85 **********************************************************************/
87 /* The NotifyMessage if send to the message port specified in
88 NotifyRequest->nr_Msg->nr_Port, if NRF_SEND_MESSAGE was set in
89 NotifyRequest->nr_Flags and the watched file changes. */
92 /* Embedded message structure as defined in <exec/ports.h>. */
93 struct Message nm_ExecMessage
;
95 ULONG nm_Class
; /* see below */
96 UWORD nm_Code
; /* see below */
97 /* The notify structure that was passed to StartNotify(). */
98 struct NotifyRequest
* nm_NReq
;
100 /* The following two fields are for PRIVATE use by handlers. */
105 /* nm_Class. Do not use, yet. */
106 #define NOTIFY_CLASS 0x40000000
108 /* nm_Code. Do not use, yet. */
109 #define NOTIFY_CODE 0x1234
111 #endif /* DOS_NOTIFY_H */