2 * Server-side change notification management
4 * Copyright (C) 1998 Alexandre Julliard
20 struct object obj; /* object header */
21 int subtree; /* watch all the subtree */
22 int filter; /* notification filter */
25 static void change_dump( struct object *obj, int verbose );
26 static int change_signaled( struct object *obj, struct thread *thread );
28 static const struct object_ops change_ops =
30 sizeof(struct change),
44 static struct change *create_change_notification( int subtree, int filter )
46 struct change *change;
47 if ((change = alloc_object( &change_ops )))
49 change->subtree = subtree;
50 change->filter = filter;
55 static void change_dump( struct object *obj, int verbose )
57 struct change *change = (struct change *)obj;
58 assert( obj->ops == &change_ops );
59 fprintf( stderr, "Change notification sub=%d filter=%08x\n",
60 change->subtree, change->filter );
63 static int change_signaled( struct object *obj, struct thread *thread )
65 /* struct change *change = (struct change *)obj;*/
66 assert( obj->ops == &change_ops );
67 return 0; /* never signaled for now */
70 /* create a change notification */
71 DECL_HANDLER(create_change_notification)
73 struct change *change;
76 if ((change = create_change_notification( req->subtree, req->filter )))
78 req->handle = alloc_handle( current->process, change,
79 STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE, 0 );
80 release_object( change );