xref: /haiku/src/bin/debug/strace/MemoryReader.h (revision 24df65921befcd0ad0c5c7866118f922da61cb96)
1 /*
2  * Copyright 2005-2011, Ingo Weinhold, ingo_weinhold@gmx.de.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef STRACE_MEMORY_READER_H
6 #define STRACE_MEMORY_READER_H
7 
8 
9 #include <OS.h>
10 
11 
12 class MemoryReader {
13 public:
14 								MemoryReader();
15 								~MemoryReader();
16 
17 			status_t			Init(port_id nubPort);
18 
19 			status_t			Read(void *address, void *buffer, int32 size,
20 									int32 &bytesRead);
21 
22 private:
23 			status_t			_Read(void *address, void *buffer, int32 size,
24 									int32 &bytesRead);
25 
26 private:
27 			port_id				fNubPort;
28 			port_id				fReplyPort;
29 };
30 
31 
32 #endif	// STRACE_MEMORY_READER_H
33