14a616216Sopenharmony_ci/* 24a616216Sopenharmony_ci * Copyright (C) 2022 Huawei Device Co., Ltd. 34a616216Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 44a616216Sopenharmony_ci * you may not use this file except in compliance with the License. 54a616216Sopenharmony_ci * You may obtain a copy of the License at 64a616216Sopenharmony_ci * 74a616216Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 84a616216Sopenharmony_ci * 94a616216Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 104a616216Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 114a616216Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 124a616216Sopenharmony_ci * See the License for the specific language governing permissions and 134a616216Sopenharmony_ci * limitations under the License. 144a616216Sopenharmony_ci */ 154a616216Sopenharmony_ci 164a616216Sopenharmony_ci#ifndef DEV_SLINFO_LIST_TEST_H 174a616216Sopenharmony_ci#define DEV_SLINFO_LIST_TEST_H 184a616216Sopenharmony_ci 194a616216Sopenharmony_ci#include <cstdlib> 204a616216Sopenharmony_ci#include "dev_slinfo_mgr.h" 214a616216Sopenharmony_ci 224a616216Sopenharmony_ci#ifdef __cplusplus 234a616216Sopenharmony_ciextern "C" { 244a616216Sopenharmony_ci#endif 254a616216Sopenharmony_ci 264a616216Sopenharmony_cistruct DATASLCallbackParams { 274a616216Sopenharmony_ci DEVSLQueryParams queryParams; 284a616216Sopenharmony_ci HigestSecInfoCallback *callback; 294a616216Sopenharmony_ci}; 304a616216Sopenharmony_ci 314a616216Sopenharmony_cistruct DATASLListParams { 324a616216Sopenharmony_ci struct DATASLCallbackParams *callbackParams; 334a616216Sopenharmony_ci struct DATASLListParams *prev; 344a616216Sopenharmony_ci struct DATASLListParams *next; 354a616216Sopenharmony_ci}; 364a616216Sopenharmony_ci 374a616216Sopenharmony_ci 384a616216Sopenharmony_ciint32_t PushListNode(struct DATASLListParams *list, struct DATASLCallbackParams *callbackParams); 394a616216Sopenharmony_ci 404a616216Sopenharmony_civoid RemoveListNode(struct DATASLListParams *list, struct DATASLCallbackParams *callbackParams); 414a616216Sopenharmony_ci 424a616216Sopenharmony_civoid ClearList(struct DATASLListParams *list); 434a616216Sopenharmony_ci 444a616216Sopenharmony_ciint32_t GetListLength(struct DATASLListParams *list); 454a616216Sopenharmony_ci 464a616216Sopenharmony_ciint32_t InitPthreadMutex(void); 474a616216Sopenharmony_ci 484a616216Sopenharmony_civoid DestroyPthreadMutex(void); 494a616216Sopenharmony_ci 504a616216Sopenharmony_civoid LookupCallback(struct DATASLListParams *list, DEVSLQueryParams *queryParams, int32_t result, uint32_t levelInfo); 514a616216Sopenharmony_ci 524a616216Sopenharmony_cistruct DATASLListParams* InitList(void); 534a616216Sopenharmony_ci 544a616216Sopenharmony_ci#ifdef __cplusplus 554a616216Sopenharmony_ci} 564a616216Sopenharmony_ci#endif 574a616216Sopenharmony_ci#endif