Move RPC message and event types to CHRE APIs Bug: 308734918 Test: rpc_world, chre_test_rpc, CHQTS testRpcServiceTest Change-Id: Id9ceeae4e4c4819d662fa27c7b44485253835a64
diff --git a/chre_api/include/chre_api/chre/event.h b/chre_api/include/chre_api/chre/event.h index e519c3d..04b2d0d 100644 --- a/chre_api/include/chre_api/chre/event.h +++ b/chre_api/include/chre_api/chre/event.h
@@ -164,6 +164,21 @@ #define CHRE_EVENT_HOST_ENDPOINT_NOTIFICATION UINT16_C(0x0008) /** + * Indicates a RPC request from a nanoapp. + * + * @since v1.9 + */ +#define CHRE_EVENT_RPC_REQUEST UINT16_C(0x00009) + +/** + * Indicates a RPC response from a nanoapp. + * + * @since v1.9 + */ +#define CHRE_EVENT_RPC_RESPONSE UINT16_C(0x0000A) + + +/** * First possible value for CHRE_EVENT_SENSOR events. * * This allows us to separately define our CHRE_EVENT_SENSOR_* events in @@ -309,6 +324,15 @@ /** @} */ /** + * Reserved message type for RPC messages. + * + * @see chreSendMessageWithPermissions + * + * @since v1.9 + */ +#define CHRE_MESSAGE_TYPE_RPC UINT32_C(0x7FFFFFF5) + +/** * @see chrePublishRpcServices * * @since v1.8 @@ -717,6 +741,8 @@ * NOTE: In CHRE API v1.0, support for forwarding this field to the host was * not strictly required, and some implementations did not support it. * However, its support is mandatory as of v1.1. + * NOTE: The value CHRE_MESSAGE_TYPE_RPC is reserved for usage by RPC + * libraries and normally should not be directly used by nanoapps. * @param hostEndpoint An identifier for the intended recipient of the message, * or CHRE_HOST_ENDPOINT_BROADCAST if all registered endpoints on the host * should receive the message. Endpoint identifiers are assigned on the