Added Read(int64*)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3947 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
0524d8feef
commit
e76917c658
@ -47,6 +47,7 @@ public:
|
|||||||
void *Buffer(void) { return _buffer; }
|
void *Buffer(void) { return _buffer; }
|
||||||
ssize_t BufferSize(void) { return _buffersize; }
|
ssize_t BufferSize(void) { return _buffersize; }
|
||||||
|
|
||||||
|
status_t Read(int64 *data);
|
||||||
status_t Read(bool *data);
|
status_t Read(bool *data);
|
||||||
status_t Read(BPoint *data);
|
status_t Read(BPoint *data);
|
||||||
status_t Read(BRect *data);
|
status_t Read(BRect *data);
|
||||||
|
@ -128,6 +128,22 @@ void PortMessage::SetBuffer(const void *buffer, const ssize_t &size, const bool
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
status_t PortMessage::Read(int64 *data)
|
||||||
|
{
|
||||||
|
if(!data)
|
||||||
|
return B_BAD_VALUE;
|
||||||
|
|
||||||
|
if( !_buffer ||
|
||||||
|
_buffersize<sizeof(int64) ||
|
||||||
|
((_index+sizeof(int64))>(_buffer+_buffersize)) )
|
||||||
|
return B_NO_MEMORY;
|
||||||
|
|
||||||
|
*data=*((int64*)_index);
|
||||||
|
_index+=sizeof(bool);
|
||||||
|
|
||||||
|
return B_OK;
|
||||||
|
}
|
||||||
|
|
||||||
status_t PortMessage::Read(bool *data)
|
status_t PortMessage::Read(bool *data)
|
||||||
{
|
{
|
||||||
if(!data)
|
if(!data)
|
||||||
|
Loading…
Reference in New Issue
Block a user