2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
9 #include "BaseDevice.h"
15 class FileDevice
: public BaseDevice
{
18 virtual ~FileDevice();
20 status_t
Init(const char* path
);
22 virtual status_t
InitDevice();
23 virtual void UninitDevice();
25 virtual void Removed();
27 virtual bool HasSelect() const;
28 virtual bool HasDeselect() const;
29 virtual bool HasRead() const;
30 virtual bool HasWrite() const;
31 virtual bool HasIO() const;
33 virtual status_t
Open(const char* path
, int openMode
,
35 virtual status_t
Read(void* cookie
, off_t pos
, void* buffer
,
37 virtual status_t
Write(void* cookie
, off_t pos
, const void* buffer
,
39 virtual status_t
IO(void* cookie
, io_request
* request
);
40 virtual status_t
Control(void* cookie
, int32 op
, void* buffer
,
42 virtual status_t
Select(void* cookie
, uint8 event
, selectsync
* sync
);
43 virtual status_t
Deselect(void* cookie
, uint8 event
,
46 virtual status_t
Close(void* cookie
);
47 virtual status_t
Free(void* cookie
);
58 } // namespace BPrivate
61 using BPrivate::FileDevice
;
64 #endif // FILE_DEVICE_H