blob: 5cd25907a49834fe46ef437629acc6dc1fcf4757 [file] [log] [blame]
Julian Hall6c59e4e2020-11-23 17:50:47 +01001/*
Imre Kis33c18be2023-06-21 18:47:36 +02002 * Copyright (c) 2020-2023, Arm Limited and Contributors. All rights reserved.
Julian Hall6c59e4e2020-11-23 17:50:47 +01003 *
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
13extern "C" {
14#endif
15
Imre Kis33c18be2023-06-21 18:47:36 +020016/**
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.
Julian Hall6c59e4e2020-11-23 17:50:47 +010019 */
Imre Kis33c18be2023-06-21 18:47:36 +020020
Julian Hall6c59e4e2020-11-23 17:50:47 +010021typedef int32_t rpc_status_t;
22
Imre Kis33c18be2023-06-21 18:47:36 +020023#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
33typedef int64_t service_status_t;
Julian Halld1dfda52021-11-25 18:46:45 +010034
Julian Hall6c59e4e2020-11-23 17:50:47 +010035#ifdef __cplusplus
36}
37#endif
38
39#endif /* RPC_STATUS_H */