1999-05-15 10:48:19 +00:00
|
|
|
/*
|
|
|
|
* Server-side handle definitions
|
|
|
|
*
|
|
|
|
* Copyright (C) 1999 Alexandre Julliard
|
2002-03-09 23:29:33 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
1999-05-15 10:48:19 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __WINE_SERVER_HANDLE_H
|
|
|
|
#define __WINE_SERVER_HANDLE_H
|
|
|
|
|
1999-06-22 17:26:53 +00:00
|
|
|
#include <stdlib.h>
|
1999-11-25 21:30:24 +00:00
|
|
|
#include "windef.h"
|
2001-07-19 00:35:37 +00:00
|
|
|
#include "wine/server_protocol.h"
|
1999-06-22 17:26:53 +00:00
|
|
|
|
1999-05-15 10:48:19 +00:00
|
|
|
struct process;
|
|
|
|
struct object_ops;
|
2002-10-02 23:49:30 +00:00
|
|
|
struct namespace;
|
1999-05-15 10:48:19 +00:00
|
|
|
|
|
|
|
/* handle functions */
|
|
|
|
|
|
|
|
/* alloc_handle takes a void *obj for convenience, but you better make sure */
|
|
|
|
/* that the thing pointed to starts with a struct object... */
|
2002-05-30 20:12:58 +00:00
|
|
|
extern obj_handle_t alloc_handle( struct process *process, void *obj,
|
2001-01-05 04:08:07 +00:00
|
|
|
unsigned int access, int inherit );
|
2002-05-30 20:12:58 +00:00
|
|
|
extern int close_handle( struct process *process, obj_handle_t handle, int *fd );
|
|
|
|
extern struct object *get_handle_obj( struct process *process, obj_handle_t handle,
|
1999-05-15 10:48:19 +00:00
|
|
|
unsigned int access, const struct object_ops *ops );
|
2005-04-24 17:35:52 +00:00
|
|
|
extern unsigned int get_handle_access( struct process *process, obj_handle_t handle );
|
2003-02-14 20:27:09 +00:00
|
|
|
extern int get_handle_unix_fd( struct process *process, obj_handle_t handle, unsigned int access );
|
2005-08-24 18:33:50 +00:00
|
|
|
extern int set_handle_unix_fd( struct process *process, obj_handle_t handle, int fd );
|
2002-05-30 20:12:58 +00:00
|
|
|
extern obj_handle_t duplicate_handle( struct process *src, obj_handle_t src_handle, struct process *dst,
|
2001-01-05 04:08:07 +00:00
|
|
|
unsigned int access, int inherit, int options );
|
2002-10-02 23:49:30 +00:00
|
|
|
extern obj_handle_t open_object( const struct namespace *namespace, const WCHAR *name, size_t len,
|
|
|
|
const struct object_ops *ops, unsigned int access, int inherit );
|
|
|
|
extern obj_handle_t find_inherited_handle( struct process *process, const struct object_ops *ops );
|
|
|
|
extern struct handle_table *alloc_handle_table( struct process *process, int count );
|
|
|
|
extern struct handle_table *copy_handle_table( struct process *process, struct process *parent );
|
2003-09-16 01:07:21 +00:00
|
|
|
extern unsigned int get_handle_table_count( struct process *process);
|
2005-06-14 11:40:40 +00:00
|
|
|
extern int flush_cached_fd( struct process *process, obj_handle_t handle );
|
2003-09-16 01:07:21 +00:00
|
|
|
|
1999-06-04 19:49:54 +00:00
|
|
|
extern void close_global_handles(void);
|
1999-05-15 10:48:19 +00:00
|
|
|
|
|
|
|
#endif /* __WINE_SERVER_HANDLE_H */
|