Julian Hall | f7f8495 | 2020-11-23 17:55:51 +0100 | [diff] [blame] | 1 | /* |
julhal01 | c3f4e9a | 2020-12-15 13:39:01 +0000 | [diff] [blame] | 2 | * Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved. |
Julian Hall | f7f8495 | 2020-11-23 17:55:51 +0100 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | #ifndef DUMMY_CALLER |
| 8 | #define DUMMY_CALLER |
| 9 | |
| 10 | #include <rpc_caller.h> |
| 11 | #include <stdint.h> |
| 12 | |
| 13 | #ifdef __cplusplus |
| 14 | extern "C" { |
| 15 | #endif |
| 16 | |
| 17 | /* |
| 18 | * An rpc_caller that is used to return a suitable permanent status |
| 19 | * code if an attempt is made to invoke a remote method where an |
| 20 | * end-to-end rpc session has failed to be established. Intended |
| 21 | * to be used when a session with a real rpc endpoint cant't be |
| 22 | * established but a client doesn't wish to treat the condition |
| 23 | * as a fatal error. |
| 24 | */ |
| 25 | struct dummy_caller |
| 26 | { |
| 27 | struct rpc_caller rpc_caller; |
| 28 | rpc_status_t rpc_status; |
Julian Hall | d1dfda5 | 2021-11-25 18:46:45 +0100 | [diff] [blame] | 29 | rpc_opstatus_t opstatus; |
Julian Hall | f7f8495 | 2020-11-23 17:55:51 +0100 | [diff] [blame] | 30 | uint8_t *req_buf; |
| 31 | }; |
| 32 | |
| 33 | struct rpc_caller *dummy_caller_init(struct dummy_caller *s, |
Julian Hall | d1dfda5 | 2021-11-25 18:46:45 +0100 | [diff] [blame] | 34 | rpc_status_t rpc_status, rpc_opstatus_t opstatus); |
Julian Hall | f7f8495 | 2020-11-23 17:55:51 +0100 | [diff] [blame] | 35 | void dummy_caller_deinit(struct dummy_caller *s); |
| 36 | |
| 37 | #ifdef __cplusplus |
| 38 | } |
| 39 | #endif |
| 40 | |
| 41 | #endif /* DUMMY_CALLER */ |