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 #ifndef OHOS_HDI_LIGHT_V1_0_LIGHTIFSERVICE_VDI_H 17 #define OHOS_HDI_LIGHT_V1_0_LIGHTIFSERVICE_VDI_H 18 19 #include <stdint.h> 20 #include <vector> 21 #include <hdf_base.h> 22 #include "hdf_load_vdi.h" 23 #include "ilight_type_vdi.h" 24 25 namespace OHOS { 26 namespace HDI { 27 namespace Light { 28 namespace V1_0 { 29 30 #define HDI_LIGHT_VDI_LIBNAME "libhdi_light_impl.z.so" 31 32 class ILightInterfaceVdi { 33 public: 34 virtual ~ILightInterfaceVdi() = default; 35 virtual int32_t Init() = 0; 36 virtual int32_t GetLightInfo(std::vector<HdfLightInfoVdi>& info) = 0; 37 virtual int32_t TurnOnLight(int32_t lightId, const HdfLightEffectVdi& effect) = 0; 38 virtual int32_t TurnOnMultiLights(int32_t lightId, const std::vector<HdfLightColorVdi>& colors) = 0; 39 virtual int32_t TurnOffLight(int32_t lightId) = 0; 40 }; 41 42 struct VdiWrapperLight { 43 struct HdfVdiBase base; 44 ILightInterfaceVdi *lightModule; 45 }; 46 } // namespace V1_0 47 } // namespace Light 48 } // namespace HDI 49 } // namespace OHOS 50 51 #endif // OHOS_HDI_LIGHT_V1_0_LIGHTIFSERVICE_VDI_H