Server reorganization:
- moved request handlers to the specific C files
- moved handle management to handle.c
- moved server private includes to server/ instead of include/server/
diff --git a/include/server.h b/include/server.h
index 228c4bb..f0601ad 100644
--- a/include/server.h
+++ b/include/server.h
@@ -30,6 +30,9 @@
int fd; /* fd to pass */
};
+/* request handler definition */
+#define DECL_HANDLER(name) \
+ void req_##name( struct name##_request *req, void *data, int len, int fd )
/* Request structures */
@@ -314,6 +317,19 @@
enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
+/* Open an event */
+struct open_event_request
+{
+ unsigned int access; /* wanted access rights */
+ int inherit; /* inherit flag */
+ char name[0]; /* object name */
+};
+struct open_event_reply
+{
+ int handle; /* handle to the event */
+};
+
+
/* Create a mutex */
struct create_mutex_request
{
@@ -334,6 +350,19 @@
};
+/* Open a mutex */
+struct open_mutex_request
+{
+ unsigned int access; /* wanted access rights */
+ int inherit; /* inherit flag */
+ char name[0]; /* object name */
+};
+struct open_mutex_reply
+{
+ int handle; /* handle to the mutex */
+};
+
+
/* Create a semaphore */
struct create_semaphore_request
{
@@ -360,19 +389,16 @@
};
-/* Open a named object (event, mutex, semaphore) */
-struct open_named_obj_request
+/* Open a semaphore */
+struct open_semaphore_request
{
- int type; /* object type (see below) */
unsigned int access; /* wanted access rights */
int inherit; /* inherit flag */
char name[0]; /* object name */
};
-enum open_named_obj { OPEN_EVENT, OPEN_MUTEX, OPEN_SEMAPHORE, OPEN_MAPPING };
-
-struct open_named_obj_reply
+struct open_semaphore_reply
{
- int handle; /* handle to the object */
+ int handle; /* handle to the semaphore */
};
@@ -640,6 +666,19 @@
#define VPROT_COMMITTED 0x40
+/* Open a mapping */
+struct open_mapping_request
+{
+ unsigned int access; /* wanted access rights */
+ int inherit; /* inherit flag */
+ char name[0]; /* object name */
+};
+struct open_mapping_reply
+{
+ int handle; /* handle to the mapping */
+};
+
+
/* Get information about a file mapping */
struct get_mapping_info_request
{
@@ -692,12 +731,13 @@
};
+/* requests definitions */
+#include "server/request.h"
+
/* client-side functions */
#ifndef __WINE_SERVER__
-#include "server/request.h"
-
/* client communication functions */
extern void CLIENT_SendRequest( enum request req, int pass_fd,
int n, ... /* arg_1, len_1, etc. */ );