1 /*
2  * Copyright (C) 2017 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_PLATFORM_SLPI_FASTRPC_H
18 #define CHRE_PLATFORM_SLPI_FASTRPC_H
19 
20 /**
21  * @file
22  * Shared definitions used in FastRPC communication with the host. This file is
23  * included by both the SLPI-side and host-side code.
24  */
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 //! FastRPC mandates that return value of 0 indicates success. Any other value
31 //! is considered an error and will result in skipping transfer of output
32 //! parameters.
33 #define CHRE_FASTRPC_SUCCESS (0)
34 
35 //! General failure.
36 #define CHRE_FASTRPC_ERROR (-1)
37 
38 //! The call failed because CHRE is shutting down; the host should not call this
39 //! function again until CHRE is restarted.
40 #define CHRE_FASTRPC_ERROR_SHUTTING_DOWN (-2)
41 
42 #ifdef __cplusplus
43 }  // extern "C"
44 #endif
45 
46 #endif  // CHRE_PLATFORM_SLPI_FASTRPC_H
47