1 /* 2 * Copyright (C) 2020 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef CHRE_TEST_SHARED_SEND_MESSAGE_H_ 18 #define CHRE_TEST_SHARED_SEND_MESSAGE_H_ 19 20 #include <cinttypes> 21 22 namespace chre { 23 24 namespace test_shared { 25 26 /** 27 * Sends a test result to the host using the chre_test_common.TestResult 28 * message. 29 * 30 * @param hostEndpointId The endpoint ID of the host to send the result to. 31 * @param messageType The message type to associate with the test result. 32 * @param success True if the test succeeded. 33 */ 34 void sendTestResultToHost(uint16_t hostEndpointId, uint32_t messageType, 35 bool success); 36 37 /** 38 * Sends a message to the host with an empty payload. 39 * 40 * @param hostEndpointId The endpoint Id of the host to send the message to. 41 * @param messageType The message type. 42 */ 43 void sendEmptyMessageToHost(uint16_t hostEndpointId, uint32_t messageType); 44 45 } // namespace test_shared 46 47 } // namespace chre 48 49 #endif // CHRE_TEST_SHARED_SEND_MESSAGE_H_ 50