28 static IpcEndpoint *g_pWinmanEndpoint = 0;
30 bool LibUiProtocol::sendMessage(
void *pMessage,
size_t messageLength)
33 if (!g_pWinmanEndpoint)
35 g_pWinmanEndpoint = getEndpoint(
"pedigree-winman");
38 IpcEndpoint *pEndpoint = g_pWinmanEndpoint;
48 if (messageLength > 0x1000)
54 if (!pIpcMessage->initialise())
61 void *pDest = pIpcMessage->getBuffer();
67 memcpy(pDest, pMessage, messageLength);
70 send(pEndpoint, pIpcMessage,
false);
75 bool LibUiProtocol::recvMessage(
76 IpcEndpoint *pEndpoint,
void *pBuffer,
size_t maxSize)
91 recv(pEndpoint, &pRecv,
false);
94 if ((!pRecv) || (!pRecv->getBuffer()))
101 memcpy(pBuffer, pRecv->getBuffer(), maxSize);
109 bool LibUiProtocol::recvMessageAsync(
110 IpcEndpoint *pEndpoint,
void *pBuffer,
size_t maxSize)
113 if (maxSize > 0x1000)
125 recv(pEndpoint, &pRecv,
true);
128 if ((!pRecv) || (!pRecv->getBuffer()))
135 memcpy(pBuffer, pRecv->getBuffer(), maxSize);
A standard IPC message that is less than 4 KB in size.