Lines Matching refs:message
127 bool sendMessage(int *pipes, const PipeMessage &message) { in sendMessage() argument
128 int ret = write(pipes[1], message.array, sizeof(PipeMessage)); in sendMessage()
132 bool receiveMessage(int *pipes, PipeMessage *message) { in receiveMessage() argument
133 int ret = read(pipes[0], message->array, sizeof(PipeMessage)); in receiveMessage()
140 PipeMessage message; in doReceiver() local
143 message.data.command = PipeCommand::INIT_ERROR; in doReceiver()
144 sendMessage(mResultPipeFds, message); in doReceiver()
153 message.data.command = PipeCommand::INIT_ERROR; in doReceiver()
154 sendMessage(mResultPipeFds, message); in doReceiver()
157 message.data.command = PipeCommand::INIT_OK; in doReceiver()
158 sendMessage(mResultPipeFds, message); in doReceiver()
160 receiveMessage(mCommandPipeFds, &message); in doReceiver()
165 message.data.connectionId, message.data.transactionId, in doReceiver()
166 message.data.bufferId, message.data.timestampUs, &rhandle, &rbuffer); in doReceiver()
167 mManager->close(message.data.connectionId); in doReceiver()
169 message.data.command = PipeCommand::RECEIVE_ERROR; in doReceiver()
170 sendMessage(mResultPipeFds, message); in doReceiver()
174 message.data.command = PipeCommand::RECEIVE_ERROR; in doReceiver()
175 sendMessage(mResultPipeFds, message); in doReceiver()
183 message.data.command = PipeCommand::RECEIVE_OK; in doReceiver()
184 sendMessage(mResultPipeFds, message); in doReceiver()
191 PipeMessage message; in TEST_F() local
193 ASSERT_TRUE(receiveMessage(mResultPipeFds, &message)); in TEST_F()
225 message.data.command = PipeCommand::SEND; in TEST_F()
226 message.data.bufferId = sbuffer->mId; in TEST_F()
227 message.data.connectionId = receiverId; in TEST_F()
228 message.data.transactionId = transactionId; in TEST_F()
229 message.data.timestampUs = postUs; in TEST_F()
230 sendMessage(mCommandPipeFds, message); in TEST_F()
232 EXPECT_TRUE(receiveMessage(mResultPipeFds, &message)); in TEST_F()
233 EXPECT_TRUE(message.data.command == PipeCommand::RECEIVE_OK); in TEST_F()