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 12class MemoryReader { 13public: 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 22private: 23 status_t _Read(void *address, void *buffer, int32 size, 24 int32 &bytesRead); 25 26private: 27 port_id fNubPort; 28 port_id fReplyPort; 29}; 30 31 32#endif // STRACE_MEMORY_READER_H 33