Fixed CHECK_STRING display.
[wine/multimedia.git] / server / change.c
blob6c7d38bb9f99d6f98c56c4877b9f6b90967aaeb7
1 /*
2 * Server-side change notification management
4 * Copyright (C) 1998 Alexandre Julliard
5 */
7 #include <assert.h>
8 #include <stdio.h>
9 #include <stdlib.h>
11 #include "winerror.h"
12 #include "winnt.h"
13 #include "server/thread.h"
15 struct change
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 =
28 change_dump,
29 add_queue,
30 remove_queue,
31 change_signaled,
32 no_satisfied,
33 no_read_fd,
34 no_write_fd,
35 no_flush,
36 change_destroy
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;
47 return &change->obj;
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 );
69 free( change );