mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1091577: Added |BluetoothDaemonPDU::GetHeader|, r=shawnjohnjr
The |GetHeader| method of |BluetoothDaemonPDU| returns the PDU's header. This is helpful for debugging logs.
This commit is contained in:
parent
1a908ed0a1
commit
b1cb7387de
@ -58,6 +58,15 @@ BluetoothDaemonPDU::BluetoothDaemonPDU(size_t aPayloadSize)
|
||||
, mUserData(nullptr)
|
||||
{ }
|
||||
|
||||
void
|
||||
BluetoothDaemonPDU::GetHeader(uint8_t& aService, uint8_t& aOpcode,
|
||||
uint16_t& aPayloadSize)
|
||||
{
|
||||
memcpy(&aService, GetData(OFF_SERVICE), sizeof(aService));
|
||||
memcpy(&aOpcode, GetData(OFF_OPCODE), sizeof(aOpcode));
|
||||
memcpy(&aPayloadSize, GetData(OFF_LENGTH), sizeof(aPayloadSize));
|
||||
}
|
||||
|
||||
ssize_t
|
||||
BluetoothDaemonPDU::Send(int aFd)
|
||||
{
|
||||
|
@ -64,6 +64,9 @@ public:
|
||||
return mUserData;
|
||||
}
|
||||
|
||||
void GetHeader(uint8_t& aService, uint8_t& aOpcode,
|
||||
uint16_t& aPayloadSize);
|
||||
|
||||
ssize_t Send(int aFd);
|
||||
ssize_t Receive(int aFd);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user