diff options
Diffstat (limited to 'components/service/locator/standalone/services/protected-storage/ps_service_context.cpp')
-rw-r--r-- | components/service/locator/standalone/services/protected-storage/ps_service_context.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/components/service/locator/standalone/services/protected-storage/ps_service_context.cpp b/components/service/locator/standalone/services/protected-storage/ps_service_context.cpp new file mode 100644 index 000000000..cda49f64b --- /dev/null +++ b/components/service/locator/standalone/services/protected-storage/ps_service_context.cpp @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "ps_service_context.h" + +ps_service_context::ps_service_context(const char *sn) : + standalone_service_context(sn), + m_storage_provider(), + m_mock_store() +{ + +} + +ps_service_context::~ps_service_context() +{ + +} + +void ps_service_context::do_init() +{ + struct storage_backend *storage_backend = mock_store_init(&m_mock_store); + struct rpc_interface *storage_ep = secure_storage_provider_init(&m_storage_provider, storage_backend); + + standalone_service_context::set_rpc_interface(storage_ep); +} + +void ps_service_context::do_deinit() +{ + secure_storage_provider_deinit(&m_storage_provider); + mock_store_deinit(&m_mock_store); +} |