Julian Hall | 99a57e3 | 2021-07-28 14:18:50 +0100 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | #include <stddef.h> |
| 8 | #include <protocols/rpc/common/packed-c/status.h> |
| 9 | #include "service_client.h" |
| 10 | |
| 11 | psa_status_t service_client_init( |
| 12 | struct service_client *context, |
| 13 | struct rpc_caller *caller) |
| 14 | { |
| 15 | context->caller = caller; |
| 16 | context->rpc_status = TS_RPC_CALL_ACCEPTED; |
| 17 | |
| 18 | context->service_access_info.supported_encodings = 0; |
| 19 | context->service_access_info.max_req_size = 0; |
| 20 | |
| 21 | return PSA_SUCCESS; |
| 22 | } |
| 23 | |
| 24 | void service_client_deinit( |
| 25 | struct service_client *context) |
| 26 | { |
| 27 | context->caller = NULL; |
| 28 | } |
| 29 | |
| 30 | void service_client_set_service_access_info( |
| 31 | struct service_client *context, |
| 32 | const struct service_access_info *service_access_info) |
| 33 | { |
| 34 | context->service_access_info = *service_access_info; |
| 35 | } |