Commit 37e9503a authored by Alexandre Julliard's avatar Alexandre Julliard

Moved server.h to include/wine.

parent 37ec9275
......@@ -21,7 +21,7 @@
#include "winerror.h"
#include "wine/unicode.h"
#include "heap.h"
#include "server.h"
#include "wine/server.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(reg);
......
......@@ -65,7 +65,7 @@
#include "heap.h"
#include "options.h"
#include "wine/port.h"
#include "server.h"
#include "wine/server.h"
#include "winerror.h"
#include "services.h"
#include "callback.h"
......
......@@ -9,7 +9,7 @@
#include "winerror.h"
#include "wine/winbase16.h"
#include "server.h"
#include "wine/server.h"
#include "stackframe.h"
#include "debugtools.h"
......
......@@ -8,7 +8,7 @@
#include "winerror.h"
#include "winnls.h"
#include "wine/unicode.h"
#include "server.h"
#include "wine/server.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(win32);
......
......@@ -16,7 +16,7 @@
#include "tlhelp32.h"
#include "toolhelp.h"
#include "heap.h"
#include "server.h"
#include "wine/server.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(toolhelp);
......
......@@ -15,7 +15,7 @@
#include "wine/exception.h"
#include "stackframe.h"
#include "miscemu.h"
#include "server.h"
#include "wine/server.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(seh);
......
......@@ -15,7 +15,7 @@
#include "ntddk.h"
#include "ntdll_misc.h"
#include "server.h"
#include "wine/server.h"
DEFAULT_DEBUG_CHANNEL(ntdll);
......
......@@ -9,7 +9,7 @@
#include "ntddk.h"
#include "ntdll_misc.h"
#include "server.h"
#include "wine/server.h"
DEFAULT_DEBUG_CHANNEL(ntdll);
......
......@@ -16,7 +16,7 @@
#include "winreg.h"
#include "winerror.h"
#include "wine/unicode.h"
#include "server.h"
#include "wine/server.h"
#include "ntddk.h"
#include "ntdll_misc.h"
......
......@@ -10,7 +10,7 @@
#include "winerror.h"
#include "wine/unicode.h"
#include "server.h"
#include "wine/server.h"
#include "ntddk.h"
#include "ntdll_misc.h"
......
......@@ -96,7 +96,7 @@
#include "heap.h"
#include "wine/port.h"
#include "services.h"
#include "server.h"
#include "wine/server.h"
#include "file.h"
#include "debugtools.h"
......
......@@ -17,7 +17,7 @@
#include "winbase.h"
#include "winerror.h"
#include "heap.h"
#include "server.h"
#include "wine/server.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(file);
......
......@@ -34,7 +34,7 @@
#include "msdos.h"
#include "ntddk.h"
#include "options.h"
#include "server.h"
#include "wine/server.h"
#include "debugtools.h"
......
......@@ -44,7 +44,7 @@
#include "wincon.h"
#include "debugtools.h"
#include "server.h"
#include "wine/server.h"
DEFAULT_DEBUG_CHANNEL(file);
......
......@@ -26,7 +26,7 @@
#include "heap.h"
#include "debugtools.h"
#include "options.h"
#include "server.h"
#include "wine/server.h"
DEFAULT_DEBUG_CHANNEL(profile);
......
......@@ -31,7 +31,7 @@
#include "debugtools.h"
#include "user.h" /* for TWEAK_WineLook (FIXME) */
#include "x11font.h"
#include "server.h"
#include "wine/server.h"
DEFAULT_DEBUG_CHANNEL(font);
......
/*
* Definitions for the client side of the Wine server communication
*
* Copyright (C) 1998 Alexandre Julliard
*/
#ifndef __WINE_WINE_SERVER_H
#define __WINE_WINE_SERVER_H
#include "thread.h"
#include "ntddk.h"
#include "wine/exception.h"
#include "wine/server_protocol.h"
/* client communication functions */
extern unsigned int wine_server_call( union generic_request *req, size_t size );
extern void server_protocol_error( const char *err, ... ) WINE_NORETURN;
extern void server_protocol_perror( const char *err ) WINE_NORETURN;
extern void wine_server_alloc_req( union generic_request *req, size_t size );
extern void wine_server_send_fd( int fd );
extern int wine_server_recv_fd( handle_t handle );
extern const char *get_config_dir(void);
/* do a server call and set the last error code */
inline static unsigned int __server_call_err( union generic_request *req, size_t size )
{
unsigned int res = wine_server_call( req, size );
if (res) SetLastError( RtlNtStatusToDosError(res) );
return res;
}
/* get a pointer to the variable part of the request */
inline static void *server_data_ptr( const void *req )
{
return (char *)NtCurrentTeb()->buffer + ((struct request_header *)req)->var_offset;
}
/* get the size of the variable part of the request */
inline static size_t server_data_size( const void *req )
{
return ((struct request_header *)req)->var_size;
}
/* exception support for server calls */
extern DWORD __wine_server_exception_handler( PEXCEPTION_RECORD record, EXCEPTION_FRAME *frame,
CONTEXT *context, EXCEPTION_FRAME **pdispatcher );
struct __server_exception_frame
{
EXCEPTION_FRAME frame;
unsigned int buffer_pos; /* saved buffer position */
};
/* macros for server requests */
#define SERVER_START_REQ(type) \
do { \
union generic_request __req; \
struct type##_request * const req = &__req.type; \
__req.header.req = REQ_##type; \
__req.header.var_size = 0; \
do
#define SERVER_END_REQ \
while(0); \
} while(0)
#define SERVER_START_VAR_REQ(type,size) \
do { \
struct __server_exception_frame __f; \
union generic_request __req; \
struct type##_request * const req = &__req.type; \
__f.frame.Handler = __wine_server_exception_handler; \
__f.buffer_pos = NtCurrentTeb()->buffer_pos; \
__wine_push_frame( &__f.frame ); \
__req.header.req = REQ_##type; \
wine_server_alloc_req( &__req, (size) ); \
do
#define SERVER_END_VAR_REQ \
while(0); \
NtCurrentTeb()->buffer_pos = __f.buffer_pos; \
__wine_pop_frame( &__f.frame ); \
} while(0)
#define SERVER_CALL() (wine_server_call( &__req, sizeof(*req) ))
#define SERVER_CALL_ERR() (__server_call_err( &__req, sizeof(*req) ))
extern void CLIENT_InitServer(void);
extern void CLIENT_InitThread(void);
extern void CLIENT_BootDone( int debug_level );
extern int CLIENT_IsBootThread(void);
#endif /* __WINE_WINE_SERVER_H */
......@@ -19,7 +19,7 @@
#include "file.h"
#include "options.h"
#include "debugtools.h"
#include "server.h"
#include "wine/server.h"
#include "loadorder.h"
DEFAULT_DEBUG_CHANNEL(server);
......
......@@ -19,7 +19,7 @@
#include "debugtools.h"
#include "callback.h"
#include "loadorder.h"
#include "server.h"
#include "wine/server.h"
DEFAULT_DEBUG_CHANNEL(module);
DECLARE_DEBUG_CHANNEL(win32);
......
......@@ -33,7 +33,7 @@
#include "wine/winbase16.h"
#include "winerror.h"
#include "snoop.h"
#include "server.h"
#include "wine/server.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(win32);
......
......@@ -29,7 +29,7 @@
#include "ntddk.h"
#include "selectors.h"
#include "services.h"
#include "server.h"
#include "wine/server.h"
#include "syslevel.h"
#include "stackframe.h"
#include "task.h"
......
......@@ -24,7 +24,7 @@
#include "instance.h"
#include "stackframe.h"
#include "debugtools.h"
#include "server.h"
#include "wine/server.h"
DEFAULT_DEBUG_CHANNEL(atom);
......
......@@ -22,7 +22,7 @@
#include "wine/winbase16.h"
#include "wine/unicode.h"
#include "heap.h"
#include "server.h"
#include "wine/server.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(reg);
......
......@@ -12,7 +12,7 @@
#include "miscemu.h"
#include "selectors.h"
#include "stackframe.h"
#include "server.h"
#include "wine/server.h"
#include "debugtools.h"
#include "toolhelp.h"
......
......@@ -29,7 +29,7 @@
#include "winerror.h"
#include "file.h"
#include "global.h"
#include "server.h"
#include "wine/server.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(virtual);
......
......@@ -41,7 +41,7 @@
#include "file.h"
#include "heap.h"
#include "options.h"
#include "server.h"
#include "wine/server.h"
#include "debugtools.h"
......
......@@ -22,7 +22,7 @@
#include "file.h"
#include "heap.h"
#include "winerror.h"
#include "server.h"
#include "wine/server.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(module);
......
......@@ -32,7 +32,7 @@
#include "wine/port.h"
#include "thread.h"
#include "server.h"
#include "wine/server.h"
#include "winerror.h"
#include "options.h"
......
......@@ -8,7 +8,7 @@
#include <stdio.h>
#include <unistd.h>
#include "winbase.h"
#include "server.h"
#include "wine/server.h"
#include "winerror.h"
#include "debugtools.h"
......
......@@ -7,7 +7,7 @@
#include <assert.h>
#include "winerror.h"
#include "winbase.h"
#include "server.h"
#include "wine/server.h"
/***********************************************************************
......
......@@ -20,7 +20,7 @@
#include "file.h"
#include "thread.h"
#include "winerror.h"
#include "server.h"
#include "wine/server.h"
#include "options.h"
#include "callback.h"
#include "debugtools.h"
......
......@@ -15,7 +15,7 @@
#include "file.h" /* for DOSFS_UnixTimeToFileTime */
#include "thread.h"
#include "winerror.h"
#include "server.h"
#include "wine/server.h"
/***********************************************************************
......
......@@ -22,7 +22,7 @@
#endif
#include "wine/port.h"
#include "thread.h"
#include "server.h"
#include "wine/server.h"
#include "winbase.h"
#include "wine/exception.h"
#include "debugtools.h"
......
......@@ -22,7 +22,7 @@
#include "heap.h"
#include "selectors.h"
#include "winnt.h"
#include "server.h"
#include "wine/server.h"
#include "services.h"
#include "stackframe.h"
#include "builtin16.h"
......
......@@ -10,7 +10,7 @@
#include "winnls.h"
#include "wine/unicode.h"
#include "file.h" /* for FILETIME routines */
#include "server.h"
#include "wine/server.h"
/***********************************************************************
......
......@@ -45,7 +45,7 @@
#include "winerror.h"
#include "wincon.h"
#include "heap.h"
#include "server.h"
#include "wine/server.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(console);
......
......@@ -27,7 +27,7 @@
#include "msdos.h"
#include "miscemu.h"
#include "stackframe.h"
#include "server.h"
#include "wine/server.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(win32);
......
......@@ -31,7 +31,7 @@
#include "wine/exception.h"
#include "thread.h"
#include "stackframe.h"
#include "server.h"
#include "wine/server.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(seh);
......
......@@ -23,7 +23,7 @@
#include "wine/winbase16.h"
#include "wine/winuser16.h"
#include "wine/keyboard16.h"
#include "server.h"
#include "wine/server.h"
#include "win.h"
#include "heap.h"
#include "input.h"
......
......@@ -14,7 +14,7 @@
#include "wine/winuser16.h"
#include "message.h"
#include "winerror.h"
#include "server.h"
#include "wine/server.h"
#include "win.h"
#include "heap.h"
#include "hook.h"
......
......@@ -10,7 +10,7 @@
#include "wingdi.h"
#include "wine/winuser16.h"
#include "wine/unicode.h"
#include "server.h"
#include "wine/server.h"
#include "region.h"
#include "user.h"
#include "win.h"
......
......@@ -18,7 +18,7 @@
#include "hook.h"
#include "thread.h"
#include "debugtools.h"
#include "server.h"
#include "wine/server.h"
#include "spy.h"
DEFAULT_DEBUG_CHANNEL(msg);
......
......@@ -12,7 +12,7 @@
#include "winproc.h"
#include "message.h"
#include "server.h"
#include "wine/server.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(timer);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment