1 /*
2  * Copyright (c) 2020-2023, Arm Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef RPC_STATUS_H
8 #define RPC_STATUS_H
9 
10 #include <stdint.h>
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 /**
17  * Used for returning the status of an RPC transaction. These values indicating the result of the
18  * RPC layer operations. Service level result must be handled in a service specific way.
19  */
20 
21 typedef int32_t rpc_status_t;
22 
23 #define RPC_SUCCESS			(0)
24 #define RPC_ERROR_INTERNAL		(-1)
25 #define RPC_ERROR_INVALID_VALUE		(-2)
26 #define RPC_ERROR_NOT_FOUND		(-3)
27 #define RPC_ERROR_INVALID_STATE		(-4)
28 #define RPC_ERROR_TRANSPORT_LAYER	(-5)
29 #define RPC_ERROR_INVALID_REQUEST_BODY	(-6)
30 #define RPC_ERROR_INVALID_RESPONSE_BODY	(-7)
31 #define RPC_ERROR_RESOURCE_FAILURE	(-8)
32 
33 typedef int64_t service_status_t;
34 
35 #ifdef __cplusplus
36 }
37 #endif
38 
39 #endif /* RPC_STATUS_H */
40