server: Implement IOCTL_AFD_GET_EVENTS.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1e84cc0fa7
commit
69549fc0c7
|
@ -1181,6 +1181,12 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc
|
|||
break;
|
||||
}
|
||||
|
||||
case IOCTL_AFD_GET_EVENTS:
|
||||
if (in_size) FIXME( "unexpected input size %u\n", in_size );
|
||||
|
||||
status = STATUS_BAD_DEVICE_TYPE;
|
||||
break;
|
||||
|
||||
case IOCTL_AFD_RECV:
|
||||
{
|
||||
const struct afd_recv_params *params = in_buffer;
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#define IOCTL_AFD_RECV CTL_CODE(FILE_DEVICE_BEEP, 0x805, METHOD_NEITHER, FILE_ANY_ACCESS)
|
||||
#define IOCTL_AFD_POLL CTL_CODE(FILE_DEVICE_BEEP, 0x809, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_AFD_EVENT_SELECT CTL_CODE(FILE_DEVICE_BEEP, 0x821, METHOD_NEITHER, FILE_ANY_ACCESS)
|
||||
#define IOCTL_AFD_GET_EVENTS CTL_CODE(FILE_DEVICE_BEEP, 0x822, METHOD_NEITHER, FILE_ANY_ACCESS)
|
||||
|
||||
enum afd_poll_bit
|
||||
{
|
||||
|
@ -125,6 +126,12 @@ struct afd_event_select_params_32
|
|||
int mask;
|
||||
};
|
||||
|
||||
struct afd_get_events_params
|
||||
{
|
||||
int flags;
|
||||
NTSTATUS status[13];
|
||||
};
|
||||
|
||||
#define IOCTL_AFD_WINE_CREATE CTL_CODE(FILE_DEVICE_NETWORK, 200, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_AFD_WINE_ACCEPT CTL_CODE(FILE_DEVICE_NETWORK, 201, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_AFD_WINE_ACCEPT_INTO CTL_CODE(FILE_DEVICE_NETWORK, 202, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
|
|
@ -2011,6 +2011,28 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
|
|||
}
|
||||
return 1;
|
||||
|
||||
case IOCTL_AFD_GET_EVENTS:
|
||||
{
|
||||
struct afd_get_events_params params = {0};
|
||||
unsigned int i;
|
||||
|
||||
if (get_reply_max_size() < sizeof(params))
|
||||
{
|
||||
set_error( STATUS_INVALID_PARAMETER );
|
||||
return 0;
|
||||
}
|
||||
|
||||
params.flags = sock->pending_events & sock->mask;
|
||||
for (i = 0; i < ARRAY_SIZE( params.status ); ++i)
|
||||
params.status[i] = sock_get_ntstatus( sock->errors[i] );
|
||||
|
||||
sock->pending_events = 0;
|
||||
sock_reselect( sock );
|
||||
|
||||
set_reply_data( ¶ms, sizeof(params) );
|
||||
return 0;
|
||||
}
|
||||
|
||||
case IOCTL_AFD_EVENT_SELECT:
|
||||
{
|
||||
struct event *event = NULL;
|
||||
|
|
Loading…
Reference in New Issue