176fd607bSopenharmony_ci/* 276fd607bSopenharmony_ci * Copyright (c) 2024 Huawei Device Co., Ltd. 376fd607bSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 476fd607bSopenharmony_ci * you may not use this file except in compliance with the License. 576fd607bSopenharmony_ci * You may obtain a copy of the License at 676fd607bSopenharmony_ci * 776fd607bSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 876fd607bSopenharmony_ci * 976fd607bSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1076fd607bSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1176fd607bSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1276fd607bSopenharmony_ci * See the License for the specific language governing permissions and 1376fd607bSopenharmony_ci * limitations under the License. 1476fd607bSopenharmony_ci */ 1576fd607bSopenharmony_ci 1676fd607bSopenharmony_ci#include "native_engine/native_engine.h" 1776fd607bSopenharmony_ci 1876fd607bSopenharmony_ci#include "napi/native_api.h" 1976fd607bSopenharmony_ci#include "napi/native_node_api.h" 2076fd607bSopenharmony_ci 2176fd607bSopenharmony_ciextern const char _binary_albumpickercomponent_abc_start[]; 2276fd607bSopenharmony_ciextern const char _binary_albumpickercomponent_abc_end[]; 2376fd607bSopenharmony_ci 2476fd607bSopenharmony_ci// Napi get abc code function 2576fd607bSopenharmony_ciextern "C" __attribute__((visibility("default"))) void NAPI_file_AlbumPickerComponent_GetABCCode(const char **buf, 2676fd607bSopenharmony_ci int *buflen) 2776fd607bSopenharmony_ci{ 2876fd607bSopenharmony_ci if (buf != nullptr) { 2976fd607bSopenharmony_ci *buf = _binary_albumpickercomponent_abc_start; 3076fd607bSopenharmony_ci } 3176fd607bSopenharmony_ci if (buflen != nullptr) { 3276fd607bSopenharmony_ci *buflen = _binary_albumpickercomponent_abc_end - _binary_albumpickercomponent_abc_start; 3376fd607bSopenharmony_ci } 3476fd607bSopenharmony_ci} 3576fd607bSopenharmony_ci 3676fd607bSopenharmony_ci/* 3776fd607bSopenharmony_ci * Module define 3876fd607bSopenharmony_ci */ 3976fd607bSopenharmony_cistatic napi_module AlbumPickerComponentModule = { 4076fd607bSopenharmony_ci .nm_version = 1, 4176fd607bSopenharmony_ci .nm_flags = 0, 4276fd607bSopenharmony_ci .nm_filename = nullptr, 4376fd607bSopenharmony_ci .nm_modname = "file.AlbumPickerComponent", 4476fd607bSopenharmony_ci .nm_priv = ((void*)0), 4576fd607bSopenharmony_ci .reserved = { 0 }, 4676fd607bSopenharmony_ci}; 4776fd607bSopenharmony_ci 4876fd607bSopenharmony_ci/* 4976fd607bSopenharmony_ci * Module registerfunction 5076fd607bSopenharmony_ci */ 5176fd607bSopenharmony_ciextern "C" __attribute__((constructor)) void AlbumPickerComponentRegisterModule(void) 5276fd607bSopenharmony_ci{ 5376fd607bSopenharmony_ci napi_module_register(&AlbumPickerComponentModule); 5476fd607bSopenharmony_ci}