1 /* 2 * Copyright (c) 2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 /* 17 * supply the fuction delaration of the audio effect model, which maybe used by the ISV/OEM. 18 */ 19 20 #ifndef EFFECT_CORE_H 21 #define EFFECT_CORE_H 22 23 #include <dlfcn.h> 24 #include <stdbool.h> 25 #include <stdlib.h> 26 #include "effect_host_common.h" 27 #include "v1_0/effect_factory.h" 28 29 /* define the struct here */ 30 struct EffectFactoryLibListNode { 31 struct EffectFactory *factLib; 32 struct DListHead list; /**< Factory library list */ 33 void *handle; 34 }; 35 36 struct ControllerManagerNode { 37 struct ControllerManager *ctrlMgr; 38 struct DListHead list; 39 }; 40 41 /* declare the function here */ 42 bool IsEffectLibExist(void); 43 int32_t RegisterEffectLibToList(void *handle, struct EffectFactory *factLib); 44 struct EffectFactory *GetEffectLibFromList(const char *effectLibName); 45 void ReleaseLibFromList(void); 46 int32_t RegisterControllerToList(struct ControllerManager *ctrlMgr); 47 struct ControllerManager *GetControllerFromList(char *effectId); 48 49 #endif 50