2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Copyright 2008-2009, Axel Dörfler, axeld@pinc-software.de.
4 * Distributed under the terms of the MIT License.
8 #include "AbstractModuleDevice.h"
11 AbstractModuleDevice::AbstractModuleDevice()
21 AbstractModuleDevice::~AbstractModuleDevice()
27 AbstractModuleDevice::HasSelect() const
29 return Module()->select
!= NULL
;
34 AbstractModuleDevice::HasDeselect() const
36 return Module()->deselect
!= NULL
;
41 AbstractModuleDevice::HasRead() const
43 return Module()->read
!= NULL
;
48 AbstractModuleDevice::HasWrite() const
50 return Module()->write
!= NULL
;
55 AbstractModuleDevice::HasIO() const
57 return Module()->io
!= NULL
;
62 AbstractModuleDevice::Open(const char* path
, int openMode
, void** _cookie
)
64 return Module()->open(Data(), path
, openMode
, _cookie
);
69 AbstractModuleDevice::Read(void* cookie
, off_t pos
, void* buffer
, size_t* _length
)
71 return Module()->read(cookie
, pos
, buffer
, _length
);
76 AbstractModuleDevice::Write(void* cookie
, off_t pos
, const void* buffer
, size_t* _length
)
78 return Module()->write(cookie
, pos
, buffer
, _length
);
83 AbstractModuleDevice::IO(void* cookie
, io_request
* request
)
85 return Module()->io(cookie
, request
);
90 AbstractModuleDevice::Control(void* cookie
, int32 op
, void* buffer
, size_t length
)
92 return Module()->control(cookie
, op
, buffer
, length
);
97 AbstractModuleDevice::Select(void* cookie
, uint8 event
, selectsync
* sync
)
99 return Module()->select(cookie
, event
, sync
);
104 AbstractModuleDevice::Deselect(void* cookie
, uint8 event
, selectsync
* sync
)
106 return Module()->deselect(cookie
, event
, sync
);
111 AbstractModuleDevice::Close(void* cookie
)
113 return Module()->close(cookie
);
118 AbstractModuleDevice::Free(void* cookie
)
120 return Module()->free(cookie
);