133eb0b6dSopenharmony_ci/* 233eb0b6dSopenharmony_ci * Copyright (c) 2021 Huawei Device Co., Ltd. 333eb0b6dSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 433eb0b6dSopenharmony_ci * you may not use this file except in compliance with the License. 533eb0b6dSopenharmony_ci * You may obtain a copy of the License at 633eb0b6dSopenharmony_ci * 733eb0b6dSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 833eb0b6dSopenharmony_ci * 933eb0b6dSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1033eb0b6dSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1133eb0b6dSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1233eb0b6dSopenharmony_ci * See the License for the specific language governing permissions and 1333eb0b6dSopenharmony_ci * limitations under the License. 1433eb0b6dSopenharmony_ci */ 1533eb0b6dSopenharmony_ci#include "js_napi_common.h" 1633eb0b6dSopenharmony_ci#include "napi/native_api.h" 1733eb0b6dSopenharmony_ci#include "utils/log.h" 1833eb0b6dSopenharmony_ci 1933eb0b6dSopenharmony_cinamespace ACE { 2033eb0b6dSopenharmony_cinamespace NAPI { 2133eb0b6dSopenharmony_cinamespace SYSTEM_TEST_NAPI { 2233eb0b6dSopenharmony_ciEXTERN_C_START 2333eb0b6dSopenharmony_ci/* 2433eb0b6dSopenharmony_ci * The module initialization. 2533eb0b6dSopenharmony_ci */ 2633eb0b6dSopenharmony_cistatic napi_value ModuleInit(napi_env env, napi_value exports) 2733eb0b6dSopenharmony_ci{ 2833eb0b6dSopenharmony_ci HILOG_INFO("%{public}s,called", __func__); 2933eb0b6dSopenharmony_ci BigIntInit(env, exports); 3033eb0b6dSopenharmony_ci BufferInit(env, exports); 3133eb0b6dSopenharmony_ci ThreadSafeInit(env, exports); 3233eb0b6dSopenharmony_ci JsDateInit(env, exports); 3333eb0b6dSopenharmony_ci CallBackScopeInit(env, exports); 3433eb0b6dSopenharmony_ci JsStringInit(env, exports); 3533eb0b6dSopenharmony_ci ObjectInit(env, exports); 3633eb0b6dSopenharmony_ci ArrayDetachInit(env, exports); 3733eb0b6dSopenharmony_ci return exports; 3833eb0b6dSopenharmony_ci} 3933eb0b6dSopenharmony_ciEXTERN_C_END 4033eb0b6dSopenharmony_ci 4133eb0b6dSopenharmony_ci/* 4233eb0b6dSopenharmony_ci * The module definition. 4333eb0b6dSopenharmony_ci */ 4433eb0b6dSopenharmony_cistatic napi_module NapiSystemtestModule = { 4533eb0b6dSopenharmony_ci .nm_version = 1, 4633eb0b6dSopenharmony_ci .nm_flags = 0, 4733eb0b6dSopenharmony_ci .nm_filename = nullptr, 4833eb0b6dSopenharmony_ci .nm_register_func = ModuleInit, 4933eb0b6dSopenharmony_ci .nm_modname = "systemtestnapi", 5033eb0b6dSopenharmony_ci .nm_priv = ((void*)0), 5133eb0b6dSopenharmony_ci .reserved = { 0 } 5233eb0b6dSopenharmony_ci}; 5333eb0b6dSopenharmony_ci 5433eb0b6dSopenharmony_ci/* 5533eb0b6dSopenharmony_ci * The module registration. 5633eb0b6dSopenharmony_ci */ 5733eb0b6dSopenharmony_ciextern "C" __attribute__((constructor)) void RegisterModule(void) 5833eb0b6dSopenharmony_ci{ 5933eb0b6dSopenharmony_ci HILOG_INFO("%{public}s,called", __func__); 6033eb0b6dSopenharmony_ci napi_module_register(&NapiSystemtestModule); 6133eb0b6dSopenharmony_ci} 6233eb0b6dSopenharmony_ci} // namespace SYSTEM_TEST_NAPI 6333eb0b6dSopenharmony_ci} // namespace NAPI 6433eb0b6dSopenharmony_ci} // namespace ACE