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
=
41 struct object
*create_change_notification( int subtree
, int filter
)
43 struct change
*change
;
44 if (!(change
= mem_alloc( sizeof(*change
) ))) return NULL
;
45 init_object( &change
->obj
, &change_ops
, NULL
);
46 change
->subtree
= subtree
;
47 change
->filter
= filter
;
51 static void change_dump( struct object
*obj
, int verbose
)
53 struct change
*change
= (struct change
*)obj
;
54 assert( obj
->ops
== &change_ops
);
55 fprintf( stderr
, "Change notification sub=%d filter=%08x\n",
56 change
->subtree
, change
->filter
);
59 static int change_signaled( struct object
*obj
, struct thread
*thread
)
61 /* struct change *change = (struct change *)obj;*/
62 assert( obj
->ops
== &change_ops
);
63 return 0; /* never signaled for now */
66 static void change_destroy( struct object
*obj
)
68 struct change
*change
= (struct change
*)obj
;
69 assert( obj
->ops
== &change_ops
);