2009-03-08 20:30:37 +03:00
|
|
|
/*
|
|
|
|
* Copyright 2009, Haiku Inc. All Rights Reserved.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef _IO_REQUESTS_H
|
|
|
|
#define _IO_REQUESTS_H
|
|
|
|
|
2009-07-29 16:16:15 +04:00
|
|
|
|
2009-03-08 20:30:37 +03:00
|
|
|
/*! I/O request interface */
|
|
|
|
|
|
|
|
|
|
|
|
#include <SupportDefs.h>
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct IORequest io_request;
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2009-11-19 10:38:33 +03:00
|
|
|
bool io_request_is_write(const io_request* request);
|
2010-07-22 15:08:34 +04:00
|
|
|
bool io_request_is_vip(const io_request* request);
|
2009-11-19 10:38:33 +03:00
|
|
|
off_t io_request_offset(const io_request* request);
|
|
|
|
off_t io_request_length(const io_request* request);
|
|
|
|
status_t read_from_io_request(io_request* request, void* buffer,
|
|
|
|
size_t size);
|
|
|
|
status_t write_to_io_request(io_request* request, const void* buffer,
|
|
|
|
size_t size);
|
|
|
|
void notify_io_request(io_request* request, status_t status);
|
2009-03-08 20:30:37 +03:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2009-07-29 16:16:15 +04:00
|
|
|
|
2009-03-08 20:30:37 +03:00
|
|
|
#endif /* _IO_REQUESTS_H */
|