ConnectionSharedMemory.h [plain text]
#ifndef liblldb_ConnectionSharedMemory_h_
#define liblldb_ConnectionSharedMemory_h_
#include <string>
#include "lldb/Core/Connection.h"
#include "lldb/Core/DataBufferMemoryMap.h"
namespace lldb_private {
class ConnectionSharedMemory :
public Connection
{
public:
ConnectionSharedMemory ();
virtual
~ConnectionSharedMemory ();
virtual bool
IsConnected () const;
virtual lldb::ConnectionStatus
BytesAvailable (uint32_t timeout_usec, Error *error_ptr);
virtual lldb::ConnectionStatus
Connect (const char *s, Error *error_ptr);
virtual lldb::ConnectionStatus
Disconnect (Error *error_ptr);
virtual size_t
Read (void *dst,
size_t dst_len,
uint32_t timeout_usec,
lldb::ConnectionStatus &status,
Error *error_ptr);
virtual size_t
Write (const void *src, size_t src_len, lldb::ConnectionStatus &status, Error *error_ptr);
lldb::ConnectionStatus
Open (bool create, const char *name, size_t size, Error *error_ptr);
protected:
std::string m_name;
int m_fd; DataBufferMemoryMap m_mmap;
private:
DISALLOW_COPY_AND_ASSIGN (ConnectionSharedMemory);
};
}
#endif // liblldb_ConnectionSharedMemory_h_