void CWII_IPC_HLE_WiiMote::SDPSendServiceAttributeResponse(u16 cid, u16 TransactionID, u32 ServiceHandle, u16 startAttrID, u16 endAttrID, u16 MaximumAttributeByteCount, u8* pContinuationState) { if (ServiceHandle != 0x10000) { ERROR_LOG(WII_IPC_WIIMOTE, "Unknown service handle %x", ServiceHandle); PanicAlert("Unknown service handle %x", ServiceHandle); } // _dbg_assert_(WII_IPC_WIIMOTE, ServiceHandle == 0x10000); u32 contState = ParseCont(pContinuationState); u32 packetSize = 0; const u8* pPacket = GetAttribPacket(ServiceHandle, contState, packetSize); // generate package u8 DataFrame[1000]; CBigEndianBuffer buffer(DataFrame); int Offset = 0; l2cap_hdr_t* pHeader = (l2cap_hdr_t*)&DataFrame[Offset]; Offset += sizeof(l2cap_hdr_t); pHeader->dcid = cid; buffer.Write8(Offset, 0x05); Offset++; buffer.Write16(Offset, TransactionID); Offset += 2; // Transaction ID memcpy(buffer.GetPointer(Offset), pPacket, packetSize); Offset += packetSize; pHeader->length = (u16)(Offset - sizeof(l2cap_hdr_t)); m_pHost->SendACLPacket(GetConnectionHandle(), DataFrame, pHeader->length + sizeof(l2cap_hdr_t)); // Debugger::PrintDataBuffer(LogTypes::WIIMOTE, DataFrame, pHeader->length + sizeof(l2cap_hdr_t), // "test response: "); }
void InfixParser::Parse(LispPtr& aResult) { ParseCont(aResult); }