Mistake on this page?
Report an issue in GitHub or email us
psa_storage_common_impl.h
1 /* Copyright (c) 2019 ARM Limited
2  *
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef __PSA_STORAGE_COMMON_IMPL_H__
19 #define __PSA_STORAGE_COMMON_IMPL_H__
20 
21 #include "psa/error.h"
22 #include "psa/storage_common.h"
23 #include "KVStore.h"
24 
25 #ifdef __cplusplus
26 extern "C"
27 {
28 #endif
29 
30 typedef struct {
31  uint32_t major;
32  uint32_t minor;
34 
35 typedef psa_status_t (*migrate_func_t)(mbed::KVStore *kvstore, const psa_storage_version_t *old_version, const psa_storage_version_t *new_version);
36 
37 void psa_storage_handle_version(mbed::KVStore *kvstore, const char *version_key, const psa_storage_version_t *version,
38  migrate_func_t migrate_func);
39 psa_status_t psa_storage_set_impl(mbed::KVStore *kvstore, int32_t pid, psa_storage_uid_t uid, size_t data_length, const void *p_data, uint32_t kv_create_flags);
40 psa_status_t psa_storage_get_impl(mbed::KVStore *kvstore, int32_t pid, psa_storage_uid_t uid, size_t data_offset, size_t data_length, void *p_data, size_t *p_data_length);
41 psa_status_t psa_storage_get_info_impl(mbed::KVStore *kvstore, int32_t pid, psa_storage_uid_t uid, struct psa_storage_info_t *p_info, uint32_t *kv_get_flags);
42 psa_status_t psa_storage_remove_impl(mbed::KVStore *kvstore, int32_t pid, psa_storage_uid_t uid);
43 psa_status_t psa_storage_reset_impl(mbed::KVStore *kvstore);
44 
45 #ifdef __cplusplus
46 }
47 #endif
48 
49 
50 #endif // __PSA_STORAGE_COMMON_IMPL_H__
uint64_t psa_storage_uid_t
A type for UIDs used for identifying data.
KVStore class.
Definition: KVStore.h:30
A container for metadata associated with a specific uid.
int32_t psa_status_t
Function return status.
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.