1 /* 2 * Copyright (C) 2022 Huawei Technologies Co., Ltd. 3 * Licensed under the Mulan PSL v2. 4 * You can use this software according to the terms and conditions of the Mulan PSL v2. 5 * You may obtain a copy of Mulan PSL v2 at: 6 * http://license.coscl.org.cn/MulanPSL2 7 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR 8 * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR 9 * PURPOSE. 10 * See the Mulan PSL v2 for more details. 11 */ 12 #ifndef TEE_OBJ_H 13 #define TEE_OBJ_H 14 15 #include <pthread.h> 16 17 #include "tee_defines.h" 18 19 TEE_Result tee_obj_setname(TEE_ObjectHandle object, const uint8_t *name, uint32_t len); 20 TEE_Result tee_obj_new(TEE_ObjectHandle *object); 21 TEE_Result tee_obj_free(TEE_ObjectHandle *object); 22 TEE_Result tee_obj_init(void); 23 void tee_memory_dump(const uint8_t *data, uint32_t count); 24 void dump_object(void); 25 TEE_Result check_object(const TEE_ObjectHandle object); 26 TEE_Result add_object(TEE_ObjectHandle object); 27 TEE_Result delete_object(const TEE_ObjectHandle object); 28 TEE_Result check_permission(const char *object_id, size_t object_id_len, uint32_t flags); 29 int mutex_lock_ops(pthread_mutex_t *mutex); 30 TEE_Result check_enum_object_in_list(const TEE_ObjectEnumHandle object); 31 TEE_Result add_enum_object_in_list(const TEE_ObjectEnumHandle object); 32 void delete_enum_object_in_list(const TEE_ObjectEnumHandle object); 33 #endif 34