server.h revision 589fd26cedb2b4ebbed14f2964cad03cc8ebbca2
/*
* Definitions for the client side of the Wine server communication
*
* Copyright (C) 1998 Alexandre Julliard
*
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/*
* Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
* other than GPL or LGPL is available it will apply instead, Sun elects to use only
* the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
* a choice of LGPL license versions is made available with the language indicating
* that LGPLv2 or any later version may be used, or where a choice of which version
* of the LGPL is applied is otherwise unspecified.
*/
#ifndef __WINE_WINE_SERVER_H
#define __WINE_WINE_SERVER_H
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <winternl.h>
#include <wine/server_protocol.h>
/* client communication functions */
struct __server_iovec
{
const void *ptr;
};
#define __SERVER_MAX_DATA 5
struct __server_request_info
{
union
{
} u;
unsigned int data_count; /* count of request data pointers */
void *reply_data; /* reply data pointer */
};
extern unsigned int wine_server_call( void *req_ptr );
extern int CDECL wine_server_fd_to_handle( int fd, unsigned int access, unsigned int attributes, HANDLE *handle );
extern int CDECL wine_server_handle_to_fd( HANDLE handle, unsigned int access, int *unix_fd, unsigned int *options );
/* do a server call and set the last error code */
static inline unsigned int wine_server_call_err( void *req_ptr )
{
return res;
}
/* get the size of the variable part of the returned reply */
{
}
/* add some data to be sent along with the request */
{
if (size)
{
}
}
/* set the pointer and max size for the reply var data */
{
}
/* convert an object handle to a server handle */
{
}
/* convert a user handle to a server handle */
{
}
/* convert a server handle to a generic handle */
{
}
/* convert a client pointer to a server client_ptr_t */
{
}
/* convert a server client_ptr_t to a real pointer */
{
}
/* macros for server requests */
#define SERVER_START_REQ(type) \
do { \
struct __server_request_info __req; \
__req.data_count = 0; \
(void)reply; \
do
#define SERVER_END_REQ \
while(0); \
} while(0)
#endif /* __WINE_WINE_SERVER_H */