blob: b93c02f5faf61af4786d3e80cc52a00b5da6b4a2 [file] [log] [blame]
Julian Hallf7f84952020-11-23 17:55:51 +01001/*
julhal01c3f4e9a2020-12-15 13:39:01 +00002 * Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.
Julian Hallf7f84952020-11-23 17:55:51 +01003 *
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
14extern "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 */
25struct dummy_caller
26{
27 struct rpc_caller rpc_caller;
28 rpc_status_t rpc_status;
Julian Halld1dfda52021-11-25 18:46:45 +010029 rpc_opstatus_t opstatus;
Julian Hallf7f84952020-11-23 17:55:51 +010030 uint8_t *req_buf;
31};
32
33struct rpc_caller *dummy_caller_init(struct dummy_caller *s,
Julian Halld1dfda52021-11-25 18:46:45 +010034 rpc_status_t rpc_status, rpc_opstatus_t opstatus);
Julian Hallf7f84952020-11-23 17:55:51 +010035void dummy_caller_deinit(struct dummy_caller *s);
36
37#ifdef __cplusplus
38}
39#endif
40
41#endif /* DUMMY_CALLER */