blob: 27fe68a727e3ccfa2da6579c5d2c2de492f62d2b [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;
29 int opstatus;
30 uint8_t *req_buf;
31};
32
33struct rpc_caller *dummy_caller_init(struct dummy_caller *s,
34 rpc_status_t rpc_status, int opstatus);
35void dummy_caller_deinit(struct dummy_caller *s);
36
37#ifdef __cplusplus
38}
39#endif
40
41#endif /* DUMMY_CALLER */