2 * Server-side change notification management
4 * Copyright (C) 1998 Alexandre Julliard
13 #include "server/thread.h"
17 struct object obj
; /* object header */
18 int subtree
; /* watch all the subtree */
19 int filter
; /* notification filter */
22 static void change_dump( struct object
*obj
, int verbose
);
23 static int change_signaled( struct object
*obj
, struct thread
*thread
);
24 static void change_destroy( struct object
*obj
);
26 static const struct object_ops change_ops
=
40 struct object
*create_change_notification( int subtree
, int filter
)
42 struct change
*change
;
43 if (!(change
= mem_alloc( sizeof(*change
) ))) return NULL
;
44 init_object( &change
->obj
, &change_ops
, NULL
);
45 change
->subtree
= subtree
;
46 change
->filter
= filter
;
50 static void change_dump( struct object
*obj
, int verbose
)
52 struct change
*change
= (struct change
*)obj
;
53 assert( obj
->ops
== &change_ops
);
54 printf( "Change notification sub=%d filter=%08x\n",
55 change
->subtree
, change
->filter
);
58 static int change_signaled( struct object
*obj
, struct thread
*thread
)
60 /* struct change *change = (struct change *)obj;*/
61 assert( obj
->ops
== &change_ops
);
62 return 0; /* never signaled for now */
65 static void change_destroy( struct object
*obj
)
67 struct change
*change
= (struct change
*)obj
;
68 assert( obj
->ops
== &change_ops
);